From 615915a72c923e99c7a227e9f9066e106ad5a9bc Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Thu, 6 Feb 2025 16:15:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B9=E7=94=A8=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/costPush/pushReview/index.vue | 100 +++++++++++++----- .../material/ma/typeConfigKeeper/index.vue | 5 +- 2 files changed, 77 insertions(+), 28 deletions(-) diff --git a/src/views/material/costPush/pushReview/index.vue b/src/views/material/costPush/pushReview/index.vue index 9eb1a858..ea23f1e1 100644 --- a/src/views/material/costPush/pushReview/index.vue +++ b/src/views/material/costPush/pushReview/index.vue @@ -30,7 +30,9 @@ v-model="queryParams.month" type="month" placeholder="请选择月份" - value-format="yyyy-MM"> + value-format="yyyy-MM" + :clearable="false" + @input="handleMonthInput"> @@ -95,17 +97,23 @@ - + + + + {{originalMonthTrue}} + + + - + {{scope.row.leaseMoney}} - + {{scope.row.repairMoney}} @@ -117,10 +125,10 @@ - + - - {{scope.row.loseMoney}} + + {{scope.row.lostMoney}} @@ -147,11 +155,11 @@ 合计费用 - {{ 2530.55 }} - {{ 2530.55 }} - {{ 2530.55 }} - {{ 2530.55 }} - {{ 2530.55 }} + {{ leaseAll.toFixed(2) }} + {{ repairAll.toFixed(2) }} + {{ scrapAll.toFixed(2) }} + {{ loseAll.toFixed(2) }} + {{ moneyAll.toFixed(2) }} @@ -196,12 +204,12 @@ - - + + - + - {{ scope.row.leaseMoney.toFixed(2) }} + {{ scope.row.leaseMoney.toFixed(2) }} @@ -256,10 +264,10 @@ - + - + {{ scope.row.costs.toFixed(2) }} @@ -316,10 +324,10 @@ - + - + {{ scope.row.costs.toFixed(2) }} @@ -376,9 +384,9 @@ - + - + {{ scope.row.costs.toFixed(2) }} @@ -430,6 +438,17 @@ export default { // 工程数据 proList: [], + //合计 + moneyAll: 0, + //租赁合计 + leaseAll: 0, + //维修合计 + repairAll: 0, + //报废合计 + scrapAll: 0, + //丢失合计 + loseAll: 0, + // 查询参数 queryParams: { unitId: null, @@ -481,6 +500,9 @@ export default { modelName: undefined, }, dialogLoseTotal: 0, + + originalMonth: null, // 用于存储原始的月份值,防止键盘按键删除 + originalMonthTrue: null, }; }, created() { @@ -501,6 +523,21 @@ export default { }; const dayDate = date.year + "-" + (date.month >= 10 ? date.month : "0" + date.month); this.$set(this.queryParams, "month", dayDate.toString()); + this.originalMonth = dayDate.toString(); + this.originalMonthTrue = dayDate.toString(); + }, + + //键盘按键删除触发返回效果 + handleMonthInput() { + // 当用户输入时,检查是否为空 + if (!this.queryParams.month) { + this.queryParams.month = this.originalMonth; + } + }, + + //多选框选中数据 + handleSelectionChange(val) { + this.ids = val.map(item => item.id); }, /** 转换菜单数据结构 */ @@ -577,6 +614,16 @@ export default { console.log(this.queryParams.month) getPushReviewList(this.queryParams).then((response) => { this.pushReviewList = response.rows; + this.originalMonthTrue = this.queryParams.month; + if(response.rows){ + response.rows.forEach(item => { + this.leaseAll += (Number(item.leaseMoney) || 0); + this.repairAll += (Number(item.repairMoney) || 0) ; + this.scrapAll += (Number(item.scrapMoney) || 0); + this.loseAll += (Number(item.loseMoney) || 0); + }) + this.moneyAll = this.leaseAll + this.repairAll + this.scrapAll + this.loseAll; + } this.loading = false; }); @@ -595,7 +642,7 @@ export default { projectId: null, agreementId: '', agreementCode: '', - month: null, + month: this.originalMonth, } this.resetForm('queryForm') this.handleQuery() @@ -854,15 +901,16 @@ export default { background-color: #f8f8f9; padding: 5px; border-left: 1px solid #dfe6ec; - width:14.38%; + width:14.5%; align-items: center; text-align: center; justify-content: center; /* 将内容对齐到中间 */ } .columnFirstRight { padding: 5px; + background-color: #f8f8f9; border-left: 1px solid #dfe6ec; - width:28.6%; + width:28.5%; align-items: center; text-align: center; justify-content: center; /* 将内容对齐到中间 */ @@ -871,7 +919,7 @@ export default { background-color: #f8f8f9; padding: 5px; text-align: center; - width:41.9%; + width:41.7%; border-left: none; } \ No newline at end of file diff --git a/src/views/material/ma/typeConfigKeeper/index.vue b/src/views/material/ma/typeConfigKeeper/index.vue index a06a3f97..1098b901 100644 --- a/src/views/material/ma/typeConfigKeeper/index.vue +++ b/src/views/material/ma/typeConfigKeeper/index.vue @@ -224,6 +224,7 @@ :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" + :page-sizes="[1000]" /> @@ -325,7 +326,7 @@ export default { typeName: "", level: 0, pageNum: 1, - pageSize: 10, + pageSize: 1000, displayBindRelationship: true, houseId: "", // phonenumber: undefined, @@ -539,7 +540,7 @@ export default { this.resetForm("queryForm"); this.queryParams.typeId = undefined; this.queryParams.pageNum = 1; - this.queryParams.pageSize = 10; + this.queryParams.pageSize = 1000; this.queryParams.level = 0; this.$refs.tree.setCurrentKey(null); this.handleQuery();