From 8ce18d40325a96ec939e43b6f64db43e4c5ece0e Mon Sep 17 00:00:00 2001
From: pengjun <158915633@qq.com>
Date: Thu, 22 Jan 2026 21:15:32 +0800
Subject: [PATCH] seo
---
public/sysConfig.json | 4 +-
src/components/report/TurnoverReport.vue | 28 +---
src/components/report/TurnoverReportReal.vue | 137 +++++++++++--------
3 files changed, 84 insertions(+), 85 deletions(-)
diff --git a/public/sysConfig.json b/public/sysConfig.json
index 5964923..4dc018a 100644
--- a/public/sysConfig.json
+++ b/public/sysConfig.json
@@ -1,7 +1,7 @@
{
- "apiurl": "http://192.168.0.188:9530",
+ "apiurl": "http://192.168.0.188:9527",
"softName": "神豚体检管理系统",
- "pacsApi": "http://192.168.0.188:9530",
+ "pacsApi": "http://192.168.0.188:9527",
"dcmViewers": "https://app.mzaktj.com:4436",
"pacsApiHttps": "https://app.mzaktj.com:8042",
"dict":{
diff --git a/src/components/report/TurnoverReport.vue b/src/components/report/TurnoverReport.vue
index c74ff66..6a0ba0e 100644
--- a/src/components/report/TurnoverReport.vue
+++ b/src/components/report/TurnoverReport.vue
@@ -152,32 +152,6 @@ export default {
},
tableData: [],
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now();
- },
- shortcuts: [{
- text: '今天',
- onClick(picker) {
- picker.$emit('pick', new Date());
- }
- }, {
- text: '昨天',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24);
- picker.$emit('pick', date);
- }
- }, {
- text: '一周前',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', date);
- }
- }]
- },
-
};
},
@@ -199,7 +173,7 @@ export default {
},
computed: {
- ...mapState(["window", "dict", "patientRegister", "report"]),
+ ...mapState(["pickerOptions","window", "dict", "patientRegister", "report"]),
},
methods: {
//获取初始数据
diff --git a/src/components/report/TurnoverReportReal.vue b/src/components/report/TurnoverReportReal.vue
index 5551b6e..c1c80d5 100644
--- a/src/components/report/TurnoverReportReal.vue
+++ b/src/components/report/TurnoverReportReal.vue
@@ -11,7 +11,7 @@
-
+
@@ -81,7 +81,7 @@
查询
-
@@ -90,23 +90,27 @@
-
-
- {{ query.isChild == 'Y' ? scope.row.customerOrgName + (scope.row.departmentName &&
- scope.row.customerOrgName != scope.row.departmentName ?
- '--' + scope.row.departmentName : '') : scope.row.customerOrgName }}
-
-
+
-
-
-
-
-
-
-
-
+ min-width="80" align="center" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row[col] }}
+
+
+
+
@@ -138,7 +142,7 @@ export default {
dictSalesman: [],
query: {
- dateType: '1',
+ dateType: '6',
startDate: '',
endDate: '',
customerOrgIds: [],
@@ -151,33 +155,7 @@ export default {
isCustomerOrgRegister: 'N', // 是否显示单位体检次数
},
tableData: [],
-
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now();
- },
- shortcuts: [{
- text: '今天',
- onClick(picker) {
- picker.$emit('pick', new Date());
- }
- }, {
- text: '昨天',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24);
- picker.$emit('pick', date);
- }
- }, {
- text: '一周前',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', date);
- }
- }]
- },
-
+ asyncCols: [], // 动态列
};
},
@@ -199,7 +177,7 @@ export default {
},
computed: {
- ...mapState(["window", "dict", "patientRegister", "report"]),
+ ...mapState(["pickerOptions","window", "dict", "patientRegister", "report"]),
},
methods: {
//获取初始数据
@@ -273,20 +251,55 @@ export default {
btnQuery() {
//let body = deepCopy(this.query)
postapi("/api/app/CustomerReport/GetCustomerOrgAmountReceivedStatistics", this.query).then(res => {
- if (res.code > -1) {
- this.tableData = res.data
- if (Array.isArray(this.tableData) && this.tableData.length > 0) {
- this.tableData.forEach(e => {
- e.startMedical = Number(e.partCheckCount) + Number(e.checkCount)
- });
+ if (res.code > -1) {
+ if (Array.isArray(res.data) && res.data.length > 0) {
+ // 动态生成新的显示数据
+ this.makeDispData(res.data)
}
}
})
},
+ // 动态生成新的显示数据
+ makeDispData(orgData) {
+ this.tableData = []
+ this.asyncCols = []
+ orgData.forEach(e => {
+ if (this.query.isChild == 'Y') {
+ e.customerOrgName = (e.customerOrgName == e.departmentName ? e.customerOrgName : e.customerOrgName + '--' + e.departmentName)
+ }
+ e.chargeTotal = 0
+ e.refundTotal = 0
+ e.feeDetail.forEach(c => {
+ e.chargeTotal = Number(e.chargeTotal) + Number(c.chargeMoney)
+ e.refundTotal = Number(e.refundTotal) + Number(c.refundMoney)
+ if(!this.asyncCols.includes(c.payModeName)){
+ this.asyncCols.push(c.payModeName)
+ }
+ e[c.payModeName] = Math.round((Number(c.chargeMoney) + Number(c.refundMoney)) * 100) / 100
+ e[c.payModeName + '_p'] = c.chargeMoney // 收
+ e[c.payModeName + '_b'] = c.refundMoney // 退
+ });
+ e.chargeTotal = Math.round(e.chargeTotal * 100) / 100
+ e.refundTotal = Math.round(e.refundTotal * 100) / 100
+ e.turnoverTotal = Math.round((Number(e.chargeTotal) + Number(e.refundTotal)) * 100) / 100
+ this.tableData.push(e)
+ });
+
+ this.tableData.forEach(e => {
+ this.asyncCols.forEach(col => {
+ if(!e[col]){
+ e[col] = 0
+ }
+ });
+ });
+ // console.log('this.tableData',this.tableData)
+ // console.log('this.asyncCols',this.asyncCols)
+ },
+
//合计
getSummaries(param) {
- console.log('getSummaries param', param)
+ // console.log('getSummaries param', param)
// if(!param){
// param = {
// columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}],
@@ -295,10 +308,22 @@ export default {
// }
const { columns, data } = param;
- const sumCol = [2, 3, 4, 7, 8, 9] //需合计的列
+ let count = 7,sumCol = [] //需合计的列
const sums = [];
+
+ if (this.query.isCustomerOrgRegister == 'Y'){
+ sumCol = [2,3,4,5,6,7]
+ count = 8
+ }else{
+ sumCol = [2,3,4,5,6]
+ }
+ this.asyncCols.forEach(() => {
+ sumCol.push(count++)
+ });
+
+ console.log('sumCol',sumCol)
columns.forEach((column, index) => {
- //console.log('column, index,data',column, index,data)
+ console.log('column.property, index,data',column.property, index,data)
//显示合计列
if (index === 1) {
sums[index] = '合计';