|
@@ -89,14 +89,15 @@
|
|
|
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,
|
|
|
getTemplateListByPlanId,
|
|
getTemplateListByPlanId,
|
|
|
getSampleListByPlanId,
|
|
getSampleListByPlanId,
|
|
|
getInventoryListByPlanId,
|
|
getInventoryListByPlanId,
|
|
|
- outInRecordsPage
|
|
|
|
|
|
|
+ outInRecordsPage,
|
|
|
|
|
+ getByCategoryId
|
|
|
} from '@/api/inspectionPlan/index.js';
|
|
} from '@/api/inspectionPlan/index.js';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -330,9 +331,10 @@ 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,categoryid) {
|
|
|
//通过来源和产品 获取来料清单
|
|
//通过来源和产品 获取来料清单
|
|
|
- await this.getGoodsList(receiveNo, productCode, null, productCategoryId, productCategoryName);
|
|
|
|
|
|
|
+ await this.getGoodsList(receiveNo, productCode, null, productCategoryId, productCategoryName,categoryid);
|
|
|
|
|
+
|
|
|
//通过抽样方式获取样品列表 全检 样品列表等于来料清单列表
|
|
//通过抽样方式获取样品列表 全检 样品列表等于来料清单列表
|
|
|
if (this.baseForm.qualityMode == 1) {
|
|
if (this.baseForm.qualityMode == 1) {
|
|
|
this.sampleList = this.packingList;
|
|
this.sampleList = this.packingList;
|
|
@@ -342,14 +344,28 @@ export default {
|
|
|
//通过来源和产品 获取质检方案
|
|
//通过来源和产品 获取质检方案
|
|
|
this.getQualityTemplate(productCode);
|
|
this.getQualityTemplate(productCode);
|
|
|
},
|
|
},
|
|
|
- async getGoodsList(receiveNo, productCode, ids, productCategoryId, productCategoryName) {
|
|
|
|
|
- let res = await outInRecordsPage({
|
|
|
|
|
- // receiveNo: receiveNo,
|
|
|
|
|
- sourceBizNo: receiveNo,
|
|
|
|
|
- categoryCode: productCode,
|
|
|
|
|
- qualityQlanId: ids,
|
|
|
|
|
- size:-1
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ async getGoodsList(receiveNo, productCode, ids, productCategoryId, productCategoryName,categoryid) {
|
|
|
|
|
+ let res;
|
|
|
|
|
+ // 根据物品id 编码查询主数据中物品编码是否需要拆包 是走 包装明细表 否 走获取产品表
|
|
|
|
|
+ let cateRes = await getByCategoryId({
|
|
|
|
|
+ categoryId: categoryid
|
|
|
|
|
+ })
|
|
|
|
|
+ if (cateRes) {
|
|
|
|
|
+ if (cateRes.isUnpack == 1) {
|
|
|
|
|
+ res = await outInRecordsPage({
|
|
|
|
|
+ // receiveNo: receiveNo,
|
|
|
|
|
+ sourceBizNo: receiveNo,
|
|
|
|
|
+ categoryCode: productCode,
|
|
|
|
|
+ categoryId: categoryid,
|
|
|
|
|
+ qualityQlanId: ids,
|
|
|
|
|
+ size:-1
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // 获取没有拆包的产品数据 --- 等接口
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
console.log(res, '来料清单');
|
|
console.log(res, '来料清单');
|
|
|
if (Array.isArray(res?.list)) {
|
|
if (Array.isArray(res?.list)) {
|
|
|
let _arr1 = [];
|
|
let _arr1 = [];
|