| | |
| | | import type { VbenFormSchema } from '#/adapter/form'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | |
| | | import { DICT_TYPE } from '../../../packages/constants/src'; |
| | | import { useUserStore } from '../../../packages/stores/src'; |
| | | import { erpPriceInputFormatter, erpPriceMultiply } from '../../../packages/utils/src'; |
| | | |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'orderDate', |
| | | label: '下单日期', |
| | | component: 'DatePicker', |
| | | rules: 'required', |
| | | componentProps: { |
| | | showTime: false, |
| | | format: 'YYYY-MM-DD', |
| | | valueFormat: 'x', |
| | | placeholder: '请选择下单日期', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'businessId', |
| | | label: '商机名称', |
| | | component: 'Select', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'orderDate', |
| | | label: '下单日期', |
| | | component: 'DatePicker', |
| | | rules: 'required', |
| | | componentProps: { |
| | | showTime: false, |
| | | format: 'YYYY-MM-DD', |
| | | valueFormat: 'x', |
| | | placeholder: '请选择下单日期', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'startTime', |
| | | label: '合同开始时间', |
| | | component: 'DatePicker', |
| | |
| | | valueFormat: 'x', |
| | | placeholder: '请选择合同结束时间', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'depositPrice', |
| | | label: '定金金额(元)', |
| | | component: 'InputNumber', |
| | | componentProps: { |
| | | class: '!w-full', |
| | | min: 0, |
| | | precision: 2, |
| | | placeholder: '请输入定金金额', |
| | | }, |
| | | rules: z.number().min(0).optional(), |
| | | }, |
| | | { |
| | | fieldName: 'signUserId', |
| | |
| | | allowClear: true, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'auditStatus', |
| | | label: '合同状态', |
| | | component: 'Select', |
| | | componentProps: { |
| | | options: [ |
| | | { label: '未提交', value: 0 }, |
| | | { label: '审批中', value: 10 }, |
| | | { label: '审核通过', value: 20 }, |
| | | { label: '审核不通过', value: 30 }, |
| | | { label: '已取消', value: 40 }, |
| | | { label: '已作废', value: 50 }, |
| | | ], |
| | | placeholder: '请选择合同状态', |
| | | allowClear: true, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'orderNo', |
| | | label: '关联订单', |
| | | component: 'Input', |
| | | componentProps: { |
| | | placeholder: '请输入订单号', |
| | | allowClear: true, |
| | | }, |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | |
| | | field: 'no', |
| | | minWidth: 180, |
| | | fixed: 'left', |
| | | slots: { default: 'no' }, |
| | | }, |
| | | { |
| | | title: '合同名称', |
| | |
| | | { |
| | | title: '合同金额(元)', |
| | | field: 'totalPrice', |
| | | minWidth: 140, |
| | | formatter: 'formatAmount2', |
| | | }, |
| | | { |
| | | title: '定金金额(元)', |
| | | field: 'depositPrice', |
| | | minWidth: 140, |
| | | formatter: 'formatAmount2', |
| | | }, |
| | |
| | | field: 'auditStatus', |
| | | fixed: 'right', |
| | | minWidth: 120, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.CRM_AUDIT_STATUS }, |
| | | }, |
| | | slots: { default: 'auditStatus' }, |
| | | }, |
| | | { |
| | | title: '关联订单', |
| | | field: 'orderNo', |
| | | fixed: 'right', |
| | | minWidth: 150, |
| | | slots: { default: 'orderNo' }, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | field: 'actions', |
| | | fixed: 'right', |
| | | minWidth: 130, |
| | | minWidth: 220, |
| | | slots: { default: 'actions' }, |
| | | }, |
| | | ]; |