|
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react'
|
|
|
import { Modal, Form, Select, Input, Spin, Button, Radio, Popconfirm, message } from 'antd'
|
|
import { Modal, Form, Select, Input, Spin, Button, Radio, Popconfirm, message } from 'antd'
|
|
|
import { SearchOutlined } from '@ant-design/icons'
|
|
import { SearchOutlined } from '@ant-design/icons'
|
|
|
import { queryClient } from '@/services/customer'
|
|
import { queryClient } from '@/services/customer'
|
|
|
-import { queryLock } from '@/services/product'
|
|
|
|
|
|
|
+import { apiUpdateLonglelog, queryLock } from '@/services/product'
|
|
|
import consts from '@/basic/consts'
|
|
import consts from '@/basic/consts'
|
|
|
import { useDebounceFn } from 'ahooks'
|
|
import { useDebounceFn } from 'ahooks'
|
|
|
import { apiSoftwareAddLonglelog, apiReceiveLock } from '@/services/product'
|
|
import { apiSoftwareAddLonglelog, apiReceiveLock } from '@/services/product'
|
|
@@ -30,7 +30,9 @@ const placeholderEnum = {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const OpreateLock = props => {
|
|
const OpreateLock = props => {
|
|
|
- const { onConfirm, onCancel, type, longleId, keyNum, prodList, upgradeProduct, ...resetModalProps } = props
|
|
|
|
|
|
|
+ const { onConfirm, onCancel, type, longleId, id, keyNum, prodList, upgradeProduct, ...resetModalProps } =
|
|
|
|
|
+ props
|
|
|
|
|
+ console.log(id)
|
|
|
const [form] = Form.useForm()
|
|
const [form] = Form.useForm()
|
|
|
const dispatch = useDispatch()
|
|
const dispatch = useDispatch()
|
|
|
const scrollRef = useRef()
|
|
const scrollRef = useRef()
|
|
@@ -155,6 +157,20 @@ const OpreateLock = props => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === lockTypeEnum.REMARK) {
|
|
|
|
|
+ const { code = -1 } = await apiUpdateLonglelog({ id })
|
|
|
|
|
+ if (code === consts.RET_CODE.SUCCESS) {
|
|
|
|
|
+ message.success('修改成功')
|
|
|
|
|
+ onCancel()
|
|
|
|
|
+ dispatch({
|
|
|
|
|
+ type: 'refresh/commitAction',
|
|
|
|
|
+ payload: {
|
|
|
|
|
+ main: 'software',
|
|
|
|
|
+ target: longleId
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
const isSuccess = await onConfirm({ ...values, preserveStatus: type })
|
|
const isSuccess = await onConfirm({ ...values, preserveStatus: type })
|
|
|
isSuccess && onCancel()
|
|
isSuccess && onCancel()
|