xiaoyi
3 天以前 5c243d9d05da668a32b1bc9a4f543ea081488d11
src/views/crm/contract/data.ts
@@ -1,6 +1,8 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { useUserStore } from '@vben/stores';
import { erpPriceInputFormatter, erpPriceMultiply } from '@vben/utils';
@@ -199,6 +201,78 @@
      },
    },
    {
      fieldName: 'contractType',
      label: '合同类型',
      component: 'Select',
      componentProps: {
        options: getDictOptions(DICT_TYPE.CRM_CONTRACT_TYPE),
        placeholder: '请选择合同类型',
        allowClear: true,
      },
    },
    {
      fieldName: 'voltageLevel',
      label: '电压等级',
      component: 'Select',
      componentProps: {
        options: getDictOptions(DICT_TYPE.CRM_VOLTAGE_LEVEL),
        placeholder: '请选择电压等级',
        allowClear: true,
      },
    },
    {
      fieldName: 'electricityType',
      label: '用电类型',
      component: 'Select',
      componentProps: {
        options: getDictOptions(DICT_TYPE.CRM_ELECTRICITY_TYPE),
        placeholder: '请选择用电类型',
        allowClear: true,
      },
    },
    {
      fieldName: 'contractCapacity',
      label: '合同容量(kVA)',
      component: 'InputNumber',
      componentProps: {
        class: '!w-full',
        min: 0,
        precision: 2,
        placeholder: '请输入合同容量',
      },
    },
    {
      fieldName: 'tariffMode',
      label: '电价模式',
      component: 'Select',
      componentProps: {
        options: getDictOptions(DICT_TYPE.CRM_TARIFF_MODE),
        placeholder: '请选择电价模式',
        allowClear: true,
      },
    },
    {
      fieldName: 'meterMode',
      label: '计量方式',
      component: 'Select',
      componentProps: {
        options: getDictOptions(DICT_TYPE.CRM_METER_MODE),
        placeholder: '请选择计量方式',
        allowClear: true,
      },
    },
    {
      fieldName: 'payCycle',
      label: '缴费周期(月)',
      component: 'InputNumber',
      componentProps: {
        class: '!w-full',
        min: 1,
        precision: 0,
        placeholder: '请输入缴费周期',
      },
    },
    {
      fieldName: 'remark',
      label: '备注',
      component: 'Textarea',
@@ -353,6 +427,34 @@
      slots: { default: 'businessName' },
    },
    {
      title: '合同类型',
      field: 'contractType',
      minWidth: 110,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_TYPE.CRM_CONTRACT_TYPE },
      },
    },
    {
      title: '电压等级',
      field: 'voltageLevel',
      minWidth: 90,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_TYPE.CRM_VOLTAGE_LEVEL },
      },
    },
    {
      title: '合同容量',
      field: 'contractCapacity',
      minWidth: 100,
    },
    {
      title: '指令数',
      field: 'commandCount',
      minWidth: 80,
    },
    {
      title: '合同金额(元)',
      field: 'totalPrice',
      minWidth: 140,