收费页面弹出层
This commit is contained in:
parent
f0ac254e43
commit
21416475a2
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.system.fantang.controller;
|
package com.ruoyi.system.fantang.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
@ -9,7 +10,11 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
||||||
import com.ruoyi.system.fantang.domain.FtSettleDao;
|
import com.ruoyi.system.fantang.domain.FtSettleDao;
|
||||||
|
import com.ruoyi.system.fantang.entity.ReportMealsPriceEntity;
|
||||||
|
import com.ruoyi.system.fantang.entity.SettleEntity;
|
||||||
|
import com.ruoyi.system.fantang.service.IFtFoodDemandDaoService;
|
||||||
import com.ruoyi.system.fantang.service.IFtReportMealsDaoService;
|
import com.ruoyi.system.fantang.service.IFtReportMealsDaoService;
|
||||||
import com.ruoyi.system.fantang.service.IFtSettleDaoService;
|
import com.ruoyi.system.fantang.service.IFtSettleDaoService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -17,10 +22,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结算报Controller
|
* 结算报Controller
|
||||||
@ -37,6 +41,70 @@ public class FtSettleDaoController extends BaseController {
|
|||||||
|
|
||||||
private final IFtReportMealsDaoService iFtReportMealsDaoService;
|
private final IFtReportMealsDaoService iFtReportMealsDaoService;
|
||||||
|
|
||||||
|
private final IFtFoodDemandDaoService iFtFoodDemandDaoService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示报餐信息,包含日期,正餐与营养餐的总价格
|
||||||
|
*/
|
||||||
|
@PostMapping("/showMealsWithSelect")
|
||||||
|
public AjaxResult showMealsWithSelect(@RequestBody SettleEntity settlement) {
|
||||||
|
|
||||||
|
Long patientId = settlement.getPatientId();
|
||||||
|
Date lastBillingDate = settlement.getLastBillingDate();
|
||||||
|
Date selectBillingDate = settlement.getSelectBillingDate();
|
||||||
|
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
|
// 根据病人 id ,上次结算日期,选择日期查询病人非营养餐记录
|
||||||
|
QueryWrapper<FtReportMealsDao> reportMealsWrapper = new QueryWrapper<>();
|
||||||
|
reportMealsWrapper.eq("patient_id", patientId);
|
||||||
|
// reportMealsWrapper.eq("nutrition_food_flag", 0);
|
||||||
|
reportMealsWrapper.between("create_at", sdf.format(lastBillingDate), sdf.format(selectBillingDate));
|
||||||
|
List<FtReportMealsDao> reportMealsList = iFtReportMealsDaoService.list(reportMealsWrapper);
|
||||||
|
|
||||||
|
ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
|
||||||
|
|
||||||
|
Map<String, Object> data = new HashMap<>();
|
||||||
|
data.put("reportMealsList",reportMealsList);
|
||||||
|
data.put("reportMealsPrice",reportMealsPrice);
|
||||||
|
|
||||||
|
return AjaxResult.success(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增结算报
|
||||||
|
*/
|
||||||
|
@PostMapping("/addSettle")
|
||||||
|
public AjaxResult addSettle(@RequestBody SettleEntity settlement) {
|
||||||
|
System.out.println(settlement);
|
||||||
|
|
||||||
|
Long patientId = settlement.getPatientId();
|
||||||
|
Date lastBillingDate = settlement.getLastBillingDate();
|
||||||
|
Date selectBillingDate = settlement.getSelectBillingDate();
|
||||||
|
|
||||||
|
// List<FtReportMealsDao> reportMealsDaoList = iFtReportMealsDaoService.listByPatientIdAndDate(patientId,);
|
||||||
|
|
||||||
|
// 根据病人 id ,上次结算日期,选择日期查询病人非营养餐记录
|
||||||
|
QueryWrapper<FtReportMealsDao> reportMealsWrapper = new QueryWrapper<>();
|
||||||
|
reportMealsWrapper.eq("patient_id", patientId);
|
||||||
|
reportMealsWrapper.eq("nutrition_food_flag", 0);
|
||||||
|
reportMealsWrapper.between("create_at", lastBillingDate, selectBillingDate);
|
||||||
|
List<FtReportMealsDao> reportMealsList = iFtReportMealsDaoService.list(reportMealsWrapper);
|
||||||
|
|
||||||
|
// 统计非营养餐总价
|
||||||
|
// BigDecimal totalPrice = iFtReportMealsDaoService.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
|
||||||
|
|
||||||
|
|
||||||
|
// 根据病人 id ,上次结算日期,选择日期查询病人养餐记录
|
||||||
|
QueryWrapper<FtReportMealsDao> withNutritionWrapper = new QueryWrapper<>();
|
||||||
|
withNutritionWrapper.eq("patient_id", patientId);
|
||||||
|
withNutritionWrapper.eq("nutrition_food_flag", 1);
|
||||||
|
withNutritionWrapper.between("create_at", lastBillingDate, selectBillingDate);
|
||||||
|
List<FtReportMealsDao> withNutritionList = iFtReportMealsDaoService.list(reportMealsWrapper);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询结算报列表
|
* 查询结算报列表
|
||||||
|
@ -116,4 +116,13 @@ public class FtFoodDemandDao extends BasePatient implements Serializable {
|
|||||||
@Excel(name = "启用状态")
|
@Excel(name = "启用状态")
|
||||||
private Boolean flag;
|
private Boolean flag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养餐 id
|
||||||
|
**/
|
||||||
|
private Long nutritionFoodId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养餐标志
|
||||||
|
**/
|
||||||
|
private Integer nutritionFoodFlag;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ public class FtReportMealsDao implements Serializable {
|
|||||||
private String foods;
|
private String foods;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总价
|
* 正餐总价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "总价")
|
@Excel(name = "总价")
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
@ -96,7 +96,31 @@ public class FtReportMealsDao implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String bedId;
|
private String bedId;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养餐 id
|
||||||
|
*/
|
||||||
|
private Long nutritionFoodId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养配餐标志
|
||||||
|
*/
|
||||||
|
private Integer nutritionFoodFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否替代正餐
|
||||||
|
*/
|
||||||
|
private Boolean isReplaceFood;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养配餐价格
|
||||||
|
*/
|
||||||
|
private BigDecimal nutritionFoodPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前报餐总价
|
||||||
|
*/
|
||||||
|
private BigDecimal totalPrice;
|
||||||
}
|
}
|
||||||
|
@ -15,11 +15,11 @@ import java.util.Date;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ReportMealsDayEntity extends FtReportMealsDao {
|
public class ReportMealsDayEntity extends FtReportMealsDao {
|
||||||
// 用户自定义结算日期
|
// 用户自定义结算日期
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date selectBillingDate;
|
private Date selectBillingDate;
|
||||||
// 自上一次结算累计未结算天数
|
// 自上一次结算累计未结算天数
|
||||||
private Long days;
|
private Long days;
|
||||||
// 上次缴费日期
|
// 上次缴费日期
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date lastCreateDate;
|
private Date lastCreateDate;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.ruoyi.system.fantang.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ReportMealsPriceEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正餐总价
|
||||||
|
*/
|
||||||
|
private BigDecimal dinnerTotalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养餐总价
|
||||||
|
*/
|
||||||
|
private BigDecimal nutritionTotalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正餐和营养餐总价
|
||||||
|
*/
|
||||||
|
private BigDecimal sumTotalPrice;
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package com.ruoyi.system.fantang.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SettleEntity {
|
||||||
|
|
||||||
|
// 床号
|
||||||
|
private String bedId;
|
||||||
|
|
||||||
|
// 科室名
|
||||||
|
private String departName;
|
||||||
|
|
||||||
|
// 住院号
|
||||||
|
private String hospitalId;
|
||||||
|
|
||||||
|
// 上次缴费日期
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date lastBillingDate;
|
||||||
|
|
||||||
|
// 病人姓名
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
// 实收
|
||||||
|
private BigDecimal netPeceipt;
|
||||||
|
|
||||||
|
// 操作员
|
||||||
|
private String opera;
|
||||||
|
|
||||||
|
// 病人 id
|
||||||
|
private Long patientId;
|
||||||
|
|
||||||
|
// 预付款金额
|
||||||
|
private BigDecimal prepayment;
|
||||||
|
|
||||||
|
// 应收
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
// 用户自定义结算日期
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date selectBillingDate;
|
||||||
|
|
||||||
|
// 自上一次结算累计未结算天数
|
||||||
|
private Long days;
|
||||||
|
|
||||||
|
// 操作员
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.ruoyi.system.fantang.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
||||||
|
import com.ruoyi.system.fantang.entity.ReportMealsPriceEntity;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.apache.ibatis.annotations.Update;
|
import org.apache.ibatis.annotations.Update;
|
||||||
@ -24,4 +25,16 @@ public interface FtReportMealsDaoMapper extends BaseMapper<FtReportMealsDao> {
|
|||||||
|
|
||||||
@Update("UPDATE ft_report_meals set settlement_flag = 1 , settlement_at = now() , settlement_id = #{settlementId} where patient_id = #{patientId} and create_at BETWEEN #{lastBillingDate} and #{selectBillingDate}")
|
@Update("UPDATE ft_report_meals set settlement_flag = 1 , settlement_at = now() , settlement_id = #{settlementId} where patient_id = #{patientId} and create_at BETWEEN #{lastBillingDate} and #{selectBillingDate}")
|
||||||
Integer settleMeals(@Param("settlementId") Long settlementId, @Param("patientId") Long patientId, @Param("lastBillingDate") String lastBillingDate, @Param("selectBillingDate") String selectBillingDate);
|
Integer settleMeals(@Param("settlementId") Long settlementId, @Param("patientId") Long patientId, @Param("lastBillingDate") String lastBillingDate, @Param("selectBillingDate") String selectBillingDate);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SELECT a.patient_id,sum(a.price) as price , sum(a.nutrition_food_price ) as nutrition_food_price , sum(a.total_price) as total_price FROM ft_report_meals a where a.patient_id = 2 and a.create_at BETWEEN '2020-12-01' AND '2020-12-22'
|
||||||
|
*
|
||||||
|
* @param patientId
|
||||||
|
* @param lastBillingDate
|
||||||
|
* @param selectBillingDate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@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.create_at BETWEEN #{lastBillingDate} AND #{selectBillingDate}")
|
||||||
|
ReportMealsPriceEntity sumTotalPrice(@Param("patientId") Long patientId, @Param("lastBillingDate") Date lastBillingDate, @Param("selectBillingDate") Date selectBillingDate);
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,10 @@ package com.ruoyi.system.fantang.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
||||||
import com.ruoyi.system.fantang.entity.ReportMealsDayEntity;
|
import com.ruoyi.system.fantang.entity.ReportMealsDayEntity;
|
||||||
|
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;
|
||||||
|
|
||||||
@ -27,4 +29,6 @@ public interface IFtReportMealsDaoService extends IService<FtReportMealsDao> {
|
|||||||
List<FtReportMealsDao> listMealsWithInSettle(FtReportMealsDao ftReportMealsDao);
|
List<FtReportMealsDao> listMealsWithInSettle(FtReportMealsDao ftReportMealsDao);
|
||||||
|
|
||||||
Integer settleMeals(Long settlementId, Long patientId, String lastBillingDate, String selectBillingDate);
|
Integer settleMeals(Long settlementId, Long patientId, String lastBillingDate, String selectBillingDate);
|
||||||
|
|
||||||
|
ReportMealsPriceEntity sumTotalPrice(Long patientId, Date lastBillingDate, Date selectBillingDate);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package com.ruoyi.system.fantang.service.impl;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
||||||
import com.ruoyi.system.fantang.entity.ReportMealsDayEntity;
|
import com.ruoyi.system.fantang.entity.ReportMealsDayEntity;
|
||||||
|
import com.ruoyi.system.fantang.entity.ReportMealsPriceEntity;
|
||||||
import com.ruoyi.system.fantang.mapper.FtReportMealVoMapper;
|
import com.ruoyi.system.fantang.mapper.FtReportMealVoMapper;
|
||||||
import com.ruoyi.system.fantang.mapper.FtReportMealsDaoMapper;
|
import com.ruoyi.system.fantang.mapper.FtReportMealsDaoMapper;
|
||||||
import com.ruoyi.system.fantang.service.IFtReportMealsDaoService;
|
import com.ruoyi.system.fantang.service.IFtReportMealsDaoService;
|
||||||
@ -10,6 +11,7 @@ import com.ruoyi.system.fantang.vo.FtReportMealVo;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -63,4 +65,9 @@ public class FtReportMealsDaoServiceImpl extends ServiceImpl<FtReportMealsDaoMap
|
|||||||
public Integer settleMeals(Long settlementId, Long patientId, String lastBillingDate, String selectBillingDate) {
|
public Integer settleMeals(Long settlementId, Long patientId, String lastBillingDate, String selectBillingDate) {
|
||||||
return this.baseMapper.settleMeals(settlementId, patientId, lastBillingDate, selectBillingDate);
|
return this.baseMapper.settleMeals(settlementId, patientId, lastBillingDate, selectBillingDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReportMealsPriceEntity sumTotalPrice(Long patientId, Date lastBillingDate, Date selectBillingDate) {
|
||||||
|
return this.baseMapper.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<result property="egg" column="egg"/>
|
<result property="egg" column="egg"/>
|
||||||
<result property="orderInfo" column="order_info"/>
|
<result property="orderInfo" column="order_info"/>
|
||||||
<result property="flag" column="flag"/>
|
<result property="flag" column="flag"/>
|
||||||
|
<result property="nutritionFoodId" column="nutrition_food_id"/>
|
||||||
|
<result property="nutritionFoodFlag" column="nutrition_food_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="listNewFormatter" resultType="com.ruoyi.system.fantang.domain.FtFoodDemandDao">
|
<select id="listNewFormatter" resultType="com.ruoyi.system.fantang.domain.FtFoodDemandDao">
|
||||||
|
@ -15,6 +15,11 @@
|
|||||||
<result property="settlementFlag" column="settlement_flag"/>
|
<result property="settlementFlag" column="settlement_flag"/>
|
||||||
<result property="settlementAt" column="settlement_at"/>
|
<result property="settlementAt" column="settlement_at"/>
|
||||||
<result property="settlementBy" column="settlement_by"/>
|
<result property="settlementBy" column="settlement_by"/>
|
||||||
|
<result property="nutritionFoodId" column="nutrition_food_id"/>
|
||||||
|
<result property="nutritionFoodFlag" column="nutrition_food_flag"/>
|
||||||
|
<result property="isReplaceFood" column="is_replace_food"/>
|
||||||
|
<result property="nutritionFoodPrice" column="nutrition_food_price"/>
|
||||||
|
<result property="totalPrice" column="total_price"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="listMealsWithInSettle" resultType="com.ruoyi.system.fantang.domain.FtReportMealsDao">
|
<select id="listMealsWithInSettle" resultType="com.ruoyi.system.fantang.domain.FtReportMealsDao">
|
||||||
|
@ -36,7 +36,16 @@ export function getSettle(settleId) {
|
|||||||
// 新增结算报
|
// 新增结算报
|
||||||
export function addSettle(data) {
|
export function addSettle(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/fantang/settle',
|
url: '/fantang/settle/addSettle',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 显示正餐记录
|
||||||
|
export function showMealsWithSelect(data) {
|
||||||
|
return request({
|
||||||
|
url: '/fantang/settle/showMealsWithSelect',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
@ -145,10 +145,13 @@
|
|||||||
<el-form-item label="订单列表" prop="foods">
|
<el-form-item label="订单列表" prop="foods">
|
||||||
<el-input v-model="form.foods" placeholder="请输入订单列表"/>
|
<el-input v-model="form.foods" placeholder="请输入订单列表"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总价" prop="price">
|
<el-form-item label="正餐总价" prop="price">
|
||||||
<el-input v-model="form.price" placeholder="请输入总价"/>
|
<el-input v-model="form.price" placeholder="请输入总价"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-form-item>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
@ -185,7 +185,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="上次结算日期" prop="lastBillingDate" v-if="lastBillFlag">
|
<!-- <el-form-item label="上次结算日期" prop="lastBillingDate" v-if="lastBillFlag">-->
|
||||||
|
<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"
|
||||||
@ -202,12 +203,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="应收" prop="price">
|
<el-form-item label="结算总价" prop="price">
|
||||||
<el-input v-model="formAddNewSettlement.price" :disabled="true"/>
|
<el-input v-model="formAddNewSettlement.price" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="已收预付伙食费" prop="prepayment" v-if="flagAddPrepaymentShow">
|
<!-- <el-form-item label="已收预付伙食费" prop="prepayment" v-if="flagAddPrepaymentShow">-->
|
||||||
|
<el-form-item label="已收预付伙食费" prop="prepayment">
|
||||||
<el-input v-model="formAddNewSettlement.prepayment" :disabled="true"/>
|
<el-input v-model="formAddNewSettlement.prepayment" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结算日期" prop="selectBillingDate">
|
<el-form-item label="结算日期" prop="selectBillingDate">
|
||||||
@ -216,7 +218,7 @@
|
|||||||
align="right"
|
align="right"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
value-format="yyyy-MM-dd mm:hh:ss"
|
value-format="yyyy-MM-dd"
|
||||||
@change="changeBillingDate"
|
@change="changeBillingDate"
|
||||||
:picker-options="pickerOptions">
|
:picker-options="pickerOptions">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -229,6 +231,32 @@
|
|||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="clickFormAddNewSettlementCancel">取 消</el-button>
|
<el-button @click="clickFormAddNewSettlementCancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
报餐明细
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="4">
|
||||||
|
正餐总价:{{ dinnerTotalPrice }}
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
营养餐总价:{{ nutritionTotalPrice }}
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
报餐总价:{{ sumTotalPrice }}
|
||||||
|
</el-row>
|
||||||
|
<el-table v-loading="loading" :data="mealsList">
|
||||||
|
<el-table-column label="报餐日期" align="center" prop="createAt" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createAt, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="正餐价格" align="center" prop="price"/>
|
||||||
|
<el-table-column label="营养餐价格" align="center" prop="nutritionFoodPrice"/>
|
||||||
|
<el-table-column label="报餐总价" align="center" prop="totalPrice"/>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 出院结算弹出层对话框-->
|
<!-- 出院结算弹出层对话框-->
|
||||||
@ -264,7 +292,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addSettle, delSettle, exportSettle, getSettle, updateSettle} from "@/api/fantang/settle";
|
import {addSettle, delSettle, exportSettle, getSettle, 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 {getPrepaymentByPatientId} from "@/api/fantang/prepayment";
|
import {getPrepaymentByPatientId} from "@/api/fantang/prepayment";
|
||||||
@ -275,6 +303,10 @@ export default {
|
|||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
sumTotalPrice: 0,
|
||||||
|
dinnerTotalPrice: 0,
|
||||||
|
nutritionTotalPrice: 0,
|
||||||
|
mealsList: [],
|
||||||
departOptions: [],
|
departOptions: [],
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
@ -432,6 +464,13 @@ export default {
|
|||||||
iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
|
iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
|
||||||
this.formAddNewSettlement.settlementDays = iDays;
|
this.formAddNewSettlement.settlementDays = iDays;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showMealsWithSelect(this.formAddNewSettlement).then(response => {
|
||||||
|
this.mealsList = response.data.reportMealsList;
|
||||||
|
this.dinnerTotalPrice = response.data.reportMealsPrice.dinnerTotalPrice;
|
||||||
|
this.nutritionTotalPrice = response.data.reportMealsPrice.nutritionTotalPrice;
|
||||||
|
this.sumTotalPrice = response.data.reportMealsPrice.sumTotalPrice;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 获取用户相关信息
|
// 获取用户相关信息
|
||||||
myGetUser() {
|
myGetUser() {
|
||||||
@ -575,15 +614,15 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["formAddNewSettlement"].validate(valid => {
|
// this.$refs["formAddNewSettlement"].validate(valid => {
|
||||||
if (valid) {
|
// if (valid) {
|
||||||
if (this.form.settleId != null) {
|
// if (this.form.settleId != null) {
|
||||||
updateSettle(this.form).then(response => {
|
// updateSettle(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
// this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
// this.open = false;
|
||||||
this.getList();
|
// this.getList();
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
console.log(this.formAddNewSettlement);
|
console.log(this.formAddNewSettlement);
|
||||||
this.formAddNewSettlement.opera = this.userName;
|
this.formAddNewSettlement.opera = this.userName;
|
||||||
addSettle(this.formAddNewSettlement).then(response => {
|
addSettle(this.formAddNewSettlement).then(response => {
|
||||||
@ -591,9 +630,9 @@ export default {
|
|||||||
this.flagAddNewSettlementOpen = false;
|
this.flagAddNewSettlementOpen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user