|
|
@@ -170,6 +170,8 @@
|
|
|
delDetailIds: [],
|
|
|
supplierProducts: {},
|
|
|
formDef,
|
|
|
+ rawList:[],
|
|
|
+ outputList:[],
|
|
|
|
|
|
acceptUnpackList: [
|
|
|
{
|
|
|
@@ -224,7 +226,9 @@
|
|
|
data.detailList.forEach((item) => {
|
|
|
item.supplierList = supplierObj[item.productId] || []
|
|
|
});
|
|
|
- this.list = data.detailList;
|
|
|
+ this.list = [...data.detailList, ...data.rawList, ...data.outputList];
|
|
|
+ this.rawList = data.rawList;
|
|
|
+ this.outputList = data.outputList;
|
|
|
this.supplierList = data.supplierList;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inventoryTable &&
|
|
|
@@ -262,6 +266,8 @@
|
|
|
async getplanData(id, type) {
|
|
|
this.loading = true;
|
|
|
let data = await getplanDetail(id);
|
|
|
+ this.rawList = data.rawDetailList;
|
|
|
+ this.outputList = data.outputDetailList;
|
|
|
this.loading = false;
|
|
|
if (data) {
|
|
|
let supplierObj = await this.getSupplierObj(data.detailList,'productId');
|
|
|
@@ -291,7 +297,11 @@
|
|
|
if (type == 'init') {
|
|
|
return;
|
|
|
}
|
|
|
- this.list = data.detailList;
|
|
|
+ this.list = [
|
|
|
+ ...data.detailList,
|
|
|
+ ...data.rawDetailList,
|
|
|
+ ...data.outputDetailList
|
|
|
+ ];
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inventoryTable &&
|
|
|
this.$refs.inventoryTable.putTableValue(data.detailList);
|
|
|
@@ -475,6 +485,14 @@
|
|
|
this.$message.warning('产品清单不能为空');
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ this.form.supplierList.forEach((item) => {
|
|
|
+ item.resultList = [
|
|
|
+ ...item.resultList,
|
|
|
+ ...this.rawList,
|
|
|
+ ...this.outputList
|
|
|
+ ];
|
|
|
+ });
|
|
|
this.form.files = this.form.files || [];
|
|
|
return this.form;
|
|
|
} catch (error) {
|