pengjun 7 hours ago
parent
commit
aa99cddb21
  1. 199
      src/components/report/TurnoverReportOrg.vue

199
src/components/report/TurnoverReportOrg.vue

@ -93,22 +93,22 @@
</div>
<div id="tableData">
<div v-show="false">{{ queryCondition }}</div>
<el-table :data="tableDataTrans" border style="width: 100%" highlight-current-row :span-method="spanMethod">
<el-table :data="tableDataTrans" border :height="window.pageHeight - 200" highlight-current-row :span-method="spanMethod">
<el-table-column prop="itemTypeName" label="科室" min-width="120"></el-table-column>
<el-table-column prop="asbitemName" label="组合项目" min-width="180"></el-table-column>
<el-table-column v-for="(col, index) in asyncCols" :key="index" :label="col" min-width="80" align="center">
<el-table-column :prop="`${col}_djrs`" label="登记人" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_yjrs`" label="已检人数" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_bzje`" label="标准金额" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_ysje`" label="应收金额" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_ssje`" label="实收金额" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_registerCount`" label="登记人" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_checkCount`" label="已检人次" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_standardAmount`" label="标准金额" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_receivableAmount`" label="应收金额" min-width="80" align="center"></el-table-column>
<el-table-column :prop="`${col}_receivedAmount`" label="实收金额" min-width="80" align="center"></el-table-column>
</el-table-column>
<el-table-column label="汇总" min-width="180">
<el-table-column prop="djrs" label="登记人" min-width="80" align="center"></el-table-column>
<el-table-column prop="yjrs" label="已检人数" min-width="80" align="center"></el-table-column>
<el-table-column prop="bzje" label="标准金额" min-width="80" align="center"></el-table-column>
<el-table-column prop="ysje" label="应收金额" min-width="80" align="center"></el-table-column>
<el-table-column prop="ssje" label="实收金额" min-width="80" align="center"></el-table-column>
<el-table-column prop="registerCount" label="登记人" min-width="80" align="center"></el-table-column>
<el-table-column prop="checkCount" label="已检人次" min-width="80" align="center"></el-table-column>
<el-table-column prop="standardAmount" label="标准金额" min-width="80" align="center"></el-table-column>
<el-table-column prop="receivableAmount" label="应收金额" min-width="80" align="center"></el-table-column>
<el-table-column prop="receivedAmount" label="实收金额" min-width="80" align="center"></el-table-column>
</el-table-column>
</el-table>
</div>
@ -154,24 +154,34 @@ export default {
isPreRegistration: "N",
itemTypeIds: [],
},
tableData: [
{
itemTypeName: 'CT',
djrs: 4, yjrs: 2, bzje: 6, ysje: 8, ssje: 10,
itemDetails: [
asbitemDetails: [
{
asbitemName: '胸部CT', djrs: 4, yjrs: 2, bzje: 6, ysje: 8, ssje: 10,
asbitemName: '胸部CT',
details: [
{ org: 'C座', djrs: 3, yjrs: 2, bzje: 3, ysje: 4, ssje: 6 },
{ org: 'B座', djrs: 1, yjrs: 0, bzje: 3, ysje: 4, ssje: 2 }
{ medicalCenterName: 'C座', registerCount: 3, checkCount: 2, standardAmount: 3, receivableAmount: 4, receivedAmount: 6 },
{ medicalCenterName: 'B座', registerCount: 1, checkCount: 0, standardAmount: 3, receivableAmount: 4, receivedAmount: 2 }
]
},
{
asbitemName: '头部CT', djrs: 2, yjrs: 1, bzje: 3, ysje: 4, ssje: 5,
asbitemName: '头部CT',
details: [
{ org: 'C座', djrs: 2, yjrs: 1, bzje: 3, ysje: 4, ssje: 5 },
{ org: 'B座', djrs: 0, yjrs: 0, bzje: 0, ysje: 0, ssje: 0 }
{ medicalCenterName: 'C座', registerCount: 2, checkCount: 1, standardAmount: 3, receivableAmount: 4, receivedAmount: 5 },
{ medicalCenterName: 'B座', registerCount: 0, checkCount: 0, standardAmount: 0, receivableAmount: 0, receivedAmount: 0 }
]
}
]
},
{
itemTypeName: '放射',
asbitemDetails: [
{
asbitemName: '胸部正位片',
details: [
{ medicalCenterName: 'C座', registerCount: 13, checkCount: 12, standardAmount: 13, receivableAmount: 14, receivedAmount: 16 },
{ medicalCenterName: 'B座', registerCount: 11, checkCount: 10, standardAmount: 8, receivableAmount: 9, receivedAmount: 12 }
]
}
]
@ -200,6 +210,8 @@ export default {
//
mounted() {
this.dictInit();
//
//this.tableDataTran()
},
updated() {
@ -407,87 +419,118 @@ export default {
}
},
//
//
tableDataTran() {
this.tableDataTrans = []
// tableData: [
// {
// itemTypeName: 'CT',
// itemDetails: [
// {
// asbitemName: 'CT',
// details: [
// { org: 'C', djrs: 3, yjrs: 2, bzje: 3, ysje: 4, ssje: 6 },
// { org: 'B', djrs: 1, yjrs: 0, bzje: 3, ysje: 4, ssje: 2 }
// ]
// },
// {
// asbitemName: 'CT',
// details: [
// { org: 'C', djrs: 2, yjrs: 1, bzje: 3, ysje: 4, ssje: 5 },
// { org: 'B', djrs: 0, yjrs: 0, bzje: 0, ysje: 0, ssje: 0 }
// ]
// }
// ]
// }
// ],
let itemTotals = []
this.tableDataTrans = []
let pojo = {};
this.tableData.forEach(e1 => {
pojo = Object.assign({}, { itemTypeName: e1.itemTypeName })
if (e1.itemDetails.length > 0) {
//console.log('pojo1',pojo)
if (e1.asbitemDetails.length > 0) {
let asb_pojos = []
e1.itemDetails.forEach(e2 => {
asb_pojo = this.tableDataTranForOrg(e2)
pojo = Object({}, pojo, asb_pojo)
e1.asbitemDetails.forEach(e2 => {
let asb_pojo = this.tableDataTranForOrg(e2)
//console.log('asb_pojo',asb_pojo)
pojo = Object.assign({}, pojo, asb_pojo)
this.tableDataTrans.push(pojo)
asb_pojos.push(pojo)
});
//
if(e1.itemDetails.length > 1){
// pojo
if (e1.asbitemDetails.length > 1) {
let asbTotal = this.conTotals(asb_pojos,'')
this.tableDataTrans.push(asbTotal)
itemTotals.push(asbTotal)
} else {
itemTotals.push(pojo)
}
}
});
},
//
if(this.tableData.length > 1){
this.tableDataTrans.push(this.conTotals(itemTotals,'总合计'))
}
// console.log('this.tableDataTrans',this.tableDataTrans)
},
//
tableDataTranForOrg(asbitem) {
let initData = { asb_djrs: 0, asb_yjrs: 0, asb_bzje: 0, asb_ysje: 0, asb_ssje: 0 }
let initData = { registerCount: 0, checkCount: 0, standardAmount: 0, receivableAmount: 0, receivedAmount: 0 }
let asb_pojo = Object.assign({}, { asbitemName: asbitem.asbitemName }, initData)
let lfind
this.asyncCols.forEach(col => {
lfind = arrayExistObj(asbitem.details, 'org', col)
lfind = arrayExistObj(asbitem.details, 'medicalCenterName', col)
if (lfind > -1) {
asb_pojo[`${col}_djrs`] = asbitem.details[lfind].djrs
asb_pojo[`${col}_yjrs`] = asbitem.details[lfind].yjrs
asb_pojo[`${col}_bzje`] = asbitem.details[lfind].bzje
asb_pojo[`${col}_ysje`] = asbitem.details[lfind].ysje
asb_pojo[`${col}_ssje`] = asbitem.details[lfind].ssje
asb_pojo.asb_djrs = Number(asb_pojo.asb_djrs) + asbitem.details[lfind].djrs
asb_pojo.asb_yjrs = Number(asb_pojo.asb_yjrs) + asbitem.details[lfind].yjrs
asb_pojo.asb_bzje = Number(asb_pojo.asb_bzje) + asbitem.details[lfind].bzje
asb_pojo.asb_ysje = Number(asb_pojo.asb_ysje) + asbitem.details[lfind].ysje
asb_pojo.asb_ssje = Number(asb_pojo.asb_ssje) + asbitem.details[lfind].ssje
asb_pojo[`${col}_registerCount`] = asbitem.details[lfind].registerCount
asb_pojo[`${col}_checkCount`] = asbitem.details[lfind].checkCount
asb_pojo[`${col}_standardAmount`] = asbitem.details[lfind].standardAmount
asb_pojo[`${col}_receivableAmount`] = asbitem.details[lfind].receivableAmount
asb_pojo[`${col}_receivedAmount`] = asbitem.details[lfind].receivedAmount
asb_pojo.registerCount = Math.round((Number(asb_pojo.registerCount) + Number(asbitem.details[lfind].registerCount)) * 100) / 100;
asb_pojo.checkCount = Math.round((Number(asb_pojo.checkCount) + Number(asbitem.details[lfind].checkCount)) * 100) / 100;
asb_pojo.standardAmount = Math.round((Number(asb_pojo.standardAmount) + Number(asbitem.details[lfind].standardAmount)) * 100) / 100;
asb_pojo.receivableAmount = Math.round((Number(asb_pojo.receivableAmount) + Number(asbitem.details[lfind].receivableAmount)) * 100) / 100;
asb_pojo.receivedAmount = Math.round((Number(asb_pojo.receivedAmount) + Number(asbitem.details[lfind].receivedAmount)) * 100) / 100;
} else {
asb_pojo[`${col}_djrs`] = 0
asb_pojo[`${col}_yjrs`] = 0
asb_pojo[`${col}_bzje`] = 0
asb_pojo[`${col}_ysje`] = 0
asb_pojo[`${col}_ssje`] = 0
asb_pojo[`${col}_registerCount`] = 0
asb_pojo[`${col}_checkCount`] = 0
asb_pojo[`${col}_standardAmount`] = 0
asb_pojo[`${col}_receivableAmount`] = 0
asb_pojo[`${col}_receivedAmount`] = 0
}
});
return asb_pojo
},
//
conTotals(sources, itemTypeName) {
let retPojo = {}
let cols = Object.keys(sources[0])
sources.forEach((e, i) => {
let totalCol = false //
if (i == 0) {
retPojo = Object.assign({}, e)
} else {
cols.forEach(col => {
if (col.includes('registerCount')) {
totalCol = true
} else if (col.includes('registerCount')) {
totalCol = true
} else if (col.includes('registerCount')) {
totalCol = true
} else if (col.includes('registerCount')) {
totalCol = true
} else if (col.includes('registerCount')) {
totalCol = true
}
//
if(totalCol){
retPojo[col] = Math.round((Number(retPojo[col]) + Number(e[col])) * 100) / 100;
}
});
}
});
if(itemTypeName == '总合计'){
retPojo.itemTypeName = itemTypeName
retPojo.asbitemName = ''
}else{
retPojo.asbitemName = '合计'
}
return retPojo
},
//
btnQuery() {
this.tableData = []
@ -548,19 +591,11 @@ export default {
if (!body.startDate) body.startDate = '1900-01-01'
if (!body.endDate) body.endDate = moment(new Date()).format('yyyy-MM-DD')
}
postapi("/api/app/CustomerReport/GetCustomerOrgPhysicalExaminationDetailStatistics", body)
postapi("/api/app/CustomerReport/GetRegisterItemByMedicalCenterIdStatistics", body)
.then(res => {
if (res.code > -1) {
this.loadOpts.totalCount = res.data.totalCount
let arrs = [].concat(res.data.items);
arrs.forEach(e => {
e.groupPack = e.customerOrgGroupName || e.medicalPackageName
e.deptName = (e.customerOrgName == e.departmentName ? '' : e.departmentName)
e.birthDate = e?.birthDate.substring(0, 10) || e.birthDate
e.medicalStartDate = e?.medicalStartDate.substring(0, 10) || e.medicalStartDate
});
this.tableData = [].concat(this.tableData, arrs)
this.getSummaries()
this.tableData = res.data
this.tableDataTran()
}
})
.finally(() => {

Loading…
Cancel
Save