疗休养

This commit is contained in:
Paidax
2025-06-13 17:59:50 +08:00
parent 7c2242685d
commit 4064a88a1b
6 changed files with 953 additions and 10 deletions
@@ -21,7 +21,7 @@ layout("/layouts/platform.html"){
</style>
<div id="app" v-cloak>
<guava>
<guava ref="guava">
<el-card shadow="never">
<div slot="header" class="clearfix">
<h3 style="color: rgb(24, 103, 176);font-family: Microsoft YaHei;">疗休养配置</h3>
@@ -61,6 +61,7 @@ layout("/layouts/platform.html"){
<el-form-item label="省外名额分配模式" prop="outsideQuotaMode">
<el-radio-group v-model="formData.outsideQuotaMode" size="small">
<el-radio label="fixedRatio" border>固定比例</el-radio>
<el-radio label="fixedUser" border>固定人员</el-radio>
<el-radio label="unionRatio" border>分工会名额</el-radio>
</el-radio-group>
</el-form-item>
@@ -76,6 +77,16 @@ layout("/layouts/platform.html"){
</el-col>
</template>
<template v-else-if="formData.outsideQuotaMode == 'fixedUser'">
<el-col :span="12">
<el-form-item label="导入人员" prop="outsideQuotaUser">
<el-button @click="openImport" type="primary" size="small">导入人员</el-button>
<el-button @click="showUser" type="primary" size="small">查看人员</el-button>
<el-button @click="clearUser" type="danger" size="small">清空人员</el-button>
</el-form-item>
</el-col>
</template>
<template v-else-if="formData.outsideQuotaMode == 'unionRatio'">
<el-col :span="12">
<el-form-item label="分工会名额分配" prop="unionLimit">
@@ -250,6 +261,11 @@ layout("/layouts/platform.html"){
<el-button type="primary" @click="deleteLotById">确 定</el-button>
</span>
</el-dialog>
<template #view>
<show-user ref="showUserRef"></show-user>
</template>
</guava>
<drawer-user-scope
@@ -324,9 +340,23 @@ layout("/layouts/platform.html"){
<el-button @click="doConfirmSetUpUnionLimit" type="primary">确定</el-button>
</el-row>
</el-dialog>
<el-dialog :close-on-click-modal="false" :visible.sync="importDialog" title="导入省外名额人员" top="50px">
<file-import
ref="viewImport"
temp_url="/platform/theRapyRecuperation/TheRapyConfig/downloadImportTemp"
post_url="/platform/theRapyRecuperation/TheRapyConfig/doImport"
is_show_radio
@flush="successImport"
></file-import>
</el-dialog>
</div>
<script>
<!--#include("showCanApplyOutUser.js"){}#-->
const vue = new Vue({
el: '#app',
data() {
@@ -415,12 +445,50 @@ layout("/layouts/platform.html"){
unionUserNumCalc: [{}],
unionUserNumOneKeyRatio: null,
summaryCount: 0,
// 导入相关
importDialog: false
}
},
components: {
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue?v=1.0.1'),
'file-import': httpVueLoader('/components/plugins/FileImport.vue'),
'show-user': SHOW_CAN_APPLY_OUT_USER
},
methods: {
// 省外名额,固定人员分配相关
openImport() {
this.importDialog = true
this.$nextTick(() => {
this.$refs.viewImport.resetImportData()
})
},
successImport() {
this.importDialog = false
this.$nextTick(() => {
this.$refs.viewImport.resetImportData()
})
},
showUser(){
this.$refs.guava.view()
this.$nextTick(() => {
this.$refs.showUserRef.pageData()
})
},
clearUser(){
this.$confirm('您确定要清空省外名额人员吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await this.$axios.post('/platform/theRapyRecuperation/TheRapyConfig/clearUser')
if (resp.code === 0) {
this.$message.success('操作成功')
} else {
this.$message.error(resp.msg)
}
})
},
// 设置分工会比例相关==============================================start
async doAllocationUnionRatio(){
this.setUpUnionLimitDialog = true
@@ -0,0 +1,246 @@
const SHOW_CAN_APPLY_OUT_USER = {
template: /* language=HTML */ `
<div>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">姓名工号</div>
<div class="search-item-option">
<el-input clearable placeholder="请输入姓名或工号查询" @key.enter="doSearch"
v-model="pageForm.searchKeyword"></el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId"
style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname"
:value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">组成单位:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unitId" style="width: 100%" filterable
clearable @change="doSearch"
placeholder="请选择">
<el-option
v-for="item in units"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">性别:</div>
<div class="search-item-option">
<el-select v-model="pageForm.sex" style="width: 100%" clearable
placeholder="请选择">
<el-option v-for="sex in sexOptions" :label="sex"
:value="sex"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">在职状态:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.userState"
style="width: 100%"
clearable
placeholder="在职状态"
code="USER_STATE"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.personType"
style="width: 100%"
clearable
placeholder="人员类型"
code="PERSON_TYPE"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">人员性质:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.preparedBy"
style="width: 100%"
clearable
placeholder="人员性质"
code="PREPARED_BY"></dict-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="数据列表" :app="this">
<template #func>
<el-button @click="openAddList" size="small" type="primary">添加人员</el-button>
</template>
</table-tool>
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
@sort-change="pageOrder" :size="tableSize" class="vi-table">
<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
:sortable="column.sortable"
:label="column.label"
:prop="column.prop" :width="column.width" min-width="100px">
</el-table-column>
<el-table-column label="操作" width="250px">
<template scope="{row}">
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog :visible.sync="addListDialog" title="添加省外名额人员" width="50%" append-to-body>
<el-form label-width="120px" ref="addForm">
<el-form-item label="添加人员">
<el-select
v-model="userIds"
value-key="id"
filterable
remote
style="width: 100%"
multiple
reserve-keyword
@change="$refs.userSelect.$children[1].clear()"
ref="userSelect"
placeholder="请输入工号或者姓名查询"
:remote-method="queryNotListUsers">
<el-option
v-for="item in notListUsers"
:key="item.id"
:label="item.username+'-'+item.loginname+'-'+item.unitname"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-row justify="end" type="flex">
<el-button @click="addListDialog=false">取消</el-button>
<el-button @click="doAddList" type="primary">确定</el-button>
</el-row>
</el-dialog>
</div>
`,
mixins: [initTableMixins],
data(){
return {
unions: [],
units: [],
sexOptions: ['男', '女'],
tableColumns: [
{prop: 'loginName', label: '工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
{prop: 'mobile', label: '联系方式', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
],
// 添加人员相关
userIds: [],
addListDialog: false,
notListUsers: [],
}
},
methods: {
async queryNotListUsers(key){
const resp = await $.post('/platform/theRapyRecuperation/TheRapyConfig/queryNotListUsers', {
query: key
})
if (resp.code === 0) {
this.notListUsers = resp.data.list
}
},
openAddList(){
this.userIds = []
this.addListDialog = true
},
doAddList(){
this.$confirm('确定要添加吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.post('/platform/theRapyRecuperation/TheRapyConfig/addList', {
userIds: JSON.stringify(this.userIds)
})
if (resp.code === 0) {
this.$message.success('添加成功')
this.addListDialog = false
this.notListUsers = []
this.doSearch()
} else {
this.$message.error(resp.msg)
}
})
},
doDelete(id){
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios.post('/platform/theRapyRecuperation/TheRapyConfig/deleteCanApplyOutUser', {id: id}).then(async resp => {
if (resp.code === 0) {
await this.pageData()
this.$message.success('删除成功')
} else {
this.$message.error(resp.msg)
}
})
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.units = await getUnits(this.pageForm.unionId)
}
},
async pageData() {
const resp = await this.$axios.post('/platform/theRapyRecuperation/TheRapyConfig/getCanApplyOutUserPageData', this.pageForm)
if (resp.code === 0) {
this.tableData = resp.data.list
this.pageForm.totalCount = resp.data.totalCount
}
},
},
async created(){
this.unions = await getUnionList(null)
}
}