Files
UNION_NSI/target/classes/views/platform/evaluate/audit/school.html
T
2026-09-08 19:49:21 +08:00

492 lines
24 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="btn-group tool-button">
<div class="block">
<el-date-picker
style="width: 100px"
v-model="pageForm.year"
type="year" @change="getEvaluateByYear()"
value-format="yyyy"
placeholder="年度">
</el-date-picker>
</div>
</div>
<div class="btn-group tool-button">
<el-select placeholder="评优评先名称" v-model="pageForm.evaluateId"
style="width: 100%;"
clearable="true" filterable="true">
<el-option v-for="item in evaluateList" :label="item.evaluateName"
:value="item.evaluateId"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" clearable>
<el-select v-model="pageForm.searchName" slot="prepend"
placeholder="查询类型"
style="width: 100px;">
<el-option label="工号" value="us.loginname"></el-option>
<el-option label="姓名" value="us.username"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button" v-if="pageForm.honorType=== HonorApi.honor_single_id">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
filterable>
<el-option v-for="item in unions" :label="item.unionname"
:value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button" v-if="pageForm.honorType=== HonorApi.honor_single_id">
<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>
<!-- v-if="pageForm.honorType !== HonorApi.honor_single_id"-->
<div class="btn-group tool-button">
<el-select placeholder="请选择申报协会" v-model="pageForm.clubId"
style="width: 100%;"
clearable
filterable>
<el-option v-for="item in clubs"
:label="item.name"
:value="item.stid"></el-option>
</el-select>
</div>
<!-- <div class="btn-group tool-button">-->
<!-- <el-radio-group v-model="pageForm.honorType" @change="(o) => {radioChange(o)}">-->
<!-- <el-radio-button v-for="v in honorTypeList" :label="v.id">-->
<!-- {{v.name}}{{v.num}}-->
<!-- </el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </div>-->
<div class="btn-group tool-button">
<el-button type="primary" @click="doSearch" icon="el-icon-search"></el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<vi-title2 title="申请列表">
<template #func>
<!-- <el-button @click="exportTableData" type="primary" size="small">导出汇总表-->
<!-- </el-button>-->
<!-- <el-button @click="exportFiles" type="primary" size="small">一键导出附件-->
<!-- </el-button>-->
<el-radio-group v-model="pageForm.isAudit" @change="doSearch" size="small"
class="ml10">
<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>
</vi-title2>
<el-table :data="tableData" ref="multipleTable"
@selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55"></el-table-column>-->
<el-table-column align="center" header-align="center" label="序号" type="index"
width="80px"></el-table-column>
<el-table-column align="center" header-align="center" label="评优评先名称"
prop="evaluateName"
show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="申请类型"
prop="honorName"
show-overflow-tooltip></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
show-overflow-tooltip>
<template v-if="column.prop=='unionClub'" scope="{row}">
{{row.pxxmlx===1?row.unionName:row.clubName}}
</template>
</el-table-column>
<!-- <template v-if="pageForm.honorType !== HonorApi.honor_single_id">-->
<!-- <el-table-column align="center" header-align="center" label="工会/协会"-->
<!-- prop="applyTime"-->
<!-- show-overflow-tooltip>-->
<!-- <template slot-scope="{row}">-->
<!-- <template v-if="row.pxxmlx===1">-->
<!-- {{row.applyUnionName}}-->
<!-- </template>-->
<!-- <template v-if="row.pxxmlx===2">-->
<!-- {{row.clubName}}-->
<!-- </template>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" header-align="center" label="工会主席/协会会长"-->
<!-- prop="applyTime"-->
<!-- show-overflow-tooltip>-->
<!-- <template slot-scope="{row}">-->
<!-- <template v-if="row.pxxmlx===1">-->
<!-- {{row.unionLeader}}-->
<!-- </template>-->
<!-- <template v-if="row.pxxmlx===2">-->
<!-- {{row.clubLeader}}-->
<!-- </template>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" header-align="center" label="会员人数"-->
<!-- prop="applyTime"-->
<!-- show-overflow-tooltip>-->
<!-- <template slot-scope="{row}">-->
<!-- <template v-if="row.pxxmlx===1">-->
<!-- {{row.memberNumber}}-->
<!-- </template>-->
<!-- <template v-if="row.pxxmlx===2">-->
<!-- {{row.clubNumber}}-->
<!-- </template>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </template>-->
<!-- <el-table-column align="center" header-align="center" label="评选项目类型"-->
<!-- prop="applyTime"-->
<!-- show-overflow-tooltip>-->
<!-- <template slot-scope="{row}">-->
<!-- {{row.pxxmlx===1?'工会':'协会'}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="申请时间" prop="applyTime" sortable header-align="center"
align="center"></el-table-column>
<el-table-column align="center" header-align="center" label="审核状态" prop="year"
show-overflow-tooltip>
<template slot-scope="{row}">
<span :style="'color: ' + row.stateColor">{{row.stateName}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="220px">
<template scope="{row}">
<el-button size="mini" @click="openView(row)" type="primary">
查看
</el-button>
<el-button size="mini" @click="rollback(row)" type="danger"
v-if="pageForm.isAudit === true && row.stateId <= 1850">
撤回
</el-button>
<el-button size="mini" @click="openEdit(row)" type="primary"
v-if="row.stateId == 1800">
审核
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<evaluate-info ref="info2" :handle="true" label="校工会审核" :panes="[2, 3, 4, 5]">
<template #handle>
<vi-title title="审核信息"></vi-title>
<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 v-model="formData.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="签&emsp;&emsp;字">
<sign :qz.sync="formData.auditSign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="doReview(false)">
拒绝
</el-button>
<!-- <el-button type="danger" @click="returnBack()">退-->
<!-- 回-->
<!-- </el-button>-->
<el-button type="primary" @click="doReview(true)">
通过
</el-button>
</div>
</template>
</evaluate-info>
</template>
<template #view>
<evaluate-info ref="info"></evaluate-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
clubs: [],
units: [],
unions: [],
honorLevelList: [],
evaluateList: [],
honorTypeList: [],
pageForm: {
year: new Date().getFullYear() + "",
isAudit: false,
searchName: 'us.username',
honorType: '',
honorLevel: ''
},
rowData: {},
tableColumns: [
{prop: 'username', label: '申请人姓名', sortable: true},
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'userSex', label: '性别', sortable: true},
{prop: 'unitName', label: '单位', sortable: true},
{prop: 'unionName', label: '分工会', sortable: true},
{prop: 'clubName', label: '协会', sortable: true},
// {prop: 'political', label: '政治面貌', sortable: true},
// {prop: 'joinTime', label: '加入工会时间', sortable: true},
// {prop: 'position', label: '担任职务'},
// {prop: 'unionClub', label: '工会/协会'},
],
multipleSelection: [],
formRules: {
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
}
}
},
components: {
'evaluate-info': httpVueLoader('/components/evaluate/evaluateInfo.vue?v=1.0.0'),
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = val;
},
exportFiles() {
if (this.multipleSelection.length === 0) {
this.$notify.warning({title: '提示', message: '请在左侧多选框中选择再进行此操作!'});
return
}
const ids = this.multipleSelection.map(o => o.id)
window.location.href = "/platform/evaluate/audit/school/downloadAnnex?ids=" + JSON.stringify(ids)
},
exportTableData() {
this.pageForm.honorTypeBoolean = this.pageForm.honorType === HonorApi.honor_single_id
window.location.href = "/platform/evaluate/audit/school/exportTableData?data=" + JSON.stringify(this.pageForm)
},
rollback(row) {
this.$confirm('确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
const resp = await $.post('/platform/evaluate/audit/school/rollback', {
id: row.id,
type: row.honorTypeId === HonorApi.honor_single_id,
})
if (resp.code === 0) {
this.$message.success(resp.msg)
await this.getHonorNum()
this.pageData()
} else {
this.$message.warning(resp.msg)
}
}
}
});
},
returnBack() {
this.formData.id = this.rowData.id
this.formData.type = this.rowData.honorTypeId === HonorApi.honor_single_id
this.formData.userId = this.rowData.userId
this.$confirm('确定要退回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
const resp = await $.post('/platform/evaluate/audit/school/returnBack', this.formData)
if (resp.code === 0) {
this.$message.success(resp.msg)
await this.getHonorNum()
this.pageData()
this.$refs.guava.index()
} else {
this.$message.warning(resp.msg)
}
}
}
});
},
radioChange(o) {
if (this.pageForm.honorType == HonorApi.honor_single_id) {
this.tableColumns = [
{prop: 'username', label: '申请人姓名', sortable: true},
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'userSex', label: '性别', sortable: true},
{prop: 'unitName', label: '单位', sortable: true},
{prop: 'unionName', label: '工会', sortable: true},
// {prop: 'joinTime', label: '加入工会时间', sortable: true},
{prop: 'position', label: '担任职务'},
]
} else {
this.tableColumns = [
/* {prop: 'evaluateName', label: '评优评先名称', sortable: true},
{prop: 'applyUnionName', label: '申报院级工会', sortable: true},
{prop: 'unionLeader', label: '工会主席', sortable: true},
{prop: 'memberNumber', label: '会员人数', sortable: true},
{prop: 'unionGroupNumber', label: '工会小组数', sortable: true},*/
]
}
this.doSearch()
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'edit') {
this.openEdit(data)
}
},
async doReview(flag) {
if (!this.formData.auditSign) {
this.$message.warning("请填写签字!")
return
}
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.pass = flag
const resp = await $.post(loc() + "/doReview", this.formData)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
this.getHonorNum()
this.$refs.guava.index()
} else {
this.notifyWarning(resp.msg)
}
}
})
},
openView(data) {
this.$refs.info.getInfo(data.id)
this.$refs.guava.view()
},
openEdit(data) {
this.rowData = data
this.formData = {
id: data.id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.info2.getInfo(data.id)
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
async getHonorNum() {
const evaluateNum = await HonorApi.getEvaluateNum(1800)
this.honorTypeList.map(v => {
if (v.code === "H1100") {
v.num = evaluateNum.gr
} else {
v.num = evaluateNum.jt
}
})
this.$forceUpdate();
},
async getEvaluateByYear() {
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
this.evaluateList = data
},
},
async created() {
this.honorLevelList = await HonorApi.getHonorLevel()
this.honorTypeList = await HonorApi.getHonorType()
if (this.honorTypeList) {
await this.getHonorNum()
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
}
await this.getEvaluateByYear()
this.unions = await getUnions(null)
this.clubs = await getClubsByRole()
this.flushUnits()
this.pageData()
}
})
</script>
<!--#
}
#-->