Prechádzať zdrojové kódy

feat:增加工序选择框

lupeng 8 mesiacov pred
rodič
commit
eb0ef80c53

+ 277 - 1
src/components/CommonTable/configs/tableConfig.ts

@@ -422,7 +422,283 @@ export const tableConfig = {
       },
     ],
   },
-
+  OPERATION: {
+    url: "/api/v1/op/baseOperation",
+    column: [
+      {
+        label: "工序名称",
+        prop: "operationName",
+        span: 12,
+        search: true,
+        rules: [
+          {
+            required: true,
+            message: "工序名称不能为空",
+            trigger: "blur",
+          },
+        ],
+      },
+      {
+        label: "工序编码",
+        prop: "operationCode",
+        span: 12,
+        search: true,
+        rules: [
+          {
+            required: true,
+            message: "工序编码不能为空",
+            trigger: "blur",
+          },
+        ],
+      },
+      {
+        label: "工段",
+        prop: "workSection",
+        type: "select",
+        search: true,
+        dicData: dicts.workshop_section,
+        props: {
+          label: "dictLabel",
+          value: "dictValue",
+        },
+        span: 12,
+        rules: [
+          {
+            required: true,
+            message: "请选择工段",
+            trigger: "change",
+          },
+        ],
+      },
+      {
+        label: "工序类型",
+        prop: "operationType",
+        type: "select",
+        search: true,
+        dicData: dicts.process_type,
+        props: {
+          label: "dictLabel",
+          value: "dictValue",
+        },
+        span: 12,
+        rules: [
+          {
+            required: true,
+            message: "请选择工序类型",
+            trigger: "change",
+          },
+        ],
+      },
+      {
+        label: "工艺条件",
+        prop: "processAsk",
+        span: 12,
+        rules: [
+          {
+            required: true,
+            message: "工艺条件不能为空",
+            trigger: "blur",
+          },
+        ],
+      },
+      {
+        label: "技能要求",
+        prop: "skillAsk",
+        span: 12,
+        type: "select",
+        search: true,
+        filterable: true,
+        dicData: dicts.skill_requirements,
+        props: {
+          label: "dictLabel",
+          value: "dictValue",
+        },
+        rules: [
+          {
+            required: true,
+            message: "请选择技能要求",
+            trigger: "change",
+          },
+        ],
+      },
+      {
+        label: "后置时间(分)",
+        prop: "forceTime",
+        type: "number",
+        span: 12,
+        rules: [
+          {
+            required: true,
+            message: "后置时间不能为空",
+            trigger: "blur",
+          },
+        ],
+      },
+      /*{
+        label: "标准机时",
+        prop: "timeingNum",
+        type: "number",
+        span: 12,
+        rules: [
+          {
+            required: true,
+            message: "标准机时不能为空",
+            trigger: "blur",
+          },
+        ],
+      },*/
+      {
+        label: "标准工时(分)",
+        prop: "standardWorktime",
+        type: "number",
+        span: 12,
+        rules: [
+          {
+            required: true,
+            message: "标准工时不能为空",
+            trigger: "blur",
+          },
+        ],
+      },
+      // {
+      //   label: '岗位',
+      //   prop: 'type',
+      //   type: 'select',
+      //   dicData: [
+      //     {
+      //       label: '岗位1',
+      //       value: 'position1',
+      //     },
+      //   ],
+      //   props: {
+      //     label: 'label',
+      //     value: 'value',
+      //   },
+      //   span: 12,
+      // },
+      {
+        label: "工位类型",
+        prop: "stanType",
+        search: true,
+        type: "select",
+        dicData: dicts.station_type,
+        props: {
+          label: "dictLabel",
+          value: "dictValue",
+        },
+        span: 12,
+        row: true,
+        rules: [
+          {
+            required: true,
+            message: "请选择工位类型",
+            trigger: "blur",
+          },
+        ],
+      },
+      //  {
+      //    label: "是否外协",
+      //    prop: "externalCooperation",
+      //    span: 8,
+      // hide: true,
+      //    type: "switch",
+      //    dicData: switchOp,
+      //    value: 0,
+      //  },
+      /*{
+        label: "是否首检",
+        prop: "firstCheck",
+        span: 8,
+        hide: true,
+        type: "switch",
+        dicData: switchOp,
+        value: 0,
+      },*/
+      /*{
+        label: "是否巡检",
+        prop: "inspection",
+        span: 8,
+        hide: true,
+        type: "switch",
+        dicData: switchOp,
+        value: 0,
+      },
+      {
+        label: "是否自检",
+        prop: "selfCheck",
+        span: 8,
+        hide: true,
+        type: "switch",
+        dicData: switchOp,
+        value: 0,
+      },*/
+      //  {
+      //    label: "是否工艺数量",
+      //    prop: "common",
+      //    span: 8,
+      // hide: true,
+      //    type: "switch",
+      //    dicData: switchOp,
+      //    value: 0,
+      //  },
+      //  {
+      //    label: "是否分批",
+      //    prop: "batch",
+      //    span: 8,
+      // hide: true,
+      //    type: "switch",
+      //    dicData: switchOp,
+      //    value: 0,
+      //  },
+      /*{
+        label: "是否委外",
+        prop: "outsourcing",
+        span: 8,
+        hide: true,
+        type: "switch",
+        dicData: switchOp,
+        // click: ({ column,value }) => {
+        //  if(value == 0){
+        // console.log('column',column)
+        //  }
+        // },
+        //联动隐藏
+        control: (val, form) => {
+          return {
+            outTime: {
+              display: val == 1 ? true : false,
+            },
+          };
+        },
+        value: 0,
+      },*/
+      {
+        label: "分批数量",
+        prop: "batchNum",
+        span: 5,
+        display: false,
+        hide: true,
+        value: 0,
+        // slot:true, // 自定义列
+      },
+      {
+        label: "委外时间",
+        prop: "outTime",
+        span: 5,
+        display: false,
+        hide: true,
+        value: 0,
+        // slot:true, // 自定义列
+      },
+      {
+        label: "工序描述",
+        prop: "operationDesc",
+        hide: true,
+        span: 24,
+        type: "textarea",
+      },
+    ],
+  },
   MARTERIAL_BOM: {
     url: "/api/v1/base/materialBom/list",
     column: [