|
@@ -1,4 +1,4 @@
|
|
|
-import { Button, Input, message, Modal } from 'antd'
|
|
|
|
|
|
|
+import { Button, Input, message, Modal, Popconfirm } from 'antd'
|
|
|
import React, { useState, useRef } from 'react'
|
|
import React, { useState, useRef } from 'react'
|
|
|
import styles from '@/pages/Customer/Company/components/ConnectCompany/index.less'
|
|
import styles from '@/pages/Customer/Company/components/ConnectCompany/index.less'
|
|
|
import consts from '@/basic/consts'
|
|
import consts from '@/basic/consts'
|
|
@@ -39,9 +39,14 @@ const ReceiveLock = ({ refresh, ...resetModalProps }) => {
|
|
|
dataIndex: 'opreate',
|
|
dataIndex: 'opreate',
|
|
|
title: '操作',
|
|
title: '操作',
|
|
|
render: (_, record) => (
|
|
render: (_, record) => (
|
|
|
- <Button size="small" onClick={() => receiveLongle(record.keyNum, record.id)}>
|
|
|
|
|
- 接收
|
|
|
|
|
- </Button>
|
|
|
|
|
|
|
+ <Popconfirm
|
|
|
|
|
+ title="确定接收该锁吗?"
|
|
|
|
|
+ cancelText="取消"
|
|
|
|
|
+ okText="确定"
|
|
|
|
|
+ onConfirm={() => receiveLongle(record.keyNum, record.id)}
|
|
|
|
|
+ >
|
|
|
|
|
+ <Button size="small">接收</Button>
|
|
|
|
|
+ </Popconfirm>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
@@ -51,9 +56,10 @@ const ReceiveLock = ({ refresh, ...resetModalProps }) => {
|
|
|
}
|
|
}
|
|
|
return (
|
|
return (
|
|
|
<Modal
|
|
<Modal
|
|
|
- width="50vw"
|
|
|
|
|
{...resetModalProps}
|
|
{...resetModalProps}
|
|
|
|
|
+ width="50vw"
|
|
|
bodyStyle={{ padding: '24px 24px 0' }}
|
|
bodyStyle={{ padding: '24px 24px 0' }}
|
|
|
|
|
+ footer={false}
|
|
|
getContainer={() => document.getElementById('root')}
|
|
getContainer={() => document.getElementById('root')}
|
|
|
title={
|
|
title={
|
|
|
<div className="flex items-center justify-between">
|
|
<div className="flex items-center justify-between">
|
|
@@ -70,7 +76,8 @@ const ReceiveLock = ({ refresh, ...resetModalProps }) => {
|
|
|
onSearch={handleOnSearch}
|
|
onSearch={handleOnSearch}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- }>
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ >
|
|
|
<div className={styles.modalContent}>
|
|
<div className={styles.modalContent}>
|
|
|
<ProTable
|
|
<ProTable
|
|
|
rowKey={record => record.id}
|
|
rowKey={record => record.id}
|
|
@@ -82,7 +89,9 @@ const ReceiveLock = ({ refresh, ...resetModalProps }) => {
|
|
|
bordered={true}
|
|
bordered={true}
|
|
|
scroll={{ y: 460 }}
|
|
scroll={{ y: 460 }}
|
|
|
request={async params => {
|
|
request={async params => {
|
|
|
- const { data: { longle, total } = { longle: [], total: 0 }, code = -1 } = await queryOldLockList(params)
|
|
|
|
|
|
|
+ const { data: { longle, total } = { longle: [], total: 0 }, code = -1 } = await queryOldLockList(
|
|
|
|
|
+ params
|
|
|
|
|
+ )
|
|
|
return {
|
|
return {
|
|
|
data: longle,
|
|
data: longle,
|
|
|
success: code === consts.RET_CODE.SUCCESS,
|
|
success: code === consts.RET_CODE.SUCCESS,
|