| | |
| | | lockCustomer, |
| | | putCustomerPool, |
| | | receiveCustomer, |
| | | updateCustomerDealStatus, |
| | | } from '#/api/crm/customer'; |
| | | import { getOperateLogPage } from '#/api/crm/operateLog'; |
| | | import { BizTypeEnum } from '#/api/crm/permission'; |
| | |
| | | // return true; |
| | | // } |
| | | |
| | | /** 更新成交状态操作 */ |
| | | async function handleUpdateDealStatus(): Promise<boolean | undefined> { |
| | | const dealStatus = !customer.value.dealStatus; |
| | | try { |
| | | await confirm( |
| | | `确定更新成交状态为【${dealStatus ? '已成交' : '未成交'}】吗?`, |
| | | ); |
| | | } catch { |
| | | return false; |
| | | } |
| | | // 更新成交状态 |
| | | await updateCustomerDealStatus(customerId.value, dealStatus); |
| | | // 提示并返回成功 |
| | | message.success('更新成交状态成功'); |
| | | return true; |
| | | } |
| | | |
| | | /** 加载数据 */ |
| | | onMounted(() => { |
| | | customerId.value = Number(route.params.id); |
| | |
| | | type: 'primary', |
| | | ifShow: permissionListRef?.validateOwnerUser, |
| | | onClick: handleTransfer, |
| | | }, |
| | | { |
| | | label: '更改成交状态', |
| | | type: 'default', |
| | | ifShow: permissionListRef?.validateWrite, |
| | | onClick: handleUpdateDealStatus, |
| | | }, |
| | | { |
| | | label: '锁定', |