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

点击修改进来查询所有全检的样品清单

yijing 1 год назад
Родитель
Сommit
4ec7f0ca7a
2 измененных файлов с 14 добавлено и 10 удалено
  1. 14 9
      src/views/inspectionPlan/components/edit.vue
  2. 0 1
      src/views/inspectionWork/edit.vue

+ 14 - 9
src/views/inspectionPlan/components/edit.vue

@@ -290,13 +290,20 @@ export default {
           //   this.baseForm?.productCode,
           //   row?.id
           // );
-          debugger
           //操作行点击时查询清单
-          this.getInventoryList(row?.id);
+          await this.getInventoryList(row?.id);
           //操作行点击时查询质检
-          this.getTemplateList(row?.id);
+          await this.getTemplateList(row?.id);
           //操作行点击时查询样品
-          this.getSampleList(row?.id);
+          await this.getSampleList(row?.id);
+
+          if (this.baseForm.qualityMode == 1) {
+            this.sampleList = this.packingList;
+            this.samplePagination.currentPage = 1;
+            this.samplePagination.total = this.packingList.length;
+          } else {
+            this.sampleList = [];
+          }
         }
       } else {
         const code = await getCode('qms_plan_code');
@@ -305,7 +312,6 @@ export default {
       this.visible = true;
     },
     async getInventoryList(id) {
-      debugger
       let res = await getInventoryListByPlanId({
         planId: id
       });
@@ -410,13 +416,13 @@ export default {
       console.log('aaa')
       if (this.baseForm.qualityMode == 1) {
         this.sampleList = [];
-        if (this.baseForm.isUnpack != null && this.baseForm.isUnpack != undefined && this.baseForm.isUnpack!= '') {
+        if (this.baseForm.isUnpack != null && this.baseForm.isUnpack != undefined && this.baseForm.isUnpack != '') {
           if (this.baseForm.isUnpack == 2) {
             const num = Number(this.baseForm.productNumber || 0);
             if (num) {
               this.getUnpackSamList(this.packingList, num)
             }
-          }else if(this.baseForm.isUnpack == 1){
+          } else if (this.baseForm.isUnpack == 1) {
             if (this.baseForm.qualityMode == 1) {
               this.sampleList = this.packingList;
               this.samplePagination.currentPage = 1;
@@ -425,7 +431,7 @@ export default {
               this.sampleList = [];
             }
           }
-        }else{
+        } else {
           if (!this.isCheck) {
             const num = Number(this.baseForm.productNumber || 0);
             if (num) {
@@ -550,7 +556,6 @@ export default {
       this.schemePagination.currentPage = val;
     },
     changeModel(val) {
-      debugger
       this.baseForm.qualityMode = val;
       console.log(this.baseForm.productNumber, 'productNumberproductNumber数量')
       if (this.baseForm.qualityMode == 1) {

+ 0 - 1
src/views/inspectionWork/edit.vue

@@ -123,7 +123,6 @@ export default {
   methods: {
     //切换检验方式
     changeModel(val,flag) {
-      debugger
       this.form.qualityMode = val;
       //检验方式 全检
       if (this.form.qualityMode == 1) {