|
|
@@ -695,7 +695,6 @@
|
|
|
clearable
|
|
|
v-model="row.modelKey"
|
|
|
:isOne="$index == 1"
|
|
|
- multiple
|
|
|
filterable
|
|
|
allow-create
|
|
|
default-first-option
|
|
|
@@ -710,7 +709,6 @@
|
|
|
clearable
|
|
|
v-model="row.colorKey"
|
|
|
:isOne="$index == 1"
|
|
|
- multiple
|
|
|
filterable
|
|
|
allow-create
|
|
|
default-first-option
|
|
|
@@ -1801,10 +1799,10 @@
|
|
|
packingUnitId:
|
|
|
filtersItem.purchaseUnitId || filtersItem.saleUnitId,
|
|
|
modelKey: filtersItem.modelKey
|
|
|
- ? filtersItem.modelKey.split(',')
|
|
|
+ ? filtersItem.modelKey
|
|
|
: '', // 机型
|
|
|
colorKey: filtersItem.colorKey
|
|
|
- ? filtersItem.colorKey.split(',')
|
|
|
+ ? filtersItem.colorKey
|
|
|
: '', // 颜色
|
|
|
measureType: item.measureType, // 计量方式
|
|
|
netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
|
|
|
@@ -1816,12 +1814,8 @@
|
|
|
pricingWay: pricingWay, //计价方式
|
|
|
purpose: '', // 用途
|
|
|
detailPurchaseDate,
|
|
|
- detailExpireDate: this.saleProductList.find(
|
|
|
- (product) => product.productId == item.id
|
|
|
- )?.guaranteePeriodDeadline,
|
|
|
- detailProductionDate: this.saleProductList.find(
|
|
|
- (product) => product.productId == item.id
|
|
|
- )?.productionDate,
|
|
|
+ detailExpireDate: filtersItem?.guaranteePeriodDeadline,
|
|
|
+ detailProductionDate: filtersItem?.productionDate,
|
|
|
|
|
|
provenance: filtersItem.provenance, //产地
|
|
|
isUnpack: item.isUnpack, // 是否允许拆包
|
|
|
@@ -2045,18 +2039,18 @@
|
|
|
colorKey:
|
|
|
this.bizType == 1
|
|
|
? this.form.colorKey
|
|
|
- ? this.form.colorKey.split(',')
|
|
|
+ ? this.form.colorKey
|
|
|
: ''
|
|
|
: filtersItem.colorKey
|
|
|
- ? filtersItem.colorKey.split(',')
|
|
|
+ ? filtersItem.colorKey
|
|
|
: '', // 颜色
|
|
|
modelKey:
|
|
|
this.bizType == 1
|
|
|
? this.form.modelKey
|
|
|
- ? this.form.modelKey.split(',')
|
|
|
+ ? this.form.modelKey
|
|
|
: ''
|
|
|
: filtersItem.modelKey
|
|
|
- ? filtersItem.modelKey.split(',')
|
|
|
+ ? filtersItem.modelKey
|
|
|
: '', // 机型
|
|
|
batchNo: [1, 3, 6].includes(this.bizType)
|
|
|
? filtersItem.batchNo || batchNo
|
|
|
@@ -2077,17 +2071,18 @@
|
|
|
packingSpecificationOption: newSpecificationOption, // 包装规格选项
|
|
|
packingSpecificationLabel: packingSpecificationLabel, // 包装规格显示
|
|
|
// minPackingQuantity: 1, // 最小包装单元数量
|
|
|
- packingQuantity: this.isMoreProduct
|
|
|
- ? this.detailList.filter(
|
|
|
- (val) => val.productCode == item.code
|
|
|
- ).length
|
|
|
- : this.detailList.length || this.form.detailList.length, // 包装数量
|
|
|
+ // packingQuantity: this.isMoreProduct
|
|
|
+ // ? this.detailList.filter(
|
|
|
+ // (val) => val.productCode == item.code
|
|
|
+ // ).length
|
|
|
+ // : this.detailList.length || this.form.detailList.length, // 包装数量
|
|
|
+ packingQuantity: this.isMoreProduct ? filtersItem.packingQuantity : this.detailList.length || this.detailList.length,
|
|
|
packingUnit: packingUnit, // 单位
|
|
|
measureQuantity: this.isMoreProduct
|
|
|
- ? this.getMeasureQuantity(item.code)
|
|
|
+ ? filtersItem.quantity
|
|
|
: this.form.totalCount, // 计量数量
|
|
|
- measureUnit: item.measuringUnit, // 计量单位
|
|
|
- measureType: item.measureType, // 计量方式
|
|
|
+ measureUnit: filtersItem.measuringUnit, // 计量单位
|
|
|
+ measureType: filtersItem.measureType, // 计量方式
|
|
|
netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
|
|
|
weight: weight || 0, // 重量
|
|
|
singleWeight: singleWeight || 0,
|
|
|
@@ -2097,14 +2092,10 @@
|
|
|
purpose: '', // 用途
|
|
|
isUnpack: item.isUnpack, // 是否允许拆包
|
|
|
warehouseId: this.isMoreProduct
|
|
|
- ? this.detailList.find(
|
|
|
- (val) => val.productCode == item.code
|
|
|
- )?.warehouseId
|
|
|
+ ? filtersItem?.warehouseId
|
|
|
: this.form.warehouseId, // 仓库id
|
|
|
warehouseName: this.isMoreProduct
|
|
|
- ? this.detailList.find(
|
|
|
- (val) => val.productCode == item.code
|
|
|
- )?.warehouseName
|
|
|
+ ? filtersItem?.warehouseName
|
|
|
: this.form.warehouseName, // 仓库名称
|
|
|
warehouseIds: this.isMoreProduct
|
|
|
? this.detailList
|
|
|
@@ -2254,17 +2245,17 @@
|
|
|
item.specification || this.productList[0].specification, // 规格
|
|
|
brandNum: item.productBrand || this.productList[0].brandNum, // 牌号
|
|
|
colorKey:
|
|
|
- (item.colorKey ? item.colorKey.split(',') : '') ||
|
|
|
+ (item.colorKey ? item.colorKey : '') ||
|
|
|
this.productList[0].colorKey, // 颜色
|
|
|
modelKey:
|
|
|
- (item.modelKey ? item.modelKey.split(',') : '') ||
|
|
|
+ (item.modelKey ? item.modelKey : '') ||
|
|
|
this.productList[0].modelKey, // 机型
|
|
|
parentIndex: this.isMoreProduct
|
|
|
? this.productList.find(
|
|
|
(val) => val.categoryCode == item.productCode
|
|
|
).index
|
|
|
: this.productList[0].index, // 产品索引
|
|
|
- batchNo: this.productList[0].batchNo, // 批次号
|
|
|
+ batchNo: item.batchNo || this.productList[0].batchNo, // 批次号
|
|
|
packageNo:
|
|
|
item.packageNo ||
|
|
|
item.packingCode ||
|
|
|
@@ -2286,13 +2277,13 @@
|
|
|
)?.packingSpecificationOption
|
|
|
: this.productList[0].packingSpecificationOption, // 包装规格
|
|
|
|
|
|
- netWeight: this.productList[0].netWeight, // 净重
|
|
|
+ netWeight: item.netWeight || this.productList[0].netWeight, // 净重
|
|
|
barcodes: item.barcodes || item.sendCode, // 发货条码
|
|
|
clientCode: clientCode, // 客户代号
|
|
|
materielDesignation:
|
|
|
item.materielDesignation || item.extInfo?.materielCode, // 物料代号
|
|
|
engrave: item.engrave || item.extInfo?.engrave, // 刻码
|
|
|
- isUnpack: this.productList[0].isUnpack, // 是否允许拆包
|
|
|
+ isUnpack: item.isUnpack || this.productList[0].isUnpack, // 是否允许拆包
|
|
|
productionDate: productionDate, // 生产日期
|
|
|
purchaseDate: purchaseDate, // 采购时间
|
|
|
result: 1, // 结果(1合格 2不合格)
|
|
|
@@ -2608,10 +2599,10 @@
|
|
|
_taskId = this.detailProductList[0]?.taskId;
|
|
|
}
|
|
|
if (packingItem.modelKey) {
|
|
|
- packingItem.modelKey = packingItem.modelKey.toString();
|
|
|
+ packingItem.modelKey = packingItem.modelKey;
|
|
|
}
|
|
|
if (packingItem.colorKey) {
|
|
|
- packingItem.colorKey = packingItem.colorKey.toString();
|
|
|
+ packingItem.colorKey = packingItem.colorKey;
|
|
|
}
|
|
|
return {
|
|
|
...packingItem,
|
|
|
@@ -2628,10 +2619,10 @@
|
|
|
// 处理产品数据
|
|
|
this.productList = this.productList.map((productItem) => {
|
|
|
if (productItem.modelKey) {
|
|
|
- productItem.modelKey = productItem.modelKey.toString();
|
|
|
+ productItem.modelKey = productItem.modelKey;
|
|
|
}
|
|
|
if (productItem.colorKey) {
|
|
|
- productItem.colorKey = productItem.colorKey.toString();
|
|
|
+ productItem.colorKey = productItem.colorKey;
|
|
|
}
|
|
|
return {
|
|
|
...productItem,
|
|
|
@@ -3048,8 +3039,8 @@
|
|
|
categoryCode: item.code, // 物品编码
|
|
|
categoryModel: item.modelType, // 物品型号
|
|
|
specification: item.specification, // 规格
|
|
|
- modelKey: item.modelKey ? item.modelKey.split(',') : '', // 机型
|
|
|
- colorKey: item.colorKey ? item.colorKey.split(',') : '', // 颜色
|
|
|
+ modelKey: item.modelKey ? item.modelKey : '', // 机型
|
|
|
+ colorKey: item.colorKey ? item.colorKey : '', // 颜色
|
|
|
brandNum: item.brandNum, // 牌号
|
|
|
batchNo: batchNo, // 批次号
|
|
|
supplierListOptions: supplierList[item.id], // 供应商列表
|