|
@@ -1876,7 +1876,8 @@
|
|
|
filtersItem &&
|
|
filtersItem &&
|
|
|
filtersItem.isAllPackageData &&
|
|
filtersItem.isAllPackageData &&
|
|
|
filtersItem.isAllPackageData == 1
|
|
filtersItem.isAllPackageData == 1
|
|
|
- ? filtersItem.packingUnit
|
|
|
|
|
|
|
+ ? filtersItem.packingUnit ||
|
|
|
|
|
+ newSpecificationOption[1]?.packingUnit
|
|
|
: item.packingUnit, // 单位
|
|
: item.packingUnit, // 单位
|
|
|
|
|
|
|
|
unit:
|
|
unit:
|
|
@@ -1899,8 +1900,12 @@
|
|
|
? filtersItem.measuringUnit
|
|
? filtersItem.measuringUnit
|
|
|
: item.measuringUnit, // 计量单位
|
|
: item.measuringUnit, // 计量单位
|
|
|
unitId: filtersItem.purchaseUnitId || filtersItem.saleUnitId,
|
|
unitId: filtersItem.purchaseUnitId || filtersItem.saleUnitId,
|
|
|
- modelKey: filtersItem.modelKey ? filtersItem.modelKey?.split(',')?.[0] || '' : '', // 机型
|
|
|
|
|
- colorKey: filtersItem.colorKey ? filtersItem.colorKey?.split(',')?.[0] || '' : '', // 颜色
|
|
|
|
|
|
|
+ modelKey: filtersItem.modelKey
|
|
|
|
|
+ ? filtersItem.modelKey?.split(',')?.[0] || ''
|
|
|
|
|
+ : '', // 机型
|
|
|
|
|
+ colorKey: filtersItem.colorKey
|
|
|
|
|
+ ? filtersItem.colorKey?.split(',')?.[0] || ''
|
|
|
|
|
+ : '', // 颜色
|
|
|
measureType: item.measureType, // 计量方式
|
|
measureType: item.measureType, // 计量方式
|
|
|
netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
|
|
netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
|
|
|
singleWeight: singleWeight || 0, // 单重重量
|
|
singleWeight: singleWeight || 0, // 单重重量
|
|
@@ -2041,6 +2046,7 @@
|
|
|
// );
|
|
// );
|
|
|
|
|
|
|
|
// 生成产品列表
|
|
// 生成产品列表
|
|
|
|
|
+ let newSpecificationOption = [];
|
|
|
this.productList = mergedList.map((filtersItem, index) => {
|
|
this.productList = mergedList.map((filtersItem, index) => {
|
|
|
let item = res.find(
|
|
let item = res.find(
|
|
|
(detailItem) =>
|
|
(detailItem) =>
|
|
@@ -2088,7 +2094,7 @@
|
|
|
})
|
|
})
|
|
|
.filter((item) => !!item);
|
|
.filter((item) => !!item);
|
|
|
|
|
|
|
|
- const newSpecificationOption = packingSpecificationItem;
|
|
|
|
|
|
|
+ newSpecificationOption = packingSpecificationItem;
|
|
|
|
|
|
|
|
// 换算重量
|
|
// 换算重量
|
|
|
let weight = 0;
|
|
let weight = 0;
|
|
@@ -2161,7 +2167,11 @@
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- let packingUnit = filtersItem.packingUnit;
|
|
|
|
|
|
|
+ let packingUnit =
|
|
|
|
|
+ filtersItem.packingUnit ||
|
|
|
|
|
+ newSpecificationOption[1]?.conversionUnit ||
|
|
|
|
|
+ '';
|
|
|
|
|
+
|
|
|
let singleWeight = filtersItem.singleWeight || 0; // 单重重量
|
|
let singleWeight = filtersItem.singleWeight || 0; // 单重重量
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
@@ -2214,6 +2224,10 @@
|
|
|
? filtersItem.quantity
|
|
? filtersItem.quantity
|
|
|
: filtersItem.quantity || this.form.totalCount, // 计量数量
|
|
: filtersItem.quantity || this.form.totalCount, // 计量数量
|
|
|
measureUnit: filtersItem.measuringUnit, // 计量单位
|
|
measureUnit: filtersItem.measuringUnit, // 计量单位
|
|
|
|
|
+ quantity: this.isMoreProduct
|
|
|
|
|
+ ? filtersItem.quantity
|
|
|
|
|
+ : filtersItem.quantity || this.form.totalCount, // 数量
|
|
|
|
|
+ unit: filtersItem.measuringUnit, // 单位
|
|
|
measureType: item.measureType, // 计量方式
|
|
measureType: item.measureType, // 计量方式
|
|
|
netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
|
|
netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
|
|
|
weight: weight || 0, // 重量
|
|
weight: weight || 0, // 重量
|
|
@@ -2221,7 +2235,9 @@
|
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
|
totalMoney: filtersItem.totalPrice, // 总价
|
|
totalMoney: filtersItem.totalPrice, // 总价
|
|
|
unitPrice: filtersItem.unitPrice, // 单价
|
|
unitPrice: filtersItem.unitPrice, // 单价
|
|
|
- reelSpecification: filtersItem.reelSpecification || filtersItem.extInfo?.reelSpecification, // 盘具
|
|
|
|
|
|
|
+ reelSpecification:
|
|
|
|
|
+ filtersItem.reelSpecification ||
|
|
|
|
|
+ filtersItem.extInfo?.reelSpecification, // 盘具
|
|
|
purpose: '', // 用途
|
|
purpose: '', // 用途
|
|
|
isUnpack: item.isUnpack, // 是否允许拆包
|
|
isUnpack: item.isUnpack, // 是否允许拆包
|
|
|
warehouseId: this.isMoreProduct
|
|
warehouseId: this.isMoreProduct
|
|
@@ -2378,11 +2394,17 @@
|
|
|
item.specification || this.productList[0].specification, // 规格
|
|
item.specification || this.productList[0].specification, // 规格
|
|
|
brandNum: item.productBrand || this.productList[0].brandNum, // 牌号
|
|
brandNum: item.productBrand || this.productList[0].brandNum, // 牌号
|
|
|
colorKey:
|
|
colorKey:
|
|
|
- (item.colorKey ? item.colorKey?.split(',')?.[0] || '' : '') ||
|
|
|
|
|
- this.productList[0].colorKey?.split(',')?.[0] || '', // 颜色
|
|
|
|
|
|
|
+ (item.colorKey
|
|
|
|
|
+ ? item.colorKey?.split(',')?.[0] || ''
|
|
|
|
|
+ : '') ||
|
|
|
|
|
+ this.productList[0].colorKey?.split(',')?.[0] ||
|
|
|
|
|
+ '', // 颜色
|
|
|
modelKey:
|
|
modelKey:
|
|
|
- (item.modelKey ? item.modelKey?.split(',')?.[0] || '' : '') ||
|
|
|
|
|
- this.productList[0].modelKey?.split(',')?.[0] || '', // 机型
|
|
|
|
|
|
|
+ (item.modelKey
|
|
|
|
|
+ ? item.modelKey?.split(',')?.[0] || ''
|
|
|
|
|
+ : '') ||
|
|
|
|
|
+ this.productList[0].modelKey?.split(',')?.[0] ||
|
|
|
|
|
+ '', // 机型
|
|
|
parentIndex: this.isMoreProduct
|
|
parentIndex: this.isMoreProduct
|
|
|
? this.productList.find(
|
|
? this.productList.find(
|
|
|
(val) => val.categoryCode == item.productCode
|
|
(val) => val.categoryCode == item.productCode
|
|
@@ -2394,7 +2416,9 @@
|
|
|
item.packingCode ||
|
|
item.packingCode ||
|
|
|
packingCodeList[index]?.onlyCode, // 包装编码
|
|
packingCodeList[index]?.onlyCode, // 包装编码
|
|
|
packingQuantity: 1, // 包装数量
|
|
packingQuantity: 1, // 包装数量
|
|
|
- packingUnit: item.packingUnit, // 单位
|
|
|
|
|
|
|
+ packingUnit:
|
|
|
|
|
+ item.packingUnit ||
|
|
|
|
|
+ newSpecificationOption[1]?.conversionUnit, // 单位
|
|
|
measureQuantity: item.quantity || item.measureQuantity, // 计量数量
|
|
measureQuantity: item.quantity || item.measureQuantity, // 计量数量
|
|
|
measureUnit: item.measuringUnit || item.measureUnit, // 计量单位
|
|
measureUnit: item.measuringUnit || item.measureUnit, // 计量单位
|
|
|
supplierCode: item.supplierCode,
|
|
supplierCode: item.supplierCode,
|
|
@@ -2416,7 +2440,8 @@
|
|
|
materielDesignation:
|
|
materielDesignation:
|
|
|
item.materielDesignation || item.extInfo?.materielCode, // 物料代号
|
|
item.materielDesignation || item.extInfo?.materielCode, // 物料代号
|
|
|
engrave: item.engrave || item.extInfo?.engrave, // 刻码
|
|
engrave: item.engrave || item.extInfo?.engrave, // 刻码
|
|
|
- reelSpecification: item.reelSpecification || item.extInfo?.reelSpecification, // 盘具
|
|
|
|
|
|
|
+ reelSpecification:
|
|
|
|
|
+ item.reelSpecification || item.extInfo?.reelSpecification, // 盘具
|
|
|
isUnpack: item.isUnpack || this.productList[0].isUnpack, // 是否允许拆包
|
|
isUnpack: item.isUnpack || this.productList[0].isUnpack, // 是否允许拆包
|
|
|
productionDate: productionDate, // 生产日期
|
|
productionDate: productionDate, // 生产日期
|
|
|
purchaseDate: purchaseDate, // 采购时间
|
|
purchaseDate: purchaseDate, // 采购时间
|
|
@@ -3657,11 +3682,11 @@
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
this.$refs.wareHouseDailogRef.open(
|
|
this.$refs.wareHouseDailogRef.open(
|
|
|
- num,
|
|
|
|
|
- row.measureQuantity,
|
|
|
|
|
- idx,
|
|
|
|
|
- row.warehouseId,
|
|
|
|
|
- row.warehouseName + ''
|
|
|
|
|
|
|
+ num,
|
|
|
|
|
+ row.measureQuantity,
|
|
|
|
|
+ idx,
|
|
|
|
|
+ row.warehouseId,
|
|
|
|
|
+ row.warehouseName + ''
|
|
|
);
|
|
);
|
|
|
// if (packingBoolen) {
|
|
// if (packingBoolen) {
|
|
|
// console.log(
|
|
// console.log(
|
|
@@ -4055,8 +4080,7 @@
|
|
|
* : row.packingSpecificationOption[1].conversionUnit: row.measureUnit: packingBoolen ? filterArr[0].conversionUnit : row.packingUnit,
|
|
* : row.packingSpecificationOption[1].conversionUnit: row.measureUnit: packingBoolen ? filterArr[0].conversionUnit : row.packingUnit,
|
|
|
*/
|
|
*/
|
|
|
if (row.isUnpack) {
|
|
if (row.isUnpack) {
|
|
|
- item.packingUnit =
|
|
|
|
|
- row.packingSpecificationOption[1].conversionUnit;
|
|
|
|
|
|
|
+ item.packingUnit = row.packingSpecificationOption[1].conversionUnit;
|
|
|
// // 第二层条件: packingBoolen
|
|
// // 第二层条件: packingBoolen
|
|
|
// if (packingBoolen) {
|
|
// if (packingBoolen) {
|
|
|
// // 空值保护: 确保 filterArr[0] 存在
|
|
// // 空值保护: 确保 filterArr[0] 存在
|
|
@@ -4084,10 +4108,10 @@
|
|
|
? Number(item.measureQuantity)
|
|
? Number(item.measureQuantity)
|
|
|
: 0;
|
|
: 0;
|
|
|
} else {
|
|
} else {
|
|
|
- item.weight = this.$math.format(
|
|
|
|
|
- (row.singleWeight || 0) * item.measureQuantity,
|
|
|
|
|
- 14
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ item.weight = this.$math.format(
|
|
|
|
|
+ (row.singleWeight || 0) * item.measureQuantity,
|
|
|
|
|
+ 14
|
|
|
|
|
+ );
|
|
|
// console.log('计量单位为不为KG类======================');
|
|
// console.log('计量单位为不为KG类======================');
|
|
|
// // 计量单位为不为KG类,重新统计计算
|
|
// // 计量单位为不为KG类,重新统计计算
|
|
|
// let inBoolen = !!this.getDict(
|
|
// let inBoolen = !!this.getDict(
|