Browse Source

个人收费明细

master
luobinjie 4 months ago
parent
commit
b09c6f320b
  1. 140
      src/views/workload/individualfeedetails.vue

140
src/views/workload/individualfeedetails.vue

@ -28,7 +28,7 @@
size="small"
multiple
filterable
:multiple-limit=2
:multiple-limit="2"
style="width: 90px"
>
<el-option
@ -125,9 +125,11 @@
</div>
</div>
<div
style="display: flex;
style="
display: flex;
justify-content: space-between;
position: relative;"
position: relative;
"
id="domTable"
>
<div
@ -171,7 +173,10 @@
prop="patientName"
label="姓名"
></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="asbitemName"
@ -185,7 +190,10 @@
prop="charePrice"
label="实收金额"
></el-table-column>
<el-table-column prop="discount" label="折扣"></el-table-column>
<el-table-column
prop="discount"
label="折扣"
></el-table-column>
<el-table-column
prop="bookKeepingName"
label="记账人"
@ -240,7 +248,10 @@
prop="patientName"
label="姓名"
></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="asbitemName"
@ -254,7 +265,10 @@
prop="charePrice"
label="实收金额"
></el-table-column>
<el-table-column prop="discount" label="折扣"></el-table-column>
<el-table-column
prop="discount"
label="折扣"
></el-table-column>
<el-table-column
prop="bookKeepingName"
label="记账人"
@ -566,12 +580,12 @@ export default {
}
},
tableRowClassName({ row, column, rowIndex, columnIndex }) {
if (row.medicalTimes == "合计") {
if (row.asbitemName == "合计") {
return { backgroundColor: "#F5F7FA" };
}
},
feesummarytableRowClassName({ row, column, rowIndex, columnIndex }) {
if (row.patientNo == "合计") {
if (row.payModeName == "合计") {
return { backgroundColor: "#F5F7FA" };
}
},
@ -656,7 +670,7 @@ export default {
const newData = [...tableData]; //
const totalRows = {
chargeId: "",
patientNo: "合计",
patientNo: "",
patientName: "",
sexName: "",
age: "",
@ -666,8 +680,8 @@ export default {
bookKeepingName: "",
bookkeepingTiem: "",
chargeFlagName: "",
payModeName:"",
receivedChargeMoney:0
payModeName: "合计",
receivedChargeMoney: 0,
}; //
let obj = {};
for (let i = 0; i < tableData.length; i++) {
@ -680,10 +694,19 @@ export default {
tableData.forEach((item) => {
if (item.chargeId == key) {
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);
@ -704,11 +727,11 @@ export default {
const newData = [...tableData]; //
const totalRows = {
patientNo: "",
medicalTimes: "合计",
medicalTimes: "",
patientName: "",
sexName: "",
age: "",
asbitemName: "",
asbitemName: "合计",
standardPrice: 0,
charePrice: 0,
discount: "",
@ -727,8 +750,12 @@ export default {
if (item.patientNo == key) {
totalRow.patientNo = item.patientNo;
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);
@ -743,11 +770,11 @@ export default {
const newData = [...tableData]; //
const totalRows = {
patientNo: "",
medicalTimes: "合计",
medicalTimes: "",
patientName: "",
sexName: "",
age: "",
asbitemName: "",
asbitemName: "合计",
standardPrice: 0,
charePrice: 0,
discount: "",
@ -763,7 +790,6 @@ export default {
var item = tableData[i].patientNo;
obj[item] = obj[item] + 1 || 1;
}
Object.keys(obj).forEach((key) => {
let totalRow = JSON.parse(JSON.stringify(totalRows));
let pie = JSON.parse(JSON.stringify(pies));
@ -772,8 +798,12 @@ export default {
totalRow.patientNo = item.patientNo;
totalRow.patientName = 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;
}
});
@ -831,24 +861,22 @@ export default {
this.setStandardDates(this.standardTableData);
},
setStandardDates(arr) {
var obj = {},
k,
arr1 = [];
if (arr.length !== 0) {
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 {
if (item.patientNo === arr[index - 1].patientNo) {
this.arr1[pos] += 1;
this.arr1.push(0);
} else {
pos = index;
this.arr1.push(1);
}
}
});
}
},
feesummarysetStandardDates(arr) {
@ -873,42 +901,40 @@ export default {
}
},
refundsetStandardDates(arr) {
var obj = {},
k,
arr1 = [];
if (arr.length !== 0) {
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 {
if (item.patientNo === arr[index - 1].patientNo) {
this.arr2[pos] += 1;
this.arr2.push(0);
} else {
pos = index;
this.arr2.push(1);
}
}
});
}
},
objectStandardSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (columnIndex < 5) {
let _row = this.arr1[rowIndex];
let _col = this.arr1[rowIndex] > 0 ? 1 : 0;
return [_row, _col];
}
},
refundobjectStandardSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (columnIndex < 5) {
let _row = this.arr2[rowIndex];
let _col = this.arr2[rowIndex] > 0 ? 1 : 0;
return [_row, _col];
}
},
feesummaryobjectStandardSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (columnIndex < 5) {
let _row = this.arr3[rowIndex];
let _col = this.arr3[rowIndex] > 0 ? 1 : 0;
return [_row, _col];
@ -920,11 +946,7 @@ export default {
} else if (this.format == 1) {
exportToExcel("#tableData", "个人退费明细统计报表", false);
} else {
exportToExcel(
"#projectTableData",
"个人收费汇总统计报表",
false
);
exportToExcel("#projectTableData", "个人收费汇总统计报表", false);
}
},
onPrint() {

Loading…
Cancel
Save