囤积成本重构
This commit is contained in:
@@ -88,14 +88,7 @@
|
||||
{{ formatWeight(scope.row.totalNetWeight) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="avgStorageDays" label="平均在库天数" align="right" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<span :class="getStorageDaysClass(scope.row.avgStorageDays)">
|
||||
{{ scope.row.avgStorageDays || '-' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="maxStorageDays" label="最大在库天数" align="right" sortable="custom">
|
||||
<el-table-column prop="maxStorageDays" label="在库天数" align="right" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<span :class="getStorageDaysClass(scope.row.maxStorageDays)">
|
||||
{{ scope.row.maxStorageDays || '-' }}
|
||||
@@ -104,7 +97,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalCost" label="累计成本(元)" align="right" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<span class="cost-total">{{ formatMoney(scope.row.totalCost) }}</span>
|
||||
<div style="display: flex; align-items: center; justify-content: flex-end; gap: 8px;">
|
||||
<span class="cost-total">{{ formatMoney(scope.row.totalCost) }}</span>
|
||||
<el-tooltip v-if="scope.row.hasNetWeightZero" content="该入场卷存在净重为空的钢卷,累计成本按毛重计算" placement="top">
|
||||
<i class="el-icon-warning" style="color: #e6a23c; font-size: 16px;"></i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
@@ -292,7 +290,7 @@ export default {
|
||||
formatWeight(value) {
|
||||
if (!value) return '0.000'
|
||||
// 如果值大于1000,可能是kg单位,需要转换
|
||||
const weight = Number(value) > 1000 ? Number(value) / 1000 : Number(value)
|
||||
const weight = Number(value)
|
||||
return weight.toFixed(3)
|
||||
},
|
||||
formatDateTime(value) {
|
||||
|
||||
Reference in New Issue
Block a user