632 lines
29 KiB
HTML
632 lines
29 KiB
HTML
<!--#
|
||
layout("/layouts/platform.html"){
|
||
#-->
|
||
|
||
<style xmlns="">
|
||
.query-row {
|
||
height: 70px;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.query-row .el-col {
|
||
overflow: hidden;
|
||
}
|
||
|
||
.query-row:not(:last-child) {
|
||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||
}
|
||
|
||
.query-row-title {
|
||
width: 120px;
|
||
}
|
||
|
||
.el-table-container {
|
||
padding-top: 0;
|
||
}
|
||
</style>
|
||
<div id="app" v-cloak>
|
||
<guava ref="guava">
|
||
<template>
|
||
<el-card shadow="never">
|
||
<el-row align="middle" class="query-row" type="flex">
|
||
<el-col class="query-row-title"></el-col>
|
||
<el-col class="query-row-content">
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<span>年  度:</span>
|
||
<el-date-picker
|
||
v-model="pageForm.year"
|
||
type="year"
|
||
value-format="yyyy"
|
||
placeholder="选择年"
|
||
style="width: 80%" @change="doSearch">
|
||
</el-date-picker>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<span>查询类型:</span>
|
||
<el-input placeholder="请输入内容" clearable
|
||
v-model="pageForm.searchKeyword"
|
||
style="width: 80%" @keyup.enter.native="doSearch">
|
||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||
placeholder="查询类型"
|
||
style="width: 110px;">
|
||
<el-option label="姓名" value="userName"></el-option>
|
||
<el-option label="工号" value="loginName"></el-option>
|
||
</el-select>
|
||
<el-button slot="append" @click="doSearch">搜索</el-button>
|
||
</el-input>
|
||
</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<!-- <el-row align="middle" class="query-row" type="flex">
|
||
<el-col class="query-row-title"></el-col>
|
||
<el-col class="query-row-content">
|
||
<span>报名路线:</span>
|
||
<el-tag :effect="pageForm.state===item.value?'dark':'plain'"
|
||
:key="item.value"
|
||
:type="item.label"
|
||
@click="checkState(item.value)"
|
||
style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;font-size: 15px"
|
||
v-for="item in options">
|
||
{{ item.label }}
|
||
</el-tag>
|
||
<el-link :underline="false" @click="pageForm.state='';doSearch()"
|
||
style="color: red" v-if="options.length&&pageForm.state">清空
|
||
</el-link>
|
||
<span style="color: red;font-size: 12px;margin-left: 10px">温馨提示:其他工会选我线路,所在工会审核过后,才显示数量</span>
|
||
</el-col>
|
||
</el-row>-->
|
||
|
||
<el-row align="middle" class="query-row" type="flex">
|
||
<el-col class="query-row-title"></el-col>
|
||
<el-col class="query-row-content">
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<span>所属工会:</span>
|
||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||
@change="unionChange"
|
||
filterable clearable style="width: 80%"
|
||
:disabled="unionDisabled">
|
||
<el-option
|
||
v-for="item in unionOptions"
|
||
:key="item.id"
|
||
:label="item.unionname"
|
||
:value="item.id">
|
||
</el-option>
|
||
</el-select>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<span>所属单位:</span>
|
||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位"
|
||
@change="doSearch"
|
||
filterable clearable style="width: 80%"
|
||
:disabled="unitDisabled">
|
||
<el-option
|
||
v-for="item in unitOptions"
|
||
:key="item.id"
|
||
:label="item.name"
|
||
:value="item.id">
|
||
</el-option>
|
||
</el-select>
|
||
</el-col>
|
||
|
||
|
||
</el-row>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-row align="middle" class="query-row" type="flex">
|
||
<el-col class="query-row-title"></el-col>
|
||
<el-col class="query-row-content">
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<span>路线类型:</span>
|
||
<el-select v-model="pageForm.regionalNature" filterable
|
||
placeholder="请选择线路"
|
||
style="width: 80%"
|
||
@change="doSearch();pageForm.takePartInLineId=''">
|
||
<el-option label="全部" value=""></el-option>
|
||
<el-option label="省内" value="省内"></el-option>
|
||
<el-option label="省外" value="省外"></el-option>
|
||
</el-select>
|
||
</el-col>
|
||
|
||
<el-col :span="12">
|
||
<span>选择路线:</span>
|
||
<el-select v-model="pageForm.takePartInLineId" filterable clearable
|
||
placeholder="请选择线路"
|
||
style="width: 80%" @change="doSearch()">
|
||
<el-option v-for="item in takePartInLines"
|
||
:key="item.id"
|
||
:label="item.lineName"
|
||
:value="item.id">
|
||
</el-option>
|
||
</el-select>
|
||
</el-col>
|
||
|
||
</el-row>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-row align="middle" class="query-row" type="flex">
|
||
<el-col class="query-row-title"></el-col>
|
||
<el-col class="query-row-content">
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<span>标  段:</span>
|
||
<el-select v-model="pageForm.lotId" filterable clearable
|
||
placeholder="请选择标段"
|
||
style="width: 80%" @change="doSearch()">
|
||
<el-option v-for="item in modifyConfig.lots"
|
||
:key="item.id"
|
||
:label="item.lotName"
|
||
:value="item.id">
|
||
</el-option>
|
||
</el-select>
|
||
</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
|
||
</el-card>
|
||
|
||
<el-card shadow="never" class="mt10">
|
||
<table-tool label="审核列表" :app="this">
|
||
<template #label_end>
|
||
<!-- <span style="color: red;margin-left: 10px">温馨提示:省内线路不需要审核</span>-->
|
||
|
||
</template>
|
||
|
||
<template #func>
|
||
<el-tag :effect="pageForm.state===item.value?'dark':'plain'"
|
||
:key="item.value"
|
||
:type="item.label"
|
||
@click="checkState(item.value)"
|
||
style="margin-right: 10px;cursor: pointer;font-size: 15px"
|
||
v-for="item in options">
|
||
{{ item.label }}
|
||
</el-tag>
|
||
<el-link :underline="false" @click="pageForm.state='';doSearch()" class="mr10"
|
||
style="color: red" v-if="options.length&&pageForm.state">清空
|
||
</el-link>
|
||
<template
|
||
v-if="!pageForm.regionalNature||
|
||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||
<el-button type="primary" size="small" class="mr10"
|
||
@click="openOnekeyAudit">一键审核
|
||
</el-button>
|
||
<el-radio-group @change="doSearch()" size="small"
|
||
v-model="pageForm.isAudit">
|
||
<el-radio-button label="">全部</el-radio-button>
|
||
<el-radio-button label="true">已审核</el-radio-button>
|
||
<el-radio-button label="false">未审核</el-radio-button>
|
||
</el-radio-group>
|
||
</template>
|
||
|
||
</template>
|
||
</table-tool>
|
||
<el-table :data="tableData" style="width: 100%"
|
||
row-key="id" @sort-change="pageOrder"
|
||
v-loading="tableLoading"
|
||
@selection-change="handleSelectionChange">
|
||
<el-table-column
|
||
:selectable="ifEdit"
|
||
type="selection"
|
||
width="55">
|
||
</el-table-column>
|
||
<el-table-column align="center" header-align="center" type="index"
|
||
:index="indexMethod" label="序号"
|
||
width="80px"></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 scope="{row}" v-if="column.prop=='isTransferIn'">
|
||
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
|
||
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
|
||
<sapn v-else>否</sapn>
|
||
</template>
|
||
<template scope="{row}" v-else-if="column.prop=='lineName'">
|
||
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
|
||
</el-link>
|
||
</template>
|
||
<template scope="{row}" v-else-if="column.prop=='isFamily'">
|
||
{{row.isFamily?'携带':'未携带'}}({{row.num}})
|
||
</template>
|
||
<template scope="{row}" v-else-if="column.prop=='num'">
|
||
{{1+row.num}}
|
||
</template>
|
||
<template scope="{row}" v-else-if="column.prop=='stateId'">
|
||
<span v-if="row.stateId">
|
||
<vi-table-state :state="row"></vi-table-state>
|
||
</span>
|
||
<sapn v-else style="color: #67C23A">暂无</sapn>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column align="center" header-align="center" label="操作" width="300px">
|
||
<template scope="{row}">
|
||
<el-button @click="openView(row)" size="mini" type="primary">查看
|
||
</el-button>
|
||
<template v-if="!pageForm.regionalNature||
|
||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||
<el-button @click="doRecall(row)" size="mini" type="danger"
|
||
v-if="ifRecall(row)">撤回
|
||
</el-button>
|
||
<el-button v-if="ifEdit(row)" @click="openEdit(row)" size="mini"
|
||
type="primary">
|
||
审核
|
||
</el-button>
|
||
</template>
|
||
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
<!--#include("/layouts/pagination.html"){}#-->
|
||
</el-card>
|
||
</template>
|
||
|
||
<template #view>
|
||
<enroll-info ref="viewEnrollInfo" :union_id="unionId"></enroll-info>
|
||
</template>
|
||
|
||
<template #public>
|
||
<line-info ref="viewLineInfo"></line-info>
|
||
</template>
|
||
|
||
<template #edit>
|
||
<enroll-info ref="editEnrollInfo">
|
||
<template #handle>
|
||
<el-tab-pane label="审核" name="audit">
|
||
<el-form :model="formData" label-width="130px">
|
||
<el-row gutter="20">
|
||
<el-col :span="12">
|
||
<el-form-item label="审核人" prop="username">
|
||
<el-input disabled v-model="formData.username"></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="审核时间" prop="auditTime">
|
||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<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-row>
|
||
<el-row style="margin: 40px 0;text-align: right">
|
||
<el-button @click="doAudit(false)" type="danger">退回
|
||
</el-button>
|
||
<el-button @click="doAudit(true)" type="primary">通过
|
||
</el-button>
|
||
</el-row>
|
||
</el-form>
|
||
</el-tab-pane>
|
||
</template>
|
||
</enroll-info>
|
||
</template>
|
||
</guava>
|
||
|
||
|
||
<el-dialog
|
||
title="提示"
|
||
:visible.sync="dialogVisible"
|
||
width="50%">
|
||
|
||
<el-form :model="formData" label-width="130px">
|
||
<el-row gutter="20">
|
||
<el-col :span="12">
|
||
<el-form-item label="审核人" prop="username">
|
||
<el-input disabled v-model="formData.username"></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="审核时间" prop="auditTime">
|
||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<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-row>
|
||
</el-form>
|
||
|
||
<span slot="footer" class="dialog-footer">
|
||
<el-button @click="doOnekeyAudit(false)">取 消</el-button>
|
||
<el-button type="primary" @click="doOnekeyAudit(true)">确 定</el-button>
|
||
</span>
|
||
</el-dialog>
|
||
|
||
</div>
|
||
|
||
|
||
<script>
|
||
var vue = new Vue({
|
||
el: '#app',
|
||
mixins: [initTableMixins],
|
||
data() {
|
||
return {
|
||
unionDisabled: false,
|
||
unitDisabled: false,
|
||
unionId: "${@shiro.getPrincipalProperty('unit').getUnionid()}",
|
||
dialogVisible: false,
|
||
tableSelection: [],
|
||
formData: {
|
||
id: "",
|
||
username: "${@shiro.getPrincipalProperty('username')}",
|
||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||
auditOpinion: "",
|
||
isTransferIn: false,
|
||
},
|
||
options: [
|
||
{label: "本工会人员(自己线路)", value: "1"},
|
||
{label: "本工会人员(其他路线)", value: "2"},
|
||
{label: "其他工会人员(选我线路)", value: "3"}
|
||
],
|
||
unionOptions: [],
|
||
unitOptions: [],
|
||
takePartInLines: [],
|
||
pageForm: {
|
||
lotId: '',
|
||
regionalNature: '',
|
||
isAudit: "",
|
||
state: "",
|
||
year: moment().format('YYYY'),
|
||
searchName: "userName",
|
||
},
|
||
tableColumns: [
|
||
{prop: 'loginName', label: '工号'},
|
||
{prop: 'userName', label: '姓名'},
|
||
{prop: 'unitName', label: '单位', sortable: true},
|
||
{prop: 'unionName', label: '工会', sortable: true},
|
||
{prop: 'lineName', label: '线路', sortable: true},
|
||
{prop: 'regionalNature', label: '线路类型', sortable: true},
|
||
// {prop: 'userNature', label: '人员性质'},
|
||
{prop: 'isFamily', label: '是否携带家属'},
|
||
// {prop: 'num', label: '人数'},
|
||
{prop: 'isTransferIn', label: '是否转入转出', sortable: true},
|
||
{prop: 'stateId', label: '审核状态', sortable: true},
|
||
],
|
||
modifyConfig: {}
|
||
}
|
||
},
|
||
components: {
|
||
'enroll-info': httpVueLoader('/components/theRapyRecuperation/Enrollinfo.vue'),
|
||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||
|
||
},
|
||
methods: {
|
||
async doOnekeyAudit(flag) {
|
||
const confirm = await this.$confirm('您确定要一键审核您所勾选的信息吗, 是否继续?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
})
|
||
if (confirm === "confirm") {
|
||
const resp = await $.post(loc() + "/doOnekeyAudit", {
|
||
ids: JSON.stringify(this.tableSelection),
|
||
flag: flag,
|
||
auditOpinion: this.formData.auditOpinion
|
||
})
|
||
if (resp.data===0){
|
||
this.$notify.success({title: '成功', message: resp.msg});
|
||
await this.doSearch()
|
||
this.dialogVisible = false
|
||
}else {
|
||
this.$notify.warning({title: '失败', message: resp.msg});
|
||
this.dialogVisible = false
|
||
}
|
||
}
|
||
},
|
||
async openOnekeyAudit() {
|
||
if (this.tableSelection.length === 0) {
|
||
this.$notify.warning({title: '警告', message: "请您先在左侧勾选在审核"});
|
||
return
|
||
}
|
||
|
||
this.dialogVisible = true
|
||
},
|
||
handleSelectionChange(val) {
|
||
this.tableSelection = val.map(v => v.id);
|
||
},
|
||
ifEdit(row) {
|
||
const {
|
||
stateId,
|
||
selfUnionId,
|
||
takePartInUnionId
|
||
} = row
|
||
if (stateId === 2710 && selfUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
||
return true
|
||
} else if (stateId === 2720 && takePartInUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
||
return true
|
||
} else {
|
||
return false
|
||
}
|
||
},
|
||
ifRecall(row) {
|
||
const {
|
||
stateId,
|
||
selfUnionId,
|
||
takePartInUnionId
|
||
} = row
|
||
if ((stateId === 2715 || stateId === 2720 || stateId === 2750) && selfUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
||
return true
|
||
} else if ((stateId === 2725 || stateId === 2750) && takePartInUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
||
return true
|
||
} else {
|
||
return false
|
||
}
|
||
},
|
||
async doRecall(row) {
|
||
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
})
|
||
if (confirm === "confirm") {
|
||
const resp = await $.post(loc() + "/doRecall", {id: row.id})
|
||
if (resp.code === 0){
|
||
this.$notify.success({title: '成功', message: resp.msg});
|
||
await this.doSearch()
|
||
}else {
|
||
this.$notify.warning({title: '失败', message: resp.msg});
|
||
}
|
||
}
|
||
},
|
||
async doAudit(flag) {
|
||
const confirm = await this.$confirm('您确定要' + (flag ? '通过' : '退回') + '吗, 是否继续?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
})
|
||
if (confirm === "confirm") {
|
||
const resp = await $.post(loc() + "/doAudit", {
|
||
flag: flag,
|
||
id: this.formData.id,
|
||
isTransferIn: this.formData.isTransferIn,
|
||
auditOpinion: this.formData.auditOpinion
|
||
})
|
||
if (resp.code === 0){
|
||
this.$notify.success({title: '成功', message: resp.msg});
|
||
this.doSearch()
|
||
this.$refs.guava.index()
|
||
}else {
|
||
this.$notify.warning({title: '失败', message: resp.msg});
|
||
}
|
||
}
|
||
|
||
|
||
},
|
||
openLine(row) {
|
||
this.$refs.guava.public()
|
||
this.$refs.viewLineInfo.findOne(row.lineId)
|
||
},
|
||
openEdit(row) {
|
||
this.$set(this.formData, "isTransferIn", row.isTransferIn)
|
||
this.$set(this.formData, "id", row.id)
|
||
this.$refs.guava.edit()
|
||
this.$refs.editEnrollInfo.openAudit(row.id, 'audit')
|
||
},
|
||
openView(row) {
|
||
this.$refs.guava.view()
|
||
this.$refs.viewEnrollInfo.openView(row.id)
|
||
},
|
||
async checkState(type) {
|
||
this.pageForm.state = type
|
||
this.$set(this.pageForm, "unionIds", [])
|
||
this.$set(this.pageForm, "unionId", null)
|
||
await this.getBmUserUnion()
|
||
if (type === "1") {
|
||
this.$set(this.pageForm, "unionId", this.unionId)
|
||
this.unionDisabled = true
|
||
} else if (type === "2") {
|
||
this.unionDisabled = true
|
||
this.unitDisabled = true
|
||
} else if (type === "3") {
|
||
this.unionDisabled = false
|
||
this.unitDisabled = false
|
||
|
||
this.unionOptions = this.unionOptions.filter(v => v.id !== this.unionId)
|
||
} else {
|
||
this.unionDisabled = false
|
||
this.unitDisabled = false
|
||
}
|
||
await this.unionChange()
|
||
await this.doSearch()
|
||
},
|
||
async unionChange() {
|
||
this.pageForm.unitId = null
|
||
this.unitOptions = await getUnits(this.pageForm.unionId)
|
||
this.takePartInLines = await this.getXlByUnion()
|
||
await this.doSearch()
|
||
},
|
||
/**
|
||
* 查询所有报名人员的工会
|
||
* @returns {Promise<void>}
|
||
*/
|
||
async getBmUserUnion() {
|
||
const {data} = await $.post(loc() + "/getBmUserUnion")
|
||
this.unionOptions = data
|
||
},
|
||
async getXlByUnion() {
|
||
const {data} = await $.post(loc() + "/getXlByUnion", {
|
||
unionId: this.pageForm.unionId,
|
||
year: this.pageForm.year,
|
||
regionalNature: this.pageForm.regionalNature,
|
||
state: this.pageForm.state
|
||
})
|
||
return data
|
||
},
|
||
pageData() {
|
||
sublime.showLoadingbar();
|
||
this.tableLoading = true
|
||
|
||
const pageForm = clone(this.pageForm)
|
||
pageForm.states = JSON.stringify(pageForm.states)
|
||
|
||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||
sublime.closeLoadingbar();
|
||
this.tableLoading = false
|
||
if (data.code === 0) {
|
||
this.tableData = data.data.list;
|
||
this.pageForm.totalCount = data.data.totalCount;
|
||
} else {
|
||
this.$message.error(data.msg);
|
||
}
|
||
}, "json");
|
||
},
|
||
async getApplyNumAudit() {
|
||
const {data} = await $.post(loc() + "/getApplyNumAudit", this.pageForm)
|
||
this.options = [
|
||
{label: "本工会人员(自己线路)" + data.count1 + "人", value: "1"},
|
||
{label: "本工会人员(其他路线)" + data.count2 + "人", value: "2"},
|
||
{label: "其他工会人员(选我线路)" + data.count3 + "人", value: "3"}
|
||
]
|
||
|
||
},
|
||
async doSearch() {
|
||
this.pageForm.pageNumber = 1;
|
||
this.pageData();
|
||
await this.getApplyNumAudit()
|
||
this.takePartInLines = await this.getXlByUnion()
|
||
},
|
||
async getModifyConfig() {
|
||
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||
if (res.code === 0) {
|
||
this.modifyConfig = res.data
|
||
}
|
||
},
|
||
},
|
||
async created() {
|
||
await this.getBmUserUnion()
|
||
await this.getModifyConfig()
|
||
this.takePartInLines = await this.getXlByUnion()
|
||
await this.doSearch()
|
||
}
|
||
})
|
||
</script>
|
||
|
||
|
||
<!--#
|
||
}
|
||
#-->
|