|
|
@@ -2,7 +2,7 @@
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never">
|
|
|
<header-title title="基本信息"> </header-title>
|
|
|
-
|
|
|
+
|
|
|
<el-form
|
|
|
:model="formData"
|
|
|
ref="formName"
|
|
|
@@ -1652,17 +1652,29 @@
|
|
|
this.$message.error('请先保存所有产品信息');
|
|
|
return;
|
|
|
}
|
|
|
- console.log('ysy_初始', this.detailList[0]);
|
|
|
+ console.log('ysy_ bizType', this.bizType);
|
|
|
+ console.log('ysy_初始 detailList', this.detailList[0]);
|
|
|
+ console.log('ysy_初始 detailProductList', this.detailProductList[0]);
|
|
|
|
|
|
// 处理包装数据
|
|
|
- let _packingList = []
|
|
|
- _packingList = this.packingList.map((packingItem) => {
|
|
|
+ let _packingList = [];
|
|
|
+ _packingList = this.packingList.map((packingItem) => {
|
|
|
+ let _taskId = null;
|
|
|
+ let _workOrderId = null;
|
|
|
+ if ([1].includes(this.bizType)) {
|
|
|
+ _workOrderId = this.detailList[0]?.workOrderId;
|
|
|
+ _taskId = this.detailList[0]?.taskId;
|
|
|
+ } else {
|
|
|
+ _workOrderId = this.detailProductList[0]?.workOrderId;
|
|
|
+ _taskId = this.detailProductList[0]?.taskId;
|
|
|
+ }
|
|
|
+ // workOrderId: this.detailProductList[0]?.workOrderId,
|
|
|
+ // taskId: this.detailProductList[0]?.taskId,
|
|
|
+ // taskId: this.detailList[0]?.taskId,
|
|
|
+ // workOrderId: this.detailList[0]?.workOrderId,
|
|
|
return {
|
|
|
- ...packingItem,
|
|
|
- workOrderId: this.detailProductList[0]?.workOrderId,
|
|
|
- taskId: this.detailProductList[0]?.taskId,
|
|
|
- taskId: this.detailList[0]?.taskId,
|
|
|
- workOrderId: this.detailList[0]?.workOrderId,
|
|
|
+ workOrderId: _workOrderId,
|
|
|
+ taskId: _taskId,
|
|
|
outsourceBatchNo: this.detailProductList[0]?.batchNo,
|
|
|
outsourceCode: this.detailProductList[0]?.sourceCode,
|
|
|
materialDetailList: this.materialList.filter(
|
|
|
@@ -1670,6 +1682,8 @@
|
|
|
)
|
|
|
};
|
|
|
});
|
|
|
+ console.log('ysy_处理后 _packingList', _packingList);
|
|
|
+
|
|
|
// 处理产品数据
|
|
|
this.productList = this.productList.map((productItem) => {
|
|
|
return {
|
|
|
@@ -1681,8 +1695,6 @@
|
|
|
});
|
|
|
this.formData.outInDetailList = this.productList;
|
|
|
let obj = deepClone(this.formData);
|
|
|
-
|
|
|
-
|
|
|
|
|
|
// 处理物品类型assetType
|
|
|
obj.extInfo.assetType = obj.extInfo.assetType.join(',');
|
|
|
@@ -1703,11 +1715,11 @@
|
|
|
});
|
|
|
obj.warehouseIds = warehouseId;
|
|
|
obj.warehouseNames = warehouseName;
|
|
|
- console.log('yyyyy', obj)
|
|
|
+ console.log('yyyyy', obj);
|
|
|
setTimeout(() => {
|
|
|
resolve(obj);
|
|
|
}, 1000);
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
pickingHandleScroll() {
|
|
|
console.log('---------pickingHandleScroll------------');
|