feat(发货明细表): 添加总卷数和总重量显示并调整分页大小
在表格顶部右侧添加总卷数和总重量的统计显示,方便用户快速查看汇总信息。同时将默认分页大小调整为999以显示所有数据
This commit is contained in:
@@ -18,6 +18,17 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="getList">刷新</el-button>
|
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="getList">刷新</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="6" style="float: right;" size="medium">
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="总卷数">
|
||||||
|
{{ totalCoilCount }} 卷
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="总重量">
|
||||||
|
{{ totalWeight }} 吨
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table :data="deliveryWaybillDetailList">
|
<el-table :data="deliveryWaybillDetailList">
|
||||||
@@ -173,7 +184,7 @@ export default {
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 999,
|
||||||
waybillId: this.waybillId,
|
waybillId: this.waybillId,
|
||||||
coilId: undefined,
|
coilId: undefined,
|
||||||
productName: undefined,
|
productName: undefined,
|
||||||
@@ -194,6 +205,14 @@ export default {
|
|||||||
autoFillForm: true,
|
autoFillForm: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
totalCoilCount() {
|
||||||
|
return this.total;
|
||||||
|
},
|
||||||
|
totalWeight() {
|
||||||
|
return this.deliveryWaybillDetailList.reduce((acc, item) => acc + Number(item.weight), 0).toFixed(3);
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user