first commit

This commit is contained in:
2026-09-23 09:38:39 +08:00
commit 98a8b8cace
6257 changed files with 1266718 additions and 0 deletions
@@ -0,0 +1,225 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">关键字:</div>
<div class="search-item-option">
<el-input clearable maxlength="20" v-model.trim="pageForm.keyword"></el-input>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="审核列表">
<template #func>
<el-radio-group @change="doSearch()" size="small" v-model="pageForm.auditState">
<el-radio-button label="0">全部</el-radio-button>
<el-radio-button label="1">已审核</el-radio-button>
<el-radio-button label="-1">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
align="center" header-align="center">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
</el-table-column>
<el-table-column label="操作" width="250">
<template scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
<el-button :disabled="row.stateCode!=100" @click="openAudit(row.id)" size="mini" type="primary">
审核
</el-button>
<el-button :disabled="row.stateCode<300" @click="doRevoke(row.id)" size="mini" type="danger">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<sick-help-info ref="sickView"></sick-help-info>
</template>
<template #edit>
<sick-help-info ref="sickAudit">
<template #audit>
<el-tab-pane label="审核" name="999">
<vi-title title="基层工会审核"></vi-title>
<el-form :model="formData" :rules="rules" label-width="120px" ref="form">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="1000"
placeholder="请填写您的意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="基层工会签字" prop="auditSign">
<sign :qz.sync="formData.auditSign"></sign>
</el-form-item>
</el-form>
<el-row justify="end" type="flex">
<el-button @click="doAudit(false)" type="danger">拒绝</el-button>
<el-button @click="doAudit(true)" type="primary">通过</el-button>
</el-row>
</el-tab-pane>
</template>
</sick-help-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'SickHelpInfo': httpVueLoader('/components/sickHelp/SickHelpInfo.vue'),
},
data() {
return {
pageForm: {
auditState: 0,
year: (new Date().getFullYear() - 1).toString()
},
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位', sortable: true},
// {prop: 'unionName', label: '部门工会', sortable: true},
{prop: 'year', label: '年度', sortable: true},
{prop: 'selfPayMoney', label: '自费金额', sortable: true},
{prop: 'subsidyMoney', label: '补助金额', sortable: true},
// {prop: 'subsidyRatio', label: '补助比例', sortable: true},
{prop: 'remarks', label: '备注'},
// {prop: 'isMeetRequirements', label: '是否符合申请要求'},
// {prop: 'isAccept', label: '是否接受补助'},
{prop: 'stateName', label: '审核状态'}
],
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
auditOpinion: '',
auditSign: '',
auditPass: true
},
rules: {
auditSign: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
auditOpinion: [{required: true, message: '请输入审核意见', trigger: ['change', 'blur']}]
}
}
},
methods: {
async doAudit(flag) {
const valid = await this.$refs['form'].validate()
if (!valid) return
const r = flag ? '通过' : '拒绝';
const confirm = await this.$confirm('你确定要' + r + '吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
this.formData.auditPass = flag
const resp = await $.post(loc() + '/doAudit', this.formData)
if (resp.code === 0) {
this.$refs.guava.index()
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
},
async doRevoke(id) {
const confirm = await this.$confirm('你确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/doRevoke/' + id)
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
openView(id) {
this.$refs.guava.view()
this.$refs.sickView.openView(id)
},
async openAudit(id) {
this.$refs.guava.edit()
this.$refs.sickAudit.openAudit(id)
this.$set(this.formData, 'id', id)
this.$set(this.formData, 'auditOpinion', null)
}
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,241 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">关键字:</div>
<div class="search-item-option">
<el-input clearable maxlength="20" v-model.trim="pageForm.keyword"></el-input>
</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.unionId">
<el-option :key="item.id"
:label="item.unionname"
:value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="审核列表">
<template #func>
<el-radio-group @change="doSearch()" size="small" v-model="pageForm.auditState">
<el-radio-button label="0">全部</el-radio-button>
<el-radio-button label="1">已审核</el-radio-button>
<el-radio-button label="-1">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
align="center" header-align="center">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
</el-table-column>
<el-table-column label="操作" width="250">
<template scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
<el-button :disabled="row.stateCode!=300" @click="openAudit(row.id)" size="mini" type="primary">
审核
</el-button>
<el-button :disabled="![400,500].includes(row.stateCode)"
@click="doRevoke(row.id,row.stateCode)" size="mini" type="danger">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<sick-help-info ref="sickView"></sick-help-info>
</template>
<template #edit>
<sick-help-info ref="sickAudit">
<template #audit>
<el-tab-pane label="审核" name="999">
<vi-title title="校医院审核"></vi-title>
<el-form :model="formData" :rules="rules" label-width="120px" ref="form">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="1000"
placeholder="请填写您的意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="基层工会签字" prop="auditSign">
<sign :qz.sync="formData.auditSign"></sign>
</el-form-item>
</el-form>
<el-row justify="end" type="flex">
<el-button @click="doAudit(false)" type="danger">拒绝</el-button>
<el-button @click="doAudit(true)" type="primary">通过</el-button>
</el-row>
</el-tab-pane>
</template>
</sick-help-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'SickHelpInfo': httpVueLoader('/components/sickHelp/SickHelpInfo.vue'),
},
data() {
return {
pageForm: {
auditState: 0,
year: (new Date().getFullYear() - 1).toString()
},
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位', sortable: true},
// {prop: 'unionName', label: '部门工会', sortable: true},
{prop: 'year', label: '年度', sortable: true},
{prop: 'selfPayMoney', label: '自费金额', sortable: true},
{prop: 'subsidyMoney', label: '补助金额', sortable: true},
// {prop: 'subsidyRatio', label: '补助比例', sortable: true},
{prop: 'remarks', label: '备注'},
// {prop: 'isMeetRequirements', label: '是否符合申请要求'},
// {prop: 'isAccept', label: '是否接受补助'},
{prop: 'stateName', label: '审核状态'}
],
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
auditOpinion: '',
auditSign: '',
auditPass: true
},
rules: {
auditSign: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
auditOpinion: [{required: true, message: '请输入审核意见', trigger: ['change', 'blur']}]
},
unions: []
}
},
methods: {
async doAudit(flag) {
const valid = await this.$refs['form'].validate()
if (!valid) return
const r = flag ? '通过' : '拒绝';
const confirm = await this.$confirm('你确定要' + r + '吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
this.formData.auditPass = flag
const resp = await $.post(loc() + '/doAudit', this.formData)
if (resp.code === 0) {
this.$refs.guava.index()
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
},
async doRevoke(id, stateCode) {
if (![400, 500].includes(stateCode)) return
const confirm = await this.$confirm('你确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/doRevoke/' + id)
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
openView(id) {
this.$refs.guava.view()
this.$refs.sickView.openView(id)
},
async openAudit(id) {
this.$refs.guava.edit()
this.$refs.sickAudit.openAudit(id)
this.$set(this.formData, 'id', id)
this.$set(this.formData, 'auditOpinion', null)
}
},
async created() {
this.pageData()
this.unions = await getUnions(null)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,241 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">关键字:</div>
<div class="search-item-option">
<el-input clearable maxlength="20" v-model.trim="pageForm.keyword"></el-input>
</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.unionId">
<el-option :key="item.id"
:label="item.unionname"
:value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="审核列表">
<template #func>
<el-radio-group @change="doSearch()" size="small" v-model="pageForm.auditState">
<el-radio-button label="0">全部</el-radio-button>
<el-radio-button label="1">已审核</el-radio-button>
<el-radio-button label="-1">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
align="center" header-align="center">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
</el-table-column>
<el-table-column label="操作" width="250">
<template scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
<el-button :disabled="row.stateCode!=500" @click="openAudit(row.id)" size="mini" type="primary">
审核
</el-button>
<el-button :disabled="![600,700].includes(row.stateCode)"
@click="doRevoke(row.id,row.stateCode)" size="mini" type="danger">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<sick-help-info ref="sickView"></sick-help-info>
</template>
<template #edit>
<sick-help-info ref="sickAudit">
<template #audit>
<el-tab-pane label="审核" name="999">
<vi-title title="校工会审核"></vi-title>
<el-form :model="formData" :rules="rules" label-width="120px" ref="form">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="auditTime">
<el-input readonly v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="1000"
placeholder="请填写您的意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="基层工会签字" prop="auditSign">
<sign :qz.sync="formData.auditSign"></sign>
</el-form-item>
</el-form>
<el-row justify="end" type="flex">
<el-button @click="doAudit(false)" type="danger">拒绝</el-button>
<el-button @click="doAudit(true)" type="primary">通过</el-button>
</el-row>
</el-tab-pane>
</template>
</sick-help-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'SickHelpInfo': httpVueLoader('/components/sickHelp/SickHelpInfo.vue'),
},
data() {
return {
pageForm: {
auditState: 0,
year: (new Date().getFullYear() - 1).toString()
},
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位', sortable: true},
// {prop: 'unionName', label: '部门工会', sortable: true},
{prop: 'year', label: '年度', sortable: true},
{prop: 'selfPayMoney', label: '自费金额', sortable: true},
{prop: 'subsidyMoney', label: '补助金额', sortable: true},
// {prop: 'subsidyRatio', label: '补助比例', sortable: true},
{prop: 'remarks', label: '备注'},
// {prop: 'isMeetRequirements', label: '是否符合申请要求'},
// {prop: 'isAccept', label: '是否接受补助'},
{prop: 'stateName', label: '审核状态'}
],
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
auditOpinion: '',
auditSign: '',
auditPass: true
},
rules: {
auditSign: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
auditOpinion: [{required: true, message: '请输入审核意见', trigger: ['change', 'blur']}]
},
unions: []
}
},
methods: {
async doAudit(flag) {
const valid = await this.$refs['form'].validate()
if (!valid) return
const r = flag ? '通过' : '拒绝';
const confirm = await this.$confirm('你确定要' + r + '吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
this.formData.auditPass = flag
const resp = await $.post(loc() + '/doAudit', this.formData)
if (resp.code === 0) {
this.$refs.guava.index()
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
},
async doRevoke(id, stateCode) {
if (![600, 700].includes(stateCode)) return
const confirm = await this.$confirm('你确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/doRevoke/' + id)
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
openView(id) {
this.$refs.guava.view()
this.$refs.sickView.openView(id)
},
async openAudit(id) {
this.$refs.guava.edit()
this.$refs.sickAudit.openAudit(id)
this.$set(this.formData, 'id', id)
this.$set(this.formData, 'auditOpinion', null)
}
},
async created() {
this.pageData()
this.unions = await getUnions(null)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,276 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.sickCountCard {
cursor: pointer;
transition: all linear 0.5s;
line-height: 2;
border-radius: 6px;
display: flex;
justify-content: space-between;
padding: 20px;
min-width: 220px;
margin: 5px;
background-color: #0e78c5;
color: #FFFFFF;
}
.sickCountCard .info-label {
font-size: 20px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.sickCountCard .info-label::before {
content: '';
border-left: 3px solid #FFFFFF;
margin-right: 5px;
}
.sickCountCard .info-num {
font-size: 35px;
}
@media only screen and (max-width: 767px) {
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<div style="min-width: 500px">
<el-row :gutter="20" ref="sickCountDom" style="flex-wrap: wrap;" type="flex">
<el-col :lg="12" :md="12" :sm="24" :xl="6" :xs="24">
<div class="sickCountCard">
<div class="info-label">总补助次数</div>
<div class="info-num">{{sickCount.servedCount}}</div>
</div>
</el-col>
<el-col :lg="12" :md="12" :sm="24" :xl="6" :xs="24">
<div class="sickCountCard">
<div class="info-label">总补助教师人数</div>
<div class="info-num">{{sickCount.servedUserCount}}</div>
</div>
</el-col>
<el-col :lg="12" :md="12" :sm="24" :xl="6" :xs="24">
<div class="sickCountCard">
<div class="info-label">总补助金额</div>
<div class="info-num">{{sickCount.subsidyMoneySum}}</div>
</div>
</el-col>
<el-col :lg="12" :md="12" :sm="24" :xl="6" :xs="24">
<div class="sickCountCard">
<div class="info-label">当年补助金额</div>
<div class="info-num">{{sickCount.currentYearSubsidyMoneySum}}</div>
</div>
</el-col>
</el-row>
<el-row :gutter="20" :style="{height:chartRowHeight,position:'relative'}" class="mt20" id="chart-row">
<el-col :lg="12" :xs="24">
<el-card class="mb10" shadow="never">
<vi-title title="年度补助人数趋势"></vi-title>
<div :style="{height: chartHeight}" id="yearUser"></div>
</el-card>
</el-col>
<el-col :lg="12" :xs="24">
<el-card class="mb10" shadow="never">
<vi-title title="年度补助金额趋势"></vi-title>
<div :style="{height: chartHeight}" id="yearSubsidyMoney"></div>
</el-card>
</el-col>
</el-row>
</div>
</guava>
</div>
<script>
let yearUserChart, yearSubsidyMoneyChart = null
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
sickCount: {},
yearData: [],
chartRowHeight: null,
chartHeight: null
}
},
methods: {
async getSickCount() {
const resp = await $.get(loc() + '/getSickCountData')
this.sickCount = resp.data
},
async getYearCount() {
const resp = await $.get(loc() + '/getYearCountData')
this.yearData = resp.data
this.$nextTick(async () => {
await this.calcChartRowHeightHeight()
console.log('----')
this.renderYearUser()
this.renderYearSubsidyMoney()
})
},
renderYearUser() {
console.log('开始渲染')
const chartDom = document.getElementById('yearUser')
yearUserChart = echarts.init(chartDom)
const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
name: '年度',
type: 'category',
data: this.yearData.map(v => v.year)
},
yAxis: {
name: '补助人数(人)',
type: 'value'
},
series: [
{
data: this.yearData.map(v => v.userCount),
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
},
itemStyle: {
normal: {
label: {
formatter: '{c}' + '人',
show: true,
position: 'top',
textStyle: {
fontWeight: 'bolder',
fontSize: '15'
},
width: 30,
overflow: 'break'
}
}
}
}
],
dataZoom: [
{
type: "slider",
show: true,
xAxisIndex: [0],
startValue: new Date().getFullYear() - 5,
endValue: new Date().getFullYear(),
textStyle: {
color: "#ccd7d7"
}
},
],
}
yearUserChart.setOption(option)
},
renderYearSubsidyMoney() {
const chartDom = document.getElementById('yearSubsidyMoney')
yearSubsidyMoneyChart = echarts.init(chartDom)
const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
name: '年度',
type: 'category',
data: this.yearData.map(v => v.year)
},
yAxis: {
name: '补助金额(元)',
type: 'value'
},
series: [
{
data: this.yearData.map(v => v.subsidyMoneySum),
type: 'bar',
barWidth: 30,
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
},
itemStyle: {
normal: {
label: {
formatter: '{c}' + '元',
show: true,
position: 'top',
textStyle: {
fontWeight: 'bolder',
fontSize: '15'
},
width: 80,
overflow: 'break'
}
}
}
}
],
dataZoom: [
{
type: "slider",
show: true,
xAxisIndex: [0],
startValue: new Date().getFullYear() - 5,
endValue: new Date().getFullYear(),
textStyle: {
color: "#ccd7d7"
}
},
],
}
yearSubsidyMoneyChart.setOption(option)
},
calcChartRowHeightHeight() {
return new Promise(resolve => {
this.$nextTick(() => {
const top = document.getElementById('chart-row').getBoundingClientRect().top
this.chartRowHeight = (window.innerHeight - top - 10) + 'px'
this.chartHeight = (window.innerHeight - top - 10 - 20 - 20 - 50) + 'px'
console.log('高度获取完毕')
resolve()
})
})
},
onResize() {
window.onresize = async () => {
if (window.innerWidth < 1200) {
this.chartRowHeight = '720px'
this.chartHeight = '630px'
} else {
await this.calcChartRowHeightHeight()
}
yearUserChart.resize()
yearSubsidyMoneyChart.resize()
}
}
},
mounted() {
this.getSickCount()
this.getYearCount()
this.onResize()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,288 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.downLoadTemplate {
position: absolute;
right: 0;
top: 0;
}
.dividing-line {
display: flex;
justify-content: center;
position: relative;
margin: 10px 0;
}
.dividing-line::after {
content: '';
position: absolute;
border-bottom: 1px solid #ebeef5;
width: calc(100% + 40px);
bottom: 0;
}
</style>
<div id="app" v-cloak>
<guava>
<el-card shadow="never" style="position: relative">
<template #header>
<h3 style="color: rgb(24, 103, 176);">补助计算(excel批量导入)</h3>
</template>
<el-row justify="center" style="position: relative" type="flex">
<div class="downLoadTemplate">
<el-button @click="downLoadTemplate" size="small"
type="primary">
下载模板
</el-button>
</div>
<el-upload
:action="uploadUrl"
:auto-upload="true"
:file-list="files"
:limit="1"
:on-error="handleError"
:on-exceed="()=>{this.notifyWarning('只能上传一个文件')}"
:on-progress="handleProgress"
:on-remove="(f,fl)=>{fileList = fl;tableData=[];globalYear=null;}"
:on-success="handleSuccess"
accept=".xls,.xlsx"
drag
ref="excelUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
</el-row>
<div class="dividing-line"></div>
<div class="mt20" id="excel-table-container">
<vi-title2 title="计算结果">
<template #func>
<el-button :disabled="tableData.length===0" @click="checkAgain" size="small" type="primary">
重新校验
</el-button>
<el-button :disabled="tableData.length===0" @click="doImport" size="small" type="primary">导入数据
</el-button>
</template>
</vi-title2>
<el-table :data="tableData" :summary-method="summaryMethod" max-height="887" ref="table"
show-summary
v-loading="tableLoading"
v-sticky="{top: 0,parent: '#app'}">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="校验" prop="validMsg" show-overflow-tooltip>
<template scope="{row}">
<span :class="row.valid?'text-success':'text-danger'">{{row.validMsg.join('、')}}</span>
</template>
</el-table-column>
<el-table-column label="工号" prop="loginName" width="150">
<!-- <template scope="{row}">-->
<!-- <el-input v-model="row.loginName" maxlength="10" size="small"></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="姓名" prop="userName" width="150">
<!-- <template scope="{row}">-->
<!-- <el-input v-model="row.userName" maxlength="10" size="small"></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="单位" prop="unitName" show-overflow-tooltip width="150">
<!-- <template scope="{row}">-->
<!-- <el-input v-model="row.unitName" maxlength="10" size="small"></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="自费金额(元)" prop="selfPayMoney" width="200">
<!-- <template scope="{row}">-->
<!-- <el-input-number v-model="row.selfPayMoney" :min="0" :max="999999"-->
<!-- :precision="2" size="small" style="width: 100%"></el-input-number>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="补助金额(元)" prop="subsidyMoney" width="200">
<!-- <template scope="{row}">-->
<!-- <el-input-number v-model="row.subsidyMoney" :min="0" :max="999999"-->
<!-- :precision="2" size="small" style="width: 100%"></el-input-number>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="年度" prop="year" width="100">
<!-- <template #header>-->
<!-- <div style="display: flex;align-items: center">-->
<!-- <div style="width: 50px">-->
<!-- 年度-->
<!-- </div>-->
<!-- <el-date-picker-->
<!-- v-model="globalYear"-->
<!-- @change="globalYearChange"-->
<!-- type="year"-->
<!-- placeholder="一键选择年度"-->
<!-- value-format="yyyy"-->
<!-- size="small"-->
<!-- style="width: calc(200px - 50px)">-->
<!-- </el-date-picker>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template scope="{row}">-->
<!-- <el-date-picker-->
<!-- v-model="row.year"-->
<!-- type="year"-->
<!-- placeholder="选择年度"-->
<!-- value-format="yyyy"-->
<!-- size="small"-->
<!-- style="width: 100%">-->
<!-- </el-date-picker>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="上一次补助年度" prop="lastTimeSubsidyYear" width="150"></el-table-column>
<!-- <el-table-column label="自费金额补助比例" prop="selfPaySubsidyRatio" width="150">-->
<!-- <template scope="{row}">-->
<!-- {{row.selfPaySubsidyRatio * 1000 / 10 + '%'}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="额外补助比例" prop="otherSubsidyRatio" width="150">
<template scope="{row}">
{{row.otherSubsidyRatio * 1000 / 10 + '%'}}
</template>
</el-table-column>
<!-- <el-table-column label="总补助比例" prop="totalSubsidyRatio" width="150">-->
<!-- <template scope="{row}">-->
<!-- {{row.totalSubsidyRatio * 1000 / 10 + '%'}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="入会年限∕是否享受过补助" prop="subsidyDesc" width="200">-->
<!-- </el-table-column>-->
<el-table-column label="备注" prop="remarks">
<!-- <template scope="{row}">-->
<!-- <el-input v-model="formData.remarks" maxlength="20" size="small"></el-input>-->
<!-- </template>-->
</el-table-column>
</el-table>
<!-- <el-backtop target="#excel-table-container" :bottom="100"></el-backtop>-->
</div>
</el-card>
</guava>
</div>
<script>
</script>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
files: [],
globalYear: null,
uploadUrl: '/platform/sickHelp/import/readExcel',
tableHeight: null
}
},
methods: {
handleProgress() {
this.tableLoading = true
},
handleSuccess(resp) {
console.log('ok')
this.tableLoading = false
this.tableData = resp.data
},
handleError(err) {
console.log(err)
},
beforeUpload(file, files) {
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
const whiteList = ['xls', 'xlsx']
if (!whiteList.includes(fileSuffix)) {
this.files = []
this.$message.warning('上传文件只能是' + whiteList.join(',') + '格式')
return false
}
this.files = files
},
async checkAgain() {
this.tableLoading = true
const resp = await $.post('/platform/sickHelp/import/checkData', {sickHelps: JSON.stringify(this.tableData)})
console.log('ok....')
this.tableLoading = false
if (resp.code === 0) {
// resp.data.forEach(v => {
// v['year'] = v['year'] ? v['year'].toString() : null
// })
this.tableData = resp.data
} else {
this.notifyWarning(resp.msg)
}
},
async doImport() {
const hasErrorData = this.tableData.some(v => !v.valid)
if (hasErrorData) {
this.notifyWarning('数据校验不合格,无法导入')
return
}
const resp = await $.post('/platform/sickHelp/import/doImport', {sickHelps: JSON.stringify(this.tableData)})
if (resp.code === 0) {
this.tableData = []
this.globalYear = null
this.notifySuccess(resp.msg)
this.$refs.excelUpload.clearFiles()
}
},
globalYearChange(val) {
this.tableData.forEach(v => {
v['year'] = val
})
},
downLoadTemplate() {
window.open('/platform/sickHelp/import/downLoadTemplate')
},
summaryMethod(param) {
const {columns, data} = param
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
if (['selfPayMoney', 'subsidyMoney'].includes(column.property)) {
const values = data.map(item => Number(item[column.property]))
const sum = values.reduce((sum, value) => sum + value, 0)
sums[index] = sum.toFixed(2)
} else {
sums[index] = null
}
})
return sums
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,401 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.calcRow {
display: flex;
justify-content: center;
position: relative;
top: 20px;
padding: 20px 0;
}
.calcRow::before {
content: '';
position: absolute;
border-top: 1px solid #ebeef5;
width: calc(100% + 40px);
top: 0;
}
.calcRow button {
/*width: 10%;*/
}
.historySubsidy {
position: relative;
padding: 20px 0 0 0;
}
.historySubsidy::before {
content: '';
position: absolute;
border-top: 1px solid #ebeef5;
width: calc(100% + 40px);
top: 0;
}
.el-table__empty-block {
min-height: 240px !important;
background-size: unset !important;
}
.overflow-form-item .el-form-item__label {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dividing-line {
display: flex;
justify-content: center;
position: relative;
margin: 10px 0;
}
.dividing-line::after {
content: '';
position: absolute;
border-bottom: 1px solid #ebeef5;
width: calc(100% + 40px);
bottom: 0;
}
</style>
<div id="app" v-cloak>
<guava>
<el-card shadow="never">
<template #header>
<h3 style="color: rgb(24, 103, 176);">{{cardTitle}}</h3>
</template>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
<vi-title2 title="填写补助数据"></vi-title2>
<el-row>
<el-col :lg="8" :xs="24">
<el-form-item label="工号" prop="loginName">
<el-select :disabled="formDisabled"
:remote-method="searchUser"
@change="userChange"
clearable
filterable
placeholder="输入工号或者姓名查询"
remote
reserve-keyword
style="width: 100%"
v-model="formData.loginName">
<el-option
:key="item.loginName"
:label="item.userName+'('+item.loginName+')'"
:value="item.loginName"
v-for="item in userList"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="8" :xs="24">
<el-form-item label="姓名" prop="userName">
<el-input :disabled="!this.formData.id"
placeholder="输入工号之后自动显示"
v-model="formData.userName"></el-input>
</el-form-item>
</el-col>
<el-col :lg="8" :xs="24">
<el-form-item label="单位" prop="unitName">
<el-input placeholder="输入工号之后自动显示"
v-model="formData.unitName"></el-input>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :lg="8" :xs="24">
<el-form-item label="自费金额" prop="selfPayMoney">
<el-input-number :max="99999999.99" :min="3000.00"
:precision="2"
:step="1"
placeholder="请输入自费金额"
readonly
style="width: 100%"
v-model="formData.selfPayMoney"></el-input-number>
</el-form-item>
</el-col>
<el-col :lg="8" :xs="24">
<el-form-item label="申报年度" prop="year">
<el-date-picker
:disabled="formDisabled"
:picker-options="pickerOptions"
placeholder="选择申报年度"
style="width: 100%"
type="year"
v-model="formData.year"
value-format="yyyy">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :lg="24" :xs="24">
<el-form-item label="备注" prop="remarks">
<el-input
:rows="3"
maxlength="50"
placeholder="可输入备注"
type="textarea"
v-model="formData.remarks">
</el-input>
</el-form-item>
</el-col>
</el-row>
<div class="dividing-line"></div>
<vi-title2 title="计算结果"></vi-title2>
<el-row :gutter="20">
<!-- <el-col :lg="8" :xs="24">-->
<!-- <el-form-item label="自费金额补助比例" prop="selfPaySubsidyRatio" class="overflow-form-item">-->
<!-- <template #label>-->
<!-- <el-tooltip effect="dark" content="自费金额补助比例" placement="top-start">-->
<!-- <span>自费金额补助比例</span>-->
<!-- </el-tooltip>-->
<!-- </template>-->
<!-- <el-input :value="selfPaySubsidyRatioPercent" readonly></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :lg="8" :xs="24">
<el-form-item label="额外补助比例" prop="otherSubsidyRatio">
<el-input :value="otherSubsidyRatioPercent" readonly></el-input>
</el-form-item>
</el-col>
<!-- <el-col :lg="8" :xs="24">-->
<!-- <el-form-item label="总补助比例" prop="totalSubsidyRatio">-->
<!-- <el-input :value="totalSubsidyRatioPercent" readonly></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row :gutter="20">
<el-col :lg="8" :xs="24">
<el-form-item label="上一次补助年度" prop="lastTimeSubsidyYear">
<el-input readonly
v-model="formData.lastTimeSubsidyYear"></el-input>
</el-form-item>
</el-col>
<el-col :lg="8" :xs="24">
<el-form-item class="overflow-form-item" label="入会年限∕是否享受过补助" prop="subsidyDesc">
<template #label>
<el-tooltip content="入会年限∕是否享受过补助" effect="dark" placement="top-start">
<span>入会年限∕是否享受过补助</span>
</el-tooltip>
</template>
<el-input readonly v-model="formData.subsidyDesc"></el-input>
</el-form-item>
</el-col>
<el-col :lg="8" :xs="24">
<el-form-item label="补助金额" prop="subsidyMoney">
<el-input-number :max="99999999.99" :min="0" :precision="2"
readonly
style="width: 100%" v-model="formData.subsidyMoney"></el-input-number>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="historySubsidy">
<vi-title2 title="历史申请记录"></vi-title2>
<el-table :data="tableData" max-height="360">
<el-table-column label="年度" prop="year"></el-table-column>
<el-table-column label="自费金额" prop="selfPayMoney"></el-table-column>
<el-table-column label="自费金额补助比例" prop="selfPaySubsidyRatio">
<template scope="{row}">
{{row.selfPaySubsidyRatio ? row.selfPaySubsidyRatio * 1000 / 10 + '%' : null}}
</template>
</el-table-column>
<el-table-column label="额外补助比例" prop="otherSubsidyRatio">
<template scope="{row}">
{{row.otherSubsidyRatio!=null ? row.otherSubsidyRatio * 1000 / 10 + '%' : null}}
</template>
</el-table-column>
<el-table-column label="总补助比例" prop="totalSubsidyRatio">
<template scope="{row}">
{{row.totalSubsidyRatio ? row.totalSubsidyRatio * 1000 / 10 + '%' : null}}
</template>
</el-table-column>
<el-table-column label="补助金额" prop="subsidyMoney"></el-table-column>
<el-table-column label="上一次补助年度" prop="lastTimeSubsidyYear"></el-table-column>
<el-table-column label="备注" prop="remarks"></el-table-column>
<!-- <el-table-column label="是否接受补助" prop="isAccept">-->
<!-- <template scope="{row}">-->
<!-- <template v-if="row.isAccept!=null">-->
<!-- <span v-if="row.isAccept" class="text-success">-->
<!-- 接受-->
<!-- </span>-->
<!-- <span v-else class="text-danger">-->
<!-- 拒绝-->
<!-- </span>-->
<!-- </template>-->
<!-- <template v-else>-->
<!-- <span class="text-info">无</span>-->
<!-- </template>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
<div class="calcRow">
<el-button @click="calcSubsidy" type="primary">计算补助结果</el-button>
<el-button :disabled="!valid" @click="submitSubsidy" type="primary">提交补助结果</el-button>
</div>
</el-card>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
userList: [],
formData: {},
formRules: {
loginName: [{required: true, message: '请输入工号或者姓名查询用户', trigger: ['change', 'blur']}],
selfPayMoney: [{required: true, message: '请输入自费金额', trigger: ['change', 'blur']}],
year: [{required: true, message: '请选择申报年度', trigger: ['change', 'blur']}],
},
valid: false
}
},
computed: {
subsidyRatio() {
const subsidyRatio = this.formData.subsidyRatio
if (subsidyRatio) {
return subsidyRatio * 1000 / 10 + '%'
}
return null
},
pickerOptions() {
return {
disabledDate(time) {
return time.getTime() > Date.now()
}
}
},
selfPaySubsidyRatioPercent() {
if (this.formData.selfPaySubsidyRatio) {
return this.formData.selfPaySubsidyRatio * 1000 / 10 + '%'
}
return '0%'
},
otherSubsidyRatioPercent() {
if (this.formData.otherSubsidyRatio) {
return this.formData.otherSubsidyRatio * 1000 / 10 + '%'
}
return '0%'
},
totalSubsidyRatioPercent() {
if (this.formData.totalSubsidyRatio) {
return this.formData.totalSubsidyRatio * 1000 / 10 + '%'
}
return '0%'
},
cardTitle() {
return this.formData.id ? '编辑补助记录' : '新增补助记录'
},
formDisabled() {
return this.formData.id
}
},
methods: {
async calcSubsidy() {
try {
const valid = await this.$refs.form.validate()
if (!valid) return
const formData = clone(this.formData)
formData.selfPayMoney = formData.selfPayMoney.toFixed(2).toString()
const resp = await $.post('/platform/sickHelp/import/checkData', {sickHelps: JSON.stringify([formData])})
if (resp.code === 0) {
if (resp.data) {
const resp_data = resp.data[0]
if (resp_data.valid) {
this.valid = resp_data.valid
this.$set(this.formData, 'selfPaySubsidyRatio', resp_data.selfPaySubsidyRatio)
this.$set(this.formData, 'otherSubsidyRatio', resp_data.otherSubsidyRatio)
this.$set(this.formData, 'totalSubsidyRatio', resp_data.totalSubsidyRatio)
this.$set(this.formData, 'lastTimeSubsidyYear', resp_data.lastTimeSubsidyYear)
this.$set(this.formData, 'subsidyDesc', resp_data.subsidyDesc)
this.$set(this.formData, 'subsidyMoney', resp_data.subsidyMoney)
this.notifySuccess(resp_data.validMsg.join('、'))
} else {
this.notifyWarning(resp_data.validMsg.join('、'))
}
}
} else {
this.notifyWarning(resp.msg)
}
} catch (e) {
console.log(e)
}
},
async submitSubsidy() {
await this.calcSubsidy()
if (!this.valid) {
this.notifyWarning('数据校验不合格,无法提交')
return
}
const formData = clone(this.formData)
const resp = await $.post('/platform/sickHelp/import/doImport', {sickHelps: JSON.stringify([formData])})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.$refs.form.resetFields()
this.tableData = []
} else {
this.notifyError(resp.msg)
}
},
async searchUser(key) {
const resp = await $.post('/platform/sickHelp/import/searchUser/' + key)
this.userList = resp.data
},
async userChange(val) {
const user = this.userList.find(v => v.loginName === val)
this.$set(this.formData, 'userName', user.userName)
this.$set(this.formData, 'unitName', user.unitName)
this.$set(this.formData, 'loginName', user.loginName)
await this.getHistoryApplyRecords(user.loginName)
},
async getHistoryApplyRecords(loginName) {
const resp = await $.get('/platform/sickHelp/import/getHistorySubsidyByUser/' + loginName)
if (resp.code === 0) {
this.tableData = resp.data
}
},
async checkEdit() {
const id = GetQueryString("id")
if (!id) return
const resp = await $.get('/platform/sickHelp/import/findOne/' + id)
const loginName = resp.data.loginName
await this.searchUser(loginName)
resp.data.year = resp.data.year.toString()
this.formData = resp.data
await this.getHistoryApplyRecords(loginName)
}
},
created() {
this.checkEdit()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,329 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.downLoadTemplate {
position: absolute;
right: 0;
top: 0;
}
.dividing-line {
display: flex;
justify-content: center;
position: relative;
margin: 10px 0;
}
.dividing-line::after {
content: '';
position: absolute;
border-bottom: 1px solid #ebeef5;
width: calc(100% + 40px);
bottom: 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">补助人:</div>
<div class="search-item-option">
<el-input clearable maxlength="10" placeholder="可输入补助人的工号或姓名进行查询"
v-model.trim="pageForm.subsidyUser"></el-input>
</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.unitName">
<el-option :label="item.name"
:value="item.name"
v-for="item in units"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="补助列表">
<template #func>
<el-button @click="importHistoryData" size="small" type="primary">导入历史数据</el-button>
<el-button @click="exportData" size="small" type="primary">导出补助汇总表</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
align="center" header-align="center">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='selfPaySubsidyRatio'">
{{row.selfPaySubsidyRatio * 1000 / 10 + '%'}}
</template>
<template scope="{row}" v-else-if="column.prop=='otherSubsidyRatio'">
{{row.otherSubsidyRatio * 1000 / 10 + '%'}}
</template>
<template scope="{row}" v-else-if="column.prop=='totalSubsidyRatio'">
{{row.totalSubsidyRatio * 1000 / 10 + '%'}}
</template>
<template scope="{row}" v-else-if="column.prop=='isMeetRequirements'">
<el-switch
@change="(val)=>{isMeetRequirementsChange(row.id,val)}"
active-color="#13ce66"
inactive-color="#ff4949"
v-model="row.isMeetRequirements">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
<template scope="{row}">
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #public>
<el-row class="file-upload-container" justify="center" style="position: relative" type="flex">
<div class="downLoadTemplate">
<el-button @click="downLoadTemplate" size="small"
type="primary">
下载模板
</el-button>
</div>
<el-upload
:action="uploadUrl"
:auto-upload="true"
:file-list="files"
:limit="1"
:on-error="handleError"
:on-exceed="()=>{this.notifyWarning('只能上传一个文件')}"
:on-remove="(f,fl)=>{fileList = fl;excelTableData=[];}"
:on-success="handleSuccess"
accept=".xls,.xlsx"
drag
ref="excelUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
</el-row>
<div class="dividing-line"></div>
<vi-title2 class="vi-title-top-border" title="excel数据">
<template #func>
<el-button @click="importData" class="importData" size="small" type="primary">导入数据</el-button>
</template>
</vi-title2>
<el-table :data="excelTableData" :size="tableSize"
@sort-change="pageOrder" header-align="center">
<el-table-column header-align="center" label="序号" type="index" width="80">
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='selfPaySubsidyRatio'">
{{row.selfPaySubsidyRatio * 1000 / 10 + '%'}}
</template>
<template scope="{row}" v-else-if="column.prop=='otherSubsidyRatio'">
{{row.otherSubsidyRatio * 1000 / 10 + '%'}}
</template>
<template scope="{row}" v-else-if="column.prop=='totalSubsidyRatio'">
{{row.totalSubsidyRatio * 1000 / 10 + '%'}}
</template>
</el-table-column>
</el-table>
<el-backtop :bottom="100" target="#app"></el-backtop>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
tableColumns: [
{prop: 'year', label: '年度', sortable: true},
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位', sortable: true},
// {prop: 'unionName', label: '部门工会', sortable: true},
{prop: 'selfPayMoney', label: '自费金额(元)', sortable: true, width: 150},
{prop: 'subsidyMoney', label: '补助金额(元)', sortable: true, width: 150},
// {prop: 'selfPaySubsidyRatio', label: '自费金额补助比例', sortable: true, width: 160},
{prop: 'otherSubsidyRatio', label: '额外补助比例', sortable: true, width: 155},
// {prop: 'totalSubsidyRatio', label: '总补助比例', sortable: true, width: 155},
{prop: 'lastTimeSubsidyYear', label: '最近年度', sortable: true, width: 155},
// {prop: 'subsidyDesc', label: '入会年限∕是否享受过补助', width: 220},
{prop: 'isMeetRequirements', label: '是否符合申请要求', width: 220},
],
pageForm: {
year: (new Date().getFullYear() - 1).toString(),
unitName: ''
},
units: [],
files: [],
uploadUrl: loc() + '/readExcelData',
excelTableData: []
}
},
methods: {
async importData() {
if (this.excelTableData.length === 0) {
this.notifyWarning('无数据')
return
}
const confirm = await this.$confirm('确定导入吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
const loading = this.$loading({
lock: true,
text: '导入中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/importHistoryData', {data: JSON.stringify(this.excelTableData)})
loading.close()
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.excelTableData = []
this.files = []
} else {
this.notifyWarning(resp.msg)
}
},
handleError(err) {
console.log(err)
},
handleSuccess(resp) {
if (resp.code === 0) {
this.excelTableData = resp.data
} else {
this.notifyWarning(resp.msg)
}
},
importHistoryData() {
this.$refs.guava.public()
},
downLoadTemplate() {
window.open(loc() + '/downLoadTemplate')
},
beforeUpload(file, files) {
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
const whiteList = ['xlsx']
if (!whiteList.includes(fileSuffix)) {
this.files = []
this.$message.warning('上传文件只能是' + whiteList.join(',') + '格式')
return false
}
this.files = files
},
async doDelete(id) {
const confirm = await this.$confirm('删除后补助数据可能会受到影响,您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/doDelete/' + id)
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
openEdit(row) {
sublime.jumpPagePjax('/platform/sickHelp/importByForm?id=' + row.id)
},
exportData() {
const {year, unitName} = this.pageForm
window.open(loc() + '/exportData?year=' + year + '&unitName=' + unitName)
},
async isMeetRequirementsChange(id, isMeetRequirements) {
const resp = await $.post(loc() + '/updateIsMeetRequirements', {id, isMeetRequirements})
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
},
async created() {
this.units = await getUnits(null)
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,164 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.downLoadTemplate {
position: absolute;
right: 0;
top: 0;
}
.dividing-line {
display: flex;
justify-content: center;
position: relative;
margin: 10px 0;
}
.dividing-line::after {
content: '';
position: absolute;
border-bottom: 1px solid #ebeef5;
width: calc(100% + 40px);
bottom: 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<template #header>
<h3 style="color: rgb(24, 103, 176);">基金会员数据导入</h3>
</template>
<el-row justify="center" style="position: relative" type="flex">
<div class="downLoadTemplate">
<el-button @click="downLoadTemplate" size="small"
type="primary">
下载模板
</el-button>
</div>
<el-upload
:action="uploadUrl"
:auto-upload="true"
:file-list="files"
:limit="1"
:on-error="handleError"
:on-exceed="()=>{this.notifyWarning('只能上传一个文件')}"
:on-remove="(f,fl)=>{fileList = fl;excelTableData=[];}"
:on-success="handleSuccess"
accept=".xls,.xlsx"
drag
ref="excelUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
</el-row>
<div class="dividing-line"></div>
<vi-title2 title="excel数据">
<template #func>
<el-button @click="importData" size="small" type="primary">导入数据</el-button>
</template>
</vi-title2>
<el-table :data="excelTableData" :size="tableSize"
@sort-change="pageOrder"
header-align="center"
height="480" max-height="480">
<el-table-column header-align="center" label="序号" type="index" width="80">
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='tips'">
<span class="text-warning" v-if="row.id">
数据库已存在该用户信息
</span>
</template>
</el-table-column>
</el-table>
</el-card>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
excelTableData: [],
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'userState', label: '在职状态'},
{prop: 'mutualGoldStartTime', label: '互助金开始起扣时间'},
{prop: 'tips', label: '提示'},
],
files: [],
uploadUrl: loc() + '/readExcelData',
}
},
methods: {
handleError(err) {
console.log(err)
},
handleSuccess(resp) {
this.excelTableData = resp.data
},
downLoadTemplate() {
window.open(loc() + '/downLoadTemplate')
},
beforeUpload(file, files) {
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
const whiteList = ['xlsx']
if (!whiteList.includes(fileSuffix)) {
this.files = []
this.$message.warning('上传文件只能是' + whiteList.join(',') + '格式')
return false
}
this.files = files
},
async importData() {
if (!this.excelTableData.length) {
this.notifyWarning('无数据')
return
}
const confirm = await this.$confirm('您确定导入吗,新数据将覆盖旧数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const loading = this.$loading({
lock: true,
text: '导入中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const resp = await $.post(loc() + '/doImport', {data: JSON.stringify(this.excelTableData)})
loading.close()
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.excelTableData = []
this.files = []
} else {
this.notifyWarning(resp.msg)
}
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,181 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">起扣时间:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择起扣时间"
style="width: 100%"
type="year"
v-model="pageForm.mutualGoldStartTime"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">关键字:</div>
<div class="search-item-option">
<el-input clearable maxlength="10" placeholder="可输入基金会员的工号或姓名进行查询"
v-model.trim="pageForm.keyWord"></el-input>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="基金会员"></table-tool>
<el-table :data="tableData" :size="tableSize"
@sort-change="pageOrder" header-align="center">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='subsidyRatio'">
{{row.subsidyRatio * 100 + '%'}}
</template>
</el-table-column>
<el-table-column label="操作" width="200">
<template scope="{row}">
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
<el-dialog :close-on-click-modal="false" :visible.sync="editDialogVisible" title="编辑">
<el-form :model="formData" :rules="rules" label-width="120px">
<el-form-item label="姓名" prop="userName">
<el-input maxlength="10" v-model.trim="formData.userName"></el-input>
</el-form-item>
<el-form-item label="工号" prop="loginName">
<el-input maxlength="10" v-model.trim="formData.loginName"></el-input>
</el-form-item>
<el-form-item label="在职状态" prop="userState">
<!-- <el-select v-model="formData.userState">-->
<!-- <el-option v-for="item in units"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<el-input maxlength="10" v-model.trim="formData.userState"></el-input>
</el-form-item>
<el-form-item label="起扣时间" prop="mutualGoldStartTime">
<el-date-picker
:picker-options="pickerOptions"
placeholder="选择起扣时间"
style="width: 100%"
type="year"
v-model="formData.mutualGoldStartTime"
value-format="yyyy">
</el-date-picker>
</el-form-item>
</el-form>
<el-row justify="end" type="flex">
<el-button @click="editDialogVisible=false">取消</el-button>
<el-button @click="doEdit" type="primary">确定</el-button>
</el-row>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
tableColumns: [
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'loginName', label: '工号', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'mutualGoldStartTime', label: '互助金开始起扣时间', sortable: true},
],
units: [],
rules: {
loginName: [{required: true, message: '请输入工号', trigger: ['change', 'blur']}],
userName: [{required: true, message: '请输入姓名', trigger: ['change', 'blur']}],
userState: [{required: true, message: '请输入在职状态', trigger: ['change', 'blur']}],
mutualGoldStartTime: [{required: true, message: '请输入起扣时间', trigger: ['change', 'blur']}],
},
editDialogVisible: false
}
},
computed: {
pickerOptions() {
return {
disabledDate(time) {
return time.getTime() > Date.now()
}
}
}
},
methods: {
async doDelete(id) {
const confirm = await this.$confirm('删除后补助数据可能会受到影响,您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/doDelete/' + id)
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
openEdit(row) {
this.formData = clone(row)
this.editDialogVisible = true
},
async doEdit() {
const resp = await $.post(loc() + '/doEdit', this.formData)
if (resp.code === 0) {
this.pageData()
this.editDialogVisible = false
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,288 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="我的补助列表">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
align="center" header-align="center">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='isMeetRequirements'">
<span class="text-success" v-if="row.isMeetRequirements">
符合
</span>
<span class="text-danger" v-else>
不符合
</span>
</template>
<template scope="{row}" v-else-if="column.prop==='isAccept'">
<template v-if="row.isAccept!=null">
<span class="text-success" v-if="row.isAccept">
接受
</span>
<span class="text-danger" v-else>
放弃
</span>
</template>
<template v-else>
<span class="text-info">无</span>
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="250">
<template scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
<el-button :disabled="row.isAccept!=null || !row.isMeetRequirements || row.stateCode > 100"
@click="applySubsidy(row)" size="mini"
type="primary">申请
</el-button>
<el-button :disabled="!row.isMeetRequirements || row.stateCode > 100 || row.isAccept==0"
@click="userHandler(row.id,row.isAccept,false)"
size="mini"
type="danger">放弃
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<sick-help-info ref="sickView"></sick-help-info>
</template>
</guava>
<el-dialog :close-on-click-modal="false" :visible.sync="applyDialog" title="申请补助" width="60%">
<el-form :model="formData" :rules="rules" label-width="120px" ref="form">
<el-row :gutter="10">
<el-col :lg="8" :md="24" :sm="24" :xl="8" :xs="24">
<el-form-item label="姓名" prop="userName">
<el-input :value="formData.userName" readonly></el-input>
</el-form-item>
</el-col>
<el-col :lg="8" :md="24" :sm="24" :xl="8" :xs="24">
<el-form-item label="性别" prop="sex">
<el-input v-model="formData.sex"></el-input>
</el-form-item>
</el-col>
<el-col :lg="8" :md="24" :sm="24" :xl="8" :xs="24">
<el-form-item label="出生年月" prop="birthday">
<el-date-picker
type="date"
v-model="formData.birthday"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :lg="8" :md="24" :sm="24" :xl="8" :xs="24">
<el-form-item label="参加大病医疗互助时间" prop="mutualGoldStartTime">
<el-date-picker
type="year"
v-model="formData.mutualGoldStartTime"
value-format="yyyy">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :lg="8" :md="24" :sm="24" :xl="8" :xs="24">
<el-form-item label="工作单位" prop="unitName">
<el-input :value="formData.unitName"></el-input>
</el-form-item>
</el-col>
<el-col :lg="8" :md="24" :sm="24" :xl="8" :xs="24">
<el-form-item label="家庭住址" prop="homeAddress">
<el-input v-model="formData.homeAddress"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="申请理由" prop="applyReason">
<el-input
:autosize="{ minRows: 3, maxRows: 5}"
autosize
placeholder="请输入申报补助理由(患何种疾病)"
type="textarea"
v-model="formData.applyReason">
</el-input>
</el-form-item>
<el-row :gutter="10">
<el-col :lg="12" :md="24" :sm="24" :xl="12" :xs="24">
<el-form-item label="个人自费金额">
<el-input-number :max="99999999.99" :min="0" :precision="2"
readonly
style="width: 100%" v-model="formData.selfPayMoney"></el-input-number>
</el-form-item>
</el-col>
<el-col :lg="12" :md="24" :sm="24" :xl="12" :xs="24">
<el-form-item label="补助金额">
<el-input-number :max="99999999.99" :min="0" :precision="2"
readonly
style="width: 100%" v-model="formData.subsidyMoney"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="申请人签字" prop="applyUserSign">
<sign :qz.sync="formData.applyUserSign"></sign>
</el-form-item>
<el-row class="mt10" justify="end" type="flex">
<el-button @click="applyDialog=false">取消</el-button>
<el-button @click="doApply" type="primary">提交</el-button>
</el-row>
</el-form>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'SickHelpInfo': httpVueLoader('/components/sickHelp/SickHelpInfo.vue'),
},
data() {
return {
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位', sortable: true},
// {prop: 'unionName', label: '部门工会', sortable: true},
{prop: 'year', label: '年度', sortable: true},
{prop: 'selfPayMoney', label: '自费金额', sortable: true},
{prop: 'subsidyMoney', label: '补助金额', sortable: true},
// {prop: 'subsidyRatio', label: '补助比例', sortable: true},
{prop: 'remarks', label: '备注'},
{prop: 'isMeetRequirements', label: '是否符合申请要求'},
{prop: 'isAccept', label: '是否接受补助'},
{prop: 'stateName', label: '审核状态'}
],
pageForm: {
year: null
},
formData: {},
rules: {
applyUserSign: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
applyReason: [{required: true, message: '请输入申请理由', trigger: ['change', 'blur']}],
sex: [{required: true, message: '请选择性别', trigger: ['change', 'blur']}],
birthday: [{required: true, message: '请输入出生年月', trigger: ['change', 'blur']}],
mutualGoldStartTime: [{required: true, message: '请输入参加大病医疗互助时间', trigger: ['change', 'blur']}],
unitName: [{required: true, message: '请输入工作单位', trigger: ['change', 'blur']}],
homeAddress: [{required: true, message: '请输入家庭住址', trigger: ['change', 'blur']}],
},
applyDialog: false
}
},
methods: {
openView(id) {
this.$refs.guava.view()
this.$refs.sickView.openView(id)
},
async userHandler(id, isAccept, userChoice) {
if (isAccept) return
const msg = '您确认要' + (userChoice ? '接受' : '放弃') + '该补助吗?'
const confirm = await this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/acceptSubsidy', {id, isAccept: userChoice})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyError(resp.msg)
}
},
//申请补助
applySubsidy(row) {
this.formData = clone(row)
this.applyDialog = true
this.getApplyUserInfo(row.loginName)
},
async getApplyUserInfo(loginName) {
const resp = await $.get(loc() + '/getApplyUserInfo', {loginName})
if (resp.code === 0) {
const {userName, loginName, unitName, sex, homeAddress, birthday} = resp.data
this.$set(this.formData, 'userName', userName)
this.$set(this.formData, 'loginName', loginName)
this.$set(this.formData, 'unitName', unitName)
this.$set(this.formData, 'sex', sex)
this.$set(this.formData, 'homeAddress', homeAddress)
this.$set(this.formData, 'birthday', birthday)
}
},
async doApply() {
const valid = await this.$refs['form'].validate()
if (!valid) return
const resp = await $.post(loc() + '/doApply', this.formData)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
}
},
async created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,213 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">职工信息:</div>
<div class="search-item-option">
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 80px;">
<el-option label="工号" value="u.loginname"></el-option>
<el-option label="姓名" value="u.username"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">是否接受:</div>
<div class="search-item-option">
<el-radio-group @change="doSearch" v-model="pageForm.isAccept">
<el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="1">接受</el-radio-button>
<el-radio-button :label="-1">拒绝</el-radio-button>
</el-radio-group>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="补助汇总列表">
<template #func>
<el-button @click="exportSubsidiesAmountTable" size="small" type="primary">导出补助金额情况表</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
align="center" header-align="center">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop==='isAccept'">
<template v-if="row.isAccept!=null">
<span class="text-success" v-if="row.isAccept">
接受
</span>
<span class="text-danger" v-else>
拒绝
</span>
</template>
<template v-else>
<span class="text-info">无</span>
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="250">
<template scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<sick-help-info ref="sickView"></sick-help-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'SickHelpInfo': httpVueLoader('/components/sickHelp/SickHelpInfo.vue'),
},
data() {
return {
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'unitName', label: '单位', sortable: true},
// {prop: 'unionName', label: '部门工会', sortable: true},
{prop: 'year', label: '年度', sortable: true},
{prop: 'selfPayMoney', label: '自费金额', sortable: true},
{prop: 'subsidyMoney', label: '补助金额', sortable: true},
// {prop: 'subsidyRatio', label: '补助比例', sortable: true},
{prop: 'remarks', label: '备注'},
// {prop: 'isMeetRequirements', label: '是否符合申请要求'},
{prop: 'isAccept', label: '是否接受补助'},
{prop: 'stateName', label: '审核状态'}
],
pageForm: {
year: null,
searchName: 'u.username',
isAccept: 0
},
unions: [],
units: [],
formData: {},
rules: {
applyUserSign: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
applyReason: [{required: true, message: '请输入申请理由', trigger: ['change', 'blur']}],
sex: [{required: true, message: '请选择性别', trigger: ['change', 'blur']}],
birthday: [{required: true, message: '请输入出生年月', trigger: ['change', 'blur']}],
mutualGoldStartTime: [{required: true, message: '请输入参加大病医疗互助时间', trigger: ['change', 'blur']}],
unitName: [{required: true, message: '请输入工作单位', trigger: ['change', 'blur']}],
homeAddress: [{required: true, message: '请输入家庭住址', trigger: ['change', 'blur']}],
},
applyDialog: false
}
},
methods: {
openView(id) {
this.$refs.guava.view()
this.$refs.sickView.openView(id)
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
exportSubsidiesAmountTable() {
const {year} = this.pageForm
if (!year) {
this.notifyWarning('请先选择年度')
return
}
window.open(loc() + '/exportSubsidiesAmountTable?year=' + year)
}
},
async created() {
this.pageData()
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->