🐛 装货管理与运输计划货物信息列统一为仅一种货物时不显示等N种货物
This commit is contained in:
@@ -124,7 +124,8 @@ const formatGoodsInfo = row => {
|
||||
const text = Object.entries(groups)
|
||||
.map(([unit, group]) => {
|
||||
const quantity = formatGoodsQuantity(group.quantity);
|
||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${unit ? ` ${unit}` : ''}`;
|
||||
const typeName = group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||
return `${typeName} | ${quantity}${unit ? ` ${unit}` : ''}`;
|
||||
})
|
||||
.join('; ');
|
||||
|
||||
|
||||
@@ -3949,9 +3949,9 @@ export default {
|
||||
return Object.values(groups)
|
||||
.map(group => {
|
||||
const quantity = this.formatDispatchQuantity(group.quantity);
|
||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
||||
group.unit ? ` ${group.unit}` : ''
|
||||
}`;
|
||||
const typeName =
|
||||
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
|
||||
})
|
||||
.join('; ');
|
||||
},
|
||||
@@ -7549,12 +7549,13 @@ export default {
|
||||
}, {});
|
||||
|
||||
const cargoInfo = Object.values(groups)
|
||||
.map(
|
||||
group =>
|
||||
`${group.cargoType}等${group.count}种货物 | ${this.formatDispatchQuantity(
|
||||
group.quantity
|
||||
)}${group.unit ? ` ${group.unit}` : ''}`
|
||||
)
|
||||
.map(group => {
|
||||
const typeName =
|
||||
group.count > 1 ? `${group.cargoType}等${group.count}种货物` : group.cargoType;
|
||||
return `${typeName} | ${this.formatDispatchQuantity(group.quantity)}${
|
||||
group.unit ? ` ${group.unit}` : ''
|
||||
}`;
|
||||
})
|
||||
.join('; ');
|
||||
return cargoInfo || plan.goodsInfo || '';
|
||||
},
|
||||
|
||||
@@ -2524,9 +2524,9 @@ export default {
|
||||
Object.values(groups)
|
||||
.map(group => {
|
||||
const quantity = this.formatGoodsQuantity(group.quantity);
|
||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
||||
group.unit ? ` ${group.unit}` : ''
|
||||
}`;
|
||||
const typeName =
|
||||
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
|
||||
})
|
||||
.join('; ') || '-'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user