312 lines
14 KiB
HTML
312 lines
14 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" class="platform" 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"
|
|
type="year"
|
|
placeholder="选择年度"
|
|
value-format="yyyy"
|
|
style="width: 100%">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">职工信息:</div>
|
|
<div class="search-item-option">
|
|
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
|
style="width: 100%"
|
|
@keyup.enter.native="doSearch">
|
|
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
|
style="width: 120px;">
|
|
<el-option label="上报人姓名" value="u.username"></el-option>
|
|
<el-option label="上报人工号" value="u.loginname"></el-option>
|
|
</el-select>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item"
|
|
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('wyh02')}">
|
|
<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 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 v-model="pageForm.isAudit" @change="doSearch" size="small">
|
|
<el-radio-button :label="1">全部</el-radio-button>
|
|
<el-radio-button :label="2">已审核</el-radio-button>
|
|
<el-radio-button :label="3">未审核</el-radio-button>
|
|
</el-radio-group>
|
|
</template>
|
|
</table-tool>
|
|
|
|
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
|
v-loading="tableLoading" ref="table"
|
|
:size="tableSize" class="vi-table">
|
|
|
|
<el-table-column align="center" header-align="center" width="80px" label="序号" type="index">
|
|
<template scope="scope">
|
|
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span></template>
|
|
</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"
|
|
>
|
|
<!-- <template v-if="column.prop=='shjg'" scope="{row:{shjg}}">-->
|
|
<!-- <el-tag v-if="shjg=='1'" type="warning">待基层工会审核</el-tag>-->
|
|
<!-- <el-tag v-if="shjg=='2'" type="danger">基层工会驳回</el-tag>-->
|
|
<!-- <el-tag v-if="shjg=='3'" type="warning">待校工会审核</el-tag>-->
|
|
<!-- <el-tag v-if="shjg=='4'" type="danger">校工会驳回</el-tag>-->
|
|
<!-- <el-tag v-if="shjg=='5'" type="success">校工会通过</el-tag>-->
|
|
<!-- </template>-->
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
|
|
width="100px">
|
|
<template scope="scope">
|
|
<el-dropdown @command="dropdownCommand">
|
|
<el-button plain size="mini">
|
|
<i class="ti-settings"></i>
|
|
<span class="ti-angle-down"></span>
|
|
</el-button>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
|
查看
|
|
</el-dropdown-item>
|
|
<el-dropdown-item :command="{type:'Review',data:scope.row}"
|
|
:disabled="![200,300].includes(scope.row.state)">
|
|
审核
|
|
</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
|
|
</el-card>
|
|
</template>
|
|
|
|
<template #edit>
|
|
<info ref="info2" handle label="基层工会审核">
|
|
<template #handle>
|
|
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
|
style="padding: 20px 0"
|
|
label-width="120px">
|
|
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
|
</el-form-item>
|
|
|
|
|
|
<el-row gutter="20">
|
|
<el-col :span="12">
|
|
<el-form-item prop="fghshr" label="审核人员">
|
|
<el-input v-model="formData.fghshr"
|
|
disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item prop="fghshsj" label="审核时间">
|
|
<el-input v-model="formData.fghshsj" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item prop="fghshyj" label="审核意见">
|
|
<el-input type="textarea" v-model="formData.fghshyj" rows="4" maxlength="500"
|
|
placeholder="请填写您的审核意见"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
</el-form>
|
|
<div style="float: right;margin: 20px 0">
|
|
<el-button @click="doAudit(0)" v-throttle type="danger">
|
|
拒绝
|
|
</el-button>
|
|
<el-button @click="doAudit(-1)" v-throttle type="warning">
|
|
退回修改
|
|
</el-button>
|
|
<el-button type="primary" @click="doAudit(1)" v-throttle>
|
|
通过
|
|
</el-button>
|
|
</div>
|
|
</template>
|
|
</info>
|
|
|
|
</template>
|
|
|
|
<template #view>
|
|
<info ref="info"></info>
|
|
</template>
|
|
</guava>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
subDis: false,
|
|
subLoading1: false,
|
|
subLoading2: false,
|
|
addDialogVisible: false,
|
|
unions: [],
|
|
units: [],
|
|
pageForm: {
|
|
isAudit: 3,
|
|
searchName: "u.username",
|
|
year: new Date().getFullYear().toString()
|
|
},
|
|
tableColumns: [
|
|
{prop: 'loginname', label: '上报人工号'},
|
|
{prop: 'username', label: '上报人'},
|
|
{prop: 'sqsj', label: '申请时间'},
|
|
{prop: 'name', label: '子女姓名'},
|
|
{prop: 'sex', label: '子女性别', sortable: true},
|
|
{prop: 'cssj', label: '出生时间', sortable: true},
|
|
{prop: 'unitname', label: '所在单位', sortable: true},
|
|
{prop: 'unionname', label: '所在工会', sortable: true},
|
|
// {prop: 'shjg', label: '审核结果', sortable: true},
|
|
{prop: 'stateName', label: '审核状态', sortable: true},
|
|
],
|
|
formRules: {
|
|
fghshyj: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
},
|
|
}
|
|
},
|
|
components: {
|
|
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
|
'info': httpVueLoader('/components/singleChild/info.vue'),
|
|
},
|
|
methods: {
|
|
async doAudit(val) {
|
|
const confirm = await this.$refs["form"].validate()
|
|
if (!confirm) return
|
|
const params = {
|
|
...this.formData,
|
|
result: val
|
|
}
|
|
const resp = await $.post(loc() + "/doReview", params)
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.pageData()
|
|
this.$refs.guava.index()
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
},
|
|
dropdownCommand(command) {
|
|
const {type, data} = command
|
|
if (type == 'view') {
|
|
this.openView(data.id)
|
|
} else if (type == 'Review') {
|
|
this.openReview(data.id)
|
|
}
|
|
},
|
|
openView(id) {
|
|
this.$refs.info.getInfo(id)
|
|
this.$refs.guava.view()
|
|
},
|
|
openReview(id) {
|
|
this.formData = {
|
|
id,
|
|
fghshr: "${@shiro.getPrincipalProperty('username')}",
|
|
fghshsj: moment().format('YYYY-MM-DD'),
|
|
}
|
|
this.$refs.info2.getInfo(id)
|
|
this.$refs.guava.edit()
|
|
if (this.$refs['form']) {
|
|
this.$refs['form'].resetFields()
|
|
}
|
|
},
|
|
async doReview(flag) {
|
|
this.$refs["form"].validate(async (valid) => {
|
|
if (valid) {
|
|
this.formData.pass = flag
|
|
|
|
this.subDis = true
|
|
flag ? this.subLoading2 = true : this.subLoading1 = true
|
|
|
|
const resp = await $.post(loc() + "/doReview", this.formData)
|
|
this.subDis = false
|
|
this.subLoading1 = false
|
|
this.subLoading2 = false
|
|
if(resp.code===0){
|
|
this.pageData()
|
|
this.$refs.guava.index()
|
|
}else{
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
})
|
|
},
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", "")
|
|
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}||@shiro.hasRole('wyh02')}" === '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()
|
|
this.flushUnits()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|