first commit
This commit is contained in:
@@ -0,0 +1,360 @@
|
||||
<!--#
|
||||
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
|
||||
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 v-model="pageForm.honorLevel" placeholder="请选择级别" style="width: 200px"
|
||||
@change="doSearch"
|
||||
clearable>
|
||||
<el-option v-for="o in honorLevelList"
|
||||
:key="o.id"
|
||||
:label="o.name"
|
||||
:value="o.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
||||
</div>-->
|
||||
<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-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-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<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 class="btn-group tool-button" v-if="pageForm.honorType=='101'">
|
||||
<div>
|
||||
<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>
|
||||
<div class="btn-group tool-button">
|
||||
<el-radio-group v-model="pageForm.honorType" @change="doSearch">
|
||||
<el-radio-button v-for="v in honorTypeList" :label="v.id">{{v.name}}</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>
|
||||
<div class="pull-right offscreen-right">
|
||||
|
||||
<el-radio-group v-model="pageForm.isAudit" @change="doSearch">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
|
||||
<vi-title2 title="申请列表"></vi-title2>
|
||||
|
||||
<el-table :data="tableData">
|
||||
<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" label="申请人姓名" prop="userName"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号" prop="loginname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="性别" prop="userSex"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="单位" prop="unitName"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="协会" prop="clubName"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column align="center" header-align="center" label="加入工会时间" prop="joinTime"
|
||||
show-overflow-tooltip></el-table-column>-->
|
||||
<!-- <el-table-column align="center" header-align="center" label="担任职务" prop="position"-->
|
||||
<!-- show-overflow-tooltip></el-table-column>-->
|
||||
<el-table-column align="center" header-align="center" label="申请时间" prop="applyTime"
|
||||
show-overflow-tooltip></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 <= 1800">
|
||||
撤回
|
||||
</el-button>
|
||||
<el-button size="mini" @click="openEdit(row)" type="primary" v-if="row.stateId==1450">
|
||||
审核
|
||||
</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]">
|
||||
<template #handle>
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
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="签  字">
|
||||
<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: [],
|
||||
evaluateList: [],
|
||||
honorLevelList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
// year: new Date().getFullYear() + "",
|
||||
year: "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
},
|
||||
rowData: {},
|
||||
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: {
|
||||
async getEvaluateByYear() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
|
||||
this.evaluateList = data
|
||||
},
|
||||
rollback(row) {
|
||||
this.$confirm('确定要撤回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/unit/rollback', {
|
||||
id: row.id,
|
||||
type: row.honorTypeId === HonorApi.honor_single_id,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
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/unit/returnBack', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
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.$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 created() {
|
||||
await this.getEvaluateByYear()
|
||||
this.honorLevelList = await HonorApi.getHonorLevel()
|
||||
const honorTypeList = await HonorApi.getHonorType()
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.clubs = await getClubsByRole()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user