390 lines
18 KiB
HTML
390 lines
18 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-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
|
style="width: 100%"
|
|
v-model="pageForm.searchKeyword">
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">所属工会:</div>
|
|
<div class="search-item-option">
|
|
<el-select @change="flushUnits" @clear="flushUnits"
|
|
clearable="true"
|
|
filterable="true"
|
|
placeholder="所属工会" style="width: 100%;"
|
|
v-model="pageForm.unionId">
|
|
<el-option :label="item.unionname" :value="item.id"
|
|
v-for="item in unions"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">所属单位:</div>
|
|
<div class="search-item-option">
|
|
<el-select @change="getThreeUnits" clearable="true"
|
|
filterable="true"
|
|
placeholder="所属单位"
|
|
style="width: 100%;"
|
|
v-model="pageForm.unitId">
|
|
<el-option :label="item.name" :value="item.id"
|
|
v-for="item in units"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
<template v-if="searchMore">
|
|
<template v-if="isThreeUnit">
|
|
<div class="search-item">
|
|
<div class="search-item-label">工会小组:</div>
|
|
<div class="search-item-option">
|
|
<el-select @change="getThreeUnits" clearable
|
|
filterable
|
|
placeholder="请选择"
|
|
style="width: 100%"
|
|
v-model="pageForm.unionGroupId">
|
|
<el-option
|
|
:key="item.id"
|
|
:label="item.groupName"
|
|
:value="item.id"
|
|
v-for="item in unionGroups">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">组成科室:</div>
|
|
<div class="search-item-option">
|
|
<el-select clearable filterable
|
|
placeholder="请选择"
|
|
style="width: 100%"
|
|
v-model="pageForm.threeUnitId">
|
|
<el-option
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:value="item.id"
|
|
v-for="item in threeUnits">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">人员类型:</div>
|
|
<div class="search-item-option">
|
|
<dict-select clearable code="UserType"
|
|
placeholder="人员类型"
|
|
style="width: 100%"
|
|
v-model="pageForm.personType"></dict-select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">在职状态:</div>
|
|
<div class="search-item-option">
|
|
<dict-select clearable code="UserState"
|
|
placeholder="在职状态"
|
|
style="width: 100%"
|
|
v-model="pageForm.userState"></dict-select>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<div class="search-query">
|
|
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
|
</el-button>
|
|
<more v-model="searchMore"></more>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
|
|
<el-card class="mt10" shadow="never">
|
|
<table-tool :app="this" label="申请列表">
|
|
<template #func>
|
|
<el-radio-group @change="doSearch" class="mr10" size="small"
|
|
v-model="pageForm.isJoin">
|
|
<el-radio-button :label="true">加入({{auditNum.joinCount}})
|
|
</el-radio-button>
|
|
<el-radio-button :label="false">退出({{auditNum.exitCount}})
|
|
</el-radio-button>
|
|
</el-radio-group>
|
|
|
|
<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 :data="tableData" :size="tableSize" @sort-change="pageOrder" class="vi-table"
|
|
ref="table"
|
|
row-key="id" style="width: 100%" v-loading="tableLoading">
|
|
<el-table-column :index="indexMethod" align="center" header-align="center"
|
|
label="序号" type="index"
|
|
width="80px"></el-table-column>
|
|
<el-table-column
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
align="center"
|
|
header-align="center"
|
|
show-overflow-tooltip
|
|
v-for="column in tableColumns"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column align="center" fixed="right" header-align="center"
|
|
label="操作" prop="userOnline">
|
|
<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:'audit',data:scope.row}"
|
|
v-if="['8010','8040'].includes(scope.row.singleState)">
|
|
审核
|
|
</el-dropdown-item>
|
|
<el-dropdown-item
|
|
:command="{type:'rollback',data:scope.row}"
|
|
v-if="['8015','8020','8045','8050'].includes(scope.row.singleState)">
|
|
撤回
|
|
</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</template>
|
|
|
|
<template #view>
|
|
<single-info ref="viewInfo"></single-info>
|
|
</template>
|
|
|
|
<template #edit>
|
|
<single-info ref="auditInfo">
|
|
<template #handle>
|
|
<el-tab-pane label="分工会审核" name="unionAudit">
|
|
<el-form :model="formData" :rules="formRules" label-position="right"
|
|
label-width="120px"
|
|
ref="form"
|
|
style="padding: 20px 0">
|
|
<el-row gutter="20">
|
|
<el-col :span="12">
|
|
<el-form-item label="审核人员" prop="username">
|
|
<el-input disabled
|
|
value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="审核时间" prop="time">
|
|
<el-input disabled v-model="formData.auditTime"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<el-form-item label="审核意见" prop="auditOpinion">
|
|
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
|
type="textarea"
|
|
v-model="formData.auditOpinion"></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(0)" type="danger">
|
|
拒绝
|
|
</el-button>
|
|
<el-button @click="doReview(1)" type="primary">
|
|
通过
|
|
</el-button>
|
|
</div>
|
|
</el-tab-pane>
|
|
</template>
|
|
</single-info>
|
|
</template>
|
|
</guava>
|
|
</div>
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
id: '',
|
|
isThreeUnit: false,
|
|
pageForm: {
|
|
isJoin: true,
|
|
isAudit: false,
|
|
},
|
|
tableColumns: [
|
|
{prop: 'loginname', label: '工号', sortable: true},
|
|
{prop: 'username', label: '姓名', sortable: true},
|
|
{prop: 'sex', label: '性别'},
|
|
{prop: 'mobile', label: '联系电话'},
|
|
{prop: 'personType', label: '人员类型', sortable: true, checked: 0},
|
|
{prop: 'userState', label: '在职状态', sortable: true, checked: 0},
|
|
{prop: 'unionName', label: '所属工会', sortable: true},
|
|
{prop: 'unitName', label: '所属单位', sortable: true},
|
|
{prop: 'education', label: '学历'},
|
|
{prop: 'maritalStatus', label: '单身状况'},
|
|
{prop: 'stateName', label: '申请状态'},
|
|
],
|
|
unions: [],
|
|
units: [],
|
|
formRules: {
|
|
// auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
},
|
|
auditNum: {}
|
|
}
|
|
},
|
|
components: {
|
|
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
|
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
|
'single-info': httpVueLoader('/components/singleuser/SingUserInfo.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,
|
|
isJoin: this.pageForm.isJoin
|
|
})
|
|
if (code === 0) {
|
|
this.pageData()
|
|
await this.getAuditNum();
|
|
this.notifySuccess(msg)
|
|
this.$refs.guava.index()
|
|
} else {
|
|
this.notifyWarning(msg)
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
dropdownCommand(command) {
|
|
const {type, data} = command
|
|
this.id = data.id;
|
|
if (type === 'view') {
|
|
this.openView(data.id)
|
|
} else if (type === 'audit') {
|
|
this.openAudit(data.id)
|
|
} else if (type === 'rollback') {
|
|
this.doRollBack(data.id)
|
|
}
|
|
},
|
|
openView(id) {
|
|
this.$refs.guava.view()
|
|
this.$refs.viewInfo.openView(id)
|
|
},
|
|
openAudit(id) {
|
|
this.formData = {}
|
|
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
|
this.$refs.guava.edit()
|
|
this.$refs.auditInfo.activeName = 'unionAudit'
|
|
this.$refs.auditInfo.openView(id)
|
|
},
|
|
async doRollBack(id) {
|
|
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if ("confirm" === confirm) {
|
|
const resp = await $.get(loc() + '/doRollBack', {
|
|
id: id,
|
|
isJoin: this.pageForm.isJoin
|
|
})
|
|
if (resp.code === 0) {
|
|
this.pageData();
|
|
await this.getAuditNum();
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyError(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
async doSearch() {
|
|
this.pageData();
|
|
await this.getAuditNum();
|
|
},
|
|
async getAuditNum() {
|
|
const resp = await $.get(loc() + '/getAuditNum', {
|
|
isAudit: this.pageForm.isAudit,
|
|
unionId: this.pageForm.unionId
|
|
})
|
|
if (resp.code === 0) {
|
|
this.auditNum = resp.data
|
|
}
|
|
},
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", null)
|
|
this.$set(this.pageForm, "unionGroupId", null)
|
|
this.$set(this.pageForm, "threeUnitId", null)
|
|
this.units = []
|
|
this.unionGroups = []
|
|
this.threeUnits = []
|
|
if (this.pageForm.unionId) {
|
|
this.units = await getUnits(this.pageForm.unionId)
|
|
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
|
|
}
|
|
},
|
|
},
|
|
async created() {
|
|
this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
|
if (this.isThreeUnit) {
|
|
this.tableColumns.forEach(v => {
|
|
if (["threeUnitName", "unionGroupName"].includes(v.prop)) {
|
|
v.checked = 1
|
|
}
|
|
})
|
|
}
|
|
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.pageData();
|
|
await this.getAuditNum();
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|