|
@@ -112,7 +112,10 @@ const LockModal = props => {
|
|
|
}, [visible, type])
|
|
}, [visible, type])
|
|
|
|
|
|
|
|
const handleonOk = () => {
|
|
const handleonOk = () => {
|
|
|
- form.validateFields().then(values => {
|
|
|
|
|
|
|
+ if (type === lockTypeEnum.RECEIVE) {
|
|
|
|
|
+ receiveLongle(longleId)
|
|
|
|
|
+ }
|
|
|
|
|
+ return form.validateFields().then(values => {
|
|
|
onConfirm({ ...values, status: type })
|
|
onConfirm({ ...values, status: type })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -156,9 +159,7 @@ const LockModal = props => {
|
|
|
|
|
|
|
|
// 接收新软件锁
|
|
// 接收新软件锁
|
|
|
const receiveLongle = async id => {
|
|
const receiveLongle = async id => {
|
|
|
- const { code = -1 } = await apiReceiveLock({
|
|
|
|
|
- longleId: id
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const { code = -1 } = await apiReceiveLock({ id })
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
onCancel()
|
|
onCancel()
|
|
|
}
|
|
}
|