| | |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | field: "purchasePrice", |
| | | title: "采购价", |
| | | minWidth: 100, |
| | | formatter: ({ cellValue }) => { |
| | | return cellValue != null ? `¥${Number(cellValue).toFixed(2)}` : ""; |
| | | }, |
| | | }, |
| | | { |
| | | field: "salesPrice", |
| | | title: "销售价", |
| | | minWidth: 100, |
| | |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | | /** 物料导入的表单 */ |
| | | export function useImportFormSchema(): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | | fieldName: 'file', |
| | | label: '物料数据', |
| | | component: 'Upload', |
| | | rules: 'required', |
| | | help: '仅允许导入 xls、xlsx 格式文件', |
| | | }, |
| | | { |
| | | fieldName: 'updateSupport', |
| | | label: '是否覆盖', |
| | | component: 'Switch', |
| | | componentProps: { |
| | | checkedChildren: '是', |
| | | unCheckedChildren: '否', |
| | | }, |
| | | rules: z.boolean().default(false), |
| | | help: '是否更新已经存在的物料数据', |
| | | }, |
| | | ]; |
| | | } |