| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'productionStatus', |
| | | label: '生产状态', |
| | | component: 'Input', |
| | | dependencies: { |
| | | triggerFields: ['needProduction', 'productionStatus'], |
| | | show: (values) => { |
| | | return formType === 'detail' && values.needProduction === 1; |
| | | }, |
| | | }, |
| | | componentProps: { |
| | | disabled: true, |
| | | }, |
| | | slots: { default: 'productionStatus' }, |
| | | }, |
| | | { |
| | | fieldName: 'productionFinishTime', |
| | | label: '生产完成时间', |
| | | component: 'Input', |
| | | dependencies: { |
| | | triggerFields: ['productionStatus'], |
| | | show: (values) => { |
| | | return formType === 'detail' && values.productionStatus === 1; |
| | | }, |
| | | }, |
| | | componentProps: { |
| | | disabled: true, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'orderTime', |
| | | label: '订单时间', |
| | | component: 'DatePicker', |
| | |
| | | placeholder: '选择订单时间', |
| | | showTime: true, |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'x', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | rules: 'required', |
| | | }, |
| | |
| | | formItemClass: 'col-span-2', |
| | | }, |
| | | { |
| | | fieldName: 'fileUrl', |
| | | fieldName: 'blobIds', |
| | | label: '附件', |
| | | component: 'FileUpload', |
| | | componentProps: { |
| | | maxNumber: 1, |
| | | maxSize: 10, |
| | | accept: [ |
| | | 'pdf', |
| | | 'doc', |
| | | 'docx', |
| | | 'xls', |
| | | 'xlsx', |
| | | 'txt', |
| | | 'jpg', |
| | | 'jpeg', |
| | | 'png', |
| | | ], |
| | | valueKey: 'id', |
| | | maxNumber: 10, |
| | | multiple: true, |
| | | showDescription: formType !== 'detail', |
| | | disabled: formType === 'detail', |
| | | }, |
| | |
| | | }, |
| | | { |
| | | component: 'InputNumber', |
| | | componentProps: { |
| | | componentProps: (values) => ({ |
| | | class: '!w-full', |
| | | placeholder: '请输入收取订金', |
| | | precision: 2, |
| | | min: 0, |
| | | }, |
| | | max: values.totalPrice ?? undefined, |
| | | }), |
| | | fieldName: 'depositPrice', |
| | | label: '收取订金', |
| | | dependencies: { |
| | | triggerFields: ['totalPrice'], |
| | | rules(values) { |
| | | if (values.totalPrice != null) { |
| | | return z |
| | | .number() |
| | | .min(0, '订金不能小于0') |
| | | .max(values.totalPrice, '收取订金不能大于优惠后金额'); |
| | | } |
| | | return z.number().min(0, '订金不能小于0').optional(); |
| | | }, |
| | | }, |
| | | rules: z.number().min(0).optional(), |
| | | }, |
| | | ]; |
| | |
| | | title: '库存', |
| | | minWidth: 80, |
| | | formatter: 'formatAmount3', |
| | | visible: false, |
| | | }, |
| | | { |
| | | field: 'productUnitName', |
| | |
| | | field: 'productUnitName2', |
| | | title: '辅单位1', |
| | | minWidth: 80, |
| | | visible: false, |
| | | }, |
| | | { |
| | | field: 'productUnitName3', |
| | | title: '辅单位2', |
| | | minWidth: 80, |
| | | visible: false, |
| | | }, |
| | | { |
| | | field: 'needProduction', |
| | |
| | | title: '备注', |
| | | minWidth: 150, |
| | | slots: { default: 'remark' }, |
| | | visible: false, |
| | | }, |
| | | { |
| | | field: 'count', |
| | |
| | | component: 'Select', |
| | | componentProps: { |
| | | options: [ |
| | | { label: '未审核', value: 10 }, |
| | | { label: '未提交', value: 0 }, |
| | | { label: '审批中', value: 15 }, |
| | | { label: '已审核', value: 20 }, |
| | | { label: '已驳回', value: 35 }, |
| | | { label: '已作废', value: 30 }, |
| | | ], |
| | | placeholder: '请选择状态', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'returnStatus', |
| | | label: '退货状态', |
| | | fieldName: 'productionStatus', |
| | | label: '生产状态', |
| | | component: 'Select', |
| | | componentProps: { |
| | | options: [ |
| | | { label: '未退货', value: 0 }, |
| | | { label: '部分退货', value: 1 }, |
| | | { label: '全部退货', value: 2 }, |
| | | { label: '无需生产', value: -1 }, |
| | | { label: '未完成', value: 0 }, |
| | | { label: '已完成', value: 1 }, |
| | | ], |
| | | placeholder: '请选择退货状态', |
| | | placeholder: '请选择生产状态', |
| | | allowClear: true, |
| | | }, |
| | | }, |
| | |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'outStatus', |
| | | title: '出库状态', |
| | | minWidth: 100, |
| | | slots: { default: 'outStatus' }, |
| | | }, |
| | | { |
| | | field: 'totalProductPrice', |
| | | title: '金额合计', |
| | | formatter: 'formatAmount2', |
| | |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'outStatus', |
| | | title: '出库状态', |
| | | minWidth: 100, |
| | | fixed: 'right', |
| | | slots: { default: 'outStatus' }, |
| | | }, |
| | | { |
| | | field: 'productionStatus', |
| | | title: '生产状态', |
| | | minWidth: 100, |
| | | fixed: 'right', |
| | | slots: { default: 'productionStatus' }, |
| | | }, |
| | | { |
| | | field: 'status', |
| | | title: '状态', |
| | | minWidth: 100, |