|
|
@@ -757,9 +757,6 @@
|
|
|
methods: {
|
|
|
//包装保存
|
|
|
async packSave(row, index) {
|
|
|
- console.log('===', row);
|
|
|
- console.log('row.minPackingCount', row.minPackingCount);
|
|
|
- console.log(' this.detailList.length', this.detailList.length);
|
|
|
let packNo = 0;
|
|
|
this.warehousingMaterialList.forEach((item) => {
|
|
|
if (
|
|
|
@@ -770,19 +767,15 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- console.log('packNopackNopackNo', packNo);
|
|
|
-
|
|
|
if (packNo != this.detailList.length) {
|
|
|
//存当前没改之前包装数量
|
|
|
let count = 0;
|
|
|
|
|
|
for (const item of this.warehousingMaterialList) {
|
|
|
- console.log('item', item);
|
|
|
if (item.categoryId == row.categoryId) {
|
|
|
count = item.outInNum;
|
|
|
}
|
|
|
}
|
|
|
- console.log(111);
|
|
|
//新增包装更新物料
|
|
|
const arr = [];
|
|
|
row.outInDetailRecordVOList.forEach((it) => {
|
|
|
@@ -792,12 +785,8 @@
|
|
|
});
|
|
|
|
|
|
if (row.minPackingCount < Number(count)) {
|
|
|
- console.log(1);
|
|
|
- console.log('arr====arr', arr);
|
|
|
- console.log('rrrr', this.metailList.length);
|
|
|
this.metailList = this.metaUpdate(arr, row);
|
|
|
} else {
|
|
|
- console.log(2);
|
|
|
this.metailList = this.metaAdd(arr, row);
|
|
|
}
|
|
|
|
|
|
@@ -836,7 +825,6 @@
|
|
|
item.weight = sum;
|
|
|
}
|
|
|
});
|
|
|
- console.log(this.warehousingMaterialList);
|
|
|
},
|
|
|
//更新物料
|
|
|
metaUpdate(arr, row) {
|
|
|
@@ -869,8 +857,6 @@
|
|
|
no: obj.onlyCode + i.toString().padStart(4, '0')
|
|
|
});
|
|
|
}
|
|
|
- console.log('新增', newArr);
|
|
|
- console.log(arr);
|
|
|
|
|
|
let data = this.metailList.concat(newArr);
|
|
|
const uniqueData = data.reduce((acc, curr) => {
|
|
|
@@ -883,8 +869,6 @@
|
|
|
},
|
|
|
//包装编辑
|
|
|
packEdit(row, index) {
|
|
|
- console.log('row', row);
|
|
|
- console.log('this.detailList', this.detailList);
|
|
|
this.$set(row, 'isPack', false);
|
|
|
this.$set(
|
|
|
row,
|
|
|
@@ -903,16 +887,11 @@
|
|
|
item.position = `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`;
|
|
|
item.pathIds = `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`;
|
|
|
});
|
|
|
- console.log(argum);
|
|
|
this.$set(
|
|
|
this.warehousingMaterialList[idx],
|
|
|
'position',
|
|
|
argum[0].position
|
|
|
);
|
|
|
- console.log(
|
|
|
- 'this.warehousingMaterialList',
|
|
|
- this.warehousingMaterialList
|
|
|
- );
|
|
|
},
|
|
|
// 仓库编辑
|
|
|
handleWareHouse(row, idx) {
|
|
|
@@ -960,7 +939,6 @@
|
|
|
// 将数组2对象添加到数组1对象的outInDetailRecordVOList中
|
|
|
item1.arr.push(item2);
|
|
|
} else {
|
|
|
- console.log(item2);
|
|
|
item1.outInDetailRecordUpdatePOList.push({ ...item2 });
|
|
|
}
|
|
|
});
|
|
|
@@ -986,7 +964,6 @@
|
|
|
a.extInfo = this.extInfo;
|
|
|
|
|
|
const obj = this.formatUpdate(a);
|
|
|
- console.log('sss===》', obj);
|
|
|
|
|
|
try {
|
|
|
const data = await outin.update(obj);
|
|
|
@@ -1004,7 +981,6 @@
|
|
|
},
|
|
|
formatUpdate(a) {
|
|
|
delete a.outInDetailVOList;
|
|
|
- console.log(a);
|
|
|
// 删除 outInDetailVOList 数组对象里面的 outInDetailRecordVOList 数组对象里面的 outInDetailRecordMaterialDetailVOList
|
|
|
a.outInDetailUpdatePOList = a.outInDetailUpdatePOList.map((item) => {
|
|
|
const newItem = { ...item };
|
|
|
@@ -1049,7 +1025,6 @@
|
|
|
return arr;
|
|
|
},
|
|
|
packNum(row, value) {
|
|
|
- console.log(row);
|
|
|
const total = {
|
|
|
packingCount: Number(row.minPackingCount),
|
|
|
outInNum: Number(row.packingCount)
|
|
|
@@ -1086,12 +1061,10 @@
|
|
|
}
|
|
|
},
|
|
|
listSave(row, index) {
|
|
|
- console.log(row);
|
|
|
const fileds = [
|
|
|
// `warehousingMaterialList.${index}.batchNo`,
|
|
|
`warehousingMaterialList.${index}.position`
|
|
|
];
|
|
|
- console.log('==1', this.infoData.bizType);
|
|
|
if (this.infoData.bizType != 5) {
|
|
|
fileds.push(
|
|
|
...[
|
|
|
@@ -1139,7 +1112,6 @@
|
|
|
});
|
|
|
},
|
|
|
async createMaterialCode(row) {
|
|
|
- console.log('==--', row);
|
|
|
const {
|
|
|
packingCount,
|
|
|
minPackingCount,
|
|
|
@@ -1201,7 +1173,6 @@
|
|
|
this.detailList = this.pacKUpdate(dataArray);
|
|
|
this.metailList = this.metailUpdate(dataArray);
|
|
|
// this.metailList = this.metaAdd(dataArray);
|
|
|
- console.log('====>>>>>1', dataArray);
|
|
|
},
|
|
|
//包装修改
|
|
|
pacKUpdate(arr) {
|
|
|
@@ -1246,8 +1217,6 @@
|
|
|
},
|
|
|
//物料修改
|
|
|
metailUpdate(arr) {
|
|
|
- console.log('---', arr);
|
|
|
-
|
|
|
const extractedArray = [];
|
|
|
|
|
|
arr.forEach((item) => {
|
|
|
@@ -1316,7 +1285,6 @@
|
|
|
},
|
|
|
async _getInfo() {
|
|
|
const res = await outin.getById(this.$route.query.id);
|
|
|
- console.log('===', res);
|
|
|
if (res) {
|
|
|
this.infoData = res;
|
|
|
this.extInfo = res.extInfo;
|