|
@@ -6,7 +6,7 @@ import { queryClient } from '@/services/customer'
|
|
|
import { queryLock } from '@/services/product'
|
|
import { queryLock } from '@/services/product'
|
|
|
import consts from '@/basic/consts'
|
|
import consts from '@/basic/consts'
|
|
|
import { useDebounceFn } from 'ahooks'
|
|
import { useDebounceFn } from 'ahooks'
|
|
|
-import { apiSoftwareAddLonglelog } from '@/services/product'
|
|
|
|
|
|
|
+import { apiSoftwareAddLonglelog, apiReceiveLock } from '@/services/product'
|
|
|
import { useDispatch, connect } from 'umi'
|
|
import { useDispatch, connect } from 'umi'
|
|
|
// import { createUid } from '@/utils/utils'
|
|
// import { createUid } from '@/utils/utils'
|
|
|
// import DragIniter from '@/components/Modal/src/components/DragIniter'
|
|
// import DragIniter from '@/components/Modal/src/components/DragIniter'
|
|
@@ -149,8 +149,18 @@ const LockModal = props => {
|
|
|
}, [visible, type])
|
|
}, [visible, type])
|
|
|
|
|
|
|
|
const handleonOk = () => {
|
|
const handleonOk = () => {
|
|
|
- form.validateFields().then(values => {
|
|
|
|
|
- onConfirm({ ...values, preserveStatus: type })
|
|
|
|
|
|
|
+ form.validateFields().then(async values => {
|
|
|
|
|
+ if (type === lockTypeEnum.RECEIVE) {
|
|
|
|
|
+ const { code = -1 } = await apiReceiveLock({
|
|
|
|
|
+ longleId
|
|
|
|
|
+ })
|
|
|
|
|
+ if (code === consts.RET_CODE.SUCCESS) {
|
|
|
|
|
+ message.success('接收成功')
|
|
|
|
|
+ onCancel()
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ onConfirm({ ...values, preserveStatus: type })
|
|
|
|
|
+ }
|
|
|
dispatch({
|
|
dispatch({
|
|
|
type: 'refresh/commitAction',
|
|
type: 'refresh/commitAction',
|
|
|
payload: 'longle'
|
|
payload: 'longle'
|
|
@@ -257,8 +267,7 @@ const LockModal = props => {
|
|
|
</Button>
|
|
</Button>
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
- }
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ }>
|
|
|
{type === lockTypeEnum.SALE ? (
|
|
{type === lockTypeEnum.SALE ? (
|
|
|
<div className="text-center mb-6">
|
|
<div className="text-center mb-6">
|
|
|
<Radio.Group value={state.sellStatus} buttonStyle="solid" onChange={checkGroupOnChange}>
|
|
<Radio.Group value={state.sellStatus} buttonStyle="solid" onChange={checkGroupOnChange}>
|
|
@@ -273,8 +282,7 @@ const LockModal = props => {
|
|
|
className={styles.modalContainer}
|
|
className={styles.modalContainer}
|
|
|
ref={scrollRef}
|
|
ref={scrollRef}
|
|
|
onScroll={handleListScroll}
|
|
onScroll={handleListScroll}
|
|
|
- style={{ paddingBottom: 0 }}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ style={{ paddingBottom: 0 }}>
|
|
|
<div className={styles.modalContent}>
|
|
<div className={styles.modalContent}>
|
|
|
<Spin spinning={state.loading}>
|
|
<Spin spinning={state.loading}>
|
|
|
{type === lockTypeEnum.SALE &&
|
|
{type === lockTypeEnum.SALE &&
|
|
@@ -289,8 +297,7 @@ const LockModal = props => {
|
|
|
title="确认选择ta"
|
|
title="确认选择ta"
|
|
|
onConfirm={() => connectClient(item.id)}
|
|
onConfirm={() => connectClient(item.id)}
|
|
|
okText="确认"
|
|
okText="确认"
|
|
|
- cancelText="取消"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ cancelText="取消">
|
|
|
<Button type="primary" size="small">
|
|
<Button type="primary" size="small">
|
|
|
选择ta
|
|
选择ta
|
|
|
</Button>
|
|
</Button>
|
|
@@ -308,8 +315,7 @@ const LockModal = props => {
|
|
|
title="确认选择ta"
|
|
title="确认选择ta"
|
|
|
onConfirm={() => connectLongle(item.id)}
|
|
onConfirm={() => connectLongle(item.id)}
|
|
|
okText="确认"
|
|
okText="确认"
|
|
|
- cancelText="取消"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ cancelText="取消">
|
|
|
<Button type="primary" size="small">
|
|
<Button type="primary" size="small">
|
|
|
更换
|
|
更换
|
|
|
</Button>
|
|
</Button>
|
|
@@ -343,8 +349,7 @@ const LockModal = props => {
|
|
|
return Promise.resolve(value)
|
|
return Promise.resolve(value)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- ]}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ]}>
|
|
|
<Select
|
|
<Select
|
|
|
placeholder="请选择产品"
|
|
placeholder="请选择产品"
|
|
|
onDropdownVisibleChange={async e => {
|
|
onDropdownVisibleChange={async e => {
|