243 lines
11 KiB
HTML
243 lines
11 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<template>
|
|
<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
|
|
v-model="pageForm.year"
|
|
value-format="yyyy"
|
|
formData="yyyy"
|
|
type="year"
|
|
@change="doSearch"
|
|
style="width: 100%"
|
|
placeholder="请选择年度">
|
|
</el-date-picker>
|
|
</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="doSearch"
|
|
filterable="true">
|
|
<el-option v-for="item in unions" :label="item.unionname"
|
|
:value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="search-query">
|
|
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
|
|
<el-card shadow="never" class="mt10">
|
|
<table-tool label="审核列表" :app="this">
|
|
<template #func>
|
|
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
|
<el-radio-button :label="null">全部</el-radio-button>
|
|
<el-radio-button :label="true">已审核</el-radio-button>
|
|
<el-radio-button :label="false">未审核</el-radio-button>
|
|
</el-radio-group>
|
|
</template>
|
|
</table-tool>
|
|
|
|
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
|
@sort-change="pageOrder"
|
|
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
|
<el-table-column align="center" header-align="center" type="index"
|
|
:index="indexMethod" label="序号"
|
|
width="80px"></el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
header-align="center"
|
|
v-for="column in tableColumns"
|
|
show-overflow-tooltip
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
|
<template scope="{row}">
|
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
|
<el-button @click="openAudit(row)" v-if="[8120].includes(row.state) || !row.state" size="mini" type="primary">审核</el-button>
|
|
<el-button @click="doRollBack(row.id)" v-if="[8125,8130].includes(row.state) || !row.state" size="mini" type="danger">撤回</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</template>
|
|
|
|
<template #view>
|
|
<wakes-info ref="viewInfo"></wakes-info>
|
|
</template>
|
|
|
|
<template #edit>
|
|
<wakes-info ref="auditInfo">
|
|
<template #handle>
|
|
<el-tab-pane label="校工会审核" name="schoolAudit">
|
|
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
|
style="padding: 20px 0"
|
|
label-width="120px">
|
|
<el-row gutter="20">
|
|
<el-col :span="12">
|
|
<el-form-item prop="username" label="审核人员">
|
|
<el-input value="${@shiro.getPrincipalProperty('username')}"
|
|
disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item prop="time" label="审核时间">
|
|
<el-input v-model="formData.auditTime" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<el-form-item prop="auditOpinion" label="审核意见">
|
|
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
|
placeholder="请填写您的审核意见"></el-input>
|
|
</el-form-item>
|
|
|
|
<!-- <el-form-item prop="auditSign" label="审核签字">-->
|
|
<!-- <sign :qz.sync="formData.auditSign"></sign>-->
|
|
<!-- </el-form-item>-->
|
|
</el-form>
|
|
|
|
<div style="float: right;margin: 20px 0">
|
|
<el-button type="danger" @click="doReview(0)">
|
|
拒绝
|
|
</el-button>
|
|
<el-button type="primary" @click="doReview(1)">
|
|
通过
|
|
</el-button>
|
|
</div>
|
|
</el-tab-pane>
|
|
</template>
|
|
</wakes-info>
|
|
</template>
|
|
</guava>
|
|
</div>
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el:'#app',
|
|
mixins:[initTableMixins],
|
|
data(){
|
|
return{
|
|
id:'',
|
|
unions:[],
|
|
pageForm:{
|
|
isAudit:false,
|
|
year: moment().format('YYYY'),
|
|
},
|
|
tableColumns: [
|
|
{prop: 'unionName', label: '申报工会', sortable: true},
|
|
{prop: 'username', label: '申报人', sortable: true},
|
|
{prop: 'mobile', label: '联系方式', sortable: true},
|
|
{prop: 'position', label: '地址', sortable: true},
|
|
{prop: 'area', label: '面积', sortable: true},
|
|
{prop: 'foundTime', label: '创立时间', sortable: true},
|
|
{prop: 'applyTime', label: '申报日期', sortable: true},
|
|
{prop: 'stateName', label: '状态', sortable: true},
|
|
],
|
|
formRules: {
|
|
// auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
},
|
|
}
|
|
},
|
|
components: {
|
|
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
|
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
|
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
|
},
|
|
methods:{
|
|
doReview(row){
|
|
this.$refs['form'].validate(valid => {
|
|
if (valid) {
|
|
this.$confirm('您确定要提交吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const {code, msg} = await $.post(loc() + '/doAudit', {
|
|
audit: JSON.stringify(this.formData),
|
|
id: this.id,
|
|
isPass: row,
|
|
})
|
|
if (code === 0) {
|
|
this.pageData()
|
|
this.notifySuccess(msg)
|
|
this.$refs.guava.index()
|
|
} else {
|
|
this.notifyWarning(msg)
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
openView(row){
|
|
this.$refs.guava.view()
|
|
this.$refs.viewInfo.openView(row.id)
|
|
},
|
|
openAudit(row){
|
|
this.formData={}
|
|
this.id = row.id
|
|
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
|
this.$refs.guava.edit()
|
|
this.$refs.auditInfo.activeName = 'schoolAudit'
|
|
this.$refs.auditInfo.openView(row.id)
|
|
},
|
|
async doRollBack(id){
|
|
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if ("confirm" === confirm) {
|
|
const resp = await $.get(loc() + '/doRollBack',{id:id})
|
|
if (resp.code === 0){
|
|
this.pageData();
|
|
this.notifySuccess(resp.msg)
|
|
}else {
|
|
this.notifyError(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", null)
|
|
this.units = []
|
|
if (this.pageForm.unionId) {
|
|
this.units = await getUnits(this.pageForm.unionId)
|
|
}
|
|
},
|
|
},
|
|
async created(){
|
|
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
|
this.unions = await getUnions(null, false)
|
|
} else {
|
|
this.unions = await getUnions(null, true)
|
|
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
|
this.flushUnits()
|
|
}
|
|
this.unions.unshift({id:'校工会',unionname:'校工会'})
|
|
this.pageData();
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|