Răsfoiți Sursa

质检计划bug修复

jingshuyong 9 luni în urmă
părinte
comite
9f1c72d024

+ 7 - 4
src/views/inspectionPlan/components/new-baseInfo.vue

@@ -7,7 +7,7 @@
             dictName="质检计划类型"
             v-model="form.type"
             clearable
-            @change="typeChange"
+            @change="(e) => typeChange(e, 'select')"
             :disabled="btnType == 'detail' || btnType == 'issued'"
           ></DictSelection>
         </el-form-item>
@@ -509,8 +509,8 @@
     watch: {
       'form.type': {
         handler(newVal, old) {
-          this.clearData();
           if (!newVal) {
+            this.clearData();
             this.sourceList = [];
             this.$emit('resetTable');
             return;
@@ -755,7 +755,9 @@
       },
       //根据类型获取计划来源下拉
       typeChange(val, type) {
-        console.log(val, 'val 3456');
+        if (type == 'select') {
+          this.clearData();
+        }
         if (val == 5) {
           this.sourceList = [{ label: '受托收货单', value: '5' }];
           return;
@@ -780,7 +782,8 @@
             { label: '库存台账', value: '6' }
           ];
         }
-        if (!type) {
+        if (!type || type != 'select') {
+          console.log('执行 1')
           this.$emit('changeType');
         }
       },

+ 5 - 0
src/views/inspectionWork/details.vue

@@ -107,6 +107,7 @@
                   <el-input :value="form.total" disabled />
                 </el-form-item>
               </el-col>
+
               <el-col :span="6">
                 <el-form-item label="样品数">
                   <el-input :value="form.sampleQuantity" disabled />
@@ -360,6 +361,10 @@
           });
           this.form = obj;
           this.form.status = res.status;
+          console.log(result,'result')
+          if(name == '计划'){
+            this.form.total = result.data.productNumber || 0;
+          }
           this.fieldAssign(res, obj);
           this.sampleInfo(res);
         } catch (err) {