pengjun 4 months ago
parent
commit
bd735a8453
  1. 174
      src/views/workload/individualfeedetails.vue

174
src/views/workload/individualfeedetails.vue

@ -28,7 +28,7 @@
size="small" size="small"
multiple multiple
filterable filterable
:multiple-limit=2
:multiple-limit="2"
style="width: 90px" style="width: 90px"
> >
<el-option <el-option
@ -125,9 +125,11 @@
</div> </div>
</div> </div>
<div <div
style="display: flex;
style="
display: flex;
justify-content: space-between; justify-content: space-between;
position: relative;"
position: relative;
"
id="domTable" id="domTable"
> >
<div <div
@ -171,7 +173,10 @@
prop="patientName" prop="patientName"
label="姓名" label="姓名"
></el-table-column> ></el-table-column>
<el-table-column prop="sexName" label="性别"></el-table-column>
<el-table-column
prop="sexName"
label="性别"
></el-table-column>
<el-table-column prop="age" label="年龄"></el-table-column> <el-table-column prop="age" label="年龄"></el-table-column>
<el-table-column <el-table-column
prop="asbitemName" prop="asbitemName"
@ -185,7 +190,10 @@
prop="charePrice" prop="charePrice"
label="实收金额" label="实收金额"
></el-table-column> ></el-table-column>
<el-table-column prop="discount" label="折扣"></el-table-column>
<el-table-column
prop="discount"
label="折扣"
></el-table-column>
<el-table-column <el-table-column
prop="bookKeepingName" prop="bookKeepingName"
label="记账人" label="记账人"
@ -240,7 +248,10 @@
prop="patientName" prop="patientName"
label="姓名" label="姓名"
></el-table-column> ></el-table-column>
<el-table-column prop="sexName" label="性别"></el-table-column>
<el-table-column
prop="sexName"
label="性别"
></el-table-column>
<el-table-column prop="age" label="年龄"></el-table-column> <el-table-column prop="age" label="年龄"></el-table-column>
<el-table-column <el-table-column
prop="asbitemName" prop="asbitemName"
@ -254,7 +265,10 @@
prop="charePrice" prop="charePrice"
label="实收金额" label="实收金额"
></el-table-column> ></el-table-column>
<el-table-column prop="discount" label="折扣"></el-table-column>
<el-table-column
prop="discount"
label="折扣"
></el-table-column>
<el-table-column <el-table-column
prop="bookKeepingName" prop="bookKeepingName"
label="记账人" label="记账人"
@ -456,7 +470,7 @@ export default {
feesummarychargeMoney: 0, feesummarychargeMoney: 0,
feesummarydiscountMoney: 0, feesummarydiscountMoney: 0,
feesummaryreceivedChargeMoney: 0, feesummaryreceivedChargeMoney: 0,
feesummarytotalReceivedChargeMoney:0,
feesummarytotalReceivedChargeMoney: 0,
pages: { pages: {
SkipCount: 0, SkipCount: 0,
MaxResultCount: 1000, MaxResultCount: 1000,
@ -566,12 +580,12 @@ export default {
} }
}, },
tableRowClassName({ row, column, rowIndex, columnIndex }) { tableRowClassName({ row, column, rowIndex, columnIndex }) {
if (row.medicalTimes == "合计") {
if (row.asbitemName == "合计") {
return { backgroundColor: "#F5F7FA" }; return { backgroundColor: "#F5F7FA" };
} }
}, },
feesummarytableRowClassName({ row, column, rowIndex, columnIndex }) { feesummarytableRowClassName({ row, column, rowIndex, columnIndex }) {
if (row.patientNo == "合计") {
if (row.payModeName == "合计") {
return { backgroundColor: "#F5F7FA" }; return { backgroundColor: "#F5F7FA" };
} }
}, },
@ -655,19 +669,19 @@ export default {
feesummaryTableData(tableData) { feesummaryTableData(tableData) {
const newData = [...tableData]; // const newData = [...tableData]; //
const totalRows = { const totalRows = {
chargeId:"",
patientNo: "合计",
chargeId: "",
patientNo: "",
patientName: "", patientName: "",
sexName: "", sexName: "",
age: "", age: "",
chargeMoney: 0, chargeMoney: 0,
discountMoney: 0, discountMoney: 0,
totalReceivedChargeMoney:0,
totalReceivedChargeMoney: 0,
bookKeepingName: "", bookKeepingName: "",
bookkeepingTiem: "", bookkeepingTiem: "",
chargeFlagName: "", chargeFlagName: "",
payModeName:"",
receivedChargeMoney:0
payModeName: "合计",
receivedChargeMoney: 0,
}; // }; //
let obj = {}; let obj = {};
for (let i = 0; i < tableData.length; i++) { for (let i = 0; i < tableData.length; i++) {
@ -680,10 +694,19 @@ export default {
tableData.forEach((item) => { tableData.forEach((item) => {
if (item.chargeId == key) { if (item.chargeId == key) {
totalRow.chargeId = item.chargeId; totalRow.chargeId = item.chargeId;
totalRow.chargeMoney =item.chargeMoney
totalRow.discountMoney =item.discountMoney
totalRow.totalReceivedChargeMoney =item.totalReceivedChargeMoney
totalRow.receivedChargeMoney =(Number(totalRow.receivedChargeMoney)+Number(item.receivedChargeMoney)).toFixed(2)
totalRow.chargeMoney = (
Number(totalRow.chargeMoney) + Number(item.chargeMoney)
).toFixed(2);
totalRow.discountMoney = (
Number(totalRow.discountMoney) + Number(item.discountMoney)
).toFixed(2);
totalRow.totalReceivedChargeMoney = (
Number(totalRow.totalReceivedChargeMoney) + Number(item.totalReceivedChargeMoney)
).toFixed(2);
totalRow.receivedChargeMoney = (
Number(totalRow.receivedChargeMoney) +
Number(item.receivedChargeMoney)
).toFixed(2);
} }
}); });
newData.push(totalRow); newData.push(totalRow);
@ -704,11 +727,11 @@ export default {
const newData = [...tableData]; // const newData = [...tableData]; //
const totalRows = { const totalRows = {
patientNo: "", patientNo: "",
medicalTimes: "合计",
medicalTimes: "",
patientName: "", patientName: "",
sexName: "", sexName: "",
age: "", age: "",
asbitemName: "",
asbitemName: "合计",
standardPrice: 0, standardPrice: 0,
charePrice: 0, charePrice: 0,
discount: "", discount: "",
@ -727,8 +750,12 @@ export default {
if (item.patientNo == key) { if (item.patientNo == key) {
totalRow.patientNo = item.patientNo; totalRow.patientNo = item.patientNo;
totalRow.patientName = item.patientName; totalRow.patientName = item.patientName;
totalRow.standardPrice =(Number(totalRow.standardPrice)+Number(item.standardPrice)).toFixed(2)
totalRow.charePrice =(Number(totalRow.charePrice)+Number(item.charePrice)).toFixed(2)
totalRow.standardPrice = (
Number(totalRow.standardPrice) + Number(item.standardPrice)
).toFixed(2);
totalRow.charePrice = (
Number(totalRow.charePrice) + Number(item.charePrice)
).toFixed(2);
} }
}); });
newData.push(totalRow); newData.push(totalRow);
@ -743,11 +770,11 @@ export default {
const newData = [...tableData]; // const newData = [...tableData]; //
const totalRows = { const totalRows = {
patientNo: "", patientNo: "",
medicalTimes: "合计",
medicalTimes: "",
patientName: "", patientName: "",
sexName: "", sexName: "",
age: "", age: "",
asbitemName: "",
asbitemName: "合计",
standardPrice: 0, standardPrice: 0,
charePrice: 0, charePrice: 0,
discount: "", discount: "",
@ -763,7 +790,6 @@ export default {
var item = tableData[i].patientNo; var item = tableData[i].patientNo;
obj[item] = obj[item] + 1 || 1; obj[item] = obj[item] + 1 || 1;
} }
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
let totalRow = JSON.parse(JSON.stringify(totalRows)); let totalRow = JSON.parse(JSON.stringify(totalRows));
let pie = JSON.parse(JSON.stringify(pies)); let pie = JSON.parse(JSON.stringify(pies));
@ -772,8 +798,12 @@ export default {
totalRow.patientNo = item.patientNo; totalRow.patientNo = item.patientNo;
totalRow.patientName = item.patientName; totalRow.patientName = item.patientName;
pie.name = item.patientName; pie.name = item.patientName;
totalRow.standardPrice =(Number(totalRow.standardPrice)+Number(item.standardPrice)).toFixed(2)
totalRow.charePrice =(Number(totalRow.charePrice)+Number(item.charePrice)).toFixed(2)
totalRow.standardPrice = (
Number(totalRow.standardPrice) + Number(item.standardPrice)
).toFixed(2);
totalRow.charePrice = (
Number(totalRow.charePrice) + Number(item.charePrice)
).toFixed(2);
pie.value = totalRow.charePrice; pie.value = totalRow.charePrice;
} }
}); });
@ -831,84 +861,78 @@ export default {
this.setStandardDates(this.standardTableData); this.setStandardDates(this.standardTableData);
}, },
setStandardDates(arr) { setStandardDates(arr) {
var obj = {},
k,
arr1 = [];
if (arr.length !== 0) {
this.arr1 = []; this.arr1 = [];
for (var i = 0, len = arr.length; i < len; i++) {
k = arr[i].patientNo; //
if (obj[k]) obj[k]++;
else obj[k] = 1;
}
//{el-''count-}
for (var o in obj) {
for (let i = 0; i < obj[o]; i++) {
if (i === 0) {
this.arr1.push(obj[o]);
let pos = 0;
arr.forEach((item, index) => {
if (index === 0) {
this.arr1.push(1);
} else { } else {
if (item.patientNo === arr[index - 1].patientNo) {
this.arr1[pos] += 1;
this.arr1.push(0); this.arr1.push(0);
} else {
pos = index;
this.arr1.push(1);
} }
} }
});
} }
}, },
feesummarysetStandardDates(arr) { feesummarysetStandardDates(arr) {
var obj = {},
k,
arr1 = [];
if (arr.length !== 0) {
this.arr3 = []; this.arr3 = [];
for (var i = 0, len = arr.length; i < len; i++) {
k = arr[i].chargeId; //
if (obj[k]) obj[k]++;
else obj[k] = 1;
}
//{el-''count-}
for (var o in obj) {
for (let i = 0; i < obj[o]; i++) {
if (i === 0) {
this.arr3.push(obj[o]);
let pos = 0;
arr.forEach((item, index) => {
if (index === 0) {
this.arr3.push(1);
} else { } else {
if (item.chargeId === arr[index - 1].chargeId) {
this.arr3[pos] += 1;
this.arr3.push(0); this.arr3.push(0);
} else {
pos = index;
this.arr3.push(1);
} }
} }
});
} }
}, },
refundsetStandardDates(arr) { refundsetStandardDates(arr) {
var obj = {},
k,
arr1 = [];
if (arr.length !== 0) {
this.arr2 = []; this.arr2 = [];
for (var i = 0, len = arr.length; i < len; i++) {
k = arr[i].patientNo; //
if (obj[k]) obj[k]++;
else obj[k] = 1;
}
//{el-''count-}
for (var o in obj) {
for (let i = 0; i < obj[o]; i++) {
if (i === 0) {
this.arr2.push(obj[o]);
let pos = 0;
arr.forEach((item, index) => {
if (index === 0) {
this.arr2.push(1);
} else { } else {
if (item.patientNo === arr[index - 1].patientNo) {
this.arr2[pos] += 1;
this.arr2.push(0); this.arr2.push(0);
} else {
pos = index;
this.arr2.push(1);
} }
} }
});
} }
}, },
objectStandardSpanMethod({ row, column, rowIndex, columnIndex }) { objectStandardSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (columnIndex < 5) {
let _row = this.arr1[rowIndex]; let _row = this.arr1[rowIndex];
let _col = this.arr1[rowIndex] > 0 ? 1 : 0; let _col = this.arr1[rowIndex] > 0 ? 1 : 0;
return [_row, _col]; return [_row, _col];
} }
}, },
refundobjectStandardSpanMethod({ row, column, rowIndex, columnIndex }) { refundobjectStandardSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (columnIndex < 5) {
let _row = this.arr2[rowIndex]; let _row = this.arr2[rowIndex];
let _col = this.arr2[rowIndex] > 0 ? 1 : 0; let _col = this.arr2[rowIndex] > 0 ? 1 : 0;
return [_row, _col]; return [_row, _col];
} }
}, },
feesummaryobjectStandardSpanMethod({ row, column, rowIndex, columnIndex }) { feesummaryobjectStandardSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (columnIndex < 5) {
let _row = this.arr3[rowIndex]; let _row = this.arr3[rowIndex];
let _col = this.arr3[rowIndex] > 0 ? 1 : 0; let _col = this.arr3[rowIndex] > 0 ? 1 : 0;
return [_row, _col]; return [_row, _col];
@ -920,11 +944,7 @@ export default {
} else if (this.format == 1) { } else if (this.format == 1) {
exportToExcel("#tableData", "个人退费明细统计报表", false); exportToExcel("#tableData", "个人退费明细统计报表", false);
} else { } else {
exportToExcel(
"#projectTableData",
"个人收费汇总统计报表",
false
);
exportToExcel("#projectTableData", "个人收费汇总统计报表", false);
} }
}, },
onPrint() { onPrint() {
@ -1054,7 +1074,7 @@ page-break-before: avoid;}}`, // 去除页眉页脚
this.$refs.chart2.setOption(option2); this.$refs.chart2.setOption(option2);
}, },
getList() { getList() {
getapi("/api/identity/users/getlist",this.pages).then((res) => {
getapi("/api/identity/users/getlist", this.pages).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.registrardata = [...res.data.items]; this.registrardata = [...res.data.items];
} }
@ -1136,7 +1156,7 @@ page-break-before: avoid;}}`, // 去除页眉页脚
/* ::v-deep .el-table__fixed-body-wrapper .el-table__body { /* ::v-deep .el-table__fixed-body-wrapper .el-table__body {
padding-right: 6px; padding-right: 6px;
} */ } */
.query:last-child{
.query:last-child {
margin-right: 0; margin-right: 0;
} }
</style> </style>
Loading…
Cancel
Save