341 lines
14 KiB
HTML
341 lines
14 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.descriptions-form .el-form-item {
|
|
margin-bottom: 0;
|
|
}
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava" v-model="guavaIndex">
|
|
<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 v-model="pageForm.searchKeyword" clearable maxlength="10"></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
|
|
@change="flushUnits" @clear="flushUnits"
|
|
filterable>
|
|
<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%;"
|
|
@change="getThreeUnits"
|
|
clearable
|
|
filterable>
|
|
<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 v-model="pageForm.isAudit" @change="doSearch" size="small">
|
|
<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" 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 v-if="column.prop==='stateName'" scope="{row}">
|
|
{{row.state.stateName}}
|
|
</template>
|
|
|
|
<template v-else-if="column.prop==='subsidyType'" scope="{row}">
|
|
{{projectInfo.filter(v=>row.subsidyType.includes(v.id)).map(v=>v.projectName).join('、')}}
|
|
</template>
|
|
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="200">
|
|
<template scope="{row}">
|
|
<el-button size="mini" type="primary" @click="openView(row.id)">查看</el-button>
|
|
|
|
<el-button @click="openAudit(row.id)" size="mini" type="primary" v-if="row.stateId===7040">
|
|
审核
|
|
</el-button>
|
|
<el-button @click="revoke(row)" size="mini" type="danger"
|
|
v-if="[7050,7060,7070].includes(row.stateId)">
|
|
撤回
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
|
|
<template #edit>
|
|
<process-info ref="processAudit" v-if="guavaIndex==='edit'">
|
|
<el-tab-pane label="校工会审核" name="schoolAudit">
|
|
<el-form :model="formData" ref="form" label-width="120px">
|
|
<el-descriptions border class="descriptions-form" :column="2">
|
|
<el-descriptions-item label="审核人">
|
|
<el-form-item label-width="0">
|
|
<el-input value="${@shiro.getPrincipalProperty('username')}" readonly></el-input>
|
|
</el-form-item>
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="审核时间">
|
|
<el-form-item label-width="0">
|
|
<el-input :value="moment().format('YYYY-MM-DD')" readonly></el-input>
|
|
</el-form-item>
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="审核意见" :span="2">
|
|
<el-form-item label-width="0" prop="auditOpinion"
|
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
<el-input v-model="formData.auditOpinion" maxlength="500"
|
|
type="textarea"></el-input>
|
|
</el-form-item>
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="补助项目" :span="2">
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="补助金额" :span="2">
|
|
<el-form-item label-width="0" prop="subsidyAmount">
|
|
<el-input-number v-model="formData.subsidyAmount"
|
|
:precision="2"
|
|
type="textarea"></el-input-number>
|
|
<span class="text-danger">(通过此项必填)</span>
|
|
</el-form-item>
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
|
|
<el-row type="flex" justify="end" align="center" style="padding: 20px">
|
|
<el-button @click="$refs.guava.index()">取消</el-button>
|
|
<el-button @click="doRefuse" type="danger">拒绝</el-button>
|
|
<el-button @click="doBack" type="info">退回</el-button>
|
|
<el-button @click="doPass" type="primary">通过</el-button>
|
|
</el-row>
|
|
|
|
</el-form>
|
|
</el-tab-pane>
|
|
</process-info>
|
|
</template>
|
|
|
|
<template #view>
|
|
<process-info ref="processView" v-if="guavaIndex === 'view'"></process-info>
|
|
</template>
|
|
|
|
</guava>
|
|
</div>
|
|
|
|
<script>
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
components: {
|
|
'process-info': httpVueLoader('/components/swufeDifficultSubsidy/processInfo.vue'),
|
|
},
|
|
data() {
|
|
return {
|
|
tableColumns: [
|
|
{prop: 'userName', label: '姓名', sortable: true},
|
|
{prop: 'loginName', label: '工号', sortable: true},
|
|
{prop: 'unitName', label: '部门', sortable: true},
|
|
{prop: 'mobile', label: '联系方式', sortable: true},
|
|
{prop: 'subsidyType', label: '补助类别', sortable: true},
|
|
{prop: 'applyDate', label: '申请日期', sortable: true},
|
|
{prop: 'stateName', label: '申请状态', sortable: true},
|
|
],
|
|
pageForm: {
|
|
isAudit: -1
|
|
},
|
|
projectInfo: [],
|
|
unions: [],
|
|
units: [],
|
|
}
|
|
},
|
|
methods: {
|
|
openView(id) {
|
|
this.$refs.guava.view()
|
|
this.$nextTick(async () => {
|
|
await httpVueLoader('/components/swufeDifficultSubsidy/processInfo.vue')()
|
|
this.$refs.processView.getApplyInfo(id)
|
|
})
|
|
},
|
|
|
|
openAudit(id) {
|
|
this.$set(this.formData, 'id', id)
|
|
this.$set(this.formData, 'auditOpinion', null)
|
|
|
|
this.getDiseaseDetail(id)
|
|
|
|
this.$refs.guava.edit()
|
|
this.$nextTick(async () => {
|
|
await httpVueLoader('/components/swufeDifficultSubsidy/processInfo.vue')()
|
|
this.$refs.processAudit.getApplyInfo(id)
|
|
this.$refs.processAudit.tabActive = 'schoolAudit'
|
|
})
|
|
},
|
|
validateForm() {
|
|
return new Promise(resolve => {
|
|
this.$refs.form.validate(valid => {
|
|
resolve(valid)
|
|
})
|
|
})
|
|
},
|
|
|
|
async revoke({id}) {
|
|
this.$confirm('您确定要撤销吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const resp = await $.post(loc() + '/revoke', {id})
|
|
if (resp.code === 0) {
|
|
this.doSearch()
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
})
|
|
},
|
|
async doRefuse() {
|
|
const valid = await this.validateForm()
|
|
if (!valid) return
|
|
|
|
this.$confirm('您确定要拒绝吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const resp = await $.post(loc() + '/refuse', this.formData)
|
|
if (resp.code === 0) {
|
|
this.$refs.guava.index()
|
|
this.doSearch()
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
})
|
|
},
|
|
async doBack() {
|
|
const valid = await this.validateForm()
|
|
if (!valid) return
|
|
|
|
this.$confirm('您确定要退回吗?退回后申请人可修改重新提交!', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const resp = await $.post(loc() + '/back', this.formData)
|
|
if (resp.code === 0) {
|
|
this.$refs.guava.index()
|
|
this.doSearch()
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
})
|
|
},
|
|
doPass() {
|
|
if (this.formData.subsidyAmount == null) {
|
|
this.$message.warning('请填写补助金额')
|
|
return
|
|
}
|
|
|
|
this.$confirm('您确定通过吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const resp = await $.post(loc() + '/pass', this.formData)
|
|
if (resp.code === 0) {
|
|
this.$refs.guava.index()
|
|
this.doSearch()
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
})
|
|
},
|
|
async getProjectInfo() {
|
|
const resp = await $.post('/platform/difficultSubsidy/common/projectInfo')
|
|
if (resp.code === 0) {
|
|
this.projectInfo = resp.data
|
|
}
|
|
},
|
|
async getDiseaseDetail(id) {
|
|
const resp = await $.post(loc() + '/getDiseaseDetail', {id})
|
|
if (resp.code === 0) {
|
|
this.diseaseDetail = resp.data
|
|
}
|
|
},
|
|
|
|
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", null)
|
|
this.units = []
|
|
if (this.pageForm.unionId) {
|
|
this.units = await getUnits(this.pageForm.unionId)
|
|
}
|
|
},
|
|
|
|
},
|
|
async created() {
|
|
this.unions = await getUnions(null, false)
|
|
this.getProjectInfo()
|
|
this.pageData()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
|
|
<!--#
|
|
}
|
|
#--> |