修复日常收费翻页的异常

This commit is contained in:
czx 2021-02-09 15:00:17 +08:00
parent fd0cea9af8
commit 22caa5c771
2 changed files with 46 additions and 8 deletions

View File

@ -89,7 +89,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="clickAddLeaveSettlement(scope.row)" @click="clickListLeaveSettlement(scope.row)"
v-hasPermi="['fantang:settle:AddLeaveSettlement']" v-hasPermi="['fantang:settle:AddLeaveSettlement']"
>查看详情 >查看详情
</el-button> </el-button>
@ -219,7 +219,7 @@
</el-table> </el-table>
</el-dialog> </el-dialog>
<!-- 出院结算弹出层对话框--> <!-- 查看详情弹出层对话框-->
<el-dialog title="用餐详情" :visible.sync="open" width="1000px" append-to-body> <el-dialog title="用餐详情" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="leaveForm" :model="leaveForm" :rules="rules" label-width="160px"> <el-form ref="leaveForm" :model="leaveForm" :rules="rules" label-width="160px">
<el-form-item label="住院号" prop="hospitalId"> <el-form-item label="住院号" prop="hospitalId">
@ -283,6 +283,8 @@
<el-row> <el-row>
报餐总价{{ sumTotalPrice }} 报餐总价{{ sumTotalPrice }}
</el-row> </el-row>
<el-table v-loading="loading" :data="mealsList"> <el-table v-loading="loading" :data="mealsList">
<el-table-column label="报餐日期" align="center" prop="createAt" width="180"> <el-table-column label="报餐日期" align="center" prop="createAt" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -293,6 +295,14 @@
<el-table-column label="营养餐价格" align="center" prop="nutritionFoodPrice"/> <el-table-column label="营养餐价格" align="center" prop="nutritionFoodPrice"/>
<el-table-column label="报餐总价" align="center" prop="totalPrice"/> <el-table-column label="报餐总价" align="center" prop="totalPrice"/>
</el-table> </el-table>
<pagination
v-show="queryLeaveForm.total>0"
:total="queryLeaveForm.total"
:page.sync="queryLeaveForm.pageNum"
:limit.sync="queryLeaveForm.pageSize"
@pagination="pagechangeLeaveForm"
/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -435,6 +445,12 @@ export default {
// //
form: {}, form: {},
leaveForm: {}, leaveForm: {},
queryLeaveForm: {
patientId: null,
pageNum: 1,
pageSize: 7,
total: 0
},
// //
rules: { rules: {
list: [ list: [
@ -476,6 +492,27 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
pagechangeLeaveForm() {
showAllMealsWithNoPay(this.queryLeaveForm).then(response => {
console.log(response);
this.mealsList = response.data.reportMealsList.records;
this.queryLeaveForm.total = response.data.reportMealsList.total;
if (response.data.reportMealsPrice == null) {
this.dinnerTotalPrice = 0;
this.nutritionTotalPrice = 0;
this.sumTotalPrice = 0;
}
if (response.data.reportMealsPrice != null) {
this.dinnerTotalPrice = response.data.reportMealsPrice.dinnerTotalPrice;
this.nutritionTotalPrice = response.data.reportMealsPrice.nutritionTotalPrice;
this.sumTotalPrice = response.data.reportMealsPrice.sumTotalPrice;
this.formAddNewSettlement.netPeceipt = this.sumTotalPrice;
}
})
},
// //
changeBillingDate(value) { changeBillingDate(value) {
var dateSpan, iDays; var dateSpan, iDays;
@ -571,9 +608,8 @@ export default {
}); });
}, },
// //
clickAddLeaveSettlement(row) { clickListLeaveSettlement(row) {
// //
this.mealsList = null; this.mealsList = null;
this.sumTotalPrice = 0; this.sumTotalPrice = 0;
@ -597,9 +633,11 @@ export default {
this.leaveForm.prepayment = response.prepayment.prepaid; this.leaveForm.prepayment = response.prepayment.prepaid;
} }
showAllMealsWithNoPay(row.patientId).then(response => { this.queryLeaveForm.patientId = row.patientId;
showAllMealsWithNoPay(this.queryLeaveForm).then(response => {
console.log(response); console.log(response);
this.mealsList = response.data.reportMealsList; this.mealsList = response.data.reportMealsList.records;
this.queryLeaveForm.total = response.data.reportMealsList.total;
if (response.data.reportMealsPrice == null) { if (response.data.reportMealsPrice == null) {
this.dinnerTotalPrice = 0; this.dinnerTotalPrice = 0;