commit
This commit is contained in:
+9
-3
@@ -43,10 +43,15 @@ layout("/layouts/platform.html"){
|
||||
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')" class="mr10">
|
||||
当年未缴费【基金会员】名单
|
||||
</el-tag>
|
||||
<el-tag :effect="pageForm.personTypeChanged?'dark':'plain'"
|
||||
@click="pageForm.personTypeChanged=!pageForm.personTypeChanged;doSearch();"
|
||||
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')" class="mr10">
|
||||
人员类型变化名单
|
||||
</el-tag>
|
||||
|
||||
<el-button @click="batchExit" size="small"
|
||||
type="danger" v-if="pageForm.notPayedCurrentYear"
|
||||
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')">
|
||||
type="danger"
|
||||
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList') && (pageForm.notPayedCurrentYear || pageForm.personTypeChanged)">
|
||||
批量设置为退会
|
||||
</el-button>
|
||||
|
||||
@@ -258,7 +263,8 @@ layout("/layouts/platform.html"){
|
||||
pageForm: {
|
||||
unitId: '',
|
||||
unionId: '',
|
||||
notPayedCurrentYear: false
|
||||
notPayedCurrentYear: false,
|
||||
personTypeChanged: false
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: "loginname", label: "工号"},
|
||||
|
||||
+74
-13
@@ -153,6 +153,8 @@ layout("/layouts/platform.html"){
|
||||
prop="unitName" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="人员类型" min-width="120"
|
||||
prop="personType" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="人员属性" min-width="120"
|
||||
prop="userAttribute" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="在职状态" min-width="100"
|
||||
prop="userState" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="确认状态" min-width="100"
|
||||
@@ -184,18 +186,40 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="批量变更人员类型" :visible.sync="batchDialogVisible"
|
||||
<el-dialog title="批量变更" :visible.sync="batchDialogVisible"
|
||||
append-to-body width="480px" custom-class="pending-batch-change-dialog"
|
||||
@closed="resetBatchChange">
|
||||
<el-form :model="batchChangeForm" :rules="batchChangeRules"
|
||||
ref="batchChangeFormRef" label-width="100px">
|
||||
<el-form-item label="人员类型" prop="personType">
|
||||
<el-select v-model="batchChangeForm.personType" filterable
|
||||
<el-form-item label="人员类型">
|
||||
<el-select v-model="batchChangeForm.personType" clearable filterable
|
||||
placeholder="请选择人员类型" style="width: 100%">
|
||||
<el-option v-for="item in pendingPersonTypeOptions" :key="item.code"
|
||||
:label="item.name" :value="item.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="在职状态">
|
||||
<dict-select v-model="batchChangeForm.userState" clearable code="USER_STATE"
|
||||
placeholder="请选择在职状态" style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员属性">
|
||||
<dict-select v-model="batchChangeForm.userAttribute" clearable code="USER_ATTRIBUTE"
|
||||
placeholder="请选择人员属性" style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员状态">
|
||||
<el-select v-model="batchChangeForm.member" clearable
|
||||
placeholder="请选择会员状态" style="width: 100%">
|
||||
<el-option label="会员" :value="true"></el-option>
|
||||
<el-option label="非会员" :value="false"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="福利会员状态">
|
||||
<el-select v-model="batchChangeForm.welfareMember" clearable
|
||||
placeholder="请选择福利会员状态" style="width: 100%">
|
||||
<el-option label="福利会员" :value="true"></el-option>
|
||||
<el-option label="非福利会员" :value="false"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template slot="footer">
|
||||
<el-button @click="batchDialogVisible = false">取消</el-button>
|
||||
@@ -228,11 +252,13 @@ layout("/layouts/platform.html"){
|
||||
batchDialogVisible: false,
|
||||
batchSubmitting: false,
|
||||
batchChangeForm: {
|
||||
personType: ""
|
||||
},
|
||||
batchChangeRules: {
|
||||
personType: [{required: true, message: "请选择人员类型", trigger: "change"}]
|
||||
personType: "",
|
||||
userState: "",
|
||||
userAttribute: "",
|
||||
member: null,
|
||||
welfareMember: null
|
||||
},
|
||||
batchChangeRules: {},
|
||||
pendingTableHeight: 300,
|
||||
pendingTableResizeObserver: null
|
||||
}
|
||||
@@ -306,11 +332,23 @@ layout("/layouts/platform.html"){
|
||||
this.$message.warning("请先勾选需要变更的人员")
|
||||
return
|
||||
}
|
||||
this.batchChangeForm.personType = ""
|
||||
this.resetBatchChangeForm()
|
||||
this.batchDialogVisible = true
|
||||
},
|
||||
/** 判断批量表单是否至少填写一个需要变更的字段,布尔 false 也是有效值。 */
|
||||
hasBatchChangeField() {
|
||||
return !!this.batchChangeForm.personType
|
||||
|| !!this.batchChangeForm.userState
|
||||
|| !!this.batchChangeForm.userAttribute
|
||||
|| this.batchChangeForm.member !== null && this.batchChangeForm.member !== undefined && this.batchChangeForm.member !== ""
|
||||
|| this.batchChangeForm.welfareMember !== null && this.batchChangeForm.welfareMember !== undefined && this.batchChangeForm.welfareMember !== ""
|
||||
},
|
||||
/** 二次确认批量操作,防止误改多名人员。 */
|
||||
confirmBatchChange() {
|
||||
if (!this.hasBatchChangeField()) {
|
||||
this.$message.warning("请至少选择一个需要批量变更的字段")
|
||||
return
|
||||
}
|
||||
this.$refs.batchChangeFormRef.validate((valid) => {
|
||||
if (!valid) {
|
||||
return
|
||||
@@ -326,11 +364,26 @@ layout("/layouts/platform.html"){
|
||||
/** 调用批量接口,在一个事务中修改人员类型并完成确认。 */
|
||||
submitBatchChange() {
|
||||
const userIds = this.selectedPendingUsers.map((item) => item.id)
|
||||
const params = {
|
||||
userIds: JSON.stringify(userIds)
|
||||
}
|
||||
if (this.batchChangeForm.personType) {
|
||||
params.personType = this.batchChangeForm.personType
|
||||
}
|
||||
if (this.batchChangeForm.userState) {
|
||||
params.userState = this.batchChangeForm.userState
|
||||
}
|
||||
if (this.batchChangeForm.userAttribute) {
|
||||
params.userAttribute = this.batchChangeForm.userAttribute
|
||||
}
|
||||
if (this.batchChangeForm.member !== null && this.batchChangeForm.member !== undefined && this.batchChangeForm.member !== "") {
|
||||
params.member = this.batchChangeForm.member
|
||||
}
|
||||
if (this.batchChangeForm.welfareMember !== null && this.batchChangeForm.welfareMember !== undefined && this.batchChangeForm.welfareMember !== "") {
|
||||
params.welfareMember = this.batchChangeForm.welfareMember
|
||||
}
|
||||
this.batchSubmitting = true
|
||||
this.$axios.post("/platform/sourcechange/pending/batchChange", {
|
||||
userIds: JSON.stringify(userIds),
|
||||
personType: this.batchChangeForm.personType
|
||||
}).then((resp) => {
|
||||
this.$axios.post("/platform/sourcechange/pending/batchChange", params).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.batchDialogVisible = false
|
||||
@@ -344,10 +397,18 @@ layout("/layouts/platform.html"){
|
||||
this.batchSubmitting = false
|
||||
})
|
||||
},
|
||||
/** 重置批量表单,空值字段不会参与批量整改。 */
|
||||
resetBatchChangeForm() {
|
||||
this.batchChangeForm.personType = ""
|
||||
this.batchChangeForm.userState = ""
|
||||
this.batchChangeForm.userAttribute = ""
|
||||
this.batchChangeForm.member = null
|
||||
this.batchChangeForm.welfareMember = null
|
||||
},
|
||||
/** 关闭弹窗后清理表单,避免保留上次选择的人员类型。 */
|
||||
resetBatchChange() {
|
||||
this.batchSubmitting = false
|
||||
this.batchChangeForm.personType = ""
|
||||
this.resetBatchChangeForm()
|
||||
if (this.$refs.batchChangeFormRef) {
|
||||
this.$refs.batchChangeFormRef.clearValidate()
|
||||
}
|
||||
|
||||
+3
-2
@@ -21,9 +21,10 @@ const PENDING_MEMBER_CHANGE = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 编辑模式仅允许修改人员类型;查看模式下所有字段均为只读。 */
|
||||
/** 编辑模式仅允许修改待确认业务确认所需字段;查看模式下所有字段均为只读。 */
|
||||
pendingAllowFields(prop) {
|
||||
return this.pendingChangeReadonly || prop !== "personType"
|
||||
const editableFields = ["personType", "userState", "userAttribute", "member", "welfareMember"]
|
||||
return this.pendingChangeReadonly || !editableFields.includes(prop)
|
||||
},
|
||||
|
||||
/** 从人员类型字典中仅保留待确认业务允许变更的两种类型。 */
|
||||
|
||||
Reference in New Issue
Block a user