Просмотр исходного кода

新增等级修改时更新码单号

lph 1 год назад
Родитель
Сommit
92f3d1e576
1 измененных файлов с 13 добавлено и 1 удалено
  1. 13 1
      zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

+ 13 - 1
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -270,6 +270,7 @@
                     clearable
                     filterable
                     size="mini"
+                    @change="levelChangeHandler"
                   >
                     <el-option
                       v-for="item in dropDownData.level"
@@ -735,6 +736,16 @@ export default {
   },
 
   methods: {
+    // 等级改变回调
+    async levelChangeHandler() {
+      // 等级发生变化,重新获取码单号
+      let res = await getQrCode();
+      if (res.code == 200) {
+        this.qrCode = res.msg;
+      } else {
+        this.$message.error(res.msg);
+      }
+    },
     // 机台改变回调
     machineToolChange(id) {
       if (id) {
@@ -1134,8 +1145,9 @@ export default {
         let res = await getLineOptionLsit(payLoad);
         if (res.code == 200) {
           this.lineOptions = res.rows;
-          if (this.lineOptions.length > 0) {
+          if (this.lineOptions.length > 0 && this.excuteType == 1) {
             this.form.machineTool = this.lineOptions[0].id;
+            this.machineToolChange(this.form.machineTool);
           }
           console.log(this.lineOptions);
         } else {