qinhb před 7 měsíci
rodič
revize
564b145dfc

+ 1 - 0
src/common/configs/dictDataUtil.ts

@@ -68,6 +68,7 @@ const DictDataUtil = {
     fault_current_state: "fault_current_state",
     //报故追踪状态状态
     produce_type: "produce_type",
+    op_group: "op_group",
   },
   EXPAND_FIELD_TABLE: {
     //字段类型

+ 2 - 1
src/views/plan/workOrder/components/check-task.vue

@@ -34,12 +34,12 @@
       </template>
       <template #menu-left="{}">
         <el-button
+          type="primary"
           v-if="
             taskForm.info.workOrderState === '1' ||
             taskForm.info.workOrderState === '2' ||
             taskForm.info.workOrderState === '0'
           "
-          type="primary"
           icon="el-icon-plus"
           @click="addObj"
           >新增</el-button
@@ -122,6 +122,7 @@ const taskForm = ref({
   formName: "",
   baseFormIds: "",
   workOrderId: "",
+  info:{}
 });
 const rules = reactive({
   formName: [{ required: true, trigger: "blur" }],

+ 22 - 0
src/views/plan/workOrder/components/work-order-page.vue

@@ -139,6 +139,28 @@ option.value = Object.assign(option.value, {
       overHidden: true,
     },
     {
+      label: "工序分组",
+      prop: "opType",
+      width: "100",
+      type: "select", //类型为下拉选择框
+      dicUrl:
+          dictDataUtil.request_url + dictDataUtil.TYPE_CODE.op_group,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+    },
+    {
+      label: "分组标识",
+      prop: "opGroup",
+      width: "100",
+    },
+    {
+      label: "前置工单",
+      prop: "frontWorkOrderCode",
+      width: "100",
+    },
+    {
       label: "生产车间",
       prop: "workshopName",
       width: 120,

+ 101 - 2
src/views/plan/workOrder/index.vue

@@ -287,6 +287,15 @@
     >
       <proWorkOrderExcel :data="ExDataObj" @close="closeShow" />
     </el-dialog>
+
+    <el-dialog
+        v-model="dialog7.visible"
+        :title="dialog7.title"
+        width="950px"
+        @close="dialog7.visible = false"
+    >
+      <work-order-page :queryType="2" @order-info="workOrderInfoClick"/>
+    </el-dialog>
   </div>
 </template>
 <script setup>
@@ -383,6 +392,10 @@ const dialog6 = reactive({
   title: "检验任务",
   visible: false,
 });
+const dialog7 = reactive({
+  title: "前置工单选择",
+  visible: false,
+});
 const apsType = ref(0);
 const aps = (id) => {
   apsType.value = 0;
@@ -514,7 +527,10 @@ const handleSubmit = () => {
     }
   });
 };
-
+const workOrderInfoClick = (value) => {
+  form.value.frontWorkOrderCode = value.workOrderCode;
+  dialog7.visible = false;
+};
 const orderInfo = (value) => {
   form.value.orderCode = value.orderCode;
   form.value.orderName = value.orderName;
@@ -558,6 +574,8 @@ const routeInfo = (value) => {
   form.value.processRouteCode = value.processRouteCode;
   form.value.processRouteName = value.processRouteName;
   form.value.processRouteVersion = value.processRouteVersion;
+  option.value.column[11].dicData = value.opGroups;
+  option.value.column[11].disabled = false;
   dialog1.visible = false;
 };
 // 传入一个url,后面不带/
@@ -569,7 +587,7 @@ const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
   Methords; //增删改查
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
-
+const opGroupShow = ref(true)
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
 // 设置表格列或者其他自定义的option
@@ -685,6 +703,44 @@ option.value = Object.assign(option.value, {
       },
     },
     {
+      label: "工序分组",
+      prop: "opType",
+      width: "100",
+      type: "select", //类型为下拉选择框
+      dicUrl:
+          dictDataUtil.request_url + dictDataUtil.TYPE_CODE.op_group,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+      change: ({ value, column }) => {
+        if (value === '2') {
+          //form.value.opGroup = "-"
+          option.value.column[11].display = false;
+          option.value.column[12].display = false
+        }else{
+          //form.value.opGroup =
+          option.value.column[11].disabled = false
+          option.value.column[11].display = true
+          if(value === '1'){
+            option.value.column[12].display = true
+          }else{
+            option.value.column[12].display = false
+          }
+        }
+        if(column.boxType === 'edit'){
+          option.value.column[11].dicData = form.value.opGroups
+        }
+      },
+      rules: [
+        {
+          required: true,
+          message: "工序分组不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
       label: "工艺路线",
       prop: "processRouteName",
       width: 125,
@@ -718,6 +774,44 @@ option.value = Object.assign(option.value, {
       },
     },
     {
+      label: "分组标识",
+      prop: "opGroup",
+      width: "100",
+      display: false,
+      disabled: true,
+      type: "select", //类型为下拉选择框
+      dicData: [],
+      props: {
+        label: "name",
+        value: "name",
+      },
+      rules: [
+        {
+          required: true,
+          message: "分组标识不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
+      label: "前置工单",
+      prop: "frontWorkOrderCode",
+      width: "100",
+      display: false,
+      rules: [
+        {
+          required: true,
+          message: "前置工单不能为空",
+          trigger: "trigger",
+        },
+      ],
+      click: ({ value, column }) => {
+        if (column.boxType) {
+          dialog7.visible = true;
+        }
+      },
+    },
+    {
       label: "工艺版本",
       width: 100,
       overHidden: true,
@@ -793,6 +887,11 @@ option.value = Object.assign(option.value, {
       },
     },
     {
+      label: "生产批号",
+      prop: "produceCode",
+      width: "100",
+    },
+    {
       label: "开始时间",
       prop: "planStartWhen",
       width: 180,