first commit
This commit is contained in:
@@ -0,0 +1,279 @@
|
||||
<!--#
|
||||
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"
|
||||
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" 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-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">
|
||||
<el-radio-group v-model="pageForm.honorType" @change="doSearch">
|
||||
<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>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
|
||||
<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>
|
||||
|
||||
<honor-apply-table :loading="tableLoading" :page="pageForm" :data="tableData"
|
||||
ref="hat"
|
||||
@order="pageOrder">
|
||||
|
||||
<template #vi-title>
|
||||
<vi-title title="申请列表"></vi-title>
|
||||
</template>
|
||||
|
||||
|
||||
<template #column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" @click="openEdit(row)" type="primary" :disabled="row.stateId>1700">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
<template #pagination>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</template>
|
||||
|
||||
|
||||
</honor-apply-table>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<honor-info ref="info2" :handle="true" label="院级党组织审核" :panes="[4]">
|
||||
<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="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="opinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通
|
||||
过
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</honor-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<honor-info ref="info"></honor-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
units: [],
|
||||
unions: [],
|
||||
honorLevelList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'honor-apply-table': httpVueLoader('/components/honor/honorApplyTable.vue'),
|
||||
'honor-info': httpVueLoader('/components/honor/honorInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
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.pageData()
|
||||
this.getHonorNum()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(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 honorNum = await HonorApi.getHonorNum(1700)
|
||||
this.honorTypeList.map(v => {
|
||||
if (v.code === "H1100") {
|
||||
v.num = honorNum.gr
|
||||
} else {
|
||||
v.num = honorNum.jt
|
||||
}
|
||||
})
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,282 @@
|
||||
<!--#
|
||||
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"
|
||||
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" 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-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">
|
||||
<el-radio-group v-model="pageForm.honorType" @change="doSearch">
|
||||
<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>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
|
||||
<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>
|
||||
|
||||
<honor-apply-table :loading="tableLoading" :page="pageForm" :data="tableData"
|
||||
ref="hat"
|
||||
@order="pageOrder">
|
||||
|
||||
<template #vi-title>
|
||||
<vi-title title="申请列表"></vi-title>
|
||||
</template>
|
||||
|
||||
|
||||
<template #column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" @click="openEdit(row)" type="primary" :disabled="row.stateId>1800">
|
||||
审核
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
<template #pagination>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</template>
|
||||
|
||||
|
||||
</honor-apply-table>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<honor-info ref="info2" :handle="true" label="校工会审核" :panes="[5]">
|
||||
<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="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="opinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通
|
||||
过
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</honor-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<honor-info ref="info"></honor-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
units: [],
|
||||
unions: [],
|
||||
honorLevelList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'honor-apply-table': httpVueLoader('/components/honor/honorApplyTable.vue'),
|
||||
'honor-info': httpVueLoader('/components/honor/honorInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
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.pageData()
|
||||
this.getHonorNum()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(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 honorNum = await HonorApi.getHonorNum(1800)
|
||||
this.honorTypeList.map(v => {
|
||||
if (v.code === "H1100") {
|
||||
v.num = honorNum.gr
|
||||
} else {
|
||||
v.num = honorNum.jt
|
||||
}
|
||||
})
|
||||
this.$forceUpdate();
|
||||
}
|
||||
|
||||
},
|
||||
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)
|
||||
}
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,280 @@
|
||||
<!--#
|
||||
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"
|
||||
value-format="yyyy"
|
||||
placeholder="年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select v-model="pageForm.honorLevel" placeholder="请选择级别" style="width: 100%"
|
||||
@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" 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-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
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">
|
||||
<el-radio-group v-model="pageForm.honorType" @change="doSearch">
|
||||
<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>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
|
||||
<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>
|
||||
|
||||
<honor-apply-table :loading="tableLoading" :page="pageForm" :data="tableData"
|
||||
ref="hat"
|
||||
@order="pageOrder">
|
||||
|
||||
<template #vi-title>
|
||||
<vi-title title="申请列表"></vi-title>
|
||||
</template>
|
||||
|
||||
|
||||
<template #column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" @click="openEdit(row)" type="primary" :disabled="row.stateId>1600">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
<template #pagination>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</template>
|
||||
|
||||
|
||||
</honor-apply-table>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<honor-info ref="info2" :handle="true" label="院级工会审核" :panes="[3]">
|
||||
<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="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="opinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通
|
||||
过
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</honor-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<honor-info ref="info"></honor-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
units: [],
|
||||
unions: [],
|
||||
honorLevelList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'honor-apply-table': httpVueLoader('/components/honor/honorApplyTable.vue'),
|
||||
'honor-info': httpVueLoader('/components/honor/honorInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
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.pageData()
|
||||
this.getHonorNum()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(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')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async getHonorNum() {
|
||||
const honorNum = await HonorApi.getHonorNum(1600)
|
||||
this.honorTypeList.map(v => {
|
||||
if (v.code === "H1100") {
|
||||
v.num = honorNum.gr
|
||||
} else {
|
||||
v.num = honorNum.jt
|
||||
}
|
||||
})
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,235 @@
|
||||
<!--#
|
||||
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"
|
||||
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" 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 mt5">
|
||||
|
||||
<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>
|
||||
|
||||
<honor-apply-table :loading="tableLoading" :page="pageForm" :data="tableData"
|
||||
ref="hat"
|
||||
@order="pageOrder">
|
||||
|
||||
<template #vi-title>
|
||||
<vi-title title="申请列表"></vi-title>
|
||||
</template>
|
||||
|
||||
|
||||
<template #column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" @click="openEdit(row)" type="primary" :disabled="row.stateId!=1500">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
<template #pagination>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</template>
|
||||
|
||||
|
||||
</honor-apply-table>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<honor-info ref="info2" :handle="true" label="单位审核" :panes="[2]">
|
||||
<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="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="opinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通
|
||||
过
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</honor-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<honor-info ref="info"></honor-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
units: [],
|
||||
unions: [],
|
||||
honorLevelList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'honor-apply-table': httpVueLoader('/components/honor/honorApplyTable.vue'),
|
||||
'honor-info': httpVueLoader('/components/honor/honorInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
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.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(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 created() {
|
||||
this.honorLevelList = await HonorApi.getHonorLevel()
|
||||
const honorTypeList = await HonorApi.getHonorType()
|
||||
|
||||
if (honorTypeList) {
|
||||
this.honorTypeList = honorTypeList.filter(v => v.code === "H1100")
|
||||
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user