|
|
@@ -2309,9 +2309,13 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
} else {
|
|
|
- num = Math.ceil(
|
|
|
- row.measureQuantity / row.packingSpecificationOption[1]?.packageCell
|
|
|
- );
|
|
|
+ if (row.packingSpecificationOption[1]?.packageCell) {
|
|
|
+ num = Math.ceil(
|
|
|
+ row.measureQuantity / row.packingSpecificationOption[1]?.packageCell
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ num = row.packingQuantity;
|
|
|
+ }
|
|
|
}
|
|
|
console.log(packingNum, measureNum, num, '加油加油加油')
|
|
|
|
|
|
@@ -2481,18 +2485,27 @@ export default {
|
|
|
// this.form.categoryLevelTopId
|
|
|
);
|
|
|
} else {
|
|
|
- let num = Math.ceil(
|
|
|
- row.measureQuantity / row.packingSpecificationOption[1]?.packageCell
|
|
|
- );
|
|
|
+ if (row.packingSpecificationOption[1]?.packageCell) {
|
|
|
+ let num = Math.ceil(
|
|
|
+ row.measureQuantity / row.packingSpecificationOption[1]?.packageCell
|
|
|
+ );
|
|
|
+ this.$refs.wareHouseDailogRef.open(
|
|
|
+ num,
|
|
|
+ row.measureQuantity,
|
|
|
+ idx,
|
|
|
+ row.warehouseId,
|
|
|
+ row.warehouseName + '',
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.$refs.wareHouseDailogRef.open(
|
|
|
+ num,
|
|
|
+ row.measureQuantity,
|
|
|
+ idx,
|
|
|
+ row.warehouseId,
|
|
|
+ row.warehouseName + ''
|
|
|
+ );
|
|
|
+ }
|
|
|
console.log(num, 'num')
|
|
|
- this.$refs.wareHouseDailogRef.open(
|
|
|
- num,
|
|
|
- row.measureQuantity,
|
|
|
- idx,
|
|
|
- row.warehouseId,
|
|
|
- row.warehouseName + '',
|
|
|
- // this.form.categoryLevelTopId
|
|
|
- );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2606,7 +2619,7 @@ export default {
|
|
|
if (!row.measureType) return this.$message.warning('请到主数据维计量类型!')
|
|
|
|
|
|
// 判断是否拆包,如果是不拆包,计量单位=包装单位,则不生成包装层数据
|
|
|
- if (row.measureType != 1) {
|
|
|
+ if (!row.isUnpack && row.measureType != 1) {
|
|
|
// 计量单位=包装单位,则不生成包装层数据
|
|
|
if (row.measureUnit == row.packingUnit) {
|
|
|
// 直接生成物品层数据
|
|
|
@@ -2674,15 +2687,17 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
} else {
|
|
|
- num = Math.ceil(
|
|
|
- row.measureQuantity / row.packingSpecificationOption[1]?.packageCell
|
|
|
- );
|
|
|
- filterArr = row.packingSpecificationOption.filter((item) => {
|
|
|
- return (
|
|
|
- item.packageUnit == row.packingUnit &&
|
|
|
- item.packageUnit != item.conversionUnit
|
|
|
+ if (row.packingSpecificationOption[1]?.packageCell) {
|
|
|
+ num = Math.ceil(
|
|
|
+ row.measureQuantity / row.packingSpecificationOption[1]?.packageCell
|
|
|
);
|
|
|
- });
|
|
|
+ filterArr = row.packingSpecificationOption.filter((item) => {
|
|
|
+ return (
|
|
|
+ item.packageUnit == row.packingUnit &&
|
|
|
+ item.packageUnit != item.conversionUnit
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
console.log('num-----------', num);
|