|
|
@@ -89,7 +89,7 @@
|
|
|
import baseInfo from './baseInfo.vue';
|
|
|
|
|
|
import { getCode } from '@/api/login';
|
|
|
-import {save, update, planIssued, } from '@/api/inspectionPlan';
|
|
|
+import { save, update, planIssued, } from '@/api/inspectionPlan';
|
|
|
import {
|
|
|
getPurchaseWarehouseGoods,
|
|
|
getQualityTemplateList,
|
|
|
@@ -329,9 +329,9 @@ export default {
|
|
|
this.schemePagination.currentPage = 1;
|
|
|
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) {
|
|
|
this.sampleList = this.packingList;
|
|
|
@@ -341,7 +341,7 @@ export default {
|
|
|
//通过来源和产品 获取质检方案
|
|
|
this.getQualityTemplate(productCode);
|
|
|
},
|
|
|
- async getGoodsList(receiveNo, productCode, ids,productCategoryId,productCategoryName) {
|
|
|
+ async getGoodsList(receiveNo, productCode, ids, productCategoryId, productCategoryName) {
|
|
|
let res = await getPurchaseWarehouseGoods({
|
|
|
receiveNo: receiveNo,
|
|
|
categoryCode: productCode,
|
|
|
@@ -510,10 +510,6 @@ export default {
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
- if (this.baseForm.qualityMode) {
|
|
|
- this.updateSampleList();
|
|
|
- }
|
|
|
-
|
|
|
let params = {
|
|
|
...this.baseForm,
|
|
|
qualityInventoryList: this.packingList,
|
|
|
@@ -528,6 +524,8 @@ export default {
|
|
|
}
|
|
|
let URL =
|
|
|
this.btnType == 'add' ? save : this.btnType == 'edit' ? update : '';
|
|
|
+ console.log(params, 'params')
|
|
|
+
|
|
|
URL(params)
|
|
|
.then((msg) => {
|
|
|
this.loading = false;
|
|
|
@@ -548,9 +546,6 @@ export default {
|
|
|
}
|
|
|
this.loading = true;
|
|
|
|
|
|
- if (this.baseForm.qualityMode) {
|
|
|
- this.updateSampleList();
|
|
|
- }
|
|
|
let params = {
|
|
|
...this.baseForm,
|
|
|
qualityInventoryList: this.packingList,
|
|
|
@@ -565,16 +560,16 @@ export default {
|
|
|
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;
|
|
|
}
|