This commit is contained in:
Paidax
2024-07-22 17:36:03 +08:00
parent 03faa20548
commit 7e190d4ccc
24 changed files with 4001 additions and 2 deletions
@@ -0,0 +1,357 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.module {
margin: 10px 10px 14px 10px;
box-shadow: 0 8px 12px #ebedf0;
border-radius: 10px;
}
.menu {
display: flex;
flex-wrap: wrap;
row-gap: 10px;
background-color: white;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
padding: 6px 0px;
}
.menu_img {
position: absolute;
right: 10px;
bottom: 0px;
}
.menu_img_yjf {
position: absolute;
right: 10px;
bottom: 10px;
width: 100px;
height: 60px;
}
.pay_img {
margin-right: 5px;
display: flex;
}
.member_cost .van-cell__title {
display: flex;
align-items: center;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="history.go(-1)" left-arrow
title="会费支付"></van-nav-bar>
</van-sticky>
<div>
<van-tabs @change="pageData" v-model="memberActive">
<van-tab title="未缴费"></van-tab>
<van-tab title="已缴费"></van-tab>
</van-tabs>
<van-row class="module" v-for="p in payList">
<div class="menu">
<van-col :span="8" style="padding: 10px;">
<van-image
height="6rem"
round
src="/assets/mobile/svg/memberPay/hf.svg"
width="6rem"
></van-image>
</van-col>
<van-col :span="16" style="position: relative">
<div style="text-align: left; ">
会费项目:
<div style="font-weight: bold;font-size: 14px">{{p.projectName}}</div>
</div>
<div style="text-align: left; ">
会费标准:
<div v-if="p.selectMode==='1'" style="font-weight: bold;font-size: 14px">{{p.modeValue}}</div>
<div v-if="p.selectMode==='2'" style="font-weight: bold;font-size: 14px">{{p.modeValueName}}
</div>
</div>
<div style="text-align: left; " v-if="p.paymentMoney&&p.isPayment">
已缴费金额:{{p.paymentMoney}}
</div>
<div class="menu_img" v-if="!p.isPayment">
<van-button @click.stop="openAlipay(p)" color="#1867b0" round
size="mini"
style=" width: 75px; height: 30px;"
type="primary">
我要缴费
</van-button>
</div>
<div class="menu_img_yjf" v-if="p.isPayment">
<van-image src="/assets/mobile/svg/memberPay/yjf.svg"
></van-image>
</div>
</van-col>
<el-col span="2">
</el-col>
</div>
</van-row>
<van-action-sheet :close-on-click-overlay="false" :title="viewData.projectName"
style="height: 60%"
v-model="payShow">
<div class="member_cost">
<div v-if="viewData.selectMode==='2'">
<van-cell :value="costFormula" title="会费计算公式"></van-cell>
<van-cell-group>
<van-field :label="o.name" :placeholder="'请输入'+o.name"
@input="moneyInput"
input-align="right"
type="number" v-for="(o,index) in viewData.modeValueList"
v-model="o.value">
<template #left-icon>
<div class="pay_img">
<van-image src="/assets/mobile/svg/memberPay/money.svg"
></van-image>
</div>
</template>
</van-field>
</van-cell-group>
</div>
<div>
<van-radio-group checked-color="#1867b0" v-model="moneyModel">
<van-cell-group>
<van-cell @click="moneyModel = 1" clickable title="支付宝">
<template #icon>
<div class="pay_img">
<van-image src="/assets/mobile/svg/memberPay/zfb.svg"
></van-image>
</div>
</template>
<template #right-icon>
<van-radio :name="1"></van-radio>
</template>
</van-cell>
<van-cell @click="moneyModel = 2" clickable title="微信">
<template #icon>
<div class="pay_img">
<van-image src="/assets/mobile/svg/memberPay/wx.svg"
></van-image>
</div>
</template>
<template #right-icon>
<van-radio :name="2"></van-radio>
</template>
</van-cell>
</van-cell-group>
</van-radio-group>
</div>
</div>
<van-submit-bar
:loading="loading"
:price="money"
@submit="doAlipay"
button-color="#1867b0"
button-text="支付"
></van-submit-bar>
</van-action-sheet>
<van-popup :style="{ height: '100%', width: '100%'}" @close="imgClose" closeable
position="right"
v-model="zfImg">
<van-image src="/assets/mobile/svg/memberPay/zf_img.png"
style="margin-top: 40px; height: 95%;width: 100%"></van-image>
</van-popup>
<van-empty
class="custom-image"
description="暂无缴费记录"
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
v-if="payList&&payList.length===0"
></van-empty>
</div>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
zfImg: false,
costFormula: "",
formData: {},
payShow: false,
loading: false,
moneyModel: "",
money: 0,
viewData: {},
configData: {},
payList: [],
memberActive: 0,
intervalTimer: null,
}
},
methods: {
imgClose() {
clearInterval(this.intervalTimer)
this.loading = false
this.zfImg = false
},
moneyInput() {
const moneys = this.viewData.modeValueList.map(m => Number(m.value))
let money = 0
moneys.forEach(m => {
money += m;
})
if (money <= 10) {
this.money = 1
} else {
money = money.toFixed(2)
this.money = Number(money.replace(".", "")) * 0.5 / 100
}
},
async doAlipay() {
this.doIsPaySuccess()
if (!this.money) {
vant.Toast('请计算会费金额')
return
}
if (!this.moneyModel) {
vant.Toast('请选择支付方式')
return
}
this.loading = true
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
let money = 0
if (this.viewData.selectMode === "1") {
money = this.viewData.modeValue
} else if (this.viewData.selectMode === "2") {
const moneys = this.viewData.modeValueList.map(m => Number(m.value))
moneys.forEach(m => {
money += m;
})
money = money * 0.5 / 100
money = money.toFixed(2)
}
if (this.moneyModel === 1) {
let use = window.navigator.userAgent.toLowerCase();
//是否微信浏览器
if (use.match(/MicroMessenger/i) && use.match(/MicroMessenger/i)[0] === "micromessenger") {
this.zfImg = true
return
} else {
if (this.moneyModel === 1) {
const resp = await $.get("/mobile/memberCost/AlipayClient/tradePagePay", {
money: money,
paymentProjectId: this.viewData.paymentProjectId,
})
const div = document.createElement('div');
div.innerHTML = resp; // data就是接口返回的form 表单字符串
document.body.appendChild(div);
//如果是ios,不新开页面直接跳转
if (isiOS) {
document.forms[0].submit();
} else {
document.forms[0].setAttribute('target', '_blank') // 新开窗口跳转
document.forms[0].submit();
}
}
}
} else {
}
},
async getConfig() {
const {data} = await $.get("/platform/member/payment/config/getPaymentConfig")
this.configData = data
},
async openAlipay(p) {
const data = clone(p)
this.money = 0
this.moneyModel = ""
this.viewData = data
if (this.viewData.selectMode === "1") {
this.money = Number(data.modeValue + "00")
}
if (this.viewData.selectMode === "2") {
const names = this.viewData.modeValueList.map(m => m.name)
this.costFormula = "(" + names.join("+") + ")" + "×0.5%"
}
this.payShow = true
},
async pageData() {
const resp = await $.post("/mobile/memberCost/list/pageData", {memberActive: this.memberActive})
if (resp.code === 0) {
const personType = "${@shiro.getPrincipalProperty('personType')}"
const payStandards = this.configData.payStandards
resp.data.forEach(r => {
payStandards.map(p => {
if (p.personTypes.includes(personType)) {
r.selectMode = p.payMode
if (p.payMode === "1") {
r.modeValue = p.payModeValue
} else {
r.modeValueList = p.payModeValueList
const names = r.modeValueList.map(m => m.name)
r.modeValueName = "(" + names.join("+") + ")" + "×0.5%"
}
}
})
})
this.payList = resp.data
}
},
doIsPaySuccess() {
this.intervalTimer = setInterval(async () => {
const resp = await $.get("/mobile/memberCost/list/getPayInfo", {id: this.viewData.id})
if (resp.data.isPayment === true) {
clearInterval(this.intervalTimer)
this.doSearch()
this.payShow = false
this.loading = false
this.zfImg = false
}
}, 4000)
}
},
async created() {
await this.getConfig()
await this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,134 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.head {
position: relative;
height: 300px;
background-color: #02be6e;
}
.head_img {
position: absolute;
top: 35%;
left: 54%;
transform: translate(-50%, -50%);
}
.head_zfcg {
position: absolute;
top: 63%;
left: 52%;
transform: translate(-50%, -50%);
font-size: 20px;
font-weight: 700;
color: #ffffff;
}
.head_xq {
position: absolute;
top: 70%;
left: 15%;
color: #ffffff;
}
.middle_zfxx {
background: radial-gradient(circle, transparent, transparent 8px, #FFFFFF 8px, #FFFFFF) 170px;
height: 20vh;
position: relative;
top: -25px;
margin-left: 25px;
margin-right: 25px;
}
.middle_x {
margin-right: 20px;
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.middle_jine {
position: absolute;
top: 25%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 700;
font-size: 20px;
color: #02be6e;
}
.middle_zxxx {
position: absolute;
top: 55%;
line-height: 25px;
font-size: 13px;
width: 100%;
}
.app {
background-color: #f7f7f7;
}
</style>
<div id="app" v-cloak>
<div class="head">
<div>
<van-image class="head_img"
src="/assets/mobile/svg/memberPay/paySuccess.svg"></van-image>
<span class="head_zfcg">支付成功</span>
<span class="head_xq">您已付款成功,请返回查看会费情况</span>
</div>
</div>
<div class="middle_zfxx">
<div class="middle_jine">¥{{total_amount}}</div>
<div class="middle_x">
<van-divider dashed></van-divider>
</div>
<div class="middle_zxxx">
<van-row>
<van-col span="8" style="text-align: left;padding-left: 10px;">订单编号</van-col>
<van-col span="16" style="text-align: right;padding-right: 10px;">
{{out_trade_no}}
</van-col>
</van-row>
<van-row>
<van-col span="8" style="text-align: left;padding-left: 10px;">支付时间</van-col>
<van-col span="16" style="text-align: right;padding-right: 10px;">
{{timestamp}}
</van-col>
</van-row>
</div>
</div>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
out_trade_no: 0,
total_amount: 0,
timestamp: 0,
}
},
methods: {},
async created() {
this.out_trade_no = GetQueryString("out_trade_no")
this.total_amount = GetQueryString("total_amount")
this.timestamp = GetQueryString("timestamp").replace("+", " ")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,221 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-input-group__append {
border-left: 0;
padding: 0 13px;
height: 40px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div slot="header" class="clearfix">
<h3 style="color: rgb(24, 103, 176);font-family: Microsoft YaHei;">缴费配置</h3>
</div>
<el-form :model="formData" ref="addForm" :rules="rules"
label-width="120px"
style="margin: 10px 0 0 0">
<vi-title title="缴纳标准"></vi-title>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item class="is-required" label="会费缴纳情况" prop="payStandard">
<el-button @click="formData.payStandards.push({payPersonnel: null, payMode: '1', personTypes: null, payModeValue: null,payModeValueList:[{name:'',value:''}]})" icon="el-icon-plus" size="mini"
style="float: right;margin-bottom: 10px">
添加
</el-button>
<span style="color: red">说明:。</span>
<el-table
:data="formData.payStandards"
border
v-fit-columns
size="mini"
style="width: 100%">
<el-table-column label="缴费人员" prop="payPersonnel" width="200">
<template scope="{row,$index}">
<el-form-item :prop="'payStandards.'+$index+'.payPersonnel'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<el-input clearable maxlength="100" placeholder="请输入缴费人员"
v-model="row.payPersonnel"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="缴费模式" prop="payMode" width="200">
<template scope="{row,$index}">
<el-form-item :prop="'payStandards.'+$index+'.payMode'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<el-select placeholder="请选择缴费模式" v-model="row.payMode"
style="width: 100%">
<el-option v-for="item in payModeList" :label="item.value" :value="item.code"></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="人员类型" prop="personTypes" width="300">
<template slot-scope="{row,$index}">
<el-select multiple placeholder="请选择人员类型" v-model="row.personTypes"
style="width: 100%" clearable>
<el-option v-for="item in personTypeList" :label="item.name" :value="item.code"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="缴费标准" prop="payModeValue">
<template scope="{row,$index}">
<div v-if="row.payMode=='2'">
<el-form-item :prop="'payStandards.'+$index+'.payModeValueList'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<div style="display:flex;justify-content: space-between;margin-left: 30px">
(
<template v-for="(o,i) in row.payModeValueList">
<el-input placeholder="请输入" style="width: 120px;"
v-model="o.name">
<el-button @click="row.payModeValueList.splice(i, 1)" slot="append" style="padding: 0 7px;"
icon="el-icon-circle-close"></el-button>
</el-input>
<span v-if="i !== row.payModeValueList.length - 1">+</span>
</template>
) * 0.5%
<div>
<el-button @click="row.payModeValueList.push({name: '',value:''})" size="mini">新增</el-button>
</div>
</div>
</el-form-item>
</div>
<div v-else-if="row.payMode == '1' || row.payMode == '3'">
<el-form-item :prop="'payStandards.'+$index+'.payModeValue'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<div v-if="row.payMode == '1'">
<el-input clearable maxlength="100" type="number" placeholder="请输入缴费金额"
v-model="row.payModeValue"></el-input>
</div>
<div v-if="row.payMode == '3'" style="text-align: center">
<span>导入名单</span>
</div>
<!-- <el-input clearable maxlength="100" placeholder="请填写缴费标准"-->
<!-- v-model="row.payModeValue"></el-input>-->
</el-form-item>
</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="80">
<template slot-scope="scope">
<el-button :disabled="formData.payStandards.length<=1"
@click="formData.payStandards.splice(scope.$index,1)" circle
icon="el-icon-delete"
size="mini"
type="danger"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
<vi-title title="退会标准"></vi-title>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="未缴费退会时间" prop="unPaidExitDuration">
<el-input v-model="formData.unPaidExitDuration">
<template slot="append">月</template>
</el-input>
</el-form-item>
</el-col>
<div style="margin-top: 10px">
<span style="color: red">说明:多长时间未缴纳会费则视为退会处理。</span>
</div>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="退会模式" prop="exitMode">
<el-radio-group v-model="formData.exitMode">
<el-radio label="1" border>自动退会</el-radio>
<el-radio label="2" border>人工退会</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<vi-title title="缴费时长"></vi-title>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="缴费时长" prop="paidDuration">
<el-input v-model="formData.paidDuration">
<template slot="append">月</template>
</el-input>
</el-form-item>
</el-col>
<div style="margin-top: 10px">
<span style="color: red">说明:多长时间缴费一次。</span>
</div>
</el-row>
</el-form>
<el-row class="mt10" justify="center" type="flex">
<el-button @click="doSubmit" style="width: 300px" type="primary">保存
</el-button>
<el-button @click="doSubmit" style="width: 300px" type="primary">提交
</el-button>
</el-row>
</el-card>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
payModeList:[{code:'1',value:'固定金额缴纳'},{code:'2',value:'按比例缴纳'},{code:'3',value:'导入'}],
formData: {
payStandards: [{payPersonnel: null, payMode: '1', personTypes: null, payModeValue: null,payModeValueList:[{name:'',value:''}]}]
},
rules: {
exit: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
personTypeList:[],
}
},
methods: {
async doSubmit(){
const formData = clone(this.formData)
formData.payStandards = JSON.stringify(this.formData.payStandards)
const resp = await $.post(loc() + '/doAddOrModify',formData)
if (resp.code === 0){
await this.getPaymentConfig()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
async getPaymentConfig(){
const resp = await $.get(loc() + '/getPaymentConfig')
if (resp.code === 0){
this.formData = {...resp.data}
}
}
},
async created() {
this.personTypeList = await getDictOptions('UserType')
await this.getPaymentConfig()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,408 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-input-group__append {
border-left: 0;
padding: 0 7px;
}
</style>
<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"
clearable
@change="doSearch"
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-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 100%"
v-model="pageForm.projectName">
</el-input>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="缴费项目列表">
<template #func>
<el-button @click="openAdd" size="small" type="primary">
新增缴费项目
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize"
@sort-change="pageOrder"
class="vi-table"
ref="table" row-key="id" style="width: 100%"
v-loading="tableLoading">
<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==='isDisabled'">
<el-switch
:active-value="false"
:inactive-value="true"
@change="(val)=>{projectStatusChange(row.id)}"
active-color="#13ce66"
inactive-color="#ff4949"
v-model="row.isDisabled">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作"
width="100px">
<template scope="scope">
<el-dropdown @command="dropdownCommand">
<el-button :loading="submitLoading" plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'openCode',data:scope.row}">
二维码
</el-dropdown-item>
<el-dropdown-item :command="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',data:scope.row}">
编辑
</el-dropdown-item>
<el-dropdown-item :command="{type:'doRenew',data:scope.row}"
v-if="scope.row.created">
更新缴费人员
</el-dropdown-item>
<el-dropdown-item :command="{type:'doSet',data:scope.row}">
{{scope.row.created?'重置缴费人员':'生成缴费人员'}}
</el-dropdown-item>
<el-dropdown-item :command="{type:'remove',data:scope.row}">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<el-form :model="formData" :rules="formRules" label-width="100px" ref="form">
<vi-title title="缴费项目信息"></vi-title>
<el-form-item label="项目名称" prop="projectName">
<el-input maxlength="100" placeholder="项目名称" v-model="formData.projectName"></el-input>
</el-form-item>
<el-row :gutter="20">
<el-col span="12">
<el-form-item label="缴费年度" prop="year">
<el-date-picker
:clearable="false"
placeholder="选择年度"
type="year" style="width: 100%"
v-model="formData.year"
@change="isMonthCreatedByYear"
value-format="yyyy">
</el-date-picker>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="创建日期" prop="createTime">
<el-date-picker
placeholder="创建日期"
readonly
style="width: 100%"
type="date"
v-model="formData.createTime"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="缴费月份" prop="paymentMonth" size="medium">
<el-radio-group v-model="formData.paymentMonth">
<el-radio-button v-for="item in monthSelect" :label="item.label"
:disabled="item.code===1"></el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div>
<el-button @click="doSave" v-if="isSubmit" v-loading="submitLoading" style="float: right"
type="primary">
提交
</el-button>
</div>
</template>
<open-qr-code ref="openQRCode"></open-qr-code>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
isSubmit: true,
pageForm: {
year: moment().format('YYYY'),
},
tableColumns: [
{prop: 'year', label: '年度', sortable: true},
{prop: 'projectName', label: '项目名称', sortable: true},
{prop: 'createTime', label: '创建时间', sortable: true},
{prop: 'isDisabled', label: '开启状态'},
],
formData: {
year: moment().format('YYYY'),
},
formRules: {
projectName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
year: [{required: true, message: '必填', trigger: ['blur', 'change']}],
paymentMonth: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
paymentConfig: {},
monthSelect: []
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type === 'openCode') {
this.openCode(data)
} else if (type === 'view') {
this.openView(data)
} else if (type === 'edit') {
this.openEdit(data)
} else if (type === 'doRenew') {
this.doRenewPayment(data.id)
} else if (type === 'doSet') {
this.doSetPayment(data)
} else if (type === 'remove') {
this.doRemove(data.id)
}
},
openCode(row) {
this.$refs.openQRCode.openCode('/mobile/memberCost/list')
},
openView(data) {
this.formData = {}
this.formData = {...data}
this.isSubmit = false
this.$refs.guava.view()
},
openEdit(data) {
this.formData = {}
this.formData = {...data}
this.isSubmit = true
this.$refs.guava.view()
},
async doRenewPayment(id) {
this.$confirm('系统根据现有的会员,更新当前缴费名单,对已经缴费人员没有影响,请确认是否更新?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.submitLoading = true
const resp = await $.get(loc() + '/doSetPayment', {id: id, isRenew: true})
this.submitLoading = false
loading.close()
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
}
})
},
async doSetPayment(row) {
let msg = row.created ? "请确认是否重新生成缴费名单,如果确认,系统将清空已缴费的人员信息!" : "确定要生成缴费名单吗?"
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.submitLoading = true
const resp = await $.get(loc() + '/doSetPayment', {id: row.id, isRenew: false})
this.submitLoading = false
loading.close()
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
}
})
},
async doRemove(id) {
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.get(loc() + '/doRemove', {id: id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
}
},
openAdd() {
this.formData = {
createTime: moment().format('YYYY-MM-DD HH:mm:ss'),
year: moment().format('YYYY'),
}
this.$refs.guava.view()
this.isMonthCreatedByYear()
},
async doSave() {
const formValid = await this.$refs["form"].validate()
if (formValid) {
this.submitLoading = true
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const formData = clone(this.formData)
const o = this.monthSelect.find(v => v.label === formData.paymentMonth)
if (o.code === 1) {
this.notifyWarning("该年份下的此月份已创建了项目,请选择其他月份!")
loading.close()
this.submitLoading = false
return
}
const resp = await $.post(loc() + '/doSave', formData)
loading.close()
this.submitLoading = false
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.$refs.guava.index()
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
}
},
async projectStatusChange(id) {
const resp = await $.post(loc() + '/openClosedProject', {id: id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
},
async getPaymentConfig() {
const resp = await $.get('/platform/member/payment/config/getPaymentConfig')
if (resp.code === 0) {
this.paymentConfig = resp.data
const arr = []
let monthHalve = this.paymentConfig.paidDuration
let halve = 12 / monthHalve
for (let i = 1; i <= halve; i++) {
let value = (Number(i) - 1) * monthHalve + 1;
let followValue = i * monthHalve
if (i === 1) {
arr.push({label: i + '-' + monthHalve + '月', code: 0})
} else {
arr.push({label: value + '-' + followValue + '月', code: 0})
}
}
this.monthSelect = arr
}
},
async isMonthCreatedByYear() {
console.log(this.formData.year)
const resp = await $.post(loc() + '/isMonthCreatedByYear', {
year: this.formData.year,
monthSelect: JSON.stringify(this.monthSelect)
})
if (resp.code === 0) {
this.monthSelect = resp.data
}
}
},
async created() {
this.pageData()
await this.getPaymentConfig();
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,489 @@
<!--#
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>
</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="sendPaymentMsg" 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.id)" 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: 'sex', label: '性别'},
{prop: 'mobile', 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: {
async sendPaymentMsg(id){
const resp = await $.get(loc() + '/sendPaymentMsg',{id: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/manage/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('A06')||@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>
<!--#
}
#-->
@@ -0,0 +1,221 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-input-group__append {
border-left: 0;
padding: 0 13px;
height: 40px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div slot="header" class="clearfix">
<h3 style="color: rgb(24, 103, 176);font-family: Microsoft YaHei;">缴费配置</h3>
</div>
<el-form :model="formData" ref="addForm" :rules="rules"
label-width="120px"
style="margin: 10px 0 0 0">
<vi-title title="缴纳标准"></vi-title>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item class="is-required" label="会费缴纳情况" prop="payStandard">
<el-button @click="formData.payStandards.push({payPersonnel: null, payMode: '1', personTypes: null, payModeValue: null,payModeValueList:[{name:'',value:''}]})" icon="el-icon-plus" size="mini"
style="float: right;margin-bottom: 10px">
添加
</el-button>
<span style="color: red">说明:。</span>
<el-table
:data="formData.payStandards"
border
v-fit-columns
size="mini"
style="width: 100%">
<el-table-column label="缴费人员" prop="payPersonnel" width="200">
<template scope="{row,$index}">
<el-form-item :prop="'payStandards.'+$index+'.payPersonnel'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<el-input clearable maxlength="100" placeholder="请输入缴费人员"
v-model="row.payPersonnel"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="缴费模式" prop="payMode" width="200">
<template scope="{row,$index}">
<el-form-item :prop="'payStandards.'+$index+'.payMode'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<el-select placeholder="请选择缴费模式" v-model="row.payMode"
style="width: 100%">
<el-option v-for="item in payModeList" :label="item.value" :value="item.code"></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="人员类型" prop="personTypes" width="300">
<template slot-scope="{row,$index}">
<el-select multiple placeholder="请选择人员类型" v-model="row.personTypes"
style="width: 100%" clearable>
<el-option v-for="item in personTypeList" :label="item.name" :value="item.code"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="缴费标准" prop="payModeValue">
<template scope="{row,$index}">
<div v-if="row.payMode=='2'">
<el-form-item :prop="'payStandards.'+$index+'.payModeValueList'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<div style="display:flex;justify-content: space-between;margin-left: 30px">
(
<template v-for="(o,i) in row.payModeValueList">
<el-input placeholder="请输入" style="width: 120px;"
v-model="o.name">
<el-button @click="row.payModeValueList.splice(i, 1)" slot="append" style="padding: 0 7px;"
icon="el-icon-circle-close"></el-button>
</el-input>
<span v-if="i !== row.payModeValueList.length - 1">+</span>
</template>
) * 0.5%
<div>
<el-button @click="row.payModeValueList.push({name: '',value:''})" size="mini">新增</el-button>
</div>
</div>
</el-form-item>
</div>
<div v-else-if="row.payMode == '1' || row.payMode == '3'">
<el-form-item :prop="'payStandards.'+$index+'.payModeValue'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<div v-if="row.payMode == '1'">
<el-input clearable maxlength="100" type="number" placeholder="请输入缴费金额"
v-model="row.payModeValue"></el-input>
</div>
<div v-if="row.payMode == '3'" style="text-align: center">
<span>导入名单</span>
</div>
<!-- <el-input clearable maxlength="100" placeholder="请填写缴费标准"-->
<!-- v-model="row.payModeValue"></el-input>-->
</el-form-item>
</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="80">
<template slot-scope="scope">
<el-button :disabled="formData.payStandards.length<=1"
@click="formData.payStandards.splice(scope.$index,1)" circle
icon="el-icon-delete"
size="mini"
type="danger"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
<vi-title title="退会标准"></vi-title>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="未缴费退会时间" prop="unPaidExitDuration">
<el-input v-model="formData.unPaidExitDuration">
<template slot="append">月</template>
</el-input>
</el-form-item>
</el-col>
<div style="margin-top: 10px">
<span style="color: red">说明:多长时间未缴纳会费则视为退会处理。</span>
</div>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="退会模式" prop="exitMode">
<el-radio-group v-model="formData.exitMode">
<el-radio label="1" border>自动退会</el-radio>
<el-radio label="2" border>人工退会</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<vi-title title="缴费时长"></vi-title>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="缴费时长" prop="paidDuration">
<el-input v-model="formData.paidDuration">
<template slot="append">月</template>
</el-input>
</el-form-item>
</el-col>
<div style="margin-top: 10px">
<span style="color: red">说明:多长时间缴费一次。</span>
</div>
</el-row>
</el-form>
<el-row class="mt10" justify="center" type="flex">
<el-button @click="doSubmit" style="width: 300px" type="primary">保存
</el-button>
<el-button @click="doSubmit" style="width: 300px" type="primary">提交
</el-button>
</el-row>
</el-card>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
payModeList:[{code:'1',value:'固定金额缴纳'},{code:'2',value:'按比例缴纳'},{code:'3',value:'导入'}],
formData: {
payStandards: [{payPersonnel: null, payMode: '1', personTypes: null, payModeValue: null,payModeValueList:[{name:'',value:''}]}]
},
rules: {
exit: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
personTypeList:[],
}
},
methods: {
async doSubmit(){
const formData = clone(this.formData)
formData.payStandards = JSON.stringify(this.formData.payStandards)
const resp = await $.post(loc() + '/doAddOrModify',formData)
if (resp.code === 0){
await this.getPaymentConfig()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
async getPaymentConfig(){
const resp = await $.get(loc() + '/getPaymentConfig')
if (resp.code === 0){
this.formData = {...resp.data}
}
}
},
async created() {
this.personTypeList = await getDictOptions('UserType')
await this.getPaymentConfig()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,408 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-input-group__append {
border-left: 0;
padding: 0 7px;
}
</style>
<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"
clearable
@change="doSearch"
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-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 100%"
v-model="pageForm.projectName">
</el-input>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="缴费项目列表">
<template #func>
<el-button @click="openAdd" size="small" type="primary">
新增缴费项目
</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize"
@sort-change="pageOrder"
class="vi-table"
ref="table" row-key="id" style="width: 100%"
v-loading="tableLoading">
<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==='isDisabled'">
<el-switch
:active-value="false"
:inactive-value="true"
@change="(val)=>{projectStatusChange(row.id)}"
active-color="#13ce66"
inactive-color="#ff4949"
v-model="row.isDisabled">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作"
width="100px">
<template scope="scope">
<el-dropdown @command="dropdownCommand">
<el-button :loading="submitLoading" plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'openCode',data:scope.row}">
二维码
</el-dropdown-item>
<el-dropdown-item :command="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',data:scope.row}">
编辑
</el-dropdown-item>
<el-dropdown-item :command="{type:'doRenew',data:scope.row}"
v-if="scope.row.created">
更新缴费人员
</el-dropdown-item>
<el-dropdown-item :command="{type:'doSet',data:scope.row}">
{{scope.row.created?'重置缴费人员':'生成缴费人员'}}
</el-dropdown-item>
<el-dropdown-item :command="{type:'remove',data:scope.row}">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<el-form :model="formData" :rules="formRules" label-width="100px" ref="form">
<vi-title title="缴费项目信息"></vi-title>
<el-form-item label="项目名称" prop="projectName">
<el-input maxlength="100" placeholder="项目名称" v-model="formData.projectName"></el-input>
</el-form-item>
<el-row :gutter="20">
<el-col span="12">
<el-form-item label="缴费年度" prop="year">
<el-date-picker
:clearable="false"
placeholder="选择年度"
type="year" style="width: 100%"
v-model="formData.year"
@change="isMonthCreatedByYear"
value-format="yyyy">
</el-date-picker>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="创建日期" prop="createTime">
<el-date-picker
placeholder="创建日期"
readonly
style="width: 100%"
type="date"
v-model="formData.createTime"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="缴费月份" prop="paymentMonth" size="medium">
<el-radio-group v-model="formData.paymentMonth">
<el-radio-button v-for="item in monthSelect" :label="item.label"
:disabled="item.code===1"></el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div>
<el-button @click="doSave" v-if="isSubmit" v-loading="submitLoading" style="float: right"
type="primary">
提交
</el-button>
</div>
</template>
<open-qr-code ref="openQRCode"></open-qr-code>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
isSubmit: true,
pageForm: {
year: moment().format('YYYY'),
},
tableColumns: [
{prop: 'year', label: '年度', sortable: true},
{prop: 'projectName', label: '项目名称', sortable: true},
{prop: 'createTime', label: '创建时间', sortable: true},
{prop: 'isDisabled', label: '开启状态'},
],
formData: {
year: moment().format('YYYY'),
},
formRules: {
projectName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
year: [{required: true, message: '必填', trigger: ['blur', 'change']}],
paymentMonth: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
paymentConfig: {},
monthSelect: []
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type === 'openCode') {
this.openCode(data)
} else if (type === 'view') {
this.openView(data)
} else if (type === 'edit') {
this.openEdit(data)
} else if (type === 'doRenew') {
this.doRenewPayment(data.id)
} else if (type === 'doSet') {
this.doSetPayment(data)
} else if (type === 'remove') {
this.doRemove(data.id)
}
},
openCode(row) {
this.$refs.openQRCode.openCode('/mobile/memberCost/list')
},
openView(data) {
this.formData = {}
this.formData = {...data}
this.isSubmit = false
this.$refs.guava.view()
},
openEdit(data) {
this.formData = {}
this.formData = {...data}
this.isSubmit = true
this.$refs.guava.view()
},
async doRenewPayment(id) {
this.$confirm('系统根据现有的会员,更新当前缴费名单,对已经缴费人员没有影响,请确认是否更新?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.submitLoading = true
const resp = await $.get(loc() + '/doSetPayment', {id: id, isRenew: true})
this.submitLoading = false
loading.close()
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
}
})
},
async doSetPayment(row) {
let msg = row.created ? "请确认是否重新生成缴费名单,如果确认,系统将清空已缴费的人员信息!" : "确定要生成缴费名单吗?"
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.submitLoading = true
const resp = await $.get(loc() + '/doSetPayment', {id: row.id, isRenew: false})
this.submitLoading = false
loading.close()
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
}
})
},
async doRemove(id) {
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.get(loc() + '/doRemove', {id: id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
}
},
openAdd() {
this.formData = {
createTime: moment().format('YYYY-MM-DD HH:mm:ss'),
year: moment().format('YYYY'),
}
this.$refs.guava.view()
this.isMonthCreatedByYear()
},
async doSave() {
const formValid = await this.$refs["form"].validate()
if (formValid) {
this.submitLoading = true
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const formData = clone(this.formData)
const o = this.monthSelect.find(v => v.label === formData.paymentMonth)
if (o.code === 1) {
this.notifyWarning("该年份下的此月份已创建了项目,请选择其他月份!")
loading.close()
this.submitLoading = false
return
}
const resp = await $.post(loc() + '/doSave', formData)
loading.close()
this.submitLoading = false
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.$refs.guava.index()
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
}
},
async projectStatusChange(id) {
const resp = await $.post(loc() + '/openClosedProject', {id: id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
},
async getPaymentConfig() {
const resp = await $.get('/platform/member/payment/config/getPaymentConfig')
if (resp.code === 0) {
this.paymentConfig = resp.data
const arr = []
let monthHalve = this.paymentConfig.paidDuration
let halve = 12 / monthHalve
for (let i = 1; i <= halve; i++) {
let value = (Number(i) - 1) * monthHalve + 1;
let followValue = i * monthHalve
if (i === 1) {
arr.push({label: i + '-' + monthHalve + '月', code: 0})
} else {
arr.push({label: value + '-' + followValue + '月', code: 0})
}
}
this.monthSelect = arr
}
},
async isMonthCreatedByYear() {
console.log(this.formData.year)
const resp = await $.post(loc() + '/isMonthCreatedByYear', {
year: this.formData.year,
monthSelect: JSON.stringify(this.monthSelect)
})
if (resp.code === 0) {
this.monthSelect = resp.data
}
}
},
async created() {
this.pageData()
await this.getPaymentConfig();
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,489 @@
<!--#
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>
</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="sendPaymentMsg" 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.id)" 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: 'sex', label: '性别'},
{prop: 'mobile', 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: {
async sendPaymentMsg(id){
const resp = await $.get(loc() + '/sendPaymentMsg',{id: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/manage/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('A06')||@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>
<!--#
}
#-->