医疗补助汇总
This commit is contained in:
+241
@@ -0,0 +1,241 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.param.MedicalPageForm;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.service.MedicalApplyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :医疗互助汇总
|
||||
* @createDate : 2026/1/24 10:20
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/medicalMutualAid/medical/statistics")
|
||||
@Api("医疗互助汇总")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MedicalStatisticsController {
|
||||
|
||||
@Inject
|
||||
private MedicalApplyService medicalApplyService;
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/medical/statistics/index.html")
|
||||
@SaCheckPermission("medicalMutualAid.medical.statistics")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("medicalMutualAid.medical.statistics")
|
||||
public Result pageData(MedicalPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
type.diseaseName,
|
||||
type.isMajorDiseases,
|
||||
us.username,
|
||||
us.loginname,
|
||||
us.unitName,
|
||||
us.unionName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(SELECT MAX(id) FROM wf_process_task WHERE processInstanceId = ins.id AND taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
medical_apply info
|
||||
LEFT JOIN medical_disease_type type ON info.diseaseId = type.id
|
||||
LEFT JOIN aid_fund_member_pay member ON member.userId = info.userId
|
||||
LEFT JOIN vw_user us ON us.id = info.userId
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||
AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("us.loginname", pageForm.getSearchKeyword());
|
||||
seg.orLike("us.username", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("year(info.applyTime)", "=", pageForm.getYear());
|
||||
cnd.andEX("info.diseaseId", "=", pageForm.getDiseaseId());
|
||||
cnd.andEX("us.unionId", "=", pageForm.getUnionId());
|
||||
cnd.andEX("us.unitId", "=", pageForm.getUnitId());
|
||||
cnd.andEX("member.aidFundMemberUserType", "=", pageForm.getAidFundMemberUserType());
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc("info.applyTime");
|
||||
}
|
||||
cnd.and("ins.state", "=", 20);
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = medicalApplyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
List<NutMap> costList = medicalApplyService.getCostList(pagination.getList());
|
||||
pagination.setList(costList);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("medicalMutualAid.medical.statistics")
|
||||
public void doExport(MedicalPageForm pageForm, Boolean isMajorDiseases, HttpServletResponse response) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
type.diseaseName,
|
||||
type.diseaseCode,
|
||||
type.isMajorDiseases,
|
||||
us.username,
|
||||
us.loginname,
|
||||
us.unitName,
|
||||
us.unitCode,
|
||||
us.unionName,
|
||||
us.unionCode,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(SELECT MAX(id) FROM wf_process_task WHERE processInstanceId = ins.id AND taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
medical_apply info
|
||||
LEFT JOIN medical_disease_type type ON info.diseaseId = type.id
|
||||
LEFT JOIN aid_fund_member_pay member ON member.userId = info.userId
|
||||
LEFT JOIN vw_user us ON us.id = info.userId
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||
AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("us.loginname", pageForm.getSearchKeyword());
|
||||
seg.orLike("us.username", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("year(info.applyTime)", "=", pageForm.getYear());
|
||||
cnd.andEX("info.diseaseId", "=", pageForm.getDiseaseId());
|
||||
cnd.andEX("us.unionId", "=", pageForm.getUnionId());
|
||||
cnd.andEX("us.unitId", "=", pageForm.getUnitId());
|
||||
cnd.andEX("member.aidFundMemberUserType", "=", pageForm.getAidFundMemberUserType());
|
||||
cnd.andEX("type.isMajorDiseases", "=", isMajorDiseases);
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc("info.applyTime");
|
||||
}
|
||||
cnd.and("ins.state", "=", 20);
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = medicalApplyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
List<NutMap> list = medicalApplyService.getCostList(pagination.getList());
|
||||
for (NutMap map : list) {
|
||||
boolean isMajor = map.getBoolean("isMajorDiseases");
|
||||
map.put("isMajorDiseasesDisplay", isMajor ? "是" : "否");
|
||||
}
|
||||
List<ExcelExportEntity> excelExportEntities = new ArrayList<>();
|
||||
excelExportEntities.add(new ExcelExportEntity("姓名","username",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("工号","loginname",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("单位","unitName",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("单位编码","unitCode",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("工会","unionName",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("工会编码","unionCode",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("疾病名称","diseaseName",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("疾病编码","diseaseCode",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("是否重疾","isMajorDiseasesDisplay",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("申请时间","applyTime",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("申请次数","applyNum",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("住院医疗费总额(不含门诊)","hospitalSumMoney$",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("实际报销总额","reimbursementMoney$",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("(住院医疗)允许报销范围内个人承担部分金额","singleBearMoney$",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("(住院医疗)自费部分金额","personExpenseMoney$",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("重病门诊自费金额","outpatientServiceMoney$",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("非住院肾衰竭治疗、靶向药金额","bxyMoney$",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("合计","totalMoney",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("预测补助金额","forecastSubsidyMoney",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("补助金额","subsidyMoney",20));
|
||||
excelExportEntities.add(new ExcelExportEntity("爱心基金","loveSubsidyMoney",20));
|
||||
|
||||
String exportYear = String.valueOf(pageForm.getYear());
|
||||
if (StrUtil.isBlank(exportYear)) {
|
||||
exportYear = String.valueOf(java.time.Year.now().getValue());
|
||||
}
|
||||
String fileName = exportYear + "年补助人员列表.xlsx";
|
||||
|
||||
try {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, excelExportEntities, list);
|
||||
CommonDownloadUtil.download(fileName, workbook, response);
|
||||
} catch (Exception e) {
|
||||
log.error("导出补助人员列表失败", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+1
@@ -22,5 +22,6 @@ public class MedicalPageForm extends PageForm {
|
||||
private Boolean approval;
|
||||
private String unionId;
|
||||
private String unitId;
|
||||
private String aidFundMemberUserType;
|
||||
|
||||
}
|
||||
|
||||
+411
@@ -0,0 +1,411 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="疾病种类">
|
||||
<el-select clearable placeholder="请选择疾病种类"
|
||||
v-model="pageForm.diseaseId" filterable>
|
||||
<el-option
|
||||
:key="i.id"
|
||||
:label="i.diseaseName"
|
||||
:value="i.id"
|
||||
v-for="i in diseaseList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="会员类型">
|
||||
<dict-select v-model="pageForm.aidFundMemberUserType" code="AIDFUND_MEMBER_USER_TYPE"
|
||||
style="width: 100%"></dict-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" clearable filterable placeholder="请选择院级工会"
|
||||
@change="getUnitList()">
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="pageForm.unitId" clearable filterable placeholder="请选择单位">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-dropdown @command="doExport">
|
||||
<el-button type="primary" size="small">导出 <i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{val:true}" key="major">重疾</el-dropdown-item>
|
||||
<el-dropdown-item :command="{val:false}" key="normal">普通</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table" row-key="id" style="width: 100%"
|
||||
:summary-method="getSummaries" :show-summary="showSummary">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"
|
||||
fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:fixed="column.fixed"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-if="column.prop==='isMajorDiseases'" v-slot="{row}">
|
||||
<span :class="[row.isMajorDiseases?'text-danger':'text-info']">
|
||||
<i class="fa fa-circle ml5"></i>
|
||||
{{row.isMajorDiseases?'是':'否'}}({{row.applyNum}})
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'curTaskName'">
|
||||
{{row.curTaskName?row.curTaskName:row.taskName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)"
|
||||
size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<medical-info ref="medicalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="150px" label-suffix=":"
|
||||
>
|
||||
|
||||
<el-table :data="costList" border show-summary class="cost">
|
||||
<el-table-column label="序号" type="index" width="50px" fixed></el-table-column>
|
||||
<el-table-column label="住院时间段" width="200">
|
||||
<template v-slot="{row}">
|
||||
{{row.visitStartTime}}至{{row.visitEndTime}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="住院医院" prop="visitHospital" width="250"></el-table-column>
|
||||
<el-table-column label="住院医疗费总额(不含门诊)" width="180" prop="hospitalSumMoney">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number placeholder="住院医疗费总额(不含门诊)"
|
||||
:min="0"
|
||||
controls-position="right" style="width: 100%"
|
||||
@change="tableChangeMoney"
|
||||
v-model="row.hospitalSumMoney"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际报销金额" width="180" prop="reimbursementMoney">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number placeholder="实际报销金额"
|
||||
:min="0"
|
||||
controls-position="right" style="width: 100%"
|
||||
@change="tableChangeMoney"
|
||||
v-model="row.reimbursementMoney"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="(住院医疗)允许报销范围内个人承担部分金额"
|
||||
width="180" prop="singleBearMoney">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number :min="0" placeholder="个人承担部分金额"
|
||||
controls-position="right" style="width: 100%"
|
||||
@change="tableChangeMoney"
|
||||
v-model="row.singleBearMoney"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="(住院医疗)自费部分金额" width="180"
|
||||
prop="personExpenseMoney"></el-table-column>
|
||||
<el-table-column label="重病门诊自费金额" width="180" prop="outpatientServiceMoney">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number placeholder="门诊费"
|
||||
:min="0"
|
||||
:disabled="!formData.tf_isMajorDiseases"
|
||||
controls-position="right" style="width: 100%"
|
||||
@change="tableChangeMoney"
|
||||
v-model="row.outpatientServiceMoney"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="非住院肾衰竭治疗、靶向药" width="180" prop="bxyMoney">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number placeholder="靶向药"
|
||||
:min="0"
|
||||
:disabled="!formData.tf_isMajorDiseases"
|
||||
controls-position="right" style="width: 100%"
|
||||
@change="tableChangeMoney"
|
||||
v-model="row.bxyMoney"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="mt10">
|
||||
<el-form-item label="疾病种类" prop="tf_diseaseId"
|
||||
:rules="[{required:true,message:'请选择疾病种类',trigger:['change','blur']}]">
|
||||
<el-select placeholder="请选择疾病种类" style="width: 50%"
|
||||
v-model="formData.tf_diseaseId" filterable @change="diseaseIdChange">
|
||||
<el-option
|
||||
:key="i.id"
|
||||
:label="i.diseaseName"
|
||||
:value="i.id"
|
||||
v-for="i in diseaseList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预测补助金额(元)" prop="tf_forecastSubsidyMoney">
|
||||
<span slot="label">
|
||||
预测补助金额(元)
|
||||
<el-tooltip class="item" effect="dark"
|
||||
content="计算公式:((住院医疗)允许报销范围内个人承担部分金额+(住院医疗)自费部分金额+重病门诊自费金额+非住院肾衰竭治疗、靶向药金额)* 补助比例"
|
||||
placement="top-start">
|
||||
<i class="el-icon-question"></i>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
<el-input-number v-model="formData.tf_forecastSubsidyMoney"
|
||||
style="width: 50%"></el-input-number>
|
||||
<el-button @click="calcMoney(formData.id)" type="primary">重新计算金额</el-button>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="爱心基金(元)" prop="tf_loveSubsidyMoney">
|
||||
<el-input-number :max="medicalSetting.loveMoney" :min="0" style="width: 50%"
|
||||
v-model="formData.tf_loveSubsidyMoney"></el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</medical-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/medicalInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
props: {
|
||||
showSummary: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
localPageForm: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号', fixed: "left"},
|
||||
{prop: 'username', label: '姓名', fixed: "left"},
|
||||
{prop: 'unionName', label: '所属工会', width: "180"},
|
||||
{prop: 'unitName', label: '所属单位', width: "180"},
|
||||
{prop: 'diseaseName', label: '疾病种类', width: "180"},
|
||||
{prop: 'isMajorDiseases', label: '重大疾病(次数)', width: "100"},
|
||||
{prop: 'applyNum', label: '申请总次数'},
|
||||
{prop: 'applyTime', label: '申请时间', width: "180"},
|
||||
{prop: 'hospitalSumMoney$', label: '住院医疗总额(不含门诊)', width: "120"},
|
||||
{prop: 'reimbursementMoney$', label: '实际报销总额', width: "120"},
|
||||
{prop: 'singleBearMoney$', label: '(住院医疗)允许报销范围内个人承担部分总额', width: "120"},
|
||||
{prop: 'personExpenseMoney$', label: '(住院医疗)自费部分总额', width: "120"},
|
||||
{prop: 'outpatientServiceMoney$', label: '重病门诊自费金额', width: "120"},
|
||||
{prop: 'bxyMoney$', label: '非住院肾衰竭治疗、靶向药金额', width: "120"},
|
||||
{prop: 'totalMoney', label: '合计金额', width: "120"},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
{prop: 'subsidyMoney', label: '补助金额'},
|
||||
{prop: 'loveSubsidyMoney', label: '爱心补助金额'},
|
||||
],
|
||||
costList: [],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
diseaseList: [],
|
||||
showApprovalForm: false,
|
||||
pageForm: {
|
||||
approval: false,
|
||||
year: new Date().getFullYear() + "",
|
||||
pageSize: 9999,
|
||||
isMajorDiseases: null
|
||||
},
|
||||
medicalSetting: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"medical-info": MEDICAL_INFO
|
||||
},
|
||||
watch: {
|
||||
"localPageForm": {
|
||||
handler(val) {
|
||||
this.pageForm = {...this.pageForm, ...val}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/medicalMutualAid/medical/mine/delete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const {columns, data} = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
const sumColumn = ['hospitalSumMoney$', 'reimbursementMoney$', 'singleBearMoney$', 'personExpenseMoney$', 'subsidyMoney', 'loveSubsidyMoney', 'outpatientServiceMoney$', 'totalMoney']
|
||||
if (sumColumn.includes(column.property)) {
|
||||
const values = data.map(i => Number(i[column.property]))
|
||||
if (values && values.length > 0) {
|
||||
const everyColumnSum = values.reduce((a, b) => a + b)
|
||||
sums[index] = isNaN(everyColumnSum) ? 0 : everyColumnSum.toFixed(2)
|
||||
}
|
||||
}
|
||||
})
|
||||
sums[0] = '合计'
|
||||
return sums
|
||||
},
|
||||
// 修改表格里面的金额并修改数据库里的数据
|
||||
tableChangeMoney() {
|
||||
this.costList.forEach(cost => {
|
||||
const personExpenseMoney = cost.hospitalSumMoney - cost.reimbursementMoney - cost.singleBearMoney
|
||||
cost.personExpenseMoney = isNaN(personExpenseMoney) ? 0 : personExpenseMoney < 0 ? 0 : personExpenseMoney.toFixed(2)
|
||||
})
|
||||
console.log(this.costList)
|
||||
this.$axios.post("/platform/medicalMutualAid/medical/foundationAudit/updateCost", {
|
||||
data: JSON.stringify(this.costList)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重新计算预测补助金额
|
||||
calcMoney() {
|
||||
},
|
||||
diseaseIdChange(val) {
|
||||
const disease = this.diseaseList.find(i => i.id === val)
|
||||
this.$set(this.formData, "tf_diseaseName", disease.diseaseName)
|
||||
this.$set(this.formData, "tf_isMajorDiseases", disease.isMajorDiseases)
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.medicalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
const disease = this.diseaseList.find(i => i.id === row.diseaseId)
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
tf_diseaseId: row.diseaseId,
|
||||
tf_oldDiseaseId: row.diseaseId,
|
||||
tf_oldDiseaseName: disease.diseaseName,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.diseaseIdChange(row.diseaseId)
|
||||
this.$refs.medicalInfoRef.onOpen(row)
|
||||
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.costList = this.$refs.medicalInfoRef.viewData.costList
|
||||
}, 500)
|
||||
},
|
||||
|
||||
getDiseaseList() {
|
||||
this.$axios.post("/platform/medicalMutualAid/medical/apply/getDiseaseList").then(res => {
|
||||
if (res.code === 0) {
|
||||
this.diseaseList = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
async getUnitList() {
|
||||
this.unitList = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
},
|
||||
getMedicalSetting() {
|
||||
this.$axios.post("/platform/medicalMutualAid/medical/basicSetting/getSetting").then(res => {
|
||||
if (res.code === 0) {
|
||||
this.medicalSetting = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
doExport(command) {
|
||||
const params = {
|
||||
...this.pageForm,
|
||||
isMajorDiseases: command.val
|
||||
};
|
||||
this.$downLoad('/platform/medicalMutualAid/medical/statistics/doExport', params);
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.$emit('ready')
|
||||
this.getMedicalSetting()
|
||||
this.getDiseaseList()
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user