todo:收费
This commit is contained in:
parent
0704a2a51c
commit
af71ca6da4
@ -0,0 +1,125 @@
|
||||
package com.ruoyi.system.fantang.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.ruoyi.system.fantang.service.IFtSettlementDaoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 结算管理Controller
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-12-25
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/fantang/settlement" )
|
||||
public class FtSettlementDaoController extends BaseController {
|
||||
|
||||
private final IFtSettlementDaoService iFtSettlementDaoService;
|
||||
|
||||
/**
|
||||
* 查询结算管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(FtSettlementDao ftSettlementDao)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<FtSettlementDao> lqw = Wrappers.lambdaQuery(ftSettlementDao);
|
||||
if (ftSettlementDao.getSettleAt() != null){
|
||||
lqw.eq(FtSettlementDao::getSettleAt ,ftSettlementDao.getSettleAt());
|
||||
}
|
||||
if (ftSettlementDao.getPrice() != null){
|
||||
lqw.eq(FtSettlementDao::getPrice ,ftSettlementDao.getPrice());
|
||||
}
|
||||
if (ftSettlementDao.getPayable() != null){
|
||||
lqw.eq(FtSettlementDao::getPayable ,ftSettlementDao.getPayable());
|
||||
}
|
||||
if (ftSettlementDao.getReceipts() != null){
|
||||
lqw.eq(FtSettlementDao::getReceipts ,ftSettlementDao.getReceipts());
|
||||
}
|
||||
if (StringUtils.isNotBlank(ftSettlementDao.getType())){
|
||||
lqw.eq(FtSettlementDao::getType ,ftSettlementDao.getType());
|
||||
}
|
||||
if (ftSettlementDao.getRefund() != null){
|
||||
lqw.eq(FtSettlementDao::getRefund ,ftSettlementDao.getRefund());
|
||||
}
|
||||
List<FtSettlementDao> list = iFtSettlementDaoService.list(lqw);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出结算管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:export')" )
|
||||
@Log(title = "结算管理" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(FtSettlementDao ftSettlementDao) {
|
||||
LambdaQueryWrapper<FtSettlementDao> lqw = new LambdaQueryWrapper<FtSettlementDao>(ftSettlementDao);
|
||||
List<FtSettlementDao> list = iFtSettlementDaoService.list(lqw);
|
||||
ExcelUtil<FtSettlementDao> util = new ExcelUtil<FtSettlementDao>(FtSettlementDao. class);
|
||||
return util.exportExcel(list, "settlement" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结算管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:query')" )
|
||||
@GetMapping(value = "/{settleId}" )
|
||||
public AjaxResult getInfo(@PathVariable("settleId" ) Long settleId) {
|
||||
return AjaxResult.success(iFtSettlementDaoService.getById(settleId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增结算管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:add')" )
|
||||
@Log(title = "结算管理" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody FtSettlementDao ftSettlementDao) {
|
||||
return toAjax(iFtSettlementDaoService.save(ftSettlementDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改结算管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:edit')" )
|
||||
@Log(title = "结算管理" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody FtSettlementDao ftSettlementDao) {
|
||||
return toAjax(iFtSettlementDaoService.updateById(ftSettlementDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除结算管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:remove')" )
|
||||
@Log(title = "结算管理" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{settleIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] settleIds) {
|
||||
return toAjax(iFtSettlementDaoService.removeByIds(Arrays.asList(settleIds)) ? 1 : 0);
|
||||
}
|
||||
}
|
@ -136,7 +136,7 @@ public class FtStaffInfoDaoController extends BaseController {
|
||||
}
|
||||
|
||||
// 判断密码是否为空
|
||||
if (ftStaffInfoDao.getPassword() == null) {
|
||||
if (ftStaffInfoDao.getPassword() == null || ftStaffInfoDao.getPassword().equals("")) {
|
||||
ftStaffInfoDao.setPassword("123456");
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,76 @@
|
||||
package com.ruoyi.system.fantang.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 结算管理对象 ft_settle
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-12-25
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("ft_settle")
|
||||
public class FtSettlementDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** 结算 id */
|
||||
@TableId(value = "settle_id")
|
||||
private Long settleId;
|
||||
|
||||
/** 病人 id */
|
||||
private Long patientId;
|
||||
|
||||
/** 结算日期 */
|
||||
@Excel(name = "结算日期" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date settleAt;
|
||||
|
||||
/** 操作员 */
|
||||
private String opera;
|
||||
|
||||
/** 记录清单 */
|
||||
@Excel(name = "记录清单")
|
||||
private String list;
|
||||
|
||||
/** 结算总价 */
|
||||
@Excel(name = "结算总价")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 应收 */
|
||||
@Excel(name = "应收")
|
||||
private BigDecimal payable;
|
||||
|
||||
/** 实收 */
|
||||
@Excel(name = "实收")
|
||||
private BigDecimal receipts;
|
||||
|
||||
/** 结算类型 */
|
||||
@Excel(name = "结算类型")
|
||||
private String type;
|
||||
|
||||
/** 退押金标志 */
|
||||
private Integer flag;
|
||||
|
||||
/** 退款总额 */
|
||||
@Excel(name = "退款总额")
|
||||
private BigDecimal refund;
|
||||
}
|
@ -39,6 +39,9 @@ public interface FtPatientDaoMapper extends BaseMapper<FtPatientDao> {
|
||||
@Update("update ft_patient a inner join ft_sync b on a.hospital_id = b.hospital_id and a.sync_flag = 2 set a.depart_id = (select depart_id from ft_depart c where b.depart_name = c.depart_name )")
|
||||
public int updateDepartIDToNewPatient();
|
||||
|
||||
@Update("update ft_patient a inner join ft_sync b on a.hospital_id = b.hospital_id and a.sync_flag = 2 set a.depart_id = (select depart_id from ft_depart c where b.depart_name = c.depart_name )")
|
||||
public int updateDepartIDToPatient();
|
||||
|
||||
|
||||
@Select("select a.hospital_id, a.name, a.depart_name, a.bed_id, b.depart_id, c.hospital_id as old_hospital_id, c.name as old_name, a.depart_name as old_depart_name, c.bed_id as old_bed_id, c.depart_id as old_depart_id, c.patient_id as patient_id from ft_sync a LEFT JOIN ft_depart b on a.depart_name = b.depart_name LEFT JOIN ft_patient c on a.hospital_id = c.hospital_id where b.depart_id = c.depart_id and a.bed_id = c.bed_id and a.name != c.name")
|
||||
List<ftSyncConflictVo> syncConflictOnlyHospitalEqual();
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.fantang.mapper;
|
||||
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 结算管理Mapper接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-12-25
|
||||
*/
|
||||
public interface FtSettlementDaoMapper extends BaseMapper<FtSettlementDao> {
|
||||
|
||||
}
|
@ -2,8 +2,11 @@ package com.ruoyi.system.fantang.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtRemotePatientDao;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface FtSyncPatientDaoMapper extends BaseMapper<FtRemotePatientDao> {
|
||||
@Delete("truncate table ft_sync")
|
||||
void clearAll();
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.fantang.service;
|
||||
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 结算管理Service接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-12-25
|
||||
*/
|
||||
public interface IFtSettlementDaoService extends IService<FtSettlementDao> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.system.fantang.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.mapper.FtSettlementDaoMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.ruoyi.system.fantang.service.IFtSettlementDaoService;
|
||||
|
||||
/**
|
||||
* 结算管理Service业务层处理
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-12-25
|
||||
*/
|
||||
@Service
|
||||
public class FtSettlementDaoServiceImpl extends ServiceImpl<FtSettlementDaoMapper, FtSettlementDao> implements IFtSettlementDaoService {
|
||||
|
||||
}
|
@ -45,19 +45,25 @@ public class SyncPatientServiceImpl implements ISyncPatientService {
|
||||
@Transactional
|
||||
@Override
|
||||
public Integer insertToLocalSync(List<FtRemotePatientDao> remotePatientDaoList) {
|
||||
System.out.println("开始同步................");
|
||||
StringBuilder syncMessage = new StringBuilder();
|
||||
syncMessage.append("同步信息:");
|
||||
// 清空本地中间表数据,准备接收同步数据
|
||||
syncPatientDaoMapper.delete(null);
|
||||
syncPatientDaoMapper.clearAll();
|
||||
|
||||
// 遍历数据源,逐条插入本地中间表
|
||||
for (FtRemotePatientDao dao : remotePatientDaoList) {
|
||||
syncPatientDaoMapper.insert(dao);
|
||||
}
|
||||
// 为记录填入对应的科室id
|
||||
patientDaoMapper.updateDepartIDToNewPatient();
|
||||
|
||||
System.out.println("完成遍历数据源,逐条插入本地中间表..");
|
||||
|
||||
// 初始化本地病患表准备同步,将标志位置“0”
|
||||
int ret = patientDaoMapper.initForSync();
|
||||
syncMessage.append(String.format("本地初始化记录:%d 条", ret));
|
||||
System.out.println("完成 初始化本地病患表准备同步,将标志位置“0”..");
|
||||
|
||||
// 自动同步:住院号相同,姓名,科室,床号相同
|
||||
// 同步逻辑1:更新住院号、科室、床号、姓名全部相同的记录,并标注flag=1
|
||||
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtSettlementDaoMapper">
|
||||
|
||||
<resultMap type="FtSettlementDao" id="FtSettlementDaoResult">
|
||||
<result property="settleId" column="settle_id" />
|
||||
<result property="patientId" column="patient_id" />
|
||||
<result property="settleAt" column="settle_at" />
|
||||
<result property="opera" column="opera" />
|
||||
<result property="list" column="list" />
|
||||
<result property="price" column="price" />
|
||||
<result property="payable" column="payable" />
|
||||
<result property="receipts" column="receipts" />
|
||||
<result property="type" column="type" />
|
||||
<result property="flag" column="flag" />
|
||||
<result property="refund" column="refund" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
53
ruoyi-ui/src/api/fantang/settlement.js
Normal file
53
ruoyi-ui/src/api/fantang/settlement.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询结算管理列表
|
||||
export function listSettlement(query) {
|
||||
return request({
|
||||
url: '/fantang/settlement/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询结算管理详细
|
||||
export function getSettlement(settleId) {
|
||||
return request({
|
||||
url: '/fantang/settlement/' + settleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增结算管理
|
||||
export function addSettlement(data) {
|
||||
return request({
|
||||
url: '/fantang/settlement',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改结算管理
|
||||
export function updateSettlement(data) {
|
||||
return request({
|
||||
url: '/fantang/settlement',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除结算管理
|
||||
export function delSettlement(settleId) {
|
||||
return request({
|
||||
url: '/fantang/settlement/' + settleId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出结算管理
|
||||
export function exportSettlement(query) {
|
||||
return request({
|
||||
url: '/fantang/settlement/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -185,9 +185,9 @@
|
||||
<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="frequency"/>
|
||||
<el-table-column label="正餐类型" align="center" prop="type" :formatter="typeFormat"/>
|
||||
<el-table-column label="营养配餐" align="center" prop="foodName"/>
|
||||
<el-table-column label="配餐频次" align="center" prop="frequency"/>
|
||||
<el-table-column label="用法" align="center" prop="cateringUsage"/>
|
||||
<el-table-column label="描述" align="center" prop="cateringDescribe"/>
|
||||
<el-table-column label="启用标示" align="center" prop="flag"/>
|
||||
@ -491,7 +491,7 @@ export default {
|
||||
this.departOptions = response.rows;
|
||||
})
|
||||
listNutritionFood().then(response => {
|
||||
console.log("yyc----",response)
|
||||
console.log("yyc----", response)
|
||||
this.numberOptions = response.rows;
|
||||
})
|
||||
},
|
||||
|
345
ruoyi-ui/src/views/fantang/settlement/index.vue
Normal file
345
ruoyi-ui/src/views/fantang/settlement/index.vue
Normal file
@ -0,0 +1,345 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="结算日期" prop="settleAt">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="queryParams.settleAt"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择结算日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="应收" prop="payable">
|
||||
<el-input
|
||||
v-model="queryParams.payable"
|
||||
placeholder="请输入应收"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="实收" prop="receipts">
|
||||
<el-input
|
||||
v-model="queryParams.receipts"
|
||||
placeholder="请输入实收"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算类型" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择结算类型" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款总额" prop="refund">
|
||||
<el-input
|
||||
v-model="queryParams.refund"
|
||||
placeholder="请输入退款总额"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['fantang:settlement:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['fantang:settlement:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['fantang:settlement:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['fantang:settlement:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="settlementList" @selection-change="handleSelectionChange">
|
||||
<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="结算日期" align="center" prop="settleAt" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.settleAt, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="记录清单" align="center" prop="list" />-->
|
||||
<!-- <el-table-column label="结算总价" align="center" prop="price" />-->
|
||||
<el-table-column label="应收" align="center" prop="payable" />
|
||||
<el-table-column label="实收" align="center" prop="receipts" />
|
||||
<el-table-column label="结算类型" align="center" prop="type" />
|
||||
<el-table-column label="退款总额" align="center" prop="refund" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['fantang:settlement:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['fantang:settlement:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改结算管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<!-- <el-form-item label="记录清单" prop="list">-->
|
||||
<!-- <el-input v-model="form.list" placeholder="请输入记录清单" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="结算总价" prop="price">-->
|
||||
<!-- <el-input v-model="form.price" placeholder="请输入结算总价" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="应收" prop="payable">
|
||||
<el-input v-model="form.payable" placeholder="请输入应收" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实收" prop="receipts">
|
||||
<el-input v-model="form.receipts" placeholder="请输入实收" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择结算类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款总额" prop="refund">
|
||||
<el-input v-model="form.refund" placeholder="请输入退款总额" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSettlement, getSettlement, delSettlement, addSettlement, updateSettlement, exportSettlement } from "@/api/fantang/settlement";
|
||||
|
||||
export default {
|
||||
name: "Settlement",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 结算管理表格数据
|
||||
settlementList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
settleAt: undefined,
|
||||
price: undefined,
|
||||
payable: undefined,
|
||||
receipts: undefined,
|
||||
type: undefined,
|
||||
refund: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
list: [
|
||||
{ required: true, message: "记录清单不能为空", trigger: "blur" }
|
||||
],
|
||||
price: [
|
||||
{ required: true, message: "结算总价不能为空", trigger: "blur" }
|
||||
],
|
||||
payable: [
|
||||
{ required: true, message: "应收不能为空", trigger: "blur" }
|
||||
],
|
||||
receipts: [
|
||||
{ required: true, message: "实收不能为空", trigger: "blur" }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: "结算类型不能为空", trigger: "change" }
|
||||
],
|
||||
refund: [
|
||||
{ required: true, message: "退款总额不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询结算管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSettlement(this.queryParams).then(response => {
|
||||
this.settlementList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
settleId: undefined,
|
||||
patientId: undefined,
|
||||
settleAt: undefined,
|
||||
opera: undefined,
|
||||
list: undefined,
|
||||
price: undefined,
|
||||
payable: undefined,
|
||||
receipts: undefined,
|
||||
type: undefined,
|
||||
flag: undefined,
|
||||
refund: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.settleId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加结算管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const settleId = row.settleId || this.ids
|
||||
getSettlement(settleId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改结算管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.settleId != null) {
|
||||
updateSettlement(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSettlement(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const settleIds = row.settleId || this.ids;
|
||||
this.$confirm('是否确认删除结算管理编号为"' + settleIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delSettlement(settleIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有结算管理数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportSettlement(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user