From fdf32ef65e48653f377c735cefcf61295fb978b4 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Sat, 17 Jan 2026 12:38:36 +0800 Subject: [PATCH] seo --- src/components/report/TurnoverReport.vue | 3 +- src/components/report/TurnoverReportM.vue | 3 +- src/components/report/TurnoverReportP.vue | 3 +- src/components/report/TurnoverReportS.vue | 153 ++-------- src/router/index.js | 6 + src/views/fee-settings/cardBill.vue | 104 +++++-- src/views/fee-settings/cardBillSum.vue | 332 ++++++++++++++++++++++ 7 files changed, 446 insertions(+), 158 deletions(-) create mode 100644 src/views/fee-settings/cardBillSum.vue diff --git a/src/components/report/TurnoverReport.vue b/src/components/report/TurnoverReport.vue index bfb8f5c..b5ea439 100644 --- a/src/components/report/TurnoverReport.vue +++ b/src/components/report/TurnoverReport.vue @@ -94,6 +94,7 @@ + @@ -281,7 +282,7 @@ export default { // } const { columns, data } = param; - const sumCol = [2, 3, 4, 7, 8] //需合计的列 + const sumCol = [2, 3, 4, 7, 8, 9] //需合计的列 const sums = []; columns.forEach((column, index) => { //console.log('column, index,data',column, index,data) diff --git a/src/components/report/TurnoverReportM.vue b/src/components/report/TurnoverReportM.vue index 5293a7e..5a7ede9 100644 --- a/src/components/report/TurnoverReportM.vue +++ b/src/components/report/TurnoverReportM.vue @@ -56,6 +56,7 @@ + @@ -218,7 +219,7 @@ export default { // } const { columns, data } = param; - const sumCol = [2,3,4, 7,8] //需合计的列 + const sumCol = [2,3,4, 7,8, 9] //需合计的列 const sums = []; columns.forEach((column, index) => { //console.log('column, index,data',column, index,data) diff --git a/src/components/report/TurnoverReportP.vue b/src/components/report/TurnoverReportP.vue index c2cdcfe..ff79c09 100644 --- a/src/components/report/TurnoverReportP.vue +++ b/src/components/report/TurnoverReportP.vue @@ -56,6 +56,7 @@ + @@ -219,7 +220,7 @@ export default { // } const { columns, data } = param; - const sumCol = [2,3,4, 7,8] //需合计的列 + const sumCol = [2,3,4, 7,8,9] //需合计的列 const sums = []; columns.forEach((column, index) => { //console.log('column, index,data',column, index,data) diff --git a/src/components/report/TurnoverReportS.vue b/src/components/report/TurnoverReportS.vue index 6b4488f..ce4279b 100644 --- a/src/components/report/TurnoverReportS.vue +++ b/src/components/report/TurnoverReportS.vue @@ -6,160 +6,63 @@ 营业额统计(业务员) -
+ ">
-
+ ">
- + - + - +
业务员 - +
是否包含预登记 - +
- 查询 - 导出 + 查询 + 导出
- + - - - - - - - - - + + + + + + + + +
@@ -196,7 +99,7 @@ export default { // isMedicalTypeId: 'Y', isPreRegistration: "N", }, - salesmans:"", + salesmans: "", tableData: [], pickerOptions: { @@ -231,7 +134,7 @@ export default { }; }, - created() {}, + created() { }, //挂载完成 mounted() { @@ -298,8 +201,8 @@ export default { // 查询 btnQuery() { - this.query.salesmans = []; - if (this.salesmans.replace(/\s+/g, '')!='') { + this.query.salesmans = []; + if (this.salesmans.replace(/\s+/g, '') != '') { this.query.salesmans.push(this.salesmans.replace(/\s+/g, '')); } postapi( diff --git a/src/router/index.js b/src/router/index.js index 5abafe4..9860236 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -304,6 +304,12 @@ const routes = [{ component: () => import ("../views/fee-settings/cardBill.vue"), }, + { + path: "/cardBillSum", + name: "会员卡记账统计", + component: () => + import ("../views/fee-settings/cardBillSum.vue"), + }, //---------------------- 收费设置 start ---------------------- { path: "/item-type", diff --git a/src/views/fee-settings/cardBill.vue b/src/views/fee-settings/cardBill.vue index 2b07050..8969dfd 100644 --- a/src/views/fee-settings/cardBill.vue +++ b/src/views/fee-settings/cardBill.vue @@ -13,9 +13,9 @@
记账日期: - + -- - +
记账标志: @@ -25,7 +25,7 @@
支付方式: - +
@@ -51,36 +51,34 @@
- + row-key="id" highlight-current-row ref="dataList" border show-summary :summary-method="getSummaries"> + + - - + + - - + + - - + + +
@@ -92,7 +90,7 @@ import moment from "moment"; import { mapState, mapActions } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; -import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc"; +import { dddw, objCopy, arrayReduce, arrayExistObj, deepCopy } from "@/utlis/proFunc"; export default { @@ -105,7 +103,7 @@ export default { startDate:'', endDate:'', billFlag:'', - payModeId:'', + payModeIds:[], cardNo:'', customerName:'', idNo:'', @@ -116,7 +114,7 @@ export default { }, created() { - this.query.startDate = new Date(); + this.query.startDate = moment(new Date()).format("yyyy-MM-DD"); this.query.endDate = this.query.startDate; }, @@ -125,6 +123,13 @@ export default { this.dicInit(); this.enterToQuery() }, + + updated() { + this.$nextTick(() => { + this.$refs['dataList'].doLayout() //刷新显示合计 + }) + }, + computed: { ...mapState(["window", "dict"]), }, @@ -135,7 +140,7 @@ export default { //查询 btnQuery(queryType) { - let body = {} + let body = deepCopy(this.query) switch (queryType) { case 'idNo': @@ -158,14 +163,12 @@ export default { this.$message.error("数据不合法,起始日期不能大于截止日期!"); return; } - body.startDate = moment(this.query.startDate).format('yyyy-MM-DD'); - body.endDate = moment(this.query.endDate).format('yyyy-MM-DD'); - - if(this.query.cardModeId) body.cardModeId = this.query.cardModeId; - if(this.query.cardTypeId) body.cardTypeId = this.query.cardTypeId; - if(this.query.customerName) body.customerName = this.query.customerName; - if(this.query.cardFlag) body.cardFlag = this.query.cardFlag; - if(this.query.mobileTelephone) body.mobileTelephone = this.query.mobileTelephone; + if(!body.cardNo) delete body.cardNo + if(!body.billFlag) delete body.billFlag + if(!body.customerName) delete body.customerName + if(!body.idNo) delete body.idNo + if(!body.mobileTelephone) delete body.mobileTelephone + if(body?.payModeIds.length == 0) delete body.payModeIds } break; } @@ -188,6 +191,47 @@ export default { }); }, + //合计 + getSummaries(param) { + //console.log('getSummaries param', param) + // if(!param){ + // param = { + // columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}], + // data:this.customerOrgGroupAsbitems + // } + // } + + const { columns, data } = param; + const sumCol = [5] //需合计的列 + const sums = []; + columns.forEach((column, index) => { + //console.log('column, index,data',column, index,data) + //显示合计列 + if (index === 1) { + sums[index] = '合计'; + return; + } + + //不合计的列 + if (sumCol.indexOf(index) == -1) { + sums[index] = ''; + return; + } + + sums[index] = 0 + data.forEach(e => { + if (!isNaN(e[column.property])) sums[index] += Number(e[column.property])// * e['amount'] + }) + sums[index] = sums[index].toFixed(2) //+ ' 元'; + + }); + // this.groupPrice = sums[7]; + //console.log('getSummaries',sums) + // if (!this.totalFoucs) this.total = sums[5]; + // if (!this.discountFoucs) this.discount = Number(this.total * 100 / this.totalStand).toFixed(2); + return sums; + }, + dicInit(){ //支付方式 getapi("/api/app/pay-mode").then((res) => { diff --git a/src/views/fee-settings/cardBillSum.vue b/src/views/fee-settings/cardBillSum.vue new file mode 100644 index 0000000..7ae4f91 --- /dev/null +++ b/src/views/fee-settings/cardBillSum.vue @@ -0,0 +1,332 @@ + + +