gaoluyang
5 天以前 0c9aa3e1d5cfbf2245f9e7462e1d27cc8c7827d1
src/views/crm/customer/detail/index.vue
@@ -15,7 +15,6 @@
  lockCustomer,
  putCustomerPool,
  receiveCustomer,
  updateCustomerDealStatus,
} from '#/api/crm/customer';
import { getOperateLogPage } from '#/api/crm/operateLog';
import { BizTypeEnum } from '#/api/crm/permission';
@@ -148,23 +147,6 @@
//   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);
@@ -199,12 +181,6 @@
            type: 'primary',
            ifShow: permissionListRef?.validateOwnerUser,
            onClick: handleTransfer,
          },
          {
            label: '更改成交状态',
            type: 'default',
            ifShow: permissionListRef?.validateWrite,
            onClick: handleUpdateDealStatus,
          },
          {
            label: '锁定',