Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
31c9f6a7aa
@ -126,6 +126,14 @@ public class FtReportMealsDaoController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('fantang:meals:list')")
|
||||||
|
@GetMapping("/listMealsWithInSettle")
|
||||||
|
public TableDataInfo listMealsWithInSettle(FtReportMealsDao ftReportMealsDao) {
|
||||||
|
startPage();
|
||||||
|
List<FtReportMealsDao> list = iFtReportMealsDaoService.listMealsWithInSettle(ftReportMealsDao);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出报餐管理列表
|
* 导出报餐管理列表
|
||||||
*/
|
*/
|
||||||
|
@ -10,12 +10,14 @@ 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.FtSettleDao;
|
import com.ruoyi.system.fantang.domain.FtSettleDao;
|
||||||
|
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;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -33,6 +35,8 @@ public class FtSettleDaoController extends BaseController {
|
|||||||
|
|
||||||
private final IFtSettleDaoService iFtSettleDaoService;
|
private final IFtSettleDaoService iFtSettleDaoService;
|
||||||
|
|
||||||
|
private final IFtReportMealsDaoService iFtReportMealsDaoService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询结算报列表
|
* 查询结算报列表
|
||||||
@ -95,7 +99,17 @@ public class FtSettleDaoController extends BaseController {
|
|||||||
public AjaxResult add(@RequestBody FtSettleDao ftSettleDao) {
|
public AjaxResult add(@RequestBody FtSettleDao ftSettleDao) {
|
||||||
ftSettleDao.setSettleAt(new Date());
|
ftSettleDao.setSettleAt(new Date());
|
||||||
ftSettleDao.setReceipts(ftSettleDao.getNetPeceipt());
|
ftSettleDao.setReceipts(ftSettleDao.getNetPeceipt());
|
||||||
return toAjax(iFtSettleDaoService.save(ftSettleDao) ? 1 : 0);
|
|
||||||
|
Long patientId = ftSettleDao.getPatientId();
|
||||||
|
Date lastBillingDate = ftSettleDao.getLastBillingDate();
|
||||||
|
Date selectBillingDate = ftSettleDao.getSelectBillingDate();
|
||||||
|
iFtSettleDaoService.save(ftSettleDao);
|
||||||
|
Long settlementId = ftSettleDao.getSettleId();
|
||||||
|
SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||||
|
iFtReportMealsDaoService.settleMeals(settlementId, patientId, ft.format(lastBillingDate), ft.format(selectBillingDate));
|
||||||
|
iFtSettleDaoService.updateList(settlementId, patientId, ft.format(lastBillingDate), ft.format(selectBillingDate));
|
||||||
|
|
||||||
|
return AjaxResult.success("结算成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.system.fantang.domain;
|
package com.ruoyi.system.fantang.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@ -82,4 +83,20 @@ public class FtReportMealsDao implements Serializable {
|
|||||||
private Date settlementAt;
|
private Date settlementAt;
|
||||||
|
|
||||||
private String settlementBy;
|
private String settlementBy;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String hospitalId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String departId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String departName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String bedId;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String name;
|
||||||
}
|
}
|
||||||
|
@ -98,4 +98,12 @@ public class FtSettleDao implements Serializable {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private BigDecimal netPeceipt;
|
private BigDecimal netPeceipt;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date lastBillingDate;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date selectBillingDate;
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
package com.ruoyi.system.fantang.entity;
|
package com.ruoyi.system.fantang.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ReportMealsDayEntity extends FtReportMealsDao {
|
public class ReportMealsDayEntity extends FtReportMealsDao {
|
||||||
// 用户自定义结算日期
|
// 用户自定义结算日期
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date selectBillingDate;
|
private Date selectBillingDate;
|
||||||
// 自上一次结算累计未结算天数
|
// 自上一次结算累计未结算天数
|
||||||
private Long days;
|
private Long days;
|
||||||
// 上次缴费日期
|
// 上次缴费日期
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date lastCreateDate;
|
private Date lastCreateDate;
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,12 @@ 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.ReportMealsDayEntity;
|
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 java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报餐管理Mapper接口
|
* 报餐管理Mapper接口
|
||||||
@ -17,4 +19,9 @@ public interface FtReportMealsDaoMapper extends BaseMapper<FtReportMealsDao> {
|
|||||||
|
|
||||||
@Select("SELECT sum(price) as price from ft_report_meals where patient_id = #{patientId} and settlement_flag = 0 and create_at BETWEEN #{createAt} and #{selectBillingDate}")
|
@Select("SELECT sum(price) as price from ft_report_meals where patient_id = #{patientId} and settlement_flag = 0 and create_at BETWEEN #{createAt} and #{selectBillingDate}")
|
||||||
Long countBillingBetween(Long patientId, Date createAt, Date selectBillingDate);
|
Long countBillingBetween(Long patientId, Date createAt, Date selectBillingDate);
|
||||||
|
|
||||||
|
List<FtReportMealsDao> listMealsWithInSettle(FtReportMealsDao 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}")
|
||||||
|
Integer settleMeals(@Param("settlementId") Long settlementId, @Param("patientId") Long patientId, @Param("lastBillingDate") String lastBillingDate, @Param("selectBillingDate") String selectBillingDate);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,8 @@ 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.FtSettleDao;
|
import com.ruoyi.system.fantang.domain.FtSettleDao;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结算报Mapper接口
|
* 结算报Mapper接口
|
||||||
@ -11,4 +12,7 @@ import org.apache.ibatis.annotations.Select;
|
|||||||
* @date 2020-11-19
|
* @date 2020-11-19
|
||||||
*/
|
*/
|
||||||
public interface FtSettleDaoMapper extends BaseMapper<FtSettleDao> {
|
public interface FtSettleDaoMapper extends BaseMapper<FtSettleDao> {
|
||||||
|
|
||||||
|
@Update("UPDATE ft_settle a set list = (select GROUP_CONCAT(b.id) from ft_report_meals b where b.patient_id = #{patientId} and b.create_at BETWEEN #{lastBillingDate} and #{selectBillingDate}) where a.settle_id = #{settlementId} ")
|
||||||
|
Integer updateList(@Param("settlementId") Long settlementId, @Param("patientId") Long patientId, @Param("lastBillingDate") String lastBillingDate, @Param("selectBillingDate") String selectBillingDate);
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,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.domain.FtSettleDao;
|
|
||||||
import com.ruoyi.system.fantang.entity.ReportMealsDayEntity;
|
import com.ruoyi.system.fantang.entity.ReportMealsDayEntity;
|
||||||
import com.ruoyi.system.fantang.vo.FtReportMealVo;
|
import com.ruoyi.system.fantang.vo.FtReportMealVo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -23,4 +23,8 @@ public interface IFtReportMealsDaoService extends IService<FtReportMealsDao> {
|
|||||||
List<FtReportMealVo> listPayoff();
|
List<FtReportMealVo> listPayoff();
|
||||||
|
|
||||||
Long countBillingBetween(ReportMealsDayEntity dao);
|
Long countBillingBetween(ReportMealsDayEntity dao);
|
||||||
|
|
||||||
|
List<FtReportMealsDao> listMealsWithInSettle(FtReportMealsDao ftReportMealsDao);
|
||||||
|
|
||||||
|
Integer settleMeals(Long settlementId, Long patientId, String lastBillingDate, String selectBillingDate);
|
||||||
}
|
}
|
||||||
|
@ -11,4 +11,5 @@ import com.ruoyi.system.fantang.domain.FtSettleDao;
|
|||||||
*/
|
*/
|
||||||
public interface IFtSettleDaoService extends IService<FtSettleDao> {
|
public interface IFtSettleDaoService extends IService<FtSettleDao> {
|
||||||
|
|
||||||
|
Integer updateList(Long settlementId, Long patientId, String lastBillingDate, String selectBillingDate);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.ruoyi.system.fantang.service.impl;
|
package com.ruoyi.system.fantang.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
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;
|
||||||
@ -11,6 +10,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.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,4 +53,14 @@ public class FtReportMealsDaoServiceImpl extends ServiceImpl<FtReportMealsDaoMap
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FtReportMealsDao> listMealsWithInSettle(FtReportMealsDao ftReportMealsDao) {
|
||||||
|
return this.baseMapper.listMealsWithInSettle(ftReportMealsDao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer settleMeals(Long settlementId, Long patientId, String lastBillingDate, String selectBillingDate) {
|
||||||
|
return this.baseMapper.settleMeals(settlementId, patientId, lastBillingDate, selectBillingDate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,4 +15,8 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class FtSettleDaoServiceImpl extends ServiceImpl<FtSettleDaoMapper, FtSettleDao> implements IFtSettleDaoService {
|
public class FtSettleDaoServiceImpl extends ServiceImpl<FtSettleDaoMapper, FtSettleDao> implements IFtSettleDaoService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer updateList(Long settlementId, Long patientId, String lastBillingDate, String selectBillingDate) {
|
||||||
|
return this.baseMapper.updateList(settlementId, patientId, lastBillingDate, selectBillingDate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,18 @@
|
|||||||
<result property="settlementBy" column="settlement_by"/>
|
<result property="settlementBy" column="settlement_by"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="listMealsWithInSettle" resultType="com.ruoyi.system.fantang.domain.FtReportMealsDao">
|
||||||
|
select sum(a.price) as price, a.patient_id, b.hospital_id, b.bed_id, b.`name`, c.depart_name, c.depart_code
|
||||||
|
from ft_report_meals a
|
||||||
|
LEFT JOIN ft_patient b on a.patient_id = b.patient_id
|
||||||
|
LEFT JOIN ft_depart c on b.depart_id = c.depart_id
|
||||||
|
<where>
|
||||||
|
<if test="hospitalId != null">and b.hospital_id = #{hospitalId}</if>
|
||||||
|
<if test="departId != null">and b.depart_id = #{departId}</if>
|
||||||
|
<if test="name != null and name !=''">and b.name = #{name}</if>
|
||||||
|
<if test="settlementFlag != null">and a.settlement_flag = #{settlementFlag}</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY a.patient_id
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -8,6 +8,7 @@ export function listAll(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询未结算报餐记录
|
// 查询未结算报餐记录
|
||||||
export function listNoPay(query) {
|
export function listNoPay(query) {
|
||||||
return request({
|
return request({
|
||||||
@ -36,6 +37,14 @@ export function listMeals(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function listMealsWithInSettle(query) {
|
||||||
|
return request({
|
||||||
|
url: '/fantang/meals/listMealsWithInSettle',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询报餐管理详细
|
// 查询报餐管理详细
|
||||||
export function getMeals(id) {
|
export function getMeals(id) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -10,6 +10,21 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="科室" prop="departId">
|
||||||
|
<el-select v-model="queryParams.departId" placeholder="请选择科室"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery">
|
||||||
|
<el-option
|
||||||
|
v-for="item in departOptions"
|
||||||
|
:key="item.departName"
|
||||||
|
:label="item.departName"
|
||||||
|
:value="item.departId">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</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"
|
||||||
@ -19,25 +34,11 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结算日期" prop="settleAt">
|
<el-form-item label="结算标志" prop="settlementFlag">
|
||||||
<el-date-picker clearable size="small" style="width: 200px"
|
<el-select v-model="queryParams.settlementFlag" placeholder="请选择"
|
||||||
v-model="queryParams.settleAt"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择结算日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="结算总价" prop="price">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.price"
|
|
||||||
placeholder="请输入结算总价"
|
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery">
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="结算标志" prop="settlementFlag">
|
|
||||||
<el-select v-model="queryParams.settlementFlag" @change="selectSettlementFlag" placeholder="请选择">
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in settlementFlagOptions"
|
v-for="item in settlementFlagOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -102,16 +103,16 @@
|
|||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<el-table-column label="结算 id" align="center" prop="settleId" v-if="false"/>
|
<el-table-column label="结算 id" align="center" prop="settleId" v-if="false"/>
|
||||||
<el-table-column label="住院号" align="center" prop="hospitalId"/>
|
<el-table-column label="住院号" align="center" prop="hospitalId"/>
|
||||||
<el-table-column label="姓名" align="center" prop="name"/>
|
|
||||||
<el-table-column label="科室" align="center" prop="departName"/>
|
<el-table-column label="科室" align="center" prop="departName"/>
|
||||||
|
<el-table-column label="姓名" align="center" prop="name"/>
|
||||||
<el-table-column label="床号" align="center" prop="bedId"/>
|
<el-table-column label="床号" align="center" prop="bedId"/>
|
||||||
|
<el-table-column label="结算总价" align="center" prop="price"/>
|
||||||
|
<el-table-column label="结算类型" align="center" prop="type"/>
|
||||||
<el-table-column label="结算日期" align="center" prop="settleAt" width="180">
|
<el-table-column label="结算日期" align="center" prop="settleAt" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.settleAt, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.settleAt, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="结算总价" align="center" prop="price"/>
|
|
||||||
<el-table-column label="结算类型" align="center" prop="type"/>
|
|
||||||
<el-table-column label="退款总额" align="center" prop="refund"/>
|
<el-table-column label="退款总额" align="center" prop="refund"/>
|
||||||
<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">
|
||||||
@ -190,6 +191,7 @@
|
|||||||
v-model="formAddNewSettlement.lastBillingDate"
|
v-model="formAddNewSettlement.lastBillingDate"
|
||||||
align="right"
|
align="right"
|
||||||
type="date"
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
:disabled="true">
|
:disabled="true">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -214,6 +216,7 @@
|
|||||||
align="right"
|
align="right"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
|
value-format="yyyy-MM-dd mm:hh:ss"
|
||||||
@change="changeBillingDate"
|
@change="changeBillingDate"
|
||||||
:picker-options="pickerOptions">
|
:picker-options="pickerOptions">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -261,16 +264,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addSettle, delSettle, exportSettle, getSettle, listSettle, updateSettle} from "@/api/fantang/settle";
|
import {addSettle, delSettle, exportSettle, getSettle, updateSettle} from "@/api/fantang/settle";
|
||||||
import {getLastSettlementDate, listAll, 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";
|
||||||
|
import {listDepart} from "@/api/fantang/depart";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Settle",
|
name: "Settle",
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
departOptions: [],
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return time.getTime() > Date.now();
|
return time.getTime() > Date.now();
|
||||||
@ -331,13 +336,11 @@ export default {
|
|||||||
lastBillingDate: null,
|
lastBillingDate: null,
|
||||||
// 选择结算日期
|
// 选择结算日期
|
||||||
selectBillingDate: null,
|
selectBillingDate: null,
|
||||||
|
opera: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
// 结算类型字典
|
// 结算类型字典
|
||||||
settlementFlagOptions: [{
|
settlementFlagOptions: [{
|
||||||
value: null,
|
|
||||||
label: '全部数据'
|
|
||||||
}, {
|
|
||||||
value: 0,
|
value: 0,
|
||||||
label: '未结算'
|
label: '未结算'
|
||||||
}, {
|
}, {
|
||||||
@ -376,6 +379,7 @@ export default {
|
|||||||
hospitalId: null,
|
hospitalId: null,
|
||||||
name: null,
|
name: null,
|
||||||
settlementFlag: 0,
|
settlementFlag: 0,
|
||||||
|
departId: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -406,11 +410,10 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.myGetUser();
|
this.myGetUser();
|
||||||
listNoPay(this.queryParams).then(response => {
|
listDepart().then(response => {
|
||||||
this.settleList = response.rows;
|
this.departOptions = response.rows;
|
||||||
this.total = response.total;
|
})
|
||||||
this.loading = false;
|
this.getList();
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 变更结算日期计算
|
// 变更结算日期计算
|
||||||
@ -418,24 +421,25 @@ export default {
|
|||||||
var dateSpan, iDays;
|
var dateSpan, iDays;
|
||||||
let sDate1 = Date.parse(this.formAddNewSettlement.lastBillingDate);
|
let sDate1 = Date.parse(this.formAddNewSettlement.lastBillingDate);
|
||||||
let sDate2 = Date.parse(value);
|
let sDate2 = Date.parse(value);
|
||||||
console.log("sDate1---", sDate1, "sDate2---", sDate2)
|
console.log("selectBillingDate", this.formAddNewSettlement.selectBillingDate)
|
||||||
|
|
||||||
dateSpan = sDate2 - sDate1;
|
dateSpan = sDate2 - sDate1;
|
||||||
console.log("qqqqqqqqqqqqqqqqqqqqqqqqqqq", dateSpan);
|
if (dateSpan < 0) {
|
||||||
if (dateSpan <= 0) {
|
|
||||||
this.msgError("你现在的结算日期小于上一次结算日期!!");
|
this.msgError("你现在的结算日期小于上一次结算日期!!");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
dateSpan = Math.abs(dateSpan);
|
dateSpan = Math.abs(dateSpan);
|
||||||
iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
|
iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
|
||||||
console.log("ddddddddddddddddddddddddddddd", iDays);
|
|
||||||
this.formAddNewSettlement.settlementDays = iDays;
|
this.formAddNewSettlement.settlementDays = iDays;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取用户相关信息
|
// 获取用户相关信息
|
||||||
myGetUser() {
|
myGetUser() {
|
||||||
getUserProfile().then(response => {
|
getUserProfile().then(response => {
|
||||||
this.userName = response.data;
|
this.userName = response.data.userName;
|
||||||
this.roleGroup = response.roleGroup;
|
this.roleGroup = response.roleGroup;
|
||||||
this.postGroup = response.postGroup;
|
this.postGroup = response.postGroup;
|
||||||
|
console.log(this.userName);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -503,13 +507,11 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询结算报列表 */
|
/** 查询结算报列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
listMealsWithInSettle(this.queryParams).then(response => {
|
||||||
listSettle(this.queryParams).then(response => {
|
|
||||||
this.settleList = response.rows;
|
this.settleList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
console.log("list-------")
|
})
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
@ -583,14 +585,11 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log(this.formAddNewSettlement);
|
console.log(this.formAddNewSettlement);
|
||||||
|
this.formAddNewSettlement.opera = this.userName;
|
||||||
addSettle(this.formAddNewSettlement).then(response => {
|
addSettle(this.formAddNewSettlement).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("结算成功");
|
||||||
this.flagAddNewSettlementOpen = false;
|
this.flagAddNewSettlementOpen = false;
|
||||||
listNoPay(this.queryParams).then(response => {
|
this.getList();
|
||||||
this.settleList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user