|
@@ -267,7 +267,6 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
:ref="'packingQuantity' + $index"
|
|
:ref="'packingQuantity' + $index"
|
|
|
type="number"
|
|
type="number"
|
|
|
- placeholder="请输入"
|
|
|
|
|
@keyup.native="
|
|
@keyup.native="
|
|
|
moveFocus(
|
|
moveFocus(
|
|
|
$event,
|
|
$event,
|
|
@@ -1002,8 +1001,7 @@
|
|
|
pageSize: 20, // 物料和包装列表条数
|
|
pageSize: 20, // 物料和包装列表条数
|
|
|
pickingPageNum: 1, // 包装虚拟分页页数
|
|
pickingPageNum: 1, // 包装虚拟分页页数
|
|
|
materielPageNum: 1, // 物料虚拟分页页数
|
|
materielPageNum: 1, // 物料虚拟分页页数
|
|
|
- packingSpecificationOption: [], // 包装规格下拉
|
|
|
|
|
- proData: {}
|
|
|
|
|
|
|
+ packingSpecificationOption: [] // 包装规格下拉
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -1185,11 +1183,14 @@
|
|
|
)[0].name;
|
|
)[0].name;
|
|
|
},
|
|
},
|
|
|
// 计算最小单元数量
|
|
// 计算最小单元数量
|
|
|
- async computeNum(row, index, isClear) {
|
|
|
|
|
|
|
+ computeNum(row, index, isClear) {
|
|
|
|
|
+ console.log(row);
|
|
|
|
|
+ console.log(row.packingQuantity);
|
|
|
|
|
+ console.log(row.packingUnit);
|
|
|
// 清空仓库(包装数量输入)
|
|
// 清空仓库(包装数量输入)
|
|
|
if (isClear) {
|
|
if (isClear) {
|
|
|
- // this.$set(this.productList[index], 'warehouseId', '');
|
|
|
|
|
- // this.$set(this.productList[index], 'warehouseName', '');
|
|
|
|
|
|
|
+ this.$set(this.productList[index], 'warehouseId', '');
|
|
|
|
|
+ this.$set(this.productList[index], 'warehouseName', '');
|
|
|
if (row.packingQuantity < 0) {
|
|
if (row.packingQuantity < 0) {
|
|
|
this.$set(this.productList[index], 'packingQuantity', 1);
|
|
this.$set(this.productList[index], 'packingQuantity', 1);
|
|
|
} else if (row.packingQuantity > 9999) {
|
|
} else if (row.packingQuantity > 9999) {
|
|
@@ -1209,16 +1210,8 @@
|
|
|
// }
|
|
// }
|
|
|
}
|
|
}
|
|
|
if (row.packingQuantity && row.packingUnit) {
|
|
if (row.packingQuantity && row.packingUnit) {
|
|
|
- //获取仓库
|
|
|
|
|
- const res = await warehouseDefinition.list({
|
|
|
|
|
- inventoryType: this.proData[0]?.categoryLevelPathIdParent
|
|
|
|
|
- });
|
|
|
|
|
- if (res.length > 0) {
|
|
|
|
|
- let name = res[0]?.factoryName + '-' + res[0]?.name;
|
|
|
|
|
- console.log('仓库-----------------------------', res);
|
|
|
|
|
- this.$set(this.productList[index], 'warehouseId', res[0].id);
|
|
|
|
|
- this.$set(this.productList[index], 'warehouseName', name);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ console.log(index);
|
|
|
|
|
+ console.log(row.packingSpecificationOption);
|
|
|
let startIndex = row.packingSpecificationOption.findIndex((ite) => {
|
|
let startIndex = row.packingSpecificationOption.findIndex((ite) => {
|
|
|
return (
|
|
return (
|
|
|
row.measuringUnit == ite.packingUnit &&
|
|
row.measuringUnit == ite.packingUnit &&
|
|
@@ -1416,8 +1409,8 @@
|
|
|
},
|
|
},
|
|
|
// 获取物品列表
|
|
// 获取物品列表
|
|
|
async getListItems() {
|
|
async getListItems() {
|
|
|
- const res2 = await warehouseDefinition.getTreeByGroup({ type: 1 });
|
|
|
|
|
- this.goodsLists = res2;
|
|
|
|
|
|
|
+ const { data } = await getTreeByGroup({ type: 2 });
|
|
|
|
|
+ this.goodsLists = data;
|
|
|
},
|
|
},
|
|
|
// 打开单据来源弹窗
|
|
// 打开单据来源弹窗
|
|
|
openDocumentSourceDialog() {
|
|
openDocumentSourceDialog() {
|
|
@@ -1764,8 +1757,6 @@
|
|
|
});
|
|
});
|
|
|
obj.warehouseIds = warehouseId;
|
|
obj.warehouseIds = warehouseId;
|
|
|
obj.warehouseNames = warehouseName;
|
|
obj.warehouseNames = warehouseName;
|
|
|
- console.log('入库数据', obj);
|
|
|
|
|
- return;
|
|
|
|
|
// 是否需要审核(0审核 1跳过审核)
|
|
// 是否需要审核(0审核 1跳过审核)
|
|
|
if (obj.bizType == '12') {
|
|
if (obj.bizType == '12') {
|
|
|
obj.isSkip = 1;
|
|
obj.isSkip = 1;
|
|
@@ -2074,7 +2065,6 @@
|
|
|
},
|
|
},
|
|
|
// 添加物品明细
|
|
// 添加物品明细
|
|
|
async addGoods(data) {
|
|
async addGoods(data) {
|
|
|
- this.proData = data;
|
|
|
|
|
// 获取批次号
|
|
// 获取批次号
|
|
|
const batchNo = await getCode('lot_number_code');
|
|
const batchNo = await getCode('lot_number_code');
|
|
|
// 获取供应商
|
|
// 获取供应商
|
|
@@ -2436,20 +2426,6 @@
|
|
|
]);
|
|
]);
|
|
|
this.generateWrappers(row, index, data);
|
|
this.generateWrappers(row, index, data);
|
|
|
this.$set(this.productList[index], 'isSave', true);
|
|
this.$set(this.productList[index], 'isSave', true);
|
|
|
- this.$set(this.productList[index], 'warehouseId', row.warehouseId);
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.productList[index],
|
|
|
|
|
- 'warehouseName',
|
|
|
|
|
- row.warehouseName
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
- this.$set(this.productList[index], 'warehouseIds', row.warehouseId);
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.productList[index],
|
|
|
|
|
- 'warehouseNames',
|
|
|
|
|
- row.warehouseName
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
// 加载虚拟列表数据(分页)
|
|
// 加载虚拟列表数据(分页)
|
|
|
// this.pickingFetchData();
|
|
// this.pickingFetchData();
|
|
|
// this.materielFetchData();
|
|
// this.materielFetchData();
|
|
@@ -2482,12 +2458,7 @@
|
|
|
let num = Math.ceil(
|
|
let num = Math.ceil(
|
|
|
row.packingQuantity / filterArr[0].packageCell
|
|
row.packingQuantity / filterArr[0].packageCell
|
|
|
);
|
|
);
|
|
|
- this.$refs.wareHouseDailogRef.open(
|
|
|
|
|
- num,
|
|
|
|
|
- idx,
|
|
|
|
|
- row.warehouseId,
|
|
|
|
|
- row.warehouseName + ''
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ this.$refs.wareHouseDailogRef.open(num, idx);
|
|
|
} else {
|
|
} else {
|
|
|
let num = row.packingQuantity;
|
|
let num = row.packingQuantity;
|
|
|
if (measureBoolen) {
|
|
if (measureBoolen) {
|
|
@@ -2513,9 +2484,7 @@
|
|
|
? num
|
|
? num
|
|
|
: row.measureQuantity
|
|
: row.measureQuantity
|
|
|
: row.packingQuantity,
|
|
: row.packingQuantity,
|
|
|
- idx,
|
|
|
|
|
- row.warehouseId,
|
|
|
|
|
- row.warehouseName + ''
|
|
|
|
|
|
|
+ idx
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -2731,12 +2700,8 @@
|
|
|
}
|
|
}
|
|
|
let item = {
|
|
let item = {
|
|
|
index: row.index + '-' + index, // 包装索引
|
|
index: row.index + '-' + index, // 包装索引
|
|
|
- warehouseId: row.warehouseIds
|
|
|
|
|
- ? row.warehouseIds[index]
|
|
|
|
|
- : row.warehouseIds, // 仓库id
|
|
|
|
|
- warehouseName: row.warehouseNames
|
|
|
|
|
- ? row.warehouseNames[index]
|
|
|
|
|
- : row.warehouseNames, // 仓库名称
|
|
|
|
|
|
|
+ warehouseId: row.warehouseIds[index], // 仓库id
|
|
|
|
|
+ warehouseName: row.warehouseNames[index], // 仓库名称
|
|
|
categoryName: row.categoryName, // 产品名称
|
|
categoryName: row.categoryName, // 产品名称
|
|
|
categoryCode: row.categoryCode, // 产品编码
|
|
categoryCode: row.categoryCode, // 产品编码
|
|
|
categoryModel: row.categoryModel, // 物品型号
|
|
categoryModel: row.categoryModel, // 物品型号
|