云
20 小时以前 48e9b7d100ddd91a13e79e09bb5d992a62ffd026
fix(crm): 统一日期格式化并添加客户公海配置选项

- 将所有日期格式从 formatDateTime 替换为 formatDate 以保持一致性
- 在客户相关模块中添加 autoPoolEnabled 字段用于控制公海流入设置
- 更新 DatePicker 组件的时间显示格式为 YYYY-MM-DD
- 为操作日志组件添加日期格式化参数支持
- 在发票和回款详情页面应用新的日期格式化函数
已修改43个文件
269 ■■■■■ 文件已修改
src/api/crm/customer/index.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/operate-log/operate-log.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/operate-log/typing.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/business/data.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/business/detail/data.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/business/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/business/status/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/clue/data.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/clue/detail/data.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/clue/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/contact/data.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/contact/detail/data.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/contact/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/contract/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/customer/data.ts 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/customer/detail/data.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/customer/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/customer/limitConfig/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/customer/pool/data.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/followup/data.ts 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/invoice/data.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/invoice/detail/approve/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/invoice/detail/data.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/invoice/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/permission/modules/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/product/category/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/product/data.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/product/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/components/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/data.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/detail/approve/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/detail/data.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/plan/components/data.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/plan/data.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/plan/detail/data.ts 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/receivable/plan/detail/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/saleQuotation/modules/ocr-upload.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/salesTarget/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/statistics/customer/data.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/statistics/funnel/data.ts 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/statistics/portrait/data.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/crm/statistics/rank/data.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/crm/customer/index.ts
@@ -19,6 +19,7 @@
    ownerUserDeptName?: string; // 负责人的部门名称
    lockStatus?: boolean;
    dealStatus?: boolean;
    autoPoolEnabled?: boolean; // 是否流入公海,关闭时取消公海可见度
    mobile: string; // 手机号
    telephone: string; // 电话
    qq: string; // QQ
src/components/operate-log/operate-log.vue
@@ -3,7 +3,7 @@
import { DICT_TYPE } from '@vben/constants';
import { getDictLabel, getDictObj } from '@vben/hooks';
import { formatDateTime } from '@vben/utils';
import { formatDate } from '@vben/utils';
import { Tag, Timeline } from 'ant-design-vue';
@@ -11,6 +11,7 @@
withDefaults(defineProps<OperateLogProps>(), {
  logList: () => [],
  dateFormat: 'YYYY-MM-DD HH:mm:ss',
});
/** 获得 userType 颜色 */
@@ -48,7 +49,7 @@
        </template>
        <div class="ml-2 flex flex-wrap items-center gap-2 leading-[22px]">
          <span class="w-[140px] shrink-0 text-[13px] text-gray-400">
            {{ formatDateTime(log.createTime) }}
            {{ formatDate(log.createTime, dateFormat) }}
          </span>
          <Tag color="success" class="!mr-0">{{ log.userName }}</Tag>
          <span>{{ log.action }}</span>
src/components/operate-log/typing.ts
@@ -1,5 +1,7 @@
import type { SystemOperateLogApi } from '#/api/system/operate-log';
export interface OperateLogProps {
  /** 仅控制日期展示,不改变日志原始时间。 */
  dateFormat?: string;
  logList: SystemOperateLogApi.OperateLog[]; // 操作日志列表
}
src/views/crm/business/data.ts
@@ -97,7 +97,7 @@
      component: 'DatePicker',
      componentProps: {
        showTime: false,
        format: 'YYYY-MM-DD HH:mm:ss',
        format: 'YYYY-MM-DD',
        valueFormat: 'YYYY-MM-DD HH:mm:ss',
        placeholder: '请选择预计成交日期',
      },
@@ -218,7 +218,7 @@
    {
      field: 'contactNextTime',
      title: '下次联系时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      width: 180,
    },
    {
@@ -234,19 +234,19 @@
    {
      field: 'contactLastTime',
      title: '最后跟进时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      width: 180,
    },
    {
      field: 'updateTime',
      title: '更新时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      width: 180,
    },
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      width: 180,
    },
    {
src/views/crm/business/detail/data.ts
@@ -4,7 +4,7 @@
import type { CrmBusinessApi } from '#/api/crm/business';
import type { DescriptionItemSchema } from '#/components/description';
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
import { erpPriceInputFormatter, formatDate } from '@vben/utils';
import {
  getBusinessStatusSimpleList,
@@ -33,7 +33,7 @@
    {
      field: 'createTime',
      label: '创建时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
@@ -57,12 +57,12 @@
    {
      field: 'dealTime',
      label: '预计成交日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'contactNextTime',
      label: '下次联系时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'statusTypeName',
src/views/crm/business/detail/index.vue
@@ -168,7 +168,7 @@
          />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="6" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="团队成员" key="7" :force-render="true">
          <PermissionList
src/views/crm/business/status/data.ts
@@ -70,7 +70,7 @@
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/crm/clue/data.ts
@@ -143,7 +143,7 @@
      component: 'DatePicker',
      componentProps: {
        showTime: true,
        format: 'YYYY-MM-DD HH:mm:ss',
        format: 'YYYY-MM-DD',
        valueFormat: 'YYYY-MM-DD HH:mm:ss',
        placeholder: '请选择下次联系时间',
      },
@@ -209,6 +209,7 @@
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        format: 'YYYY-MM-DD',
        allowClear: true,
        placeholder: ['开始日期', '结束日期'],
      },
@@ -278,7 +279,7 @@
    {
      field: 'contactNextTime',
      title: '下次联系时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -289,7 +290,7 @@
    {
      field: 'contactLastTime',
      title: '最后跟进时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -310,13 +311,13 @@
    {
      field: 'updateTime',
      title: '更新时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
src/views/crm/clue/detail/data.ts
@@ -3,7 +3,7 @@
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { formatDateTime } from '@vben/utils';
import { formatDate } from '@vben/utils';
import { DictTag } from '#/components/dict-tag';
@@ -30,7 +30,7 @@
    {
      field: 'createTime',
      label: '创建时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
@@ -101,7 +101,7 @@
    {
      field: 'contactNextTime',
      label: '下次联系时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'remark',
src/views/crm/clue/detail/index.vue
@@ -162,7 +162,7 @@
          />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="4" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
      </Tabs>
    </Card>
src/views/crm/contact/data.ts
@@ -164,7 +164,7 @@
      component: 'DatePicker',
      componentProps: {
        showTime: true,
        format: 'YYYY-MM-DD HH:mm:ss',
        format: 'YYYY-MM-DD',
        valueFormat: 'YYYY-MM-DD HH:mm:ss',
        placeholder: '请选择下次联系时间',
      },
@@ -304,7 +304,7 @@
    {
      field: 'contactNextTime',
      title: '下次联系时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -324,7 +324,7 @@
    {
      field: 'contactLastTime',
      title: '最后跟进时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -340,13 +340,13 @@
    {
      field: 'updateTime',
      title: '更新时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
src/views/crm/contact/detail/data.ts
@@ -3,7 +3,7 @@
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { formatDateTime } from '@vben/utils';
import { formatDate } from '@vben/utils';
import { DictTag } from '#/components/dict-tag';
@@ -25,7 +25,7 @@
    {
      field: 'createTime',
      label: '创建时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
@@ -96,7 +96,7 @@
    {
      field: 'contactNextTime',
      label: '下次联系时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'remark',
src/views/crm/contact/detail/index.vue
@@ -134,7 +134,7 @@
          <Info :contact="contact" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="3" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="团队成员" key="4" :force-render="true">
          <PermissionList
src/views/crm/contract/detail/index.vue
@@ -169,7 +169,7 @@
          />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="6" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
      </Tabs>
    </Card>
src/views/crm/customer/data.ts
@@ -153,11 +153,22 @@
      component: 'DatePicker',
      componentProps: {
        showTime: true,
        format: 'YYYY-MM-DD HH:mm:ss',
        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',
@@ -296,7 +321,7 @@
    {
      field: 'contactNextTime',
      title: '下次联系时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -314,6 +339,15 @@
      },
    },
    {
      field: 'autoPoolEnabled',
      title: '是否流入公海',
      minWidth: 140,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING },
      },
    },
    {
      field: 'dealStatus',
      title: '成交状态',
      minWidth: 120,
@@ -325,7 +359,7 @@
    {
      field: 'contactLastTime',
      title: '最后跟进时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -351,13 +385,13 @@
    {
      field: 'updateTime',
      title: '更新时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
src/views/crm/customer/detail/data.ts
@@ -5,7 +5,7 @@
import { DICT_TYPE } from '@vben/constants';
import { useUserStore } from '@vben/stores';
import { formatDateTime } from '@vben/utils';
import { formatDate } from '@vben/utils';
import { getSimpleUserList } from '#/api/system/user';
import { DictTag } from '#/components/dict-tag';
@@ -47,6 +47,11 @@
        h(DictTag, { type: DICT_TYPE.CRM_CUSTOMER_LEVEL, value: val }),
    },
    {
      field: 'autoPoolEnabled',
      label: '是否流入公海',
      render: (val) => (val === false ? '否' : '是'),
    },
    {
      field: 'dealStatus',
      label: '成交状态',
      render: (val) => (val ? '已成交' : '未成交'),
@@ -58,7 +63,7 @@
    {
      field: 'createTime',
      label: '创建时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
@@ -120,7 +125,7 @@
    {
      field: 'contactNextTime',
      label: '下次联系时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'remark',
src/views/crm/customer/detail/index.vue
@@ -286,7 +286,7 @@
          <ReceivableDetailsList :customer-id="customerId" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="8" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
      </Tabs>
    </Card>
src/views/crm/customer/limitConfig/data.ts
@@ -143,7 +143,7 @@
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
src/views/crm/customer/pool/data.ts
@@ -114,7 +114,7 @@
      title: '下次联系时间',
      field: 'contactNextTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '备注',
@@ -134,7 +134,7 @@
      title: '最后跟进时间',
      field: 'contactLastTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '最后跟进记录',
@@ -145,13 +145,13 @@
      title: '更新时间',
      field: 'updateTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '创建时间',
      field: 'createTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '创建人',
src/views/crm/followup/data.ts
@@ -6,7 +6,7 @@
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { formatDateTime } from '@vben/utils';
import { formatDate } from '@vben/utils';
import { getBusinessPageByCustomer } from '#/api/crm/business';
import { getContactPageByCustomer } from '#/api/crm/contact';
@@ -48,7 +48,7 @@
      component: 'DatePicker',
      componentProps: {
        showTime: true,
        format: 'YYYY-MM-DD HH:mm:ss',
        format: 'YYYY-MM-DD',
        valueFormat: 'YYYY-MM-DD HH:mm:ss',
        placeholder: '请选择下次联系时间',
      },
@@ -128,7 +128,7 @@
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    { field: 'creatorName', title: '跟进人' },
    {
@@ -143,7 +143,7 @@
    {
      field: 'nextTime',
      title: '下次联系时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      field: 'contacts',
@@ -179,7 +179,7 @@
    {
      field: 'contactLastTime',
      label: '最后跟进时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'creatorName',
@@ -188,12 +188,12 @@
    {
      field: 'createTime',
      label: '创建时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'updateTime',
      label: '更新时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
src/views/crm/invoice/data.ts
@@ -256,7 +256,7 @@
      title: '开票日期',
      field: 'invoiceTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '备注',
@@ -277,13 +277,13 @@
      title: '更新时间',
      field: 'updateTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '创建时间',
      field: 'createTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '创建人',
src/views/crm/invoice/detail/approve/index.vue
@@ -6,7 +6,7 @@
import { ContentWrap } from '@vben/common-ui';
import { DICT_TYPE } from '@vben/constants';
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
import { erpPriceInputFormatter, formatDate } from '@vben/utils';
import { Spin } from 'ant-design-vue';
@@ -58,7 +58,7 @@
    {
      label: '开票日期',
      field: 'invoiceTime',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      label: '审批状态',
@@ -71,7 +71,7 @@
    {
      label: '创建时间',
      field: 'createTime',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    { label: '备注', field: 'remark', render: textRender },
  ] as DescriptionItemSchema[],
src/views/crm/invoice/detail/data.ts
@@ -3,7 +3,7 @@
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
import { erpPriceInputFormatter, formatDate } from '@vben/utils';
import { DictTag } from '#/components/dict-tag';
@@ -27,7 +27,7 @@
    {
      field: 'invoiceTime',
      label: '开票日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'invoiceType',
@@ -100,7 +100,7 @@
    {
      field: 'invoiceTime',
      label: '开票日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'remark',
@@ -123,12 +123,12 @@
    {
      field: 'createTime',
      label: '创建时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'updateTime',
      label: '更新时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
src/views/crm/invoice/detail/index.vue
@@ -111,7 +111,7 @@
          <Info :invoice="invoice" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="2" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="团队成员" key="3" :force-render="true">
          <PermissionList
src/views/crm/permission/modules/data.ts
@@ -227,7 +227,7 @@
    {
      field: 'createTime',
      title: '加入时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
  ];
}
src/views/crm/product/category/data.ts
@@ -80,7 +80,7 @@
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      field: 'actions',
src/views/crm/product/data.ts
@@ -208,7 +208,7 @@
    {
      field: 'updateTime',
      title: '更新时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
@@ -219,7 +219,7 @@
    {
      field: 'createTime',
      title: '创建时间',
      formatter: 'formatDateTime',
      formatter: 'formatDate',
      minWidth: 180,
    },
    {
src/views/crm/product/detail/index.vue
@@ -80,7 +80,7 @@
          <Info :product="product" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="2" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
      </Tabs>
    </Card>
src/views/crm/receivable/components/data.ts
@@ -25,7 +25,7 @@
      title: '回款日期',
      field: 'returnTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '回款金额(元)',
src/views/crm/receivable/data.ts
@@ -303,7 +303,7 @@
      title: '回款日期',
      field: 'returnTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '回款金额(元)',
@@ -345,13 +345,13 @@
      title: '更新时间',
      field: 'updateTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '创建时间',
      field: 'createTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '创建人',
src/views/crm/receivable/detail/approve/index.vue
@@ -6,7 +6,7 @@
import { ContentWrap } from '@vben/common-ui';
import { DICT_TYPE } from '@vben/constants';
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
import { erpPriceInputFormatter, formatDate } from '@vben/utils';
import { Spin } from 'ant-design-vue';
@@ -51,7 +51,7 @@
    {
      label: '回款日期',
      field: 'returnTime',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      label: '回款金额(元)',
@@ -78,7 +78,7 @@
    {
      label: '创建时间',
      field: 'createTime',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    { label: '备注', field: 'remark', render: textRender },
  ] as DescriptionItemSchema[],
src/views/crm/receivable/detail/data.ts
@@ -3,7 +3,7 @@
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
import { erpPriceInputFormatter, formatDate } from '@vben/utils';
import { DictTag } from '#/components/dict-tag';
@@ -23,7 +23,7 @@
    {
      field: 'returnTime',
      label: '回款日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'price',
@@ -65,7 +65,7 @@
    {
      field: 'returnTime',
      label: '回款日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'price',
@@ -102,12 +102,12 @@
    {
      field: 'createTime',
      label: '创建时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'updateTime',
      label: '更新时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
src/views/crm/receivable/detail/index.vue
@@ -114,7 +114,7 @@
          <Info :receivable="receivable" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="2" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="团队成员" key="3" :force-render="true">
          <PermissionList
src/views/crm/receivable/plan/components/data.ts
@@ -28,7 +28,7 @@
      title: '计划回款日期',
      field: 'returnTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '提前几天提醒',
@@ -39,7 +39,7 @@
      title: '提醒日期',
      field: 'remindTime',
      minWidth: 150,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '负责人',
src/views/crm/receivable/plan/data.ts
@@ -201,7 +201,7 @@
      title: '计划回款日期',
      field: 'returnTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '提前几天提醒',
@@ -212,7 +212,7 @@
      title: '提醒日期',
      field: 'remindTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '回款方式',
@@ -243,7 +243,7 @@
      title: '实际回款日期',
      field: 'receivable.returnTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '未回款金额(元)',
@@ -260,13 +260,13 @@
      title: '更新时间',
      field: 'updateTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '创建时间',
      field: 'createTime',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '创建人',
src/views/crm/receivable/plan/detail/data.ts
@@ -3,7 +3,7 @@
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
import { erpPriceInputFormatter, formatDate } from '@vben/utils';
import { DictTag } from '#/components/dict-tag';
@@ -26,7 +26,7 @@
    {
      field: 'returnTime',
      label: '计划回款日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'receivable',
@@ -54,7 +54,7 @@
    {
      field: 'returnTime',
      label: '计划回款日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'price',
@@ -90,7 +90,7 @@
    {
      field: 'receivable.returnTime',
      label: '实际回款日期',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'remark',
@@ -113,12 +113,12 @@
    {
      field: 'createTime',
      label: '创建时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
    {
      field: 'updateTime',
      label: '更新时间',
      render: (val) => formatDateTime(val) as string,
      render: (val) => formatDate(val) as string,
    },
  ];
}
src/views/crm/receivable/plan/detail/index.vue
@@ -117,7 +117,7 @@
          <ReceivablePlanDetailsInfo :receivable-plan="receivablePlan" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="操作日志" key="2" :force-render="true">
          <OperateLog :log-list="logList" />
          <OperateLog :log-list="logList" date-format="YYYY-MM-DD" />
        </Tabs.TabPane>
        <Tabs.TabPane tab="团队成员" key="3" :force-render="true">
          <PermissionList
src/views/crm/saleQuotation/modules/ocr-upload.vue
@@ -4,6 +4,7 @@
import { ref } from 'vue';
import { IconifyIcon } from '@vben/icons';
import { formatDate } from '@vben/utils';
import { Modal, Button, Upload, Descriptions, Table, Tag, message, Alert } from 'ant-design-vue';
@@ -140,7 +141,7 @@
            <Tag color="orange">{{ ocrResult.customerName }}</Tag>
          </Descriptions.Item>
          <Descriptions.Item v-if="ocrResult.quotationTime" label="报价日期">
            {{ ocrResult.quotationTime }}
            {{ formatDate(ocrResult.quotationTime) }}
          </Descriptions.Item>
          <Descriptions.Item v-if="ocrResult.validUntil" label="有效期至">
            {{ ocrResult.validUntil }}
src/views/crm/salesTarget/data.ts
@@ -334,7 +334,7 @@
      field: 'createTime',
      title: '创建时间',
      minWidth: 160,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      field: 'creatorName',
src/views/crm/statistics/customer/data.ts
@@ -62,6 +62,7 @@
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        format: 'YYYY-MM-DD',
      },
      defaultValue: [
        formatDateTime(beginOfDay(new Date(Date.now() - 3600 * 1000 * 24 * 7))),
@@ -176,13 +177,13 @@
          field: 'createTime',
          title: '创建时间',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'orderDate',
          title: '下单日期',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
      ];
    }
src/views/crm/statistics/funnel/data.ts
@@ -36,6 +36,7 @@
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        format: 'YYYY-MM-DD',
      },
      defaultValue: [
        formatDateTime(beginOfDay(new Date(Date.now() - 3600 * 1000 * 24 * 7))),
@@ -116,7 +117,7 @@
          field: 'dealTime',
          title: '预计成交日期',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'ownerUserName',
@@ -132,19 +133,19 @@
          field: 'contactLastTime',
          title: '最后跟进时间',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'updateTime',
          title: '更新时间',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'createTime',
          title: '创建时间',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'creatorName',
@@ -189,7 +190,7 @@
          field: 'dealTime',
          title: '预计成交日期',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'ownerUserName',
@@ -205,19 +206,19 @@
          field: 'contactLastTime',
          title: '最后跟进时间',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'updateTime',
          title: '更新时间',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'createTime',
          title: '创建时间',
          minWidth: 200,
          formatter: 'formatDateTime',
          formatter: 'formatDate',
        },
        {
          field: 'creatorName',
src/views/crm/statistics/portrait/data.ts
@@ -39,6 +39,7 @@
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        format: 'YYYY-MM-DD',
      },
      defaultValue: [
        formatDateTime(beginOfDay(new Date(Date.now() - 3600 * 1000 * 24 * 7))),
src/views/crm/statistics/rank/data.ts
@@ -53,6 +53,7 @@
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        format: 'YYYY-MM-DD',
      },
      defaultValue: [
        formatDateTime(beginOfDay(new Date(Date.now() - 3600 * 1000 * 24 * 7))),