大病互助

This commit is contained in:
那些花儿
2025-04-21 14:25:32 +08:00
parent 2419d6bee5
commit f2d174a8a7
7 changed files with 207 additions and 21 deletions
@@ -87,6 +87,30 @@ layout("/layouts/platform.html"){
</div>
</div>
<div class="search-item">
<div class="search-item-label">是否符合:</div>
<div class="search-item-option">
<el-select clearable filterable style="width: 100%"
v-model="pageForm.isMeetRequirements">
<el-option label="全部" :value="null"></el-option>
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="0"></el-option>
</el-select>
</div>
</div>
<div class="search-item" v-if="pageForm.isMeetRequirements!==0">
<div class="search-item-label">是否接受:</div>
<div class="search-item-option">
<el-select clearable filterable style="width: 100%"
v-model="pageForm.isAccept">
<el-option label="全部" :value="null"></el-option>
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="0"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
@@ -99,6 +123,8 @@ layout("/layouts/platform.html"){
<template #func>
<el-button @click="oneKeyUpdateIsMeetRequirements" size="small" type="primary">一键设为符合申请
</el-button>
<el-button @click="oneKeyUpdateIsAccept" size="small" type="primary">一键设为接受补助
</el-button>
<el-button @click="importHistoryData" size="small" type="primary">导入历史数据</el-button>
@@ -140,6 +166,15 @@ layout("/layouts/platform.html"){
v-model="row.isMeetRequirements">
</el-switch>
</template>
<template scope="{row}" v-else-if="column.prop=='isAccept' ">
<el-switch
v-if="row.isMeetRequirements"
@change="(val)=>{isAcceptChange(row.id,val)}"
active-color="#13ce66"
inactive-color="#ff4949"
v-model="row.isAccept">
</el-switch>
</template>
<template scope="{row}" v-else-if="column.prop=='isMember'">
<span v-if="row.isMember==true" class="text-success">是</span>
<span v-if="row.isMember==false" class="text-danger">否</span>
@@ -233,13 +268,23 @@ layout("/layouts/platform.html"){
tableColumns: [
{prop: 'year', label: '年度', sortable: true, fixed: 'left'},
{prop: 'userName', label: '姓名', fixed: 'left'},
{prop: 'loginName', label: '工号', fixed: 'left',width: 120},
{prop: 'loginName', label: '工号', fixed: 'left', width: 120},
{prop: 'unionName', label: '分工会', sortable: true, width: 150},
{prop: 'unitName', label: '单位', sortable: true, width: 150},
{prop: 'medicalFourTotalMoney', label: '医保四项之和金额(元)', sortable: true, width: 200},
{prop: 'selfPayTotalMoney', label: '两项自付之和金额(元)', sortable: true, width: 200},
{prop: 'schoolSecondSubsidyMoney', label: '学校二次报销金额(元)', sortable: true, width: 200},
{
prop: 'medicalFourTotalMoney',
label: '医保系统中个人自付、个人自理总金额(元)',
sortable: true,
width: 200
},
{prop: 'selfPayTotalMoney', label: '医保系统中个人自付金额(元)', sortable: true, width: 200},
{
prop: 'schoolSecondSubsidyMoney',
label: '学校补充医疗保险报销金额(元)',
sortable: true,
width: 200
},
{prop: 'selfPayMoney', label: '个人支付金额(元)', sortable: true, width: 170},
{prop: 'noLimitSubsidyMoney', label: '计算金额(元)', sortable: true, width: 150},
{prop: 'subsidyMoney', label: '补助金额(元)', sortable: true, width: 150},
@@ -252,11 +297,14 @@ layout("/layouts/platform.html"){
{prop: 'lastTimeSubsidyYear', label: '最近年度', sortable: true, width: 155},
// {prop: 'subsidyDesc', label: '入会年限∕是否享受过补助', width: 220},
{prop: 'isMeetRequirements', label: '是否符合申请要求', width: 220},
{prop: 'isAccept', label: '是否接受补助申请', width: 220}
],
pageForm: {
year: (new Date().getFullYear() - 1).toString(),
isMember: null,
unitName:''
unitName: '',
isMeetRequirements: null,
isAccept: null
},
unions: [],
units: [],
@@ -341,8 +389,8 @@ layout("/layouts/platform.html"){
sublime.jumpPagePjax('/platform/sickHelp/importByForm?id=' + row.id)
},
exportData() {
const {year, unitName} = this.pageForm
window.open(loc() + '/exportData?year=' + year + '&unitName=' + unitName)
const {year, unitName, isMeetRequirements, isAccept} = this.pageForm
window.open(loc() + '/exportData?year=' + year + '&unitName=' + unitName + "&isMeetRequirements=" + isMeetRequirements + "&isAccept=" + isAccept)
},
async isMeetRequirementsChange(id, isMeetRequirements) {
const resp = await $.post(loc() + '/updateIsMeetRequirements', {id, isMeetRequirements})
@@ -352,7 +400,15 @@ layout("/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
},
async isAcceptChange(id, isAccept) {
const resp = await $.post(loc() + '/updateIsAccept', {id, isAccept})
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
async oneKeyUpdateIsMeetRequirements() {
const {year} = this.pageForm
@@ -374,7 +430,27 @@ layout("/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
},
async oneKeyUpdateIsAccept() {
const {year} = this.pageForm
if (!year) {
this.notifyWarning('请先选择年度')
return
}
const confirm = await this.$confirm('确认要将' + year + '的申请记录全部设为接受补助申请吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/oneKeyUpdateIsAccept', {year})
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")