窗口收费查看所有未结算

This commit is contained in:
ryoeiken 2021-01-22 09:01:47 +08:00
parent 1c4c13a83a
commit 974f1fb229
6 changed files with 136 additions and 58 deletions

View File

@ -75,7 +75,27 @@ public class FtSettleDaoController extends BaseController {
ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumTotalPrice(patientId, lastBillingDate, selectBillingDate); ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
Map<String, Object> data = new HashMap<>(); Map<String, Object> data = new HashMap<>(2);
data.put("reportMealsList", reportMealsList);
data.put("reportMealsPrice", reportMealsPrice);
return AjaxResult.success(data);
}
@GetMapping("/showAllMealsWithNoPay/{patientId}")
public AjaxResult showAllMealsWithNoPay(@PathVariable Long patientId) {
// 查找该病人所有已用餐未结算记录
QueryWrapper<FtReportMealsDao> wrapper = new QueryWrapper<>();
wrapper.eq("patient_id", patientId);
wrapper.eq("dining_flag",0);
wrapper.eq("settlement_flag",0);
List<FtReportMealsDao> reportMealsList = iFtReportMealsDaoService.list(wrapper);
ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumAllTotalPrice(patientId);
Map<String, Object> data = new HashMap<>(2);
data.put("reportMealsList", reportMealsList); data.put("reportMealsList", reportMealsList);
data.put("reportMealsPrice", reportMealsPrice); data.put("reportMealsPrice", reportMealsPrice);

View File

@ -42,4 +42,7 @@ public interface FtReportMealsDaoMapper extends BaseMapper<FtReportMealsDao> {
List<FtReportMealsDao> listNutrition(@Param("beginOfDay") DateTime beginOfDay, @Param("endOfDay") DateTime endOfDay, FtReportMealsDao ftReportMealsDao); List<FtReportMealsDao> listNutrition(@Param("beginOfDay") DateTime beginOfDay, @Param("endOfDay") DateTime endOfDay, FtReportMealsDao ftReportMealsDao);
List<FtReportMealsDao> listAllNutrition(FtReportMealsDao ftReportMealsDao); List<FtReportMealsDao> listAllNutrition(FtReportMealsDao ftReportMealsDao);
@Select("SELECT a.patient_id,sum(a.price) as dinner_total_price , sum(a.nutrition_food_price ) as nutrition_total_price , sum(a.total_price) as sum_total_price FROM ft_report_meals a where a.patient_id = #{patientId} AND a.settlement_flag = 0 AND a.dining_flag = 1")
ReportMealsPriceEntity sumAllTotalPrice(Long patientId);
} }

View File

@ -6,7 +6,6 @@ import com.ruoyi.system.fantang.entity.ReportMealsDayEntity;
import com.ruoyi.system.fantang.entity.ReportMealsPriceEntity; import com.ruoyi.system.fantang.entity.ReportMealsPriceEntity;
import com.ruoyi.system.fantang.vo.FtReportMealVo; import com.ruoyi.system.fantang.vo.FtReportMealVo;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -32,6 +31,8 @@ public interface IFtReportMealsDaoService extends IService<FtReportMealsDao> {
ReportMealsPriceEntity sumTotalPrice(Long patientId, Date lastBillingDate, Date selectBillingDate); ReportMealsPriceEntity sumTotalPrice(Long patientId, Date lastBillingDate, Date selectBillingDate);
ReportMealsPriceEntity sumAllTotalPrice(Long patientId);
FtReportMealsDao getLastReportMeals(Long patientId); FtReportMealsDao getLastReportMeals(Long patientId);
List<FtReportMealsDao> listNutrition(FtReportMealsDao ftReportMealsDao); List<FtReportMealsDao> listNutrition(FtReportMealsDao ftReportMealsDao);

View File

@ -73,6 +73,11 @@ public class FtReportMealsDaoServiceImpl extends ServiceImpl<FtReportMealsDaoMap
return this.baseMapper.sumTotalPrice(patientId, lastBillingDate, selectBillingDate); return this.baseMapper.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
} }
@Override
public ReportMealsPriceEntity sumAllTotalPrice(Long patientId) {
return this.baseMapper.sumAllTotalPrice(patientId);
}
@Override @Override
public FtReportMealsDao getLastReportMeals(Long patientId) { public FtReportMealsDao getLastReportMeals(Long patientId) {

View File

@ -14,6 +14,13 @@ export function getLastBillingDateByPatientId(patientId) {
}) })
} }
// 查看该病人所有已用餐未结算的记录
export function showAllMealsWithNoPay(patientId) {
return request({
url: '/fantang/settle/showAllMealsWithNoPay/' + patientId,
method: 'get'
})
}
// 查询结算报列表 // 查询结算报列表

View File

@ -3,11 +3,11 @@
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="住院号" prop="hospitalId"> <el-form-item label="住院号" prop="hospitalId">
<el-input <el-input
v-model="queryParams.hospitalId" v-model="queryParams.hospitalId"
placeholder="请输入住院号" placeholder="请输入住院号"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -17,21 +17,21 @@
size="small" size="small"
@keyup.enter.native="handleQuery"> @keyup.enter.native="handleQuery">
<el-option <el-option
v-for="item in departOptions" v-for="item in departOptions"
:key="item.departName" :key="item.departName"
:label="item.departName" :label="item.departName"
:value="item.departId"> :value="item.departId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="姓名" prop="name"> <el-form-item label="姓名" prop="name">
<el-input <el-input
v-model="queryParams.name" v-model="queryParams.name"
placeholder="请输入姓名" placeholder="请输入姓名"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="结算标志" prop="settlementFlag">--> <!-- <el-form-item label="结算标志" prop="settlementFlag">-->
@ -56,11 +56,11 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['fantang:settle:export']" v-hasPermi="['fantang:settle:export']"
>导出 >导出
</el-button> </el-button>
</el-col> </el-col>
@ -78,19 +78,19 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="clickAddNewSettlement(scope.row)" @click="clickAddNewSettlement(scope.row)"
v-hasPermi="['fantang:settle:AddNewSettlement']" v-hasPermi="['fantang:settle:AddNewSettlement']"
>收费 >收费
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="clickAddLeaveSettlement(scope.row)" @click="clickAddLeaveSettlement(scope.row)"
v-hasPermi="['fantang:settle:AddLeaveSettlement']" v-hasPermi="['fantang:settle:AddLeaveSettlement']"
>查看详情 >查看详情
</el-button> </el-button>
</template> </template>
@ -98,11 +98,11 @@
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 日常收费弹出层对话框--> <!-- 日常收费弹出层对话框-->
@ -134,11 +134,11 @@
<el-form-item label="上次结算 / 首次用餐" prop="lastBillingDate"> <el-form-item label="上次结算 / 首次用餐" prop="lastBillingDate">
<!-- <el-input v-model="formAddNewSettlement.lastBillingDate" :disabled="true"/>--> <!-- <el-input v-model="formAddNewSettlement.lastBillingDate" :disabled="true"/>-->
<el-date-picker <el-date-picker
v-model="formAddNewSettlement.lastBillingDate" v-model="formAddNewSettlement.lastBillingDate"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:disabled="true"> :disabled="true">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -161,13 +161,13 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="结算日期" prop="selectBillingDate"> <el-form-item label="结算日期" prop="selectBillingDate">
<el-date-picker <el-date-picker
v-model="formAddNewSettlement.selectBillingDate" v-model="formAddNewSettlement.selectBillingDate"
align="right" align="right"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@change="changeBillingDate" @change="changeBillingDate"
:picker-options="pickerOptions"> :picker-options="pickerOptions">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -175,10 +175,10 @@
<el-form-item label="支付方式" prop="payType"> <el-form-item label="支付方式" prop="payType">
<el-select v-model="formAddNewSettlement.payType" placeholder="请选择支付方式"> <el-select v-model="formAddNewSettlement.payType" placeholder="请选择支付方式">
<el-option <el-option
v-for="item in payTypeOptions" v-for="item in payTypeOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -246,11 +246,11 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="上次结算 / 首次用餐" prop="lastBillingDate"> <el-form-item label="上次结算 / 首次用餐" prop="lastBillingDate">
<el-date-picker <el-date-picker
v-model="leaveForm.lastBillingDate" v-model="leaveForm.lastBillingDate"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:disabled="true"> :disabled="true">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -298,7 +298,14 @@
</template> </template>
<script> <script>
import {addSettle, delSettle, exportSettle, getSettle, showMealsWithSelect} from "@/api/fantang/settle"; import {
addSettle,
delSettle,
exportSettle,
getSettle,
showAllMealsWithNoPay,
showMealsWithSelect
} from "../../../api/fantang/settle";
import {getLastSettlementDate, listAll, listMealsWithInSettle, listNoPay, listPayoff} from "@/api/fantang/meals"; import {getLastSettlementDate, listAll, listMealsWithInSettle, listNoPay, listPayoff} from "@/api/fantang/meals";
import {getUserProfile} from "@/api/system/user"; import {getUserProfile} from "@/api/system/user";
import {listDepart} from "@/api/fantang/depart"; import {listDepart} from "@/api/fantang/depart";
@ -532,6 +539,13 @@ export default {
// //
clickAddNewSettlement(row) { clickAddNewSettlement(row) {
//
this.mealsList = null;
this.sumTotalPrice = 0;
this.dinnerTotalPrice = 0;
this.nutritionTotalPrice = 0;
getLastSettlementDate(row.patientId).then(response => { getLastSettlementDate(row.patientId).then(response => {
console.log("getLastBillingDateByPatientId-->", response); console.log("getLastBillingDateByPatientId-->", response);
if (response.reportMeals.settlementAt === null) { if (response.reportMeals.settlementAt === null) {
@ -565,6 +579,14 @@ export default {
// //
clickAddLeaveSettlement(row) { clickAddLeaveSettlement(row) {
//
this.mealsList = null;
this.sumTotalPrice = 0;
this.dinnerTotalPrice = 0;
this.nutritionTotalPrice = 0;
// /
getLastSettlementDate(row.patientId).then(response => { getLastSettlementDate(row.patientId).then(response => {
if (response.reportMeals.settlementAt === null) { if (response.reportMeals.settlementAt === null) {
this.lastBillFlag = false; this.lastBillFlag = false;
@ -574,6 +596,7 @@ export default {
this.leaveForm.lastBillingDate = response.reportMeals.settlementAt; this.leaveForm.lastBillingDate = response.reportMeals.settlementAt;
} }
//
if (response.prepayment === null) { if (response.prepayment === null) {
this.leaveForm.prepayment = 0; this.leaveForm.prepayment = 0;
} else { } else {
@ -590,6 +613,24 @@ export default {
this.leaveForm.price = row.price; this.leaveForm.price = row.price;
this.leaveForm.netPeceipt = null; this.leaveForm.netPeceipt = null;
this.leaveForm.userName = this.userName; this.leaveForm.userName = this.userName;
showAllMealsWithNoPay(row.patientId).then(response => {
console.log(response);
this.mealsList = response.data.reportMealsList;
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;
}
})
}); });
}, },
@ -651,6 +692,7 @@ export default {
flag: null, flag: null,
refund: null refund: null
}; };
this.formAddNewSettlement = { this.formAddNewSettlement = {
selectBillingDate: null, selectBillingDate: null,
payType: null, payType: null,