|
|
@ -75,6 +75,13 @@ |
|
|
<el-option v-for="item in dictSalesman" :key="item.id" :label="item.surname" :value="item.surname" /> |
|
|
<el-option v-for="item in dictSalesman" :key="item.id" :label="item.surname" :value="item.surname" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="query"> |
|
|
|
|
|
<span>支付方式:</span> |
|
|
|
|
|
<el-select v-model="query.payModeIds" placeholder="请选择" style="margin-left: 10px" filterable clearable |
|
|
|
|
|
size="small" multiple collapse-tags> |
|
|
|
|
|
<el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div style="display: block;width: 110px;"> |
|
|
<div style="display: block;width: 110px;"> |
|
|
@ -93,20 +100,22 @@ |
|
|
<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="单位次数" |
|
|
<el-table-column v-if="query.isCustomerOrgRegister == 'Y' ? true : false" prop="medicalTimes" label="单位次数" |
|
|
min-width="80" align="center" /> |
|
|
min-width="80" align="center" /> |
|
|
<el-table-column label="收款" align="center" > |
|
|
|
|
|
|
|
|
<el-table-column label="收款" align="center"> |
|
|
<el-table-column prop="chargeCount" label="人数" min-width="80" 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 prop="chargeTotal" label="金额" min-width="80" align="center" /> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="退款" min-width="80" align="center" > |
|
|
|
|
|
|
|
|
<el-table-column label="退款" min-width="80" align="center"> |
|
|
<el-table-column prop="refundCount" 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 prop="refundTotal" label="金额" min-width="80" align="center" /> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="营收金额" min-width="80" align="center" > |
|
|
|
|
|
|
|
|
<el-table-column label="营收金额" min-width="80" align="center"> |
|
|
<el-table-column prop="turnoverTotal" 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"> |
|
|
|
|
|
|
|
|
<el-table-column v-for="(col, index) in asyncCols" :key="index" :prop="col" :label="col" min-width="80" |
|
|
|
|
|
align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<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 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> |
|
|
</el-tooltip> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -140,7 +149,6 @@ export default { |
|
|
medicalType: [], |
|
|
medicalType: [], |
|
|
personnelType: [], |
|
|
personnelType: [], |
|
|
dictSalesman: [], |
|
|
dictSalesman: [], |
|
|
|
|
|
|
|
|
query: { |
|
|
query: { |
|
|
dateType: '6', |
|
|
dateType: '6', |
|
|
startDate: '', |
|
|
startDate: '', |
|
|
@ -149,6 +157,7 @@ export default { |
|
|
medicalTypeIds: [], |
|
|
medicalTypeIds: [], |
|
|
personnelTypeIds: [], |
|
|
personnelTypeIds: [], |
|
|
salesmans: [], |
|
|
salesmans: [], |
|
|
|
|
|
payModeIds: [], |
|
|
// isMedicalTypeId: 'Y', |
|
|
// isMedicalTypeId: 'Y', |
|
|
isPreRegistration: 'N', |
|
|
isPreRegistration: 'N', |
|
|
isChild: 'Y', |
|
|
isChild: 'Y', |
|
|
@ -177,7 +186,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
...mapState(["pickerOptions","window", "dict", "patientRegister", "report"]), |
|
|
|
|
|
|
|
|
...mapState(["pickerOptions", "window", "dict", "patientRegister", "report"]), |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
//获取初始数据 |
|
|
//获取初始数据 |
|
|
@ -218,6 +227,12 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
//支付方式 |
|
|
|
|
|
getapi("/api/app/pay-mode").then((res) => { |
|
|
|
|
|
if (res.code == 1) { |
|
|
|
|
|
this.dict.payMode = res.data; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//通用导出 |
|
|
//通用导出 |
|
|
@ -252,11 +267,9 @@ export default { |
|
|
//let body = deepCopy(this.query) |
|
|
//let body = deepCopy(this.query) |
|
|
postapi("/api/app/CustomerReport/GetCustomerOrgAmountReceivedStatistics", this.query).then(res => { |
|
|
postapi("/api/app/CustomerReport/GetCustomerOrgAmountReceivedStatistics", this.query).then(res => { |
|
|
if (res.code > -1) { |
|
|
if (res.code > -1) { |
|
|
if (Array.isArray(res.data) && res.data.length > 0) { |
|
|
|
|
|
// 动态生成新的显示数据 |
|
|
// 动态生成新的显示数据 |
|
|
this.makeDispData(res.data) |
|
|
this.makeDispData(res.data) |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -264,6 +277,9 @@ export default { |
|
|
makeDispData(orgData) { |
|
|
makeDispData(orgData) { |
|
|
this.tableData = [] |
|
|
this.tableData = [] |
|
|
this.asyncCols = [] |
|
|
this.asyncCols = [] |
|
|
|
|
|
// 没有数据返回 |
|
|
|
|
|
if (!(Array.isArray(orgData) && orgData.length > 0)) return |
|
|
|
|
|
|
|
|
orgData.forEach(e => { |
|
|
orgData.forEach(e => { |
|
|
if (this.query.isChild == 'Y') { |
|
|
if (this.query.isChild == 'Y') { |
|
|
e.customerOrgName = (e.customerOrgName == e.departmentName ? e.customerOrgName : e.customerOrgName + '--' + e.departmentName) |
|
|
e.customerOrgName = (e.customerOrgName == e.departmentName ? e.customerOrgName : e.customerOrgName + '--' + e.departmentName) |
|
|
@ -273,7 +289,7 @@ export default { |
|
|
e.feeDetail.forEach(c => { |
|
|
e.feeDetail.forEach(c => { |
|
|
e.chargeTotal = Number(e.chargeTotal) + Number(c.chargeMoney) |
|
|
e.chargeTotal = Number(e.chargeTotal) + Number(c.chargeMoney) |
|
|
e.refundTotal = Number(e.refundTotal) + Number(c.refundMoney) |
|
|
e.refundTotal = Number(e.refundTotal) + Number(c.refundMoney) |
|
|
if(!this.asyncCols.includes(c.payModeName)){ |
|
|
|
|
|
|
|
|
if (!this.asyncCols.includes(c.payModeName)) { |
|
|
this.asyncCols.push(c.payModeName) |
|
|
this.asyncCols.push(c.payModeName) |
|
|
} |
|
|
} |
|
|
e[c.payModeName] = Math.round((Number(c.chargeMoney) + Number(c.refundMoney)) * 100) / 100 |
|
|
e[c.payModeName] = Math.round((Number(c.chargeMoney) + Number(c.refundMoney)) * 100) / 100 |
|
|
@ -288,7 +304,7 @@ export default { |
|
|
|
|
|
|
|
|
this.tableData.forEach(e => { |
|
|
this.tableData.forEach(e => { |
|
|
this.asyncCols.forEach(col => { |
|
|
this.asyncCols.forEach(col => { |
|
|
if(!e[col]){ |
|
|
|
|
|
|
|
|
if (!e[col]) { |
|
|
e[col] = 0 |
|
|
e[col] = 0 |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -308,22 +324,22 @@ export default { |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
const { columns, data } = param; |
|
|
const { columns, data } = param; |
|
|
let count = 7,sumCol = [] //需合计的列 |
|
|
|
|
|
|
|
|
let count = 7, sumCol = [] //需合计的列 |
|
|
const sums = []; |
|
|
const sums = []; |
|
|
|
|
|
|
|
|
if (this.query.isCustomerOrgRegister == 'Y'){ |
|
|
|
|
|
sumCol = [2,3,4,5,6,7] |
|
|
|
|
|
|
|
|
if (this.query.isCustomerOrgRegister == 'Y') { |
|
|
|
|
|
sumCol = [2, 3, 4, 5, 6, 7] |
|
|
count = 8 |
|
|
count = 8 |
|
|
}else{ |
|
|
|
|
|
sumCol = [2,3,4,5,6] |
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
sumCol = [2, 3, 4, 5, 6] |
|
|
} |
|
|
} |
|
|
this.asyncCols.forEach(() => { |
|
|
this.asyncCols.forEach(() => { |
|
|
sumCol.push(count++) |
|
|
sumCol.push(count++) |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
console.log('sumCol',sumCol) |
|
|
|
|
|
|
|
|
console.log('sumCol', sumCol) |
|
|
columns.forEach((column, index) => { |
|
|
columns.forEach((column, index) => { |
|
|
console.log('column.property, index,data',column.property, index,data) |
|
|
|
|
|
|
|
|
console.log('column.property, index,data', column.property, index, data) |
|
|
//显示合计列 |
|
|
//显示合计列 |
|
|
if (index === 1) { |
|
|
if (index === 1) { |
|
|
sums[index] = '合计'; |
|
|
sums[index] = '合计'; |
|
|
|