gaoluyang
3 天以前 cd8b52bdf89a4d1101f72e0ece9f4df22a3d3f7a
src/views/crm/customer/data.ts
@@ -3,10 +3,10 @@
import { markRaw } from 'vue';
import { z } from '..\..\..\packages\effects\common-ui\src';
import { DICT_TYPE } from '..\..\..\packages\constants\src';
import { getDictOptions } from '..\..\..\packages\effects\hooks\src';
import { useUserStore } from '..\..\..\packages\stores\src';
import { z } from '@vben/common-ui';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { useUserStore } from '@vben/stores';
import { getSimpleUserList } from '#/api/system/user';
import { AreaCascader } from '#/components/area';
@@ -153,11 +153,22 @@
      component: 'DatePicker',
      componentProps: {
        showTime: true,
        format: 'YYYY-MM-DD HH:mm:ss',
        valueFormat: 'x',
        format: 'YYYY-MM-DD',
        valueFormat: 'YYYY-MM-DD HH:mm:ss',
        placeholder: '请选择下次联系时间',
        allowClear: true,
      },
    },
    {
      fieldName: 'autoPoolEnabled',
      label: '是否流入公海',
      component: 'Switch',
      defaultValue: true,
      componentProps: {
        checkedChildren: '是',
        unCheckedChildren: '否',
      },
      help: '关闭后不自动流入公海,并取消普通用户的公海可见度;保留负责人和团队权限,超级管理员仍可查看。',
    },
    {
      fieldName: 'remark',
@@ -202,11 +213,25 @@
      },
    },
    {
      fieldName: 'autoPoolEnabled',
      label: '是否流入公海',
      component: 'Select',
      componentProps: {
        options: [
          { label: '是', value: true },
          { label: '否', value: false },
        ],
        placeholder: '请选择',
        allowClear: true,
      },
    },
    {
      fieldName: 'createTime',
      label: '创建时间',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        format: 'YYYY-MM-DD',
        placeholder: ['开始日期', '结束日期'],
        allowClear: true,
      },
@@ -240,7 +265,7 @@
      label: '客户数据',
      component: 'Upload',
      rules: 'required',
      help: '仅允许导入 xls、xlsx 格式文件',
      help: '仅允许导入 xls、xlsx 格式文件。“是否流入公海”列填写是/否;留空时新增默认是,覆盖保留原值。关闭后取消公海可见度。',
    },
    {
      fieldName: 'updateSupport',
@@ -276,21 +301,6 @@
      },
    },
    {
      field: 'mobile',
      title: '手机',
      minWidth: 120,
    },
    {
      field: 'telephone',
      title: '电话',
      minWidth: 130,
    },
    {
      field: 'email',
      title: '邮箱',
      minWidth: 180,
    },
    {
      field: 'level',
      title: '客户级别',
      minWidth: 135,
@@ -311,7 +321,7 @@
    {
      field: 'contactNextTime',
      title: '下次联系时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -329,18 +339,24 @@
      },
    },
    {
      field: 'dealStatus',
      title: '成交状态',
      minWidth: 120,
      field: 'autoPoolEnabled',
      title: '是否流入公海',
      minWidth: 140,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING },
      },
    },
    {
      field: 'contractCount',
      title: '签订合同',
      minWidth: 170,
      slots: { default: 'contracts' },
    },
    {
      field: 'contactLastTime',
      title: '最后跟进时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -352,13 +368,6 @@
      field: 'detailAddress',
      title: '地址',
      minWidth: 180,
    },
    {
      field: 'poolDay',
      title: '距离进入公海天数',
      minWidth: 140,
      formatter: ({ cellValue }) =>
        cellValue === null ? '-' : `${cellValue} 天`,
    },
    {
      field: 'ownerUserName',
@@ -373,13 +382,13 @@
    {
      field: 'updateTime',
      title: '更新时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {