fix: 修复正式结算单结算明细运输总量未显示计量单位
This commit is contained in:
@@ -306,7 +306,7 @@
|
||||
</el-link>
|
||||
<span v-else-if="item.column.money">{{ formatMoney(row[item.column.prop]) }}</span>
|
||||
<span v-else-if="item.column.prop === 'transportQuantity'">
|
||||
{{ formatDetailTransportQuantity(row[item.column.prop]) }}
|
||||
{{ formatDetailTransportQuantity(row) }}
|
||||
</span>
|
||||
<span v-else-if="item.column.prop === 'mileage'">
|
||||
{{ formatDetailMileage(row[item.column.prop]) }}
|
||||
@@ -3172,13 +3172,13 @@ export default {
|
||||
formatMoney(value) {
|
||||
return `${Number(value || 0).toFixed(2)} RMB`;
|
||||
},
|
||||
formatQuantity(value) {
|
||||
if (value === undefined || value === null || value === '') return '-';
|
||||
formatDetailTransportQuantity(row) {
|
||||
const value = row.transportQuantity;
|
||||
if (this.readonly && Number(value) === -1) return '-';
|
||||
const quantity = Number(value);
|
||||
return Number.isFinite(quantity) ? quantity.toFixed(2) : '-';
|
||||
},
|
||||
formatDetailTransportQuantity(value) {
|
||||
return this.readonly && Number(value) === -1 ? '-' : this.formatQuantity(value);
|
||||
if (!Number.isFinite(quantity)) return '-';
|
||||
// 与预结算编辑器 formatQuantity 保持一致,拼接计量单位
|
||||
return `${quantity.toFixed(2)}${row.quantityUnit ? ` ${row.quantityUnit}` : ''}`;
|
||||
},
|
||||
formatDetailMileage(value) {
|
||||
return this.readonly && Number(value) === -1 ? '-' : this.displayValue(value);
|
||||
|
||||
Reference in New Issue
Block a user