first commit
This commit is contained in:
@@ -0,0 +1,574 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">任务:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select style="width: 100%" v-model="pageForm.taskId">
|
||||
<el-option :label="item.taskName"
|
||||
:value="item.id"
|
||||
v-for="item in memberCheckTaskOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
|
||||
<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 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>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="人员列表">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" :summary-method="getSummaries" @sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
row-key="id"
|
||||
@expand-change="tableColumnExpandChange"
|
||||
show-summary style="width: 100%" v-loading="tableLoading">
|
||||
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="{row}">
|
||||
<el-table :data="row.checkUsers" style="width: 100%">
|
||||
<el-table-column header-align="center" label="姓名"
|
||||
prop="userName"></el-table-column>
|
||||
<el-table-column header-align="center" label="工号"
|
||||
prop="loginName"></el-table-column>
|
||||
<el-table-column header-align="center" label="异动信息">
|
||||
<el-table-column align="center" header-align="center" label="更新时间"
|
||||
min-width="145px"
|
||||
prop="changeTime"
|
||||
show-overflow-tooltip sortable>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center"
|
||||
label="异动类型"
|
||||
prop="changeType" show-overflow-tooltip sortable>
|
||||
<template scope="{row}">
|
||||
<span style="color: #0e78c5">{{changeType[row.changeType]}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="会员"
|
||||
prop="member"
|
||||
show-overflow-tooltip sortable>
|
||||
<template scope="{row}">
|
||||
<span class="text-success " v-if="row.member==1">
|
||||
<i class="fa fa-circle ml5"></i> 是
|
||||
</span>
|
||||
<span class="text-danger" v-else>
|
||||
<i class="fa fa-circle ml5"></i> 否
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column header-align="center" label="操作" width="100px">
|
||||
<template scope="{row:expandRow}">
|
||||
<el-button @click="openAudit(expandRow,true,row)" size="mini"
|
||||
type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isFinish'">
|
||||
<span :class="row.isFinish?'text-success':'text-danger'">
|
||||
{{row.isFinishText}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<!--<el-table-column header-align="center" label="操作" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openCheck(row)"
|
||||
:disabled="!(row.apply||row.reApply)">
|
||||
核对
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
|
||||
<el-tabs v-model="active">
|
||||
<el-tab-pane label="个人信息" name="info">
|
||||
<member :id="info.userId" ref="memberInfo" view></member>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="变更记录" name="changInfo">
|
||||
<mem-change-records :userid="info.userId"></mem-change-records>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="部门工会审核" name="union">
|
||||
<el-form :model="formData" :rules="formRules" label-suffix=":"
|
||||
label-width="120px" ref="form">
|
||||
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
|
||||
<template v-if="!info.unionAudit&&source==1">
|
||||
<template v-if="info.type==1">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原单位">
|
||||
<el-input :value="info.originUnit.name"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原工会">
|
||||
<el-input :value="info.originUnion.unionname"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="新单位">
|
||||
<el-input :value="info.currentUnit.name"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="新工会">
|
||||
<el-input :value="info.currentUnion.unionname"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<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-row>
|
||||
|
||||
<el-form-item label="审核意见" prop="opinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button :loading="submitLoading" @click="doAudit(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button :loading="submitLoading" @click="doAudit(true)"
|
||||
type="primary">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-row :gutter="20" v-if="info&&info.unionAudit">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员">
|
||||
<span>{{ info.unionAudit.username }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间">
|
||||
<span>{{ info.unionAudit.auditTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见">
|
||||
<span>{{ info.unionAudit.auditOpinion }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row justify="center" type="flex" v-else>
|
||||
<el-form-item label="暂无审核信息">
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="校工会审核" name="school"
|
||||
v-if="info.unionAudit">
|
||||
<el-form :model="formData" :rules="formRules" class="demo-table-expand"
|
||||
label-suffix=":"
|
||||
label-width="120px" ref="form">
|
||||
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
|
||||
<template v-if="!info.schoolAudit&&source==2">
|
||||
|
||||
<template v-if="info.type==1">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原单位">
|
||||
<el-input :value="info.originUnit.name"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原工会">
|
||||
<el-input :value="info.originUnion.unionname"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="新单位">
|
||||
<!-- <el-input :value="info.currentUnit.name"></el-input>-->
|
||||
<el-select @change="unitChange"
|
||||
clearable filterable
|
||||
placeholder="请选择单位"
|
||||
style="width: 100%"
|
||||
v-model="info.currentUnitId">
|
||||
<el-option
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
v-for="item in unitOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="新工会">
|
||||
<el-input disabled
|
||||
v-model="info.currentUnionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<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-row>
|
||||
|
||||
<el-form-item label="审核意见" prop="opinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button :loading="submitLoading" @click="doAudit(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button :loading="submitLoading" @click="doAudit(true)"
|
||||
type="primary">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-row :gutter="20" v-if="info&&info.schoolAudit">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员">
|
||||
<span>{{ info.schoolAudit.username }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间">
|
||||
<span>{{ info.schoolAudit.auditTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见">
|
||||
<span>{{ info.schoolAudit.auditOpinion }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row justify="center" type="flex" v-else>
|
||||
<el-form-item label="暂无审核信息">
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unions: [],
|
||||
units: [],
|
||||
tableColumns: [
|
||||
{prop: 'unionname', label: '部门工会名称', sortable: true},
|
||||
{prop: 'unioncode', label: '部门工会编码', sortable: true},
|
||||
{prop: 'memberNum', label: '会员人数', sortable: true},
|
||||
{prop: 'isFinish', label: '是否核对完成', sortable: true},
|
||||
{prop: 'notCheckNum', label: '待核对人数', sortable: true},
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
memberCheckTaskOptions: [],
|
||||
changeType: {},
|
||||
userId: null,
|
||||
active: 'school',
|
||||
info: {},
|
||||
source: 2,
|
||||
formData: {},
|
||||
unitOptions: [],
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getSummaries(param) {
|
||||
const {columns, data} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
if ([1, 2, 3, 5].includes(index)) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' ';
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
|
||||
return sums;
|
||||
},
|
||||
openCheck(row) {
|
||||
this.userId = row.id
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
async getMemberCheckTaskOptions() {
|
||||
const resp = await $.get('/platform/welfareMember/check/task/getAllTask', {year: this.pageForm.year})
|
||||
this.memberCheckTaskOptions = resp.data
|
||||
if (this.memberCheckTaskOptions.length) {
|
||||
this.$set(this.pageForm, 'taskId', this.memberCheckTaskOptions[0].id)
|
||||
}
|
||||
},
|
||||
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 getChangeType() {
|
||||
const changeType = {}
|
||||
const changeTypeOptions = await getEnumOptions("UserChangeType")
|
||||
changeTypeOptions.forEach(v => {
|
||||
changeType[v.code] = v.description
|
||||
})
|
||||
return changeType
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar()
|
||||
const resp = await $.post(loc() + '/pageData', this.pageForm)
|
||||
sublime.closeLoadingbar()
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async tableColumnExpandChange(row, expandedRows) {
|
||||
if (expandedRows.length) {
|
||||
const {taskId} = this.pageForm
|
||||
const {id: unionId} = row
|
||||
const resp = await $.post(loc() + '/getNotCheckUsers', {taskId, unionId})
|
||||
if (resp.code === 0) {
|
||||
this.$set(row, 'checkUsers', resp.data)
|
||||
}
|
||||
}
|
||||
},
|
||||
async openAudit(expandRow, audit, row) {
|
||||
if (!row.isFinish) {
|
||||
this.notifyWarning('待院工会完成核对后才可审核')
|
||||
return
|
||||
}
|
||||
const resp = await $.get("/platform/member/common/findChangeApplyInfo", {id: expandRow.id})
|
||||
requestLaterFun(resp, (data) => {
|
||||
data.audit = audit
|
||||
data.currentUnionName = data.currentUnion ? data.currentUnion.unionname : null
|
||||
this.info = data
|
||||
if (audit) {
|
||||
this.active = 'school'
|
||||
} else {
|
||||
this.active = 'info'
|
||||
}
|
||||
|
||||
this.$refs.guava.edit()
|
||||
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData = {
|
||||
recordId: expandRow.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
}
|
||||
|
||||
}, () => {
|
||||
this.info = {}
|
||||
}, () => {
|
||||
|
||||
})
|
||||
},
|
||||
async doAudit(pass) {
|
||||
this.formData.currentUnitId = this.info.currentUnitId
|
||||
this.formData.currentUnionId = this.info.currentUnionId
|
||||
this.formData.auditPass = pass
|
||||
|
||||
this.submitLoading = true
|
||||
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
|
||||
requestLaterMsgFun(this, resp, () => {
|
||||
//更新用户信息
|
||||
this.info.userId = null
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}, null, (v) => {
|
||||
this.submitLoading = false
|
||||
})
|
||||
},
|
||||
unitChange(v) {
|
||||
const unit = this.unitOptions.find(x => x.id === v)
|
||||
if (unit) {
|
||||
this.info.currentUnionId = unit.unionid
|
||||
this.info.currentUnionName = unit.unionname
|
||||
} else {
|
||||
this.info.currentUnionId = ''
|
||||
this.info.currentUnionName = ''
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
await this.getMemberCheckTaskOptions()
|
||||
if (this.pageForm.taskId != null) {
|
||||
this.pageData()
|
||||
}
|
||||
this.unions = await getUnions(null)
|
||||
this.unitOptions = await getUnits(null)
|
||||
this.flushUnits()
|
||||
this.changeType = await this.getChangeType()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-table__expand-icon {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,183 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="任务列表">
|
||||
<template #func>
|
||||
<el-button @click="openAdd" icon="el-icon-plus" size="small" type="primary">新增任务</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" class="vi-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
|
||||
align="center"
|
||||
header-align="center"
|
||||
:label="column.label"
|
||||
show-overflow-tooltip
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column header-align="center" label="操作" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
|
||||
<el-form :model="formData" :rules="rules" label-width="80px" ref="form">
|
||||
<el-form-item label="任务名称" prop="taskName">
|
||||
<el-input maxlength="20" v-model="formData.taskName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker
|
||||
placeholder="选择开始时间"
|
||||
type="datetime"
|
||||
v-model="formData.startTime"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker
|
||||
placeholder="选择结束时间"
|
||||
type="datetime"
|
||||
v-model="formData.endTime"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务说明" prop="description">
|
||||
<el-input maxlength="50"
|
||||
type="textarea"
|
||||
v-model="formData.description"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="dialogVisible=false">取消</el-button>
|
||||
<el-button @click="doSubmit" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
computed: {
|
||||
dialogTitle() {
|
||||
return this.formData.id ? '编辑任务' : '新增任务'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'taskName', label: '任务名称', sortable: true},
|
||||
{prop: 'year', label: '年度', sortable: true},
|
||||
{prop: 'startTime', label: '开始时间', sortable: true},
|
||||
{prop: 'endTime', label: '结束时间', sortable: true},
|
||||
|
||||
],
|
||||
dialogVisible: false,
|
||||
rules: {
|
||||
taskName: [{required: true, message: '请输入', trigger: ['change', 'blur']}],
|
||||
startTime: [{required: true, message: '请选择', trigger: ['change', 'blur']}],
|
||||
endTime: [{required: true, message: '请选择', trigger: ['change', 'blur']}],
|
||||
description: [{required: true, message: '请输入', trigger: ['change', 'blur']}]
|
||||
},
|
||||
formData: {
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
description: null
|
||||
},
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd() {
|
||||
this.dialogVisible = true
|
||||
this.$refs['form'].resetFields()
|
||||
},
|
||||
openEdit(row) {
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.formData = {...row}
|
||||
})
|
||||
},
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
const methodName = this.formData.id ? '/doEdit' : '/doAdd'
|
||||
|
||||
const resp = await $.post(loc() + methodName, this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
const resp = await $.post(loc() + '/doDelete', {id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,383 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">任务:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select style="width: 100%" v-model="pageForm.taskId">
|
||||
<el-option :label="item.taskName"
|
||||
:value="item.id"
|
||||
v-for="item in memberCheckTaskOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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-select placeholder="查询类型" slot="prepend"
|
||||
style="width: 80px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="judgmentAuthority">
|
||||
<div class="search-item-label">{{welfare.welfareUnitModeName}}:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="changeWelfareUnit" clearable filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%" v-model="pageForm.welfareUnit">
|
||||
<el-option
|
||||
:value="item.welfareUnitId"
|
||||
:key="item.welfareUnitId"
|
||||
:label="item.welfareUnitName"
|
||||
v-for="item in welfareUnits">
|
||||
</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.unit">
|
||||
<el-option
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
v-for="item in units">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="人员列表">
|
||||
<template #func>
|
||||
<span class="text-danger">更新时间段内人员信息有无变化:</span>
|
||||
|
||||
<el-select :clearable="false" @change="doSearch();getChangeData()"
|
||||
size="small" style="width: 200px;margin-right: 15px"
|
||||
v-model="pageForm.welfareMember">
|
||||
<el-option :value="0" label="全部教职工范围内"></el-option>
|
||||
<el-option :value="1" label="可发放福利老师"></el-option>
|
||||
<el-option :value="2" label="不发放福利老师"></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-radio-group @change="doSearch();getChangeData()" class="mr5"
|
||||
size="small"
|
||||
v-model="pageForm.changed">
|
||||
<el-radio-button :label="0">全部({{numberData.all}})</el-radio-button>
|
||||
<el-radio-button :label="1">有变化({{numberData.have}})</el-radio-button>
|
||||
<el-radio-button :label="2">无变化({{numberData.no}})</el-radio-button>
|
||||
</el-radio-group>
|
||||
<enum-select @change="doSearch();getChangeData()" clearable
|
||||
enum="UserChangeType" placeholder="异动类型"
|
||||
label="description"
|
||||
size="small"
|
||||
style="width:200px" v-if="pageForm.changed==1" v-model="pageForm.changeType"
|
||||
value="code"></enum-select>
|
||||
|
||||
|
||||
<span class="text-danger mr10" v-if="!allowOperationTask">
|
||||
该任务不在核对时间内,无法操作
|
||||
</span>
|
||||
|
||||
<el-button :disabled="unionTaskStatus || !allowOperationTask" @click="submitCheck"
|
||||
icon="el-icon-success"
|
||||
size="small"
|
||||
type="primary">
|
||||
全部核对完成,提交核对
|
||||
</el-button>
|
||||
|
||||
<el-button @click="checkAgain" size="small" type="primary"
|
||||
v-if="unionTaskStatus">
|
||||
重新核对
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" class="vi-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
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column header-align="center" label="异动信息">
|
||||
<el-table-column align="center" header-align="center" label="更新时间"
|
||||
min-width="145px" prop="changeTime"
|
||||
show-overflow-tooltip sortable>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="异动类型"
|
||||
prop="changeType" show-overflow-tooltip sortable>
|
||||
<template scope="{row}">
|
||||
<span style="color: #0e78c5">{{changeType[row.changeType]}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="福利会员"
|
||||
prop="welfareMember"
|
||||
show-overflow-tooltip sortable>
|
||||
<template scope="{row}">
|
||||
<div v-if="row.flag">
|
||||
<span class="text-success " v-if="row.welfareMember==1">
|
||||
<i
|
||||
class="fa fa-circle ml5"></i> 是
|
||||
</span>
|
||||
<span class="text-danger" v-else>
|
||||
<i class="fa fa-circle ml5"></i> 否
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="变更状态"
|
||||
prop="welfareMember"
|
||||
show-overflow-tooltip sortable>
|
||||
<template scope="{row}">
|
||||
<span v-if="row.stateId">
|
||||
<vi-table-state :state="row"></vi-table-state>
|
||||
</span>
|
||||
<span :style="'color:'+row.mcrStateColor"
|
||||
v-else-if="row.mcrStateId">{{ row.mcrStateName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column header-align="center" label="操作" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button :disabled="row.welfareMember!=1 || row.changeUnitAuditing || unionTaskStatus"
|
||||
@click="openCheck(row)" size="mini"
|
||||
type="primary">
|
||||
核对
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<mem-change-apply :userid="userId" :welfare_member="true" @submit="doSubmitChangeUser"
|
||||
change_mode="check"
|
||||
ref="apply"></mem-change-apply>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
<!--#include("/platform/welfare/include/common.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'mem-change-apply': httpVueLoader('/components/member/MemChangeApply.vue?v=1.0.2'),
|
||||
},
|
||||
computed: {
|
||||
allowOperationTask() {
|
||||
const {taskId} = this.pageForm
|
||||
if (taskId) {
|
||||
const task = this.memberCheckTaskOptions.find(v => v.id === taskId)
|
||||
const startTime = moment(task.startTime).valueOf()
|
||||
const endTime = moment(task.endTime).valueOf()
|
||||
const nowDate = Date.now()
|
||||
return nowDate > startTime && nowDate < endTime
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
judgmentAuthority,
|
||||
welfare,
|
||||
welfareUnitMode,
|
||||
unions: [],
|
||||
welfareUnits: [],
|
||||
units: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'username', label: '姓名', sortable: true},
|
||||
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
|
||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unitname', label: '所在单位', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + '',
|
||||
searchName: 'u.username',
|
||||
welfareMember: 1,
|
||||
changed: 0,
|
||||
taskId: null
|
||||
},
|
||||
memberCheckTaskOptions: [],
|
||||
changeType: {},
|
||||
userId: null,
|
||||
unionTaskStatus: false,
|
||||
numberData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openCheck(row) {
|
||||
this.userId = row.id
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
/**
|
||||
* 提交异动人员
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async doSubmitChangeUser(formData) {
|
||||
console.log(formData)
|
||||
formData.taskId = this.pageForm.taskId
|
||||
const resp = await $.post(loc() + '/doSubmitChangeUser', formData)
|
||||
this.$refs.apply.closeLoading()
|
||||
if (resp.code === 0) {
|
||||
this.userId = null
|
||||
this.$refs.guava.index()
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交核对
|
||||
*/
|
||||
async submitCheck() {
|
||||
const confirm = await this.$confirm('此操作会提交至校工会确认,请确认核对完成了吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
const {taskId} = this.pageForm
|
||||
const resp = await $.post(loc() + '/submitCheck', {taskId})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.getUnionTaskStatus()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
async getMemberCheckTaskOptions() {
|
||||
const resp = await $.get('/platform/welfareMember/check/task/getAllTask', {year: this.pageForm.year})
|
||||
this.memberCheckTaskOptions = resp.data
|
||||
if (this.memberCheckTaskOptions.length) {
|
||||
this.$set(this.pageForm, 'taskId', this.memberCheckTaskOptions[0].id)
|
||||
}
|
||||
},
|
||||
async getChangeData() {
|
||||
const {data} = await $.post("/platform/welfare/member/adjustment/getChangeNumber", this.pageForm)
|
||||
this.numberData = data
|
||||
},
|
||||
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 getChangeType() {
|
||||
const changeType = {}
|
||||
const changeTypeOptions = await getEnumOptions("UserChangeType")
|
||||
changeTypeOptions.forEach(v => {
|
||||
changeType[v.code] = v.description
|
||||
})
|
||||
return changeType
|
||||
},
|
||||
async getUnionTaskStatus() {
|
||||
const {taskId} = this.pageForm
|
||||
const resp = await $.get(loc() + '/getUnionTaskStatus', {taskId})
|
||||
if (resp.code === 0) {
|
||||
this.unionTaskStatus = resp.data
|
||||
}
|
||||
},
|
||||
async checkAgain() {
|
||||
const confirm = await this.$confirm('您确定要重新核对吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
|
||||
const {taskId} = this.pageForm
|
||||
const resp = await $.get(loc() + '/checkAgain', {taskId})
|
||||
if (resp.code === 0) {
|
||||
this.getUnionTaskStatus()
|
||||
}
|
||||
},
|
||||
async changeWelfareUnit() {
|
||||
this.$set(this.pageForm, 'unit', '')
|
||||
this.units = await getComponentUnit(this.pageForm.welfareUnit)
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
await this.getChangeData()
|
||||
await this.getMemberCheckTaskOptions()
|
||||
if (this.pageForm.taskId != null) {
|
||||
this.pageData()
|
||||
}
|
||||
this.flushUnits()
|
||||
this.changeType = await this.getChangeType()
|
||||
this.getUnionTaskStatus()
|
||||
this.welfareUnits = await getWelfareUnit()
|
||||
this.units = await getComponentUnit()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user