This commit is contained in:
2026-01-21 10:44:02 +08:00
parent c5ec2137e2
commit 7eac8b00b5
24 changed files with 2213 additions and 265 deletions
@@ -0,0 +1,157 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="会员类型">
<dict-select v-model="pageForm.aidFundMemberUserType" code="AIDFUND_MEMBER_USER_TYPE"
style="width: 100%"></dict-select>
</search-item>
<search-item label="变更类型">
<dict-select v-model="pageForm.changeType" code="AIDFUND_MEMBER_CHANGE_TYPE"
style="width: 100%"></dict-select>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
style="width: 100%" @change="unionChange">
<el-option v-for="item in unionList" :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="请选择所属单位" filterable clearable
style="width: 100%">
<el-option v-for="item in unitList" :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" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template v-slot="{row}" v-if="column.prop=='changeType'">
<dict-tag :options="dict.type.AIDFUND_MEMBER_CHANGE_TYPE"
:value="row.changeType"></dict-tag>
</template>
<template v-slot="{row}" v-else-if="column.prop=='applyTime'">
<template v-if="row.applyTime">
{{$moment(row.applyTime).format('YYYY-MM-DD')}}
</template>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200">
<template slot-scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<info ref="infoRef"></info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/applyInfo.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
data() {
return {
pageForm: {
unitId: '',
unionId: '',
year: this.$moment().format("YYYY"),
},
tableColumns: [
{prop: "loginname", label: "工号"},
{prop: "username", label: "姓名"},
{prop: "sex", label: "性别"},
{prop: "arrivalAtSchoolDate", label: "入校时间"},
{prop: "unitName", label: "所属单位"},
{prop: "unionName", label: "所属工会"},
{prop: "aidFundMemberUserType", label: "基金会员类型"},
{prop: "changeType", label: "变更类型"},
{prop: "applyTime", label: "变更时间"},
],
unionList: [],
unitList: [],
}
},
components: {
'info': APPLY_INFO,
},
methods: {
onView(row) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
})
},
async unionChange(val) {
this.pageForm.unitId = null
this.unitList = await this.$businessTool.listUnit(val)
this.doSearch()
},
},
async created() {
this.unionList = await this.$businessTool.listUnion()
this.unitList = await this.$businessTool.listUnit()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,92 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
style="width: 100%" @change="unionChange">
<el-option v-for="item in unionList" :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" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
</el-table-column>
</el-table>
</el-card>
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
return {
pageForm: {
unionId: '',
year: this.$moment().format("YYYY"),
},
unionList: [],
tableColumns: [
{prop: "unionName", label: "分工会"},
{prop: "YEAR_BEGIN", label: "年初数量"},
{prop: "AIDFUND_MEMBER_CHANGE_TYPE_EIGTH", label: "会员退休(不变号)"},
{prop: "AIDFUND_MEMBER_CHANGE_TYPE_ONE", label: "新增会员"},
{prop: "AIDFUND_MEMBER_CHANGE_TYPE_FOUR", label: "自愿退出"},
{prop: "AIDFUND_MEMBER_CHANGE_TYPE_FIVE", label: "会员去世"},
{prop: "currentAidFundMember", label: "当前数量"},
]
}
},
async created() {
this.unionList = await this.$businessTool.listUnion()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,144 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
:clearable="false"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="会员类型">
<dict-select v-model="pageForm.aidFundMemberUserType" code="AIDFUND_MEMBER_USER_TYPE"
style="width: 100%"></dict-select>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
style="width: 100%" @change="unionChange">
<el-option v-for="item in unionList" :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="请选择所属单位" filterable clearable
style="width: 100%">
<el-option v-for="item in unitList" :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 @click="exportHistoryRecord"
size="small"
icon="el-icon-download"
type="primary">导出名单
</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template v-slot="{row}" v-if="column.prop=='aidFundMemberUserType'">
<dict-tag :options="dict.type.AIDFUND_MEMBER_USER_TYPE"
:value="row.aidFundMemberUserType"></dict-tag>
</template>
<template v-slot="{row}" v-else-if="column.prop=='aidFundMemberJoinTime'">
<template v-if="row.aidFundMemberJoinTime">
{{$moment(row.aidFundMemberJoinTime).format("YYYY-MM-DD")}}
</template>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
data() {
return {
pageForm: {
unitId: '',
unionId: '',
year: this.$moment().format("YYYY"),
isPayed: null
},
tableColumns: [
{prop: "year", label: "年度"},
{prop: "loginname", label: "工号"},
{prop: "username", label: "姓名"},
{prop: "sex", label: "性别"},
{prop: "aidFundMemberUserType", label: "基金会员类型"},
{prop: "unitName", label: "所属单位"},
{prop: "unionName", label: "所属工会"},
{prop: "aidFundMemberJoinTime", label: "加入时间"},
],
unionList: [],
unitList: [],
}
},
methods: {
exportHistoryRecord(){
this.$downLoad('/platform/medicalMutualAid/aidFund/historyRecord/exportHistoryRecord', this.pageForm)
},
async unionChange(val) {
this.pageForm.unitId = null
this.unitList = await this.$businessTool.listUnit(val)
this.doSearch()
},
},
async created() {
this.unionList = await this.$businessTool.listUnion()
this.unitList = await this.$businessTool.listUnit()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -17,22 +17,87 @@ layout("/layouts/platform.html"){
style="width: 100%"></dict-select>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
style="width: 100%" @change="unionChange">
<el-option v-for="item in unionList" :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="请选择所属单位" filterable clearable
style="width: 100%">
<el-option v-for="item in unitList" :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-tag :effect="pageForm.notPayedCurrentYear?'dark':'plain'"
@click="pageForm.notPayedCurrentYear=!pageForm.notPayedCurrentYear;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')">
批量设置为退会
</el-button>
<el-button @click="exportNewMember" icon="el-icon-download" size="small" type="primary"
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.exportNewMember')" class="mr10">
导出{{new
Date().getFullYear()}}年新会员名单
</el-button>
<el-dropdown @command="dropdownCommand"
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')" class="mr10">
<el-button size="small" type="primary">
备份会员名单<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{action:backupMember,value:year}"
v-for="year in yearOptions"
:key="year">
{{year}}年
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown @command="dropdownCommand"
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')">
<el-button size="small" type="primary"
>
生成缴费名单<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{action:createPayList,value:year}"
v-for="year in payYearOptions"
:key="year">
{{year}}年
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
@@ -40,18 +105,23 @@ layout("/layouts/platform.html"){
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='aidFundMemberUserType'">
<template v-slot="{row}" v-if="column.prop=='aidFundMemberUserType'">
<dict-tag :options="dict.type.AIDFUND_MEMBER_USER_TYPE"
:value="row.aidFundMemberUserType"></dict-tag>
</template>
<template v-slot="{row}" v-if="column.prop=='aidFundMemberJoinTime'">
<template v-if="row.aidFundMemberJoinTime">
{{$moment(row.aidFundMemberJoinTime).format('YYYY-MM-DD')}}
</template>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200">
<el-table-column label="操作" fixed="right" width="300">
<template slot-scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
<el-button @click="onEditMemberType(row)" size="mini" type="primary">修改基金会员类型
</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回
<el-button @click="onEditChangeType(row)" size="mini" type="primary">变更
</el-button>
</template>
</el-table-column>
@@ -64,13 +134,76 @@ layout("/layouts/platform.html"){
</info>
</template>
</guava>
<el-dialog
:visible.sync="aidFundMemberUserTypeVisible"
title="修改基金会员"
width="40%">
<el-form :model="formData" :rules="formRules" label-width="120px"
ref="form">
<el-form-item label="工号" prop="loginname">
<el-input
disabled
v-model="formData.loginname">
</el-input>
</el-form-item>
<el-form-item label="姓名" prop="username">
<el-input
disabled
v-model="formData.username">
</el-input>
</el-form-item>
<el-form-item label="基金会员类型" prop="aidFundMemberUserType">
<dict-select v-model="formData.aidFundMemberUserType" clearable code="AIDFUND_MEMBER_USER_TYPE"
placeholder="请选择基金会员类型"
style="width: 100%"></dict-select>
</el-form-item>
</el-form>
<span class="dialog-footer" slot="footer">
<el-button @click="aidFundMemberUserTypeVisible = false">取 消</el-button>
<el-button @click="doEditAidFundMemberUserType" type="primary">提 交</el-button>
</span>
</el-dialog>
<el-dialog
:visible.sync="changeTypeVisible"
title="会员变更"
width="40%">
<el-form :model="formData" :rules="formRules" label-width="100px"
ref="form">
<el-form-item label="工号" prop="loginname">
<el-input
disabled
v-model="formData.loginname">
</el-input>
</el-form-item>
<el-form-item label="姓名" prop="username">
<el-input
disabled
v-model="formData.username">
</el-input>
</el-form-item>
<el-form-item label="变更类型" prop="changeType">
<dict-select v-model="formData.changeType" clearable code="AIDFUND_MEMBER_CHANGE_TYPE"
placeholder="请选择变更类型"
style="width: 100%"></dict-select>
</el-form-item>
</el-form>
<span class="dialog-footer" slot="footer">
<el-button @click="changeTypeVisible = false">取 消</el-button>
<el-button @click="doEditChangeType" type="primary">提 交</el-button>
</span>
</el-dialog>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/aidFundInfo.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -79,12 +212,13 @@ layout("/layouts/platform.html"){
data() {
return {
pageForm: {
year: this.$moment().format("YYYY"),
approval: false
unitId: '',
unionId: '',
notPayedCurrentYear: false
},
tableColumns: [
{prop: "loginName", label: "工号"},
{prop: "userName", label: "姓名"},
{prop: "loginname", label: "工号"},
{prop: "username", label: "姓名"},
{prop: "sex", label: "性别"},
{prop: "arrivalAtSchoolDate", label: "入校时间"},
{prop: "unitName", label: "所属单位"},
@@ -92,67 +226,169 @@ layout("/layouts/platform.html"){
{prop: "aidFundMemberUserType", label: "基金会员类型"},
{prop: "aidFundMemberJoinTime", label: "加入时间"},
],
showApprovalForm: false
showApprovalForm: false,
unionList: [],
unitList: [],
payYearOptions: [],
yearOptions: [],
aidFundMemberUserTypeVisible: false,
changeTypeVisible: false,
formRules: {
aidFundMemberUserType: [
{required: true, message: '请选择基金会员类型', trigger: 'change'}
],
changeType: [
{required: true, message: '请选择变更类型', trigger: 'change'}
]
}
}
},
components: {
'info': AID_FUND_INFO,
},
methods: {
onEditChangeType(row) {
this.formData = clone(row)
this.changeTypeVisible = true
},
doEditChangeType() {
this.$confirm('确定要变更【' + this.formData.username + '】吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios.post(loc() + "/doEditChangeType", {
userId: this.formData.id,
changeType: this.formData.changeType
}).then(resp => {
if (resp.code === 0) {
this.$message.success(resp.msg)
this.doSearch()
this.changeTypeVisible = false
}
})
})
},
doEditAidFundMemberUserType() {
this.$confirm('确定要修改【' + this.formData.username + '】的基金会员类型吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios.post(loc() + "/doEditAidFundMemberUserType", {
userId: this.formData.id,
aidFundMemberUserType: this.formData.aidFundMemberUserType
}).then(resp => {
if (resp.code === 0) {
this.$message.success(resp.msg)
this.doSearch()
this.$refs.table.clearSelection()
this.aidFundMemberUserTypeVisible = false
}
})
})
},
onEditMemberType(row) {
this.formData = clone(row)
this.aidFundMemberUserTypeVisible = true
},
batchExit() {
const selection = this.$refs.table.selection
if (selection.length === 0) {
this.$message.warning('请勾选需要设置为退会的人员')
return
}
const ids = selection.map(v => v.id)
this.$confirm('请核实勾选人员的退会原因,您确定要将勾选的人员设置为未缴费吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios.post(loc() + "/batchExit", {ids: JSON.stringify(ids)}).then(resp => {
if (resp.code === 0) {
this.$message.success(resp.msg)
this.doSearch()
this.$refs.table.clearSelection()
}
})
})
},
backupMember(year) {
this.$confirm('您确定要备份' + year + '年的数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.tableLoading = true
this.$axios.post(loc() + "/backupMember", {year}).then(resp => {
if (resp.code === 0) {
this.$message.success(resp.msg)
}
}).finally(() => {
this.tableLoading = false
})
})
},
createPayList(year) {
let msg = "请确认是否生成缴费名单?"
if (year === new Date().getFullYear()) {
msg = "您生成的" + year + "年度的缴费名单,将有可能覆盖已缴费人员的信息!请确认是否生成?"
}
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.tableLoading = true;
this.$axios.post(loc() + "/createPayList", {year}).then(resp => {
if (resp.code === 0) {
this.$message.success(resp.msg)
}
}).finally(() => {
this.tableLoading = false
})
})
},
exportNewMember() {
this.$downLoad(loc() + "/exportNewMember")
},
getYearOptions() {
let year = new Date().getFullYear();
let arr = []
for (let i = year; i >= year - 3; i--) {
arr.push(i)
}
this.yearOptions = arr
},
getPayYearOptions() {
let year = new Date().getFullYear() + 1;
let arr = []
for (let i = year; i >= year - 1; i--) {
arr.push(i)
}
this.payYearOptions = arr
},
onView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
async unionChange(val) {
this.pageForm.unitId = null
this.unitList = await this.$businessTool.listUnit(val)
this.doSearch()
},
},
created() {
async created() {
this.getPayYearOptions()
this.getYearOptions()
this.pageData()
this.unionList = await this.$businessTool.listUnion()
this.unitList = await this.$businessTool.listUnit()
}
})
</script>
@@ -0,0 +1,240 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
:clearable="false"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="会员类型">
<dict-select v-model="pageForm.aidFundMemberUserType" code="AIDFUND_MEMBER_USER_TYPE"
style="width: 100%"></dict-select>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
style="width: 100%" @change="unionChange">
<el-option v-for="item in unionList" :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="请选择所属单位" filterable clearable
style="width: 100%">
<el-option v-for="item in unitList" :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-radio-group @change="doSearch" size="small"
v-model="pageForm.isPayed">
<el-radio-button :label="null">全部</el-radio-button>
<el-radio-button :label="1">已缴费</el-radio-button>
<el-radio-button :label="0">未缴费</el-radio-button>
</el-radio-group>
<el-button @click="openImport"
size="small"
icon="el-icon-upload2"
type="primary">导入缴费记录
</el-button>
<el-button @click="exportPayRecord"
size="small"
icon="el-icon-download"
type="primary">导出名单
</el-button>
<el-button :disabled="tableData.length==0" :loading="tableLoading" @click="clearPayRecord"
icon="el-icon-delete"
size="small"
type="danger">清空{{pageForm.year}}年缴费名单
</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template v-slot="{row}" v-if="column.prop=='aidFundMemberUserType'">
<dict-tag :options="dict.type.AIDFUND_MEMBER_USER_TYPE"
:value="row.aidFundMemberUserType"></dict-tag>
</template>
<template v-slot="{row}" v-else-if="column.prop=='isPayed'">
<template>
<el-tag type="success" v-if="row.isPayed">已缴费</el-tag>
<el-tag type="info" v-else>未缴费</el-tag>
</template>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200">
<template slot-scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="onPayed(row,1)" size="mini" type="primary" v-if="!row.isPayed">设置为已缴费
</el-button>
<el-button @click="onPayed(row,0)" size="mini" type="danger" v-if="row.isPayed">设置为未缴费
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<file-import
ref="viewImport"
temp_url="/platform/medicalMutualAid/aidFund/payRecord/downloadImportTemp"
post_url="/platform/medicalMutualAid/aidFund/payRecord/doImport"
@flush="pageData"
></file-import>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
data() {
return {
pageForm: {
unitId: '',
unionId: '',
year: this.$moment().format("YYYY"),
isPayed: null
},
tableColumns: [
{prop: "year", label: "年度"},
{prop: "loginname", label: "工号"},
{prop: "username", label: "姓名"},
{prop: "sex", label: "性别"},
{prop: "aidFundMemberUserType", label: "基金会员类型"},
{prop: "unitName", label: "所属单位"},
{prop: "unionName", label: "所属工会"},
{prop: "money", label: "缴费金额"},
{prop: "isPayed", label: "是否缴费"},
],
unionList: [],
unitList: [],
}
},
components: {
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue"),
},
methods: {
openImport() {
this.$refs.guava.edit()
this.$nextTick(() => {
setTimeout(() => {
this.$refs.viewImport.resetImportData()
this.$refs.viewImport.importData.year = this.pageForm.year
}, 500)
})
},
exportPayRecord() {
this.$downLoad('/platform/medicalMutualAid/aidFund/payRecord/exportPayRecord', this.pageForm)
},
clearPayRecord() {
if (this.pageForm.year < (new Date().getFullYear()).toString()) {
this.notifyWarning("历史数据不能删除!")
return;
}
this.$confirm("确定将【" + this.pageForm.year + "】年基金会员的缴费名单清空吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.tableLoading = true
this.$axios.post(loc() + "/clearPayRecord", {
year: this.pageForm.year
}).then(resp => {
if (resp.code === 0) {
this.$message.success(resp.msg)
this.doSearch()
}
}).finally(() => {
this.tableLoading = false
})
})
},
onPayed(row, isPayed) {
this.$confirm("确定将【" + row.username + "】设置为" + (isPayed ? "已缴费" : "未缴费") + "吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.tableLoading = true
this.$axios.post(loc() + "/onPayed", {id: row.id, isPayed: isPayed}).then(resp => {
if (resp.code === 0) {
this.$message.success(resp.msg)
this.doSearch()
}
}).finally(() => {
this.tableLoading = false
})
})
},
onView(row) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
})
},
async unionChange(val) {
this.pageForm.unitId = null
this.unitList = await this.$businessTool.listUnit(val)
this.doSearch()
},
},
async created() {
this.unionList = await this.$businessTool.listUnion()
this.unitList = await this.$businessTool.listUnit()
this.pageData()
}
})
</script>
<!--#
}
#-->