pengjun 3 months ago
parent
commit
8ce18d4032
  1. 4
      public/sysConfig.json
  2. 28
      src/components/report/TurnoverReport.vue
  3. 129
      src/components/report/TurnoverReportReal.vue

4
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":{

28
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: {
//

129
src/components/report/TurnoverReportReal.vue

@ -11,7 +11,7 @@
<div style="display:block;">
<div style="display: flex;flex-wrap: wrap;height: 32px;align-items: center;">
<div class="query">
<el-select v-model="query.dateType" placeholder="请选择" style="width: 80px" size="small">
<el-select v-model="query.dateType" placeholder="请选择" style="width: 80px" size="small" disabled>
<el-option label="登记日期" :value="'1'" />
<el-option label="体检日期" :value="'2'" />
<el-option label="总检日期" :value="'3'" />
@ -90,23 +90,27 @@
<el-table :data="tableData" border :height="window.pageHeight - 192" highlight-current-row size="small"
row-key="id" :summary-method="getSummaries" show-summary ref="refTable">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="customerOrgName" label="单位名称" min-width="240">
<el-table-column prop="customerOrgName" label="单位名称" min-width="240" />
<el-table-column v-if="query.isCustomerOrgRegister == 'Y' ? true : false" prop="medicalTimes" label="单位次数"
min-width="80" align="center" />
<el-table-column label="收款" align="center" >
<el-table-column prop="chargeCount" label="人数" min-width="80" align="center" />
<el-table-column prop="chargeTotal" label="金额" min-width="80" align="center" />
</el-table-column>
<el-table-column label="退款" min-width="80" align="center" >
<el-table-column prop="refundCount" label="人数" min-width="80" align="center" />
<el-table-column prop="refundTotal" label="金额" min-width="80" align="center" />
</el-table-column>
<el-table-column label="营收金额" min-width="80" align="center" >
<el-table-column prop="turnoverTotal" label="汇总" min-width="80" align="center" />
<el-table-column v-for="(col,index) in asyncCols" :key="index" :prop="col" :label="col" min-width="80" align="center">
<template slot-scope="scope">
<div>{{ query.isChild == 'Y' ? scope.row.customerOrgName + (scope.row.departmentName &&
scope.row.customerOrgName != scope.row.departmentName ?
'--' + scope.row.departmentName : '') : scope.row.customerOrgName }}</div>
<el-tooltip class="item" :content="`收款:${scope.row[col+'_p']} 退款:${scope.row[col+'_b']}`" placement="top">
<div v-if="scope.row[col] !=0 ? true:false">{{ scope.row[col] }}</div>
</el-tooltip>
</template>
</el-table-column>
<el-table-column v-if="query.isCustomerOrgRegister == 'Y' ? true : false" prop="medicalTimes" label="单位次数"
min-width="80" align="center" />
<el-table-column prop="registerCount" label="登记人数" min-width="80" align="center" />
<el-table-column prop="startMedical" label="检查人数" min-width="80" align="center" />
<el-table-column prop="checkCount" label="总检人数" min-width="80" align="center" />
<el-table-column prop="avgStandardPrice" label="标准平均单价" min-width="100" align="center" />
<el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" />
<el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" />
<el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" />
<el-table-column prop="sumReceivedPrice" label="实收金额" min-width="100" align="center" />
</el-table-column>
</el-table>
</div>
</div>
@ -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: {
//
@ -274,19 +252,54 @@ export default {
//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 (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] = '合计';

Loading…
Cancel
Save