省级互助保障:添加人员名单、确认统计、事项反馈三个页面
This commit is contained in:
+179
@@ -0,0 +1,179 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava" padding="0 5%">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="yearChange"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择事项"
|
||||
style="width: 100%"
|
||||
@change="doSearch">
|
||||
<el-option v-for="item in projectOptions"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="分工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
|
||||
<el-select v-model="pageForm.unionId"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择分工会"
|
||||
style="width: 100%"
|
||||
@change="doSearch">
|
||||
<el-option v-for="item in unions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="反馈列表">
|
||||
<el-button type="danger"
|
||||
size="small"
|
||||
:disabled="selectedFeedbackIds.length === 0"
|
||||
@click="deleteFeedbackBatch">批量删除</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData"
|
||||
style="width: 100%"
|
||||
row-key="id"
|
||||
:size="tableSize"
|
||||
v-loading="tableLoading"
|
||||
@selection-change="handleSelectionChange"
|
||||
ref="table"
|
||||
class="vi-table">
|
||||
<el-table-column type="selection" width="55" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column type="index" :index="indexMethod" label="序号" width="80px" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="year" label="年度" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="projectName" label="事项名称" min-width="180px" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="unionName" label="分工会" min-width="160px" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="feedbackInfo" label="反馈信息" min-width="240px" align="center" header-align="center" show-overflow-tooltip>
|
||||
<template slot-scope="{row}">
|
||||
<div v-html="row.feedbackInfo" style="white-space: pre-line !important;"></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createdByName" label="创建人" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="createdAt" label="创建时间" width="180px" align="center" header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
{{ row.createdAt ? $moment(row.createdAt).format("YYYY-MM-DD HH:mm:ss") : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format("YYYY")
|
||||
},
|
||||
tableData: [],
|
||||
selectedFeedbackIds: [],
|
||||
unions: [],
|
||||
projectOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(rows) {
|
||||
this.selectedFeedbackIds = rows.map(function (item) {
|
||||
return item.id
|
||||
})
|
||||
},
|
||||
yearChange() {
|
||||
return $.get("/platform/mutualInsurance/feedback/listProject", {year: this.pageForm.year}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.projectOptions = resp.data || []
|
||||
if (this.projectOptions.length > 0) {
|
||||
const currentProjectId = this.pageForm.projectId
|
||||
if (!currentProjectId || !this.projectOptions.some(function (item) {
|
||||
return item.id === currentProjectId
|
||||
})) {
|
||||
this.pageForm.projectId = this.projectOptions[0].id
|
||||
}
|
||||
} else {
|
||||
this.pageForm.projectId = ""
|
||||
}
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
return $.post("/platform/mutualInsurance/feedback/pageData", this.pageForm).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list || []
|
||||
this.selectedFeedbackIds = []
|
||||
this.pageForm.totalCount = resp.data.totalCount || 0
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
return this.pageData()
|
||||
},
|
||||
deleteFeedbackBatch() {
|
||||
if (this.selectedFeedbackIds.length === 0) {
|
||||
this.notifyWarning("请选择需要删除的反馈")
|
||||
return
|
||||
}
|
||||
this.$confirm("确认批量删除选中的反馈吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
$.post("/platform/mutualInsurance/feedback/deleteFeedbackBatch", {
|
||||
ids: this.selectedFeedbackIds.join(",")
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => {
|
||||
this.unions = res
|
||||
if (!this.pageForm.unionId && this.unions && this.unions.length === 1) {
|
||||
this.pageForm.unionId = this.unions[0].id
|
||||
}
|
||||
})
|
||||
this.yearChange()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava" padding="0 5%">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="yearChange"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择事项"
|
||||
style="width: 100%"
|
||||
@change="doSearch">
|
||||
<el-option v-for="item in projectOptions"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择所属工会"
|
||||
style="width: 100%"
|
||||
@change="doSearch">
|
||||
<el-option v-for="item in unions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="工会确认情况统计"></table-tool>
|
||||
<el-table :data="tableData"
|
||||
:size="tableSize"
|
||||
row-key="unionId"
|
||||
style="width: 100%"
|
||||
v-loading="tableLoading"
|
||||
ref="table"
|
||||
class="vi-table">
|
||||
<el-table-column type="index" :index="indexMethod" label="序号" width="80px" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="unionName" label="工会名称" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="totalCount" label="总人数" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="confirmedCount" label="已确认人数" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="unconfirmedCount" label="未确认人数" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="completeStatus" label="确认完成状态" align="center" header-align="center"></el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format("YYYY")
|
||||
},
|
||||
unions: [],
|
||||
projectOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
return $.get("/platform/mutualInsurance/personconfirm/listProject", {year: this.pageForm.year}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.projectOptions = resp.data || []
|
||||
if (this.projectOptions.length > 0) {
|
||||
this.$set(this.pageForm, "projectId", this.projectOptions[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "projectId", "")
|
||||
}
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
if (!this.pageForm.year || !this.pageForm.projectId) {
|
||||
this.tableData = []
|
||||
this.pageForm.totalCount = 0
|
||||
return Promise.resolve()
|
||||
}
|
||||
this.tableLoading = true
|
||||
return $.post("/platform/mutualInsurance/personconfirm/pageData", this.pageForm).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list || []
|
||||
this.pageForm.totalCount = resp.data.totalCount || 0
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
return this.pageData()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => {
|
||||
this.unions = res
|
||||
if (!this.pageForm.unionId && this.unions && this.unions.length === 1) {
|
||||
this.pageForm.unionId = this.unions[0].id
|
||||
}
|
||||
})
|
||||
this.yearChange()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+649
@@ -0,0 +1,649 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava" padding="0 5%">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="yearChange"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId"
|
||||
placeholder="请选择事项"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="doSearch">
|
||||
<el-option v-for="item in projectOptions"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入姓名或工号"></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
|
||||
<el-select v-model="pageForm.unionId"
|
||||
placeholder="请选择所属工会"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="flushUnits"
|
||||
@clear="flushUnits">
|
||||
<el-option v-for="item in unions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="pageForm.unitId"
|
||||
placeholder="请选择所属单位"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in units"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="确认状态">
|
||||
<el-select v-model="pageForm.isAudit" placeholder="请选择确认状态" clearable style="width: 100%">
|
||||
<el-option label="已确认" value="1"></el-option>
|
||||
<el-option label="未确认" value="0"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="人员名单">
|
||||
<el-button type="primary" size="small" @click="openFeedback">问题反馈</el-button>
|
||||
<el-button type="primary"
|
||||
size="small"
|
||||
@click="openImport"
|
||||
v-if="$auth.hasPermissionOr(['mutualInsurance.roster.import'])">导入名单</el-button>
|
||||
<el-button type="primary" size="small" @click="openAddUser">添加人员</el-button>
|
||||
<el-button type="primary" size="small" @click="exportData">导出</el-button>
|
||||
<el-button type="primary" size="small" :disabled="!pageForm.projectId" @click="doAuditByUnion(true)">按工会确认</el-button>
|
||||
<el-button type="danger" size="small" :disabled="!pageForm.projectId" @click="doAuditByUnion(false)">按工会取消确认</el-button>
|
||||
<el-button type="primary" size="small" :disabled="selectedIds.length === 0" @click="doAuditSelected(true)">勾选确认</el-button>
|
||||
<el-button type="danger" size="small" :disabled="selectedIds.length === 0" @click="doAuditSelected(false)">勾选取消确认</el-button>
|
||||
<el-button type="danger" size="small" :disabled="selectedIds.length === 0" @click="deleteSelected">批量删除</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData"
|
||||
style="width: 100%"
|
||||
row-key="id"
|
||||
:size="tableSize"
|
||||
v-loading="tableLoading"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="pageOrder"
|
||||
ref="table"
|
||||
class="vi-table">
|
||||
<el-table-column type="selection" width="55" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column type="index" :index="indexMethod" label="序号" width="80px" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="projectName" label="事项名称" min-width="180px" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="mobile" label="手机号" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="idCard" label="身份证号" min-width="170px" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="isAudit" label="确认状态" align="center" header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag type="success" v-if="row.isAudit">已确认</el-tag>
|
||||
<el-tag type="info" v-else>未确认</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="auditTime" label="确认时间" min-width="160px" align="center" header-align="center"></el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="问题反馈" :visible.sync="feedbackDialog" width="60%" :close-on-click-modal="false">
|
||||
<el-form :model="feedbackForm" label-width="100px">
|
||||
<el-form-item label="反馈信息">
|
||||
<el-input v-model="feedbackForm.feedbackInfo" placeholder="请输入反馈信息"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mb10">
|
||||
<el-button @click="feedbackDialog=false" type="primary" plain>取消</el-button>
|
||||
<el-button @click="saveFeedback" type="primary" v-loading="feedbackLoading">保存</el-button>
|
||||
</el-row>
|
||||
<el-table :data="feedbackList" border>
|
||||
<el-table-column align="center" label="问题反馈" prop="feedbackInfo" show-overflow-tooltip="false"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="deleteFeedback(row)" type="danger" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="添加人员" :visible.sync="addUserVisible" width="80%" :close-on-click-modal="false">
|
||||
<el-card shadow="never">
|
||||
<search @search="addUserDoSearch">
|
||||
<search-item label="姓名">
|
||||
<el-input v-model="addUserPageForm.userName"
|
||||
@keyup.enter.native="addUserDoSearch"
|
||||
clearable
|
||||
placeholder="请输入姓名"></el-input>
|
||||
</search-item>
|
||||
<search-item label="工号">
|
||||
<el-input v-model="addUserPageForm.loginName"
|
||||
@keyup.enter.native="addUserDoSearch"
|
||||
clearable
|
||||
placeholder="请输入工号"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="addUserPageForm.sex" clearable placeholder="请选择性别" style="width: 100%">
|
||||
<el-option v-for="sex in addUserSexOptions" :key="sex" :label="sex" :value="sex"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="出生日期">
|
||||
<el-date-picker v-model="addUserPageForm.birthday"
|
||||
type="date"
|
||||
placeholder="选择出生日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="出生月份">
|
||||
<el-select v-model="addUserPageForm.birthMonths"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择出生月份"
|
||||
style="width: 100%">
|
||||
<el-option v-for="month in 12" :key="month" :label="month + '月'" :value="month"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
|
||||
<el-select v-model="addUserPageForm.unionId"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择所属工会"
|
||||
style="width: 100%"
|
||||
@change="addUserUnionChange"
|
||||
@clear="addUserUnionChange">
|
||||
<el-option v-for="item in addUserUnionOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="addUserPageForm.unitIds"
|
||||
clearable
|
||||
filterable
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择所属单位"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in addUserUnitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="人员类型">
|
||||
<dict-select clearable
|
||||
code="USER_PERSON_TYPE"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择人员类型"
|
||||
v-model="addUserPageForm.personTypes"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select clearable
|
||||
code="USER_PREPARED_BY_TYPE"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择编制类别"
|
||||
v-model="addUserPageForm.preparedBys"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="在职状态">
|
||||
<dict-select clearable
|
||||
code="USER_STATE"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择人员状态"
|
||||
v-model="addUserPageForm.userStates"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="是否会员">
|
||||
<el-select v-model="addUserPageForm.isMember" clearable placeholder="请选择是否会员" style="width: 100%">
|
||||
<el-option label="全部" :value="null"></el-option>
|
||||
<el-option label="是" :value="true"></el-option>
|
||||
<el-option label="否" :value="false"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-table :data="addUserTableData"
|
||||
:size="tableSize"
|
||||
row-key="id"
|
||||
v-loading="addUserTableLoading"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" :index="addUserIndexMethod" label="序号" width="80px" align="center"></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="username" label="姓名" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="birthday" label="出生日期" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="personType" label="人员类型" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="preparedBy" label="编制类别" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="userState" label="在职状态" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<div class="mt10 text-right">
|
||||
<el-pagination background
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:current-page.sync="addUserPageForm.pageNumber"
|
||||
:page-size.sync="addUserPageForm.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:total="addUserPageForm.totalCount || 0"
|
||||
@size-change="addUserPageData"
|
||||
@current-change="addUserPageData"></el-pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
<template slot="footer">
|
||||
<el-button @click="addUserVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="submitAddUser">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<excel-import
|
||||
ref="excelImportRef"
|
||||
url="/platform/mutualInsurance/roster/importRoster"
|
||||
template_url="/platform/mutualInsurance/roster/downloadTem"
|
||||
:visible.sync="importVisible"
|
||||
title="导入人员名单"
|
||||
width="700px"
|
||||
:extra_params="{projectId:pageForm.projectId}"
|
||||
@import-success="doSearch"
|
||||
></excel-import>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format("YYYY")
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
projectOptions: [],
|
||||
selectedIds: [],
|
||||
importVisible: false,
|
||||
feedbackDialog: false,
|
||||
feedbackLoading: false,
|
||||
feedbackList: [],
|
||||
feedbackForm: {
|
||||
year: "",
|
||||
projectId: "",
|
||||
unionId: "",
|
||||
feedbackInfo: ""
|
||||
},
|
||||
addUserVisible: false,
|
||||
addUserTableLoading: false,
|
||||
addUserTableData: [],
|
||||
addUserSexOptions: ["男", "女"],
|
||||
addUserUnionOptions: [],
|
||||
addUserUnitOptions: [],
|
||||
addUserPageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: "",
|
||||
projectId: "",
|
||||
userName: "",
|
||||
loginName: "",
|
||||
sex: "",
|
||||
birthday: "",
|
||||
birthMonths: [],
|
||||
unionId: "",
|
||||
unitIds: [],
|
||||
personTypes: [],
|
||||
preparedBys: [],
|
||||
userStates: [],
|
||||
isMember: null
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(rows) {
|
||||
this.selectedIds = rows.map(function (item) {
|
||||
return item.id
|
||||
})
|
||||
},
|
||||
yearChange() {
|
||||
return $.get("/platform/mutualInsurance/roster/listProject", {year: this.pageForm.year}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.projectOptions = resp.data || []
|
||||
if (this.projectOptions.length > 0) {
|
||||
this.$set(this.pageForm, "projectId", this.projectOptions[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "projectId", "")
|
||||
}
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
return $.post("/platform/mutualInsurance/roster/pageData", this.pageForm).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list || []
|
||||
this.pageForm.totalCount = resp.data.totalCount || 0
|
||||
this.selectedIds = []
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
return this.pageData()
|
||||
},
|
||||
flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((res) => {
|
||||
this.units = res
|
||||
})
|
||||
} else {
|
||||
this.$businessTool.listUnit().then((res) => {
|
||||
this.units = res
|
||||
})
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
openImport() {
|
||||
if (!this.pageForm.projectId) {
|
||||
this.notifyWarning("请先选择事项")
|
||||
return
|
||||
}
|
||||
this.importVisible = true
|
||||
},
|
||||
openAddUser() {
|
||||
if (!this.pageForm.year || !this.pageForm.projectId) {
|
||||
this.notifyWarning("请先选择年度、事项名称")
|
||||
return
|
||||
}
|
||||
this.resetAddUserPageForm()
|
||||
this.addUserPageForm.year = this.pageForm.year
|
||||
this.addUserPageForm.projectId = this.pageForm.projectId
|
||||
this.addUserVisible = true
|
||||
this.$businessTool.listUnion().then((res) => {
|
||||
this.addUserUnionOptions = res
|
||||
})
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
this.$businessTool.listUnit(this.addUserPageForm.unionId).then((res) => {
|
||||
this.addUserUnitOptions = res
|
||||
})
|
||||
} else {
|
||||
this.$businessTool.listUnit().then((res) => {
|
||||
this.addUserUnitOptions = res
|
||||
})
|
||||
}
|
||||
this.addUserPageData()
|
||||
},
|
||||
resetAddUserPageForm() {
|
||||
this.addUserPageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: "",
|
||||
projectId: "",
|
||||
userName: "",
|
||||
loginName: "",
|
||||
sex: "",
|
||||
birthday: "",
|
||||
birthMonths: [],
|
||||
unionId: "",
|
||||
unitIds: [],
|
||||
personTypes: [],
|
||||
preparedBys: [],
|
||||
userStates: [],
|
||||
isMember: null
|
||||
}
|
||||
this.addUserTableData = []
|
||||
},
|
||||
addUserUnionChange() {
|
||||
this.$set(this.addUserPageForm, "unitIds", [])
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
this.$businessTool.listUnit(this.addUserPageForm.unionId).then((res) => {
|
||||
this.addUserUnitOptions = res
|
||||
})
|
||||
}
|
||||
},
|
||||
addUserPageData() {
|
||||
this.addUserTableLoading = true
|
||||
return $.post("/platform/mutualInsurance/roster/notRosterUserPageData", {
|
||||
pageForm: JSON.stringify(this.addUserPageForm)
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.addUserTableData = resp.data.list || []
|
||||
this.addUserPageForm.totalCount = resp.data.totalCount || 0
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
this.addUserTableLoading = false
|
||||
})
|
||||
},
|
||||
addUserDoSearch() {
|
||||
this.addUserPageForm.pageNumber = 1
|
||||
this.addUserPageData()
|
||||
},
|
||||
addUserIndexMethod(index) {
|
||||
return (this.addUserPageForm.pageNumber - 1) * this.addUserPageForm.pageSize + index + 1
|
||||
},
|
||||
submitAddUser() {
|
||||
if (!this.pageForm.year || !this.pageForm.projectId) {
|
||||
this.notifyWarning("请先选择年度、事项名称")
|
||||
return
|
||||
}
|
||||
this.addUserPageForm.year = this.pageForm.year
|
||||
this.addUserPageForm.projectId = this.pageForm.projectId
|
||||
this.$confirm("当前筛选出" + (this.addUserPageForm.totalCount || 0) + "条数据,确认添加到人员名单吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: "数据保存中,请稍后...",
|
||||
spinner: "el-icon-loading"
|
||||
})
|
||||
$.post("/platform/mutualInsurance/roster/addRosterUser", {
|
||||
pageForm: JSON.stringify(this.addUserPageForm)
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.addUserVisible = false
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
doAuditByUnion(flag) {
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"]) && !this.pageForm.unionId) {
|
||||
this.notifyWarning("请选择需要确认的分工会")
|
||||
return
|
||||
}
|
||||
const msg = flag ? "确定按当前事项和分工会确认名单吗?" : "确定按当前事项和分工会取消确认吗?"
|
||||
this.$confirm(msg, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
$.post("/platform/mutualInsurance/roster/doAuditUser", {
|
||||
projectId: this.pageForm.projectId,
|
||||
unionId: this.pageForm.unionId,
|
||||
flag: flag
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doAuditSelected(flag) {
|
||||
const msg = flag ? "确定确认勾选人员吗?" : "确定取消确认勾选人员吗?"
|
||||
this.$confirm(msg, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
$.post("/platform/mutualInsurance/roster/doAuditSelected", {
|
||||
ids: this.selectedIds.join(","),
|
||||
flag: flag
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
const form = this.pageForm
|
||||
window.open("/platform/mutualInsurance/roster/exportRoster?year=" + encodeURIComponent(form.year || "") +
|
||||
"&projectId=" + encodeURIComponent(form.projectId || "") +
|
||||
"&unionId=" + encodeURIComponent(form.unionId || "") +
|
||||
"&unitId=" + encodeURIComponent(form.unitId || "") +
|
||||
"&searchKeyword=" + encodeURIComponent(form.searchKeyword || "") +
|
||||
"&isAudit=" + encodeURIComponent(form.isAudit || ""))
|
||||
},
|
||||
validateFeedbackCondition() {
|
||||
if (!this.pageForm.year || !this.pageForm.projectId || !this.pageForm.unionId) {
|
||||
this.notifyWarning("请先选择年度、事项、所属工会")
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
openFeedback() {
|
||||
if (!this.validateFeedbackCondition()) {
|
||||
return
|
||||
}
|
||||
this.feedbackForm.year = this.pageForm.year
|
||||
this.feedbackForm.projectId = this.pageForm.projectId
|
||||
this.feedbackForm.unionId = this.pageForm.unionId
|
||||
this.feedbackForm.feedbackInfo = ""
|
||||
this.queryFeedbackList().then(() => {
|
||||
this.feedbackDialog = true
|
||||
})
|
||||
},
|
||||
queryFeedbackList() {
|
||||
return $.get("/platform/mutualInsurance/roster/feedbackList", {
|
||||
year: this.pageForm.year,
|
||||
projectId: this.pageForm.projectId,
|
||||
unionId: this.pageForm.unionId
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.feedbackList = resp.data || []
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
saveFeedback() {
|
||||
if (!this.validateFeedbackCondition()) {
|
||||
return
|
||||
}
|
||||
if (!this.feedbackForm.feedbackInfo) {
|
||||
this.notifyWarning("请输入反馈信息")
|
||||
return
|
||||
}
|
||||
this.feedbackLoading = true
|
||||
$.post("/platform/mutualInsurance/roster/saveFeedback", this.feedbackForm).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.feedbackForm.feedbackInfo = ""
|
||||
this.queryFeedbackList()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
this.feedbackLoading = false
|
||||
})
|
||||
},
|
||||
deleteFeedback(row) {
|
||||
this.$confirm("确认删除这条反馈吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
$.post("/platform/mutualInsurance/roster/deleteFeedback", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.queryFeedbackList()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
deleteSelected() {
|
||||
this.$confirm("确认删除勾选人员吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
$.post("/platform/mutualInsurance/roster/deleteSelected", {
|
||||
ids: this.selectedIds.join(",")
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => {
|
||||
this.unions = res
|
||||
if (!this.pageForm.unionId && this.unions && this.unions.length === 1) {
|
||||
this.pageForm.unionId = this.unions[0].id
|
||||
}
|
||||
})
|
||||
this.flushUnits()
|
||||
this.yearChange()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user