first commit
This commit is contained in:
@@ -0,0 +1,277 @@
|
||||
<!--#
|
||||
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-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===7010">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button @click="revoke(row)" size="mini" type="danger"
|
||||
v-if="[7020,7030,7040].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="branchUnionAudit">
|
||||
<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="审核意见">
|
||||
<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>
|
||||
|
||||
<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: []
|
||||
}
|
||||
},
|
||||
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.$refs.guava.edit()
|
||||
this.$nextTick(async () => {
|
||||
await httpVueLoader('/components/swufeDifficultSubsidy/processInfo.vue')()
|
||||
this.$refs.processAudit.getApplyInfo(id)
|
||||
this.$refs.processAudit.tabActive = 'branchUnionAudit'
|
||||
})
|
||||
},
|
||||
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() {
|
||||
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
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getProjectInfo()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user