555 lines
25 KiB
HTML
555 lines
25 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<template>
|
|
<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
|
|
:clearable="false"
|
|
@change="doSearch();getProjectList()"
|
|
placeholder="选择年度"
|
|
type="year"
|
|
style="width: 100%"
|
|
v-model="pageForm.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
|
|
placeholder="请选择项目"
|
|
v-model="pageForm.paymentProjectId"
|
|
style="width: 100%"
|
|
clearable="true"
|
|
@change="doSearch"
|
|
@clear="doSearch"
|
|
filterable="true"
|
|
>
|
|
<el-option v-for="item in paymentProjectList" :label="item.projectName" :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-input
|
|
placeholder="请输入内容"
|
|
clearable
|
|
v-model="pageForm.searchKeyword"
|
|
style="width: 100%"
|
|
@keyup.enter.native="doSearch"
|
|
>
|
|
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
|
<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">
|
|
<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
|
|
placeholder="所属单位"
|
|
v-model="pageForm.unitId"
|
|
style="width: 100%"
|
|
@change="getThreeUnits"
|
|
clearable="true"
|
|
filterable="true"
|
|
>
|
|
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
<template v-if="searchMore">
|
|
<template v-if="isThreeUnit">
|
|
<div class="search-item">
|
|
<div class="search-item-label">工会小组:</div>
|
|
<div class="search-item-option">
|
|
<el-select
|
|
v-model="pageForm.unionGroupId"
|
|
style="width: 100%"
|
|
filterable
|
|
clearable
|
|
@change="getThreeUnits"
|
|
placeholder="请选择"
|
|
>
|
|
<el-option v-for="item in unionGroups" :key="item.id" :label="item.groupName" :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.threeUnitId" style="width: 100%" filterable clearable placeholder="请选择">
|
|
<el-option v-for="item in threeUnits" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<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="UserType"
|
|
></dict-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="UserState"
|
|
></dict-select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">入职时间:</div>
|
|
<div class="search-item-option">
|
|
<el-date-picker
|
|
value-format="yyyy-MM-dd"
|
|
v-model="pageForm.schoolTime"
|
|
type="date"
|
|
style="width: 100%"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- <div class="search-item">-->
|
|
<!-- <div class="search-item-label">退休时间:</div>-->
|
|
<!-- <div class="search-item-option">-->
|
|
<!-- <el-date-picker-->
|
|
<!-- value-format="yyyy-MM-dd"-->
|
|
<!-- v-model="pageForm.retireDate"-->
|
|
<!-- type="date"-->
|
|
<!-- style="width: 100%"-->
|
|
<!-- placeholder="选择日期">-->
|
|
<!-- </el-date-picker>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
</template>
|
|
<div class="search-query">
|
|
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
|
<more v-model="searchMore"></more>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
|
|
<el-card shadow="never" class="mt10">
|
|
<table-tool label="缴费列表" :app="this">
|
|
<template #func>
|
|
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isPay">
|
|
<el-radio-button :label="null">全部</el-radio-button>
|
|
<el-radio-button :label="true">已缴</el-radio-button>
|
|
<el-radio-button :label="false">未缴</el-radio-button>
|
|
</el-radio-group>
|
|
|
|
<el-button @click="sendPaymentMsgAll" size="small" type="primary">一键催缴</el-button>
|
|
|
|
<el-button @click="openModify(false)" size="small" type="primary">批量设为已缴</el-button>
|
|
|
|
<el-button @click="doPaidToUnPaid(false)" size="small" type="primary">批量设为未缴</el-button>
|
|
|
|
<el-button icon="el-icon-s-promotion" type="primary" size="small" :loading="submitLoading" @click="openImport">
|
|
导入
|
|
</el-button>
|
|
<el-button icon="el-icon-document-add" type="primary" size="small" :loading="submitLoading" @click="doExport(false)">
|
|
导出
|
|
</el-button>
|
|
<el-button icon="el-icon-document-add" type="primary" size="small" :loading="submitLoading" @click="doExport(true)">
|
|
按基层工会导出
|
|
</el-button>
|
|
</template>
|
|
</table-tool>
|
|
|
|
<el-table
|
|
:data="tableData"
|
|
:size="tableSize"
|
|
@sort-change="pageOrder"
|
|
class="vi-table"
|
|
@selection-change="tableHandleSelectionChange"
|
|
ref="table"
|
|
row-key="id"
|
|
style="width: 100%"
|
|
v-loading="tableLoading"
|
|
>
|
|
<el-table-column :reserve-selection="true" type="selection"></el-table-column>
|
|
<el-table-column
|
|
:index="indexMethod"
|
|
align="center"
|
|
header-align="center"
|
|
label="序号"
|
|
type="index"
|
|
width="80px"
|
|
></el-table-column>
|
|
<el-table-column
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
align="center"
|
|
header-align="center"
|
|
show-overflow-tooltip
|
|
v-for="column in tableColumns"
|
|
>
|
|
<template scope="{row}" v-if="column.prop==='isPayment'">
|
|
<span style="color: #00aa3a" v-if="row.isPayment">已缴</span>
|
|
<span style="color: red" v-else>未缴</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="250px">
|
|
<template scope="{row}">
|
|
<el-button v-if="row.isPayment" @click="doPaidToUnPaid(row.id,true)" size="mini" type="primary">设为未缴</el-button>
|
|
<el-button v-if="!row.isPayment" @click="sendPaymentMsg(row)" size="mini" type="primary">催缴</el-button>
|
|
<el-button v-if="!row.isPayment" @click="openModify(row.id,true)" size="mini" type="primary">设为已缴</el-button>
|
|
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</template>
|
|
|
|
<template #edit>
|
|
<file-import
|
|
ref="viewImport"
|
|
temp_url="/platform/member/payment/summary/downloadImportTemp"
|
|
post_url="/platform/member/payment/summary/doImport"
|
|
:project_id="pageForm.paymentProjectId"
|
|
@flush="successImport"
|
|
></file-import>
|
|
</template>
|
|
</guava>
|
|
|
|
<el-diaLog :close-on-click-modal="false" :visible.sync="modifyVisible" title="已缴设置" width="35%">
|
|
<el-form ref="form" :model="formData" :rules="formRules" label-width="80px">
|
|
<el-form-item label="缴费金额" prop="paymentMoney">
|
|
<el-input placeholder="请输入要缴费的金额" type="number" v-model="formData.paymentMoney"></el-input>
|
|
</el-form-item>
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
<el-input placeholder="请输入备注" type="text" v-model="formData.remark"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div style="text-align: right">
|
|
<span>
|
|
<el-button @click="modifyVisible = false">取 消</el-button>
|
|
<el-button @click="doSubmit" type="primary">确 定</el-button>
|
|
</span>
|
|
</div>
|
|
</el-diaLog>
|
|
</div>
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el: "#app",
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
paymentProjectList: [],
|
|
units: [],
|
|
unions: [],
|
|
tableColumns: [
|
|
{ prop: "loginname", label: "工号", sortable: true },
|
|
{ prop: "username", label: "姓名" },
|
|
{ prop: "mobile", label: "联系电话" },
|
|
{ prop: "schoolTime", label: "入职时间" },
|
|
// { prop: "retireDate", label: "退休时间" },
|
|
{ prop: "personType", label: "人员类型", sortable: true },
|
|
{ prop: "userState", label: "在职状态", sortable: true },
|
|
{ prop: "unionname", label: "所属工会", sortable: true },
|
|
{ prop: "unitname", label: "所属单位", sortable: true },
|
|
{ prop: "isPayment", label: "是否缴费", sortable: true },
|
|
{ prop: "paymentMoney", label: "缴费金额", sortable: true }
|
|
],
|
|
pageForm: {
|
|
year: moment().format("YYYY"),
|
|
searchName: "u.username",
|
|
isPay: false,
|
|
searchKeyword: "",
|
|
unionId: "",
|
|
unitId: "",
|
|
threeUnitId: "",
|
|
unionGroupId: "",
|
|
personType: "",
|
|
userState: "",
|
|
paymentProjectId: ""
|
|
},
|
|
checkUsers: [],
|
|
|
|
modifyVisible: false,
|
|
formData: {
|
|
ids: []
|
|
},
|
|
formRules: {
|
|
paymentMoney: [{ required: true, message: "必填", trigger: ["blur", "change"] }]
|
|
}
|
|
}
|
|
},
|
|
components: {
|
|
guava: httpVueLoader("/components/plugins/Guava.vue"),
|
|
"file-import": httpVueLoader("/components/plugins/FileImport.vue"),
|
|
"dict-select": httpVueLoader("/components/plugins/DictSelect.vue?v=1.0.0")
|
|
},
|
|
methods: {
|
|
sendPaymentMsgAll() {},
|
|
async sendPaymentMsg(row) {
|
|
const confirm = await this.$confirm("您确定对【" + row.username + "】会员进行催缴吗?", "提示", {
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
})
|
|
if (confirm !== "confirm") return
|
|
const resp = await $.get(loc() + "/sendPaymentMsg", { id: row.id })
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.pageData()
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
},
|
|
/**
|
|
* 单个将未缴费设为已缴费
|
|
* @param id
|
|
* @param flag
|
|
*/
|
|
openModify(id, flag) {
|
|
this.formData = {
|
|
paymentMoney: "",
|
|
remark: ""
|
|
}
|
|
if (flag) {
|
|
this.checkUsers = []
|
|
this.checkUsers.push(id)
|
|
this.formData.ids = JSON.stringify(this.checkUsers)
|
|
} else {
|
|
const ids = this.checkUsers.map((obj) => obj.id)
|
|
this.formData.ids = JSON.stringify(ids)
|
|
}
|
|
if (!this.checkUsers.length) {
|
|
this.notifyWarning("请在左侧勾选需要进行操作的数据!")
|
|
return
|
|
}
|
|
this.modifyVisible = true
|
|
this.formData.isPay = true
|
|
},
|
|
async doPaidToUnPaid(id, flag) {
|
|
this.formData = {
|
|
paymentMoney: "",
|
|
remark: ""
|
|
}
|
|
if (flag) {
|
|
this.checkUsers = []
|
|
this.checkUsers.push(id)
|
|
this.formData.ids = JSON.stringify(this.checkUsers)
|
|
} else {
|
|
const ids = this.checkUsers.map((obj) => obj.id)
|
|
this.formData.ids = JSON.stringify(ids)
|
|
}
|
|
if (!this.checkUsers.length) {
|
|
this.notifyWarning("请在左侧勾选需要进行操作的数据!")
|
|
return
|
|
}
|
|
|
|
const confirm = await this.$confirm("您确定要设为【未缴】吗,此操作不可撤销!", "提示", {
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
})
|
|
if (confirm === "confirm") {
|
|
const resp = await $.post(loc() + "/modify", this.formData)
|
|
if (resp.code === 0) {
|
|
this.$refs.table.clearSelection()
|
|
this.checkUsers = []
|
|
this.notifySuccess(resp.msg)
|
|
this.modifyVisible = false
|
|
this.pageData()
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
async doSubmit() {
|
|
if (!this.checkUsers.length) {
|
|
this.notifyWarning("请在左侧勾选需要进行操作的数据!")
|
|
return
|
|
}
|
|
const formValid = await this.$refs["form"].validate()
|
|
if (formValid) {
|
|
const confirm = await this.$confirm("您确定要更改缴费信息吗?", "提示", {
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
})
|
|
if (confirm === "confirm") {
|
|
const resp = await $.post(loc() + "/modify", this.formData)
|
|
if (resp.code === 0) {
|
|
this.$refs.table.clearSelection()
|
|
this.checkUsers = []
|
|
this.notifySuccess(resp.msg)
|
|
this.modifyVisible = false
|
|
this.pageData()
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
}
|
|
},
|
|
async doDelete(id) {
|
|
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
})
|
|
if (confirm === "confirm") {
|
|
const resp = await $.get(loc() + "/doRemoveById", { id: id })
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.pageData()
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
openImport() {
|
|
this.$refs.guava.edit()
|
|
this.$refs.viewImport.resetImportData()
|
|
},
|
|
successImport() {
|
|
this.$refs.guava.index()
|
|
this.pageData()
|
|
},
|
|
doExport(isZip) {
|
|
const {
|
|
year,
|
|
paymentProjectId,
|
|
searchName,
|
|
searchKeyword,
|
|
unionId,
|
|
unitId,
|
|
threeUnitId,
|
|
unionGroupId,
|
|
personType,
|
|
userState,
|
|
isPay
|
|
} = this.pageForm
|
|
window.open(
|
|
loc() +
|
|
"/doExport?" +
|
|
searchName +
|
|
"=" +
|
|
searchKeyword +
|
|
"&unionId=" +
|
|
unionId +
|
|
"&unitId=" +
|
|
unitId +
|
|
"&isPay=" +
|
|
isPay +
|
|
"&year=" +
|
|
year +
|
|
"&threeUnitId=" +
|
|
threeUnitId +
|
|
"&isZip=" +
|
|
isZip +
|
|
"&paymentProjectId=" +
|
|
paymentProjectId +
|
|
"&unionGroupId=" +
|
|
unionGroupId +
|
|
"&personType=" +
|
|
personType +
|
|
"&userState=" +
|
|
userState
|
|
)
|
|
},
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", null)
|
|
this.$set(this.pageForm, "unionGroupId", null)
|
|
this.$set(this.pageForm, "threeUnitId", null)
|
|
this.units = []
|
|
this.unionGroups = []
|
|
this.threeUnits = []
|
|
if (this.pageForm.unionId) {
|
|
this.units = await getUnits(this.pageForm.unionId)
|
|
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
|
|
}
|
|
},
|
|
tableHandleSelectionChange(val) {
|
|
this.checkUsers = val
|
|
},
|
|
async getProjectList() {
|
|
const resp = await $.get("/platform/member/payment/project/getAllProject", { year: this.pageForm.year })
|
|
if (resp.code === 0) {
|
|
this.paymentProjectList = resp.data
|
|
this.$set(this.pageForm, "paymentProjectId", this.paymentProjectList ? this.paymentProjectList[0].id : null)
|
|
}
|
|
},
|
|
async doSearch() {
|
|
this.pageData()
|
|
}
|
|
},
|
|
async created() {
|
|
this.isThreeUnit = (await getConfigKey("isThreeUnit")) === "true"
|
|
if (this.isThreeUnit) {
|
|
this.tableColumns.forEach((v) => {
|
|
if (["threeUnitName", "unionGroupName"].includes(v.prop)) {
|
|
v.checked = 1
|
|
}
|
|
})
|
|
}
|
|
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')||@shiro.hasRole('H03')}" === "true") {
|
|
this.unions = await getUnions(null, false)
|
|
} else {
|
|
this.unions = await getUnions(null, true)
|
|
this.$set(this.pageForm, "unionId", this.unions ? this.unions[0].id : null)
|
|
this.flushUnits()
|
|
}
|
|
await this.getProjectList()
|
|
this.pageData()
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|