389 lines
17 KiB
HTML
389 lines
17 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.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">
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<span>所属工会:</span>
|
|
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" @change="unionChange"
|
|
filterable clearable style="width: 80%">
|
|
<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%">
|
|
<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.takePartInLineId" filterable clearable placeholder="请选择线路"
|
|
style="width: 80%" @change="doSearch()">
|
|
<el-option v-for="item in takePartInLines"
|
|
:key="item.lineId"
|
|
:label="item.lineName"
|
|
:value="item.lineId">
|
|
</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">
|
|
<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;"
|
|
v-for="item in options">
|
|
{{ item.label }}
|
|
</el-tag>
|
|
<el-link :underline="false" @click="pageForm.state='';doSearch()"
|
|
type="danger" v-if="options.length&&pageForm.state">清空
|
|
</el-link>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
</el-card>
|
|
|
|
<el-card shadow="never" class="mt10">
|
|
<table-tool label="审核列表" :app="this">
|
|
<template #func>
|
|
<el-radio-group @change="doSearch()" size="small" v-model="pageForm.isAudit">
|
|
<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" style="width: 100%"
|
|
row-key="id" @sort-change="pageOrder"
|
|
v-loading="tableLoading">
|
|
|
|
<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'">
|
|
{{row.isTransferIn?'是':'否'}}
|
|
</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?'携带':'未携带'}}
|
|
</template>
|
|
<template scope="{row}" v-else-if="column.prop=='stateId'">
|
|
<span>
|
|
<vi-table-state :state="row"></vi-table-state>
|
|
</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" header-align="center" label="操作" width="200px">
|
|
<template scope="{row}">
|
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
|
<el-button :disabled="isDisabled(row)" @click="openEdit(row)" size="mini" type="primary">
|
|
审核
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</template>
|
|
|
|
<template #view>
|
|
<enroll-info ref="viewEnrollInfo"></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>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
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: {
|
|
isAudit: false,
|
|
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: '线路'},
|
|
{prop: 'userNature', label: '人员性质'},
|
|
{prop: 'isFamily', label: '是否携带家属'},
|
|
{prop: 'isTransferIn', label: '是否转入', sortable: true},
|
|
{prop: 'stateId', label: '审核状态'},
|
|
]
|
|
}
|
|
},
|
|
components: {
|
|
'enroll-info': httpVueLoader('/components/theRapyRecuperation/Enrollinfo.vue'),
|
|
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
|
|
|
},
|
|
methods: {
|
|
isDisabled(row) {
|
|
const {
|
|
stateId,
|
|
selfUnionId,
|
|
isTransferIn,
|
|
takePartInUnionId,
|
|
joinLineUnionAuditId,
|
|
selfUnionAuditId
|
|
} = row
|
|
if (isTransferIn) {
|
|
if (stateId === 2710 && selfUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
|
return false
|
|
} else if (stateId === 2720 && takePartInUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
|
return false
|
|
} else {
|
|
return true
|
|
}
|
|
} else {
|
|
if (selfUnionAuditId) {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
},
|
|
async doAudit(flag) {
|
|
const resp = await $.post(loc() + "/doAudit", {
|
|
flag: flag,
|
|
id: this.formData.id,
|
|
isTransferIn: this.formData.isTransferIn,
|
|
auditOpinion: this.formData.auditOpinion
|
|
})
|
|
|
|
requestLaterFun(resp, (data) => {
|
|
this.$notify.success({title: '成功', message: resp.msg});
|
|
this.doSearch()
|
|
this.$refs.guava.index()
|
|
}, () => {
|
|
this.$notify.warning({title: '失败', message: resp.msg});
|
|
}, () => {
|
|
})
|
|
|
|
},
|
|
openLine(row) {
|
|
|
|
this.$refs.guava.public()
|
|
this.$refs.viewLineInfo.findOne(row.takePartInLineId)
|
|
},
|
|
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)
|
|
},
|
|
checkState(type) {
|
|
this.pageForm.state = type
|
|
this.doSearch()
|
|
},
|
|
async unionChange(val) {
|
|
this.pageForm.unitId = null
|
|
this.unitOptions = await getUnits(val)
|
|
this.takePartInLines = await this.getXlByUnion()
|
|
this.doSearch()
|
|
},
|
|
async getXlByUnion() {
|
|
const {data} = await $.post(loc() + "/getXlByUnion", {
|
|
unionId: this.pageForm.unionId,
|
|
year: this.pageForm.year,
|
|
regionalNature: "省外"
|
|
})
|
|
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 created() {
|
|
this.unionOptions = await getUnions(null)
|
|
await this.doSearch()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
|
|
<!--#
|
|
}
|
|
#--> |