料想监控增加一列各类型在库总数显示

main
huojin\hj 2025-07-24 14:37:19 +08:00
parent 3d8033c65b
commit ae67578b19
1 changed files with 17 additions and 1 deletions

View File

@ -143,6 +143,17 @@
</template>
</el-table-column>
<el-table-column
label="各类型在库总数"
align="center"
>
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<span>{{ getInStockTotal(scope.row) }}</span>
</div>
</template>
</el-table-column>
<el-table-column
label="剩余可入库箱数"
align="center"
@ -241,7 +252,8 @@ export default {
let mzkSum = this.tableData.reduce((total, row) => total + (Number(row.mzk) || 0), 0);
let kzkSum = this.tableData.reduce((total, row) => total + (Number(row.kzk) || 0), 0);
return 30500 - mzkSum - kzkSum;
}
},
},
mounted: function () {
this.queryUser();
@ -394,6 +406,10 @@ export default {
}
}
//
},
getInStockTotal(row) {
//
return (Number(row.mzk) || 0) + (Number(row.kzk) || 0);
}
}
}