| | |
| | | fieldName: "linkType", |
| | | label: "与下道工序关系", |
| | | component: "Select", |
| | | help: () => |
| | | h( |
| | | "div", |
| | | { |
| | | style: |
| | | "white-space: pre-line; max-width: 320px; line-height: 1.6;", |
| | | }, |
| | | "0=开始-开始(SS):本工序开始后,下道工序才能开始(可重叠并行开工)\n1=结束-结束(FF):下道工序必须等到本工序结束才能结束(并行但同步完工)\n2=开始-结束(SF):本工序开始后,下道工序才能结束\n3=结束-开始(FS):本工序结束后,下道工序才能开始(默认值)", |
| | | ), |
| | | componentProps: { |
| | | allowClear: true, |
| | | options: getDictOptions(DICT_TYPE.MES_PRO_LINK_TYPE, "number"), |
| | | placeholder: "请选择", |
| | | }, |
| | | rules: z.number().default(3), |
| | | rules: z.number().optional(), |
| | | }, |
| | | { |
| | | fieldName: "colorCode", |
| | |
| | | ]; |
| | | } |
| | | |
| | | /** 工艺路线产品表单 */ |
| | | export function useRouteProductFormSchema(onItemChange?: (item: any) => void): VbenFormSchema[] { |
| | | /** 工艺路线产品表单;multiple = true(新增模式)时产品可多选,一次性绑定多个 */ |
| | | export function useRouteProductFormSchema( |
| | | onItemChange?: (item: any) => void, |
| | | multiple = false, |
| | | ): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | | fieldName: "id", |
| | |
| | | component: "Input", |
| | | dependencies: { triggerFields: [""], show: () => false }, |
| | | }, |
| | | // 产品物料:使用业务自定义选择器,change 回填编码/名称/规格/单位 |
| | | { |
| | | fieldName: "itemId", |
| | | label: "产品", |
| | | component: markRaw(MdItemSelect), |
| | | componentProps: { |
| | | onChange: onItemChange, |
| | | }, |
| | | formItemClass: "col-span-2", |
| | | rules: "selectRequired", |
| | | }, |
| | | // 新增(多选):一次绑定多个产品;编辑(单选):change 回填编码/名称/规格/单位 |
| | | multiple |
| | | ? { |
| | | fieldName: "itemIds", |
| | | label: "产品(可多选)", |
| | | component: markRaw(MdItemSelect), |
| | | componentProps: { |
| | | multiple: true, |
| | | placeholder: "请选择要绑定的产品(可多选)", |
| | | }, |
| | | formItemClass: "col-span-2", |
| | | rules: "selectRequired", |
| | | } |
| | | : { |
| | | fieldName: "itemId", |
| | | label: "产品", |
| | | component: markRaw(MdItemSelect), |
| | | componentProps: { |
| | | onChange: onItemChange, |
| | | }, |
| | | formItemClass: "col-span-2", |
| | | rules: "selectRequired", |
| | | }, |
| | | { |
| | | fieldName: "quantity", |
| | | label: "生产数量", |