Files
2026-09-08 19:49:21 +08:00

262 lines
12 KiB
HTML

<!--#
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"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
<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"
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-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>
var 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: [],
units: []
}
},
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 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()}")
}
},
},
async created() {
this.pageData()
this.unions = await getUnions(null)
}
})
</script>
<!--#
}
#-->