|
|
@@ -23,12 +23,10 @@ const LockTabList = props => {
|
|
|
|
|
|
const [addLonglelog, setAddLonglelog] = useState({
|
|
|
type: '',
|
|
|
- visible: false,
|
|
|
- loading: false
|
|
|
+ visible: false
|
|
|
})
|
|
|
|
|
|
const handleAddLonglelog = async values => {
|
|
|
- setAddLonglelog({ ...addLonglelog, loading: true })
|
|
|
const { code = -1 } = await apiSoftwareAddLonglelog({
|
|
|
...values,
|
|
|
longleId
|
|
|
@@ -36,7 +34,7 @@ const LockTabList = props => {
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
message.success('新增成功')
|
|
|
// 请求完了
|
|
|
- setAddLonglelog({ ...addLonglelog, loading: false, visible: false })
|
|
|
+ setAddLonglelog({ ...addLonglelog, visible: false })
|
|
|
// 刷新数据
|
|
|
dispatch({
|
|
|
type: 'refresh/commitAction',
|
|
|
@@ -65,8 +63,7 @@ const LockTabList = props => {
|
|
|
{`${newLongleService[0]} ->`}
|
|
|
<span
|
|
|
className="textPurple text-hex-967bbd cursor-pointer"
|
|
|
- onClick={() => showLongleClick(longleService.newLongleId)}
|
|
|
- >
|
|
|
+ onClick={() => showLongleClick(longleService.newLongleId)}>
|
|
|
{newLongleService[1]}
|
|
|
</span>
|
|
|
</>
|
|
|
@@ -77,9 +74,7 @@ const LockTabList = props => {
|
|
|
const renderLongleCon = longleService => {
|
|
|
return (
|
|
|
<>
|
|
|
- {showProductsStatus.includes(longleService.status) && (
|
|
|
- <ProductLabel data={longleService.product} />
|
|
|
- )}
|
|
|
+ {showProductsStatus.includes(longleService.status) && <ProductLabel data={longleService.product} />}
|
|
|
{showNewLongleStatus.includes(longleService.status) && renderNewLog(longleService)}
|
|
|
{showMarkStatus.includes(longleService.status) ? <span>{longleService.mark}</span> : null}
|
|
|
</>
|
|
|
@@ -129,17 +124,12 @@ const LockTabList = props => {
|
|
|
{servicelogEnum[item.status]}{' '}
|
|
|
<span
|
|
|
className="textPurple text-hex-967bbd cursor-pointer"
|
|
|
- onClick={() =>
|
|
|
- dispatchModal('D_CLIENT_DETAIL', { dataId: item.clientId })
|
|
|
- }
|
|
|
- >
|
|
|
+ onClick={() => dispatchModal('D_CLIENT_DETAIL', { dataId: item.clientId })}>
|
|
|
{item.status !== 6 ? <>{item.client}</> : null}
|
|
|
</span>
|
|
|
<br />
|
|
|
<a>@{item.operator}</a>{' '}
|
|
|
- <span className="text-gray-500">
|
|
|
- {dayjsFormat(item.dateline, 'YYYY-MM-DD')}
|
|
|
- </span>
|
|
|
+ <span className="text-gray-500">{dayjsFormat(item.dateline, 'YYYY-MM-DD')}</span>
|
|
|
{/* <List.Item.Meta
|
|
|
description={ dayjsFormat(item.updatetime, 'MM-DD HH:mm')}
|
|
|
/> */}
|
|
|
@@ -148,16 +138,12 @@ const LockTabList = props => {
|
|
|
{renderLongleCon(item)}
|
|
|
{/* <RenderLongleCon longleService={item} /> */}
|
|
|
{hasAddPerm &&
|
|
|
- (item.status === 3 ||
|
|
|
- item.status === 4 ||
|
|
|
- item.status === 5 ||
|
|
|
- item.status === 9) ? (
|
|
|
+ (item.status === 3 || item.status === 4 || item.status === 5 || item.status === 9) ? (
|
|
|
<Popconfirm
|
|
|
title="确认删除"
|
|
|
onConfirm={() => delLonglelog(item.id)}
|
|
|
okText="确认"
|
|
|
- cancelText="取消"
|
|
|
- >
|
|
|
+ cancelText="取消">
|
|
|
<Button className="mt-2" type="primary" ghost size="small" danger>
|
|
|
删除
|
|
|
</Button>
|
|
|
@@ -179,8 +165,7 @@ const LockTabList = props => {
|
|
|
ghost
|
|
|
size="small"
|
|
|
className="mr-3px"
|
|
|
- onClick={() => openLockModal(lockTypeEnum.RECEIVE)}
|
|
|
- >
|
|
|
+ onClick={() => openLockModal(lockTypeEnum.RECEIVE)}>
|
|
|
接收
|
|
|
</Button>
|
|
|
) : null}
|
|
|
@@ -190,8 +175,7 @@ const LockTabList = props => {
|
|
|
ghost
|
|
|
size="small"
|
|
|
className="mr-3px"
|
|
|
- onClick={() => openLockModal(lockTypeEnum.SALE)}
|
|
|
- >
|
|
|
+ onClick={() => openLockModal(lockTypeEnum.SALE)}>
|
|
|
借销赠
|
|
|
</Button>
|
|
|
) : null}
|
|
|
@@ -212,8 +196,7 @@ const LockTabList = props => {
|
|
|
ghost
|
|
|
size="small"
|
|
|
className="mr-1"
|
|
|
- onClick={() => openLockModal(lockTypeEnum.CHANGE)}
|
|
|
- >
|
|
|
+ onClick={() => openLockModal(lockTypeEnum.CHANGE)}>
|
|
|
更换
|
|
|
</Button>
|
|
|
) : null}
|
|
|
@@ -223,17 +206,11 @@ const LockTabList = props => {
|
|
|
ghost
|
|
|
size="small"
|
|
|
className="mr-1"
|
|
|
- onClick={() => openLockModal(lockTypeEnum.RECOVER)}
|
|
|
- >
|
|
|
+ onClick={() => openLockModal(lockTypeEnum.RECOVER)}>
|
|
|
收回
|
|
|
</Button>
|
|
|
) : null}
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- ghost
|
|
|
- size="small"
|
|
|
- onClick={() => openLockModal(lockTypeEnum.REMARK)}
|
|
|
- >
|
|
|
+ <Button type="primary" ghost size="small" onClick={() => openLockModal(lockTypeEnum.REMARK)}>
|
|
|
备注
|
|
|
</Button>
|
|
|
</div>
|