This commit is contained in:
ln1778 2024-05-07 14:54:32 +08:00
parent 1381a6d478
commit c4aabf6add
2 changed files with 12 additions and 3 deletions

View File

@ -1,9 +1,10 @@
<template> <template>
<div class="calculation"> <div class="calculation">
<div> <div v-if="costVisible">
<span style="font-weight: bold; padding: 0 10px">本页信息:</span> <span style="font-weight: bold; padding: 0 10px">本页信息:</span>
<span style="padding: 0 10px">总定价:{{ total_cost }}</span> <span style="padding: 0 10px">总定价:{{ total_cost }}</span>
</div> </div>
<div v-else></div>
<div class="block"> <div class="block">
<el-pagination <el-pagination
@size-change="handleSizeChange" @size-change="handleSizeChange"
@ -24,6 +25,12 @@ import { add } from "./../utils/Decimal";
export default { export default {
name:"erpTablePagination", name:"erpTablePagination",
props: { props: {
costVisible:{
type: Boolean,
default: () => {
return false;
},
},
currentPage4: { currentPage4: {
type: Number, type: Number,
}, },
@ -48,7 +55,9 @@ export default {
total_cost: function () { total_cost: function () {
let priceNumber = 0; let priceNumber = 0;
this.tableData.map((res, index) => { this.tableData.map((res, index) => {
if(res.total_cost){
priceNumber = add(priceNumber, res.total_cost); priceNumber = add(priceNumber, res.total_cost);
}
}); });
return priceNumber.toFixed(2); return priceNumber.toFixed(2);
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "erp-element-ui", "name": "erp-element-ui",
"version": "1.0.21", "version": "1.0.22",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {