yijing 1 год назад
Родитель
Сommit
1815338657
1 измененных файлов с 16 добавлено и 21 удалено
  1. 16 21
      src/views/inspectionPlan/components/edit.vue

+ 16 - 21
src/views/inspectionPlan/components/edit.vue

@@ -89,7 +89,7 @@
 import baseInfo from './baseInfo.vue';
 import baseInfo from './baseInfo.vue';
 
 
 import { getCode } from '@/api/login';
 import { getCode } from '@/api/login';
-import {save, update, planIssued, } from '@/api/inspectionPlan';
+import { save, update, planIssued, } from '@/api/inspectionPlan';
 import {
 import {
   getPurchaseWarehouseGoods,
   getPurchaseWarehouseGoods,
   getQualityTemplateList,
   getQualityTemplateList,
@@ -329,9 +329,9 @@ export default {
       this.schemePagination.currentPage = 1;
       this.schemePagination.currentPage = 1;
       this.schemePagination.total = this.schemeList.length;
       this.schemePagination.total = this.schemeList.length;
     },
     },
-    async getList(receiveNo, productCode,productCategoryId,productCategoryName) {
+    async getList(receiveNo, productCode, productCategoryId, productCategoryName) {
       //通过来源和产品 获取来料清单
       //通过来源和产品 获取来料清单
-      await this.getGoodsList(receiveNo, productCode,null,productCategoryId,productCategoryName);
+      await this.getGoodsList(receiveNo, productCode, null, productCategoryId, productCategoryName);
       //通过抽样方式获取样品列表 全检 样品列表等于来料清单列表
       //通过抽样方式获取样品列表 全检 样品列表等于来料清单列表
       if (this.baseForm.qualityMode == 1) {
       if (this.baseForm.qualityMode == 1) {
         this.sampleList = this.packingList;
         this.sampleList = this.packingList;
@@ -341,7 +341,7 @@ export default {
       //通过来源和产品 获取质检方案
       //通过来源和产品 获取质检方案
       this.getQualityTemplate(productCode);
       this.getQualityTemplate(productCode);
     },
     },
-    async getGoodsList(receiveNo, productCode, ids,productCategoryId,productCategoryName) {
+    async getGoodsList(receiveNo, productCode, ids, productCategoryId, productCategoryName) {
       let res = await getPurchaseWarehouseGoods({
       let res = await getPurchaseWarehouseGoods({
         receiveNo: receiveNo,
         receiveNo: receiveNo,
         categoryCode: productCode,
         categoryCode: productCode,
@@ -510,10 +510,6 @@ export default {
 
 
         this.loading = true;
         this.loading = true;
 
 
-        if (this.baseForm.qualityMode) {
-          this.updateSampleList();
-        }
-
         let params = {
         let params = {
           ...this.baseForm,
           ...this.baseForm,
           qualityInventoryList: this.packingList,
           qualityInventoryList: this.packingList,
@@ -528,6 +524,8 @@ export default {
         }
         }
         let URL =
         let URL =
           this.btnType == 'add' ? save : this.btnType == 'edit' ? update : '';
           this.btnType == 'add' ? save : this.btnType == 'edit' ? update : '';
+        console.log(params, 'params')
+
         URL(params)
         URL(params)
           .then((msg) => {
           .then((msg) => {
             this.loading = false;
             this.loading = false;
@@ -548,9 +546,6 @@ export default {
         }
         }
         this.loading = true;
         this.loading = true;
 
 
-        if (this.baseForm.qualityMode) {
-          this.updateSampleList();
-        }
         let params = {
         let params = {
           ...this.baseForm,
           ...this.baseForm,
           qualityInventoryList: this.packingList,
           qualityInventoryList: this.packingList,
@@ -565,16 +560,16 @@ export default {
           return;
           return;
         }
         }
 
 
-        // planIssued(params)
-        //   .then((msg) => {
-        //     this.loading = false;
-        //     this.$message.success(msg);
-        //     this.handleClose();
-        //     this.$emit('done');
-        //   })
-        //   .catch((e) => {
-        //     this.loading = false;
-        //   });
+        planIssued(params)
+          .then((msg) => {
+            this.loading = false;
+            this.$message.success(msg);
+            this.handleClose();
+            this.$emit('done');
+          })
+          .catch((e) => {
+            this.loading = false;
+          });
       });
       });
       this.loading = false;
       this.loading = false;
     }
     }