first commit

This commit is contained in:
2026-01-08 14:58:16 +08:00
commit 556e5d64aa
9575 changed files with 1621095 additions and 0 deletions
@@ -0,0 +1,376 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.top_block {
width: 100%;
padding: 20px 80px;
border-bottom: 10px solid rgb(240, 240, 240);
}
.top_title {
font-size: 14px;
color: #808492;
height: 30px;
line-height: 30px;
margin-bottom: 5px;
}
.top_num {
font-size: 26px;
}
.cut-off-line {
width: 1px;
height: 70%;
position: absolute;
right: 0;
top: 0;
bottom: 0;
margin: auto;
background-color: rgb(230, 230, 230);
}
.chartTitle {
font-size: 14px;
color: #808492;
margin-bottom: 20px;
}
</style>
<div id="app" v-cloak>
<div class="p10">
<el-card shadow="never">
<div class="top_block" v-loading="top_block_loading">
<el-row :gutter="60">
<div style="position: absolute; top: -35px; right: -8px">
<el-date-picker
class="year"
style="width: 120px"
size="mini"
v-model="numForm.startYear"
type="year"
:clearable="false"
value-format="yyyy"
@change="getNumData()"
placeholder="选择年"
></el-date-picker>
-
<el-date-picker
class="year"
style="width: 120px"
size="mini"
v-model="numForm.endYear"
type="year"
:clearable="false"
value-format="yyyy"
@change="getNumData()"
placeholder="选择年"
></el-date-picker>
</div>
<el-col :span="6" style="position: relative">
<div class="top_title">总缴费金额</div>
<div class="top_num">{{numData.payMoney?numData.payMoney:'0'}}</div>
<div class="cut-off-line"></div>
</el-col>
<el-col :span="6" style="position: relative">
<div class="top_title">退款金额</div>
<div class="top_num">{{numData.refundMoney?numData.refundMoney:'0'}}</div>
<div class="cut-off-line"></div>
</el-col>
<el-col :span="6" style="position: relative">
<div class="top_title">退款订单数</div>
<div class="top_num">{{numData.refundSize?numData.refundSize:'0'}}</div>
<div class="cut-off-line"></div>
</el-col>
<el-col :span="6" style="position: relative">
<div class="top_title">总缴费人数</div>
<div class="top_num">{{numData.paySize?numData.paySize:'0'}}</div>
</el-col>
</el-row>
</div>
<el-row style="padding: 30px 0; border-bottom: 10px solid rgb(240, 240, 240)">
<div style="position: absolute; top: 25px; right: 40px; z-index: 200">
<el-date-picker
class="year"
style="width: 120px"
size="mini"
v-model="oneForm.startYear"
type="year"
:clearable="false"
value-format="yyyy"
@change="getPayProjectChart();getPayMoneyChart()"
placeholder="选择年"
></el-date-picker>
-
<el-date-picker
class="year"
style="width: 120px"
size="mini"
v-model="oneForm.endYear"
type="year"
:clearable="false"
value-format="yyyy"
@change="getPayProjectChart();getPayMoneyChart()"
placeholder="选择年"
></el-date-picker>
</div>
<el-col :span="12" style="padding: 0 20px" v-loading="payProjectLoading">
<div class="chartTitle">已缴人数</div>
<div id="payProjectChart" style="width: 100%; height: 330px"></div>
</el-col>
<el-col :span="12" style="padding: 0 20px" v-loading="payMoneyLoading">
<div class="chartTitle">已缴金额</div>
<div id="payMoneyChart" style="width: 100%; height: 330px"></div>
</el-col>
</el-row>
<el-row style="padding: 30px 0; border-bottom: 10px solid rgb(240, 240, 240)">
<div style="position: absolute; top: 25px; right: 250px; z-index: 999">
<el-date-picker
class="year"
style="width: 120px"
size="mini"
v-model="unionForm.year"
type="year"
:clearable="false"
value-format="yyyy"
@change="getProjectList"
placeholder="选择年"
></el-date-picker>
</div>
<div style="position: absolute; top: 25px; right: 40px; z-index: 999">
<el-select
placeholder="请选择项目"
v-model="unionForm.paymentProjectId"
style="width: 100%"
size="mini"
:clearable="false"
@change="doSearch"
@clear="doSearch"
filterable
>
<el-option v-for="item in paymentProjectList"
:label="item.projectName" :value="item.id"></el-option>
</el-select>
</div>
<el-col :span="24" style="padding: 0 20px" v-loading="all_union_loading">
<div class="chartTitle" style="margin-bottom: 50px">
</div>
<div id="allUnionChart" style="width: 100%; height: 300px"></div>
</el-col>
</el-row>
</el-card>
</div>
</div>
<script nonce="${cspNonce!}">
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
return {
oneForm: {
startYear: new Date().getFullYear() - 2 + "",
endYear: new Date().getFullYear() + ""
},
twoForm: {
startYear: new Date().getFullYear() - 2 + "",
endYear: new Date().getFullYear() + ""
},
numForm: {
startYear: new Date().getFullYear() - 2 + "",
endYear: new Date().getFullYear() + ""
},
payProjectLoading: false,
refundProjectLoading: false,
payMoneyLoading: false,
top_block_loading: false,
numData: {},
all_union_loading: false,
unionForm: {
year: new Date().getFullYear() + ""
},
paymentProjectList: []
}
},
methods: {
async getNumData() {
this.top_block_loading = true
const resp = await this.$axios.post("/platform/member/payment/chartSummary/getNumData", this.numForm)
if (resp.code === 0) {
this.numData = resp.data
}
this.top_block_loading = false
},
async getPayProjectChart() {
this.payProjectLoading = true
const resp = await this.$axios.post("/platform/member/payment/chartSummary/getPayProjectChart", this.oneForm)
if (resp.code === 0) {
let { data } = resp
document.getElementById("payProjectChart").innerHTML = ""
const config = {
xField: "projectName",
yField: "num",
label: {
position: "middle", // 'top', 'bottom', 'middle',
style: {
fill: "#FFFFFF",
opacity: 0.6
}
},
xAxis: {
label: {
autoHide: true,
autoRotate: false
}
},
meta: {
projectName: {
alias: "项目"
},
num: {
alias: "缴费人数"
}
}
}
const plot = new G2Plot.Column(document.getElementById("payProjectChart"), {
data,
...config
})
plot.render()
}
this.payProjectLoading = false
},
async getPayMoneyChart() {
this.payMoneyLoading = true
const resp = await this.$axios.post("/platform/member/payment/chartSummary/getPayMoneyChart", this.oneForm)
if (resp.code === 0) {
let { data } = resp
document.getElementById("payMoneyChart").innerHTML = ""
const config = {
xField: "projectName",
yField: "money",
label: {
position: "middle", // 'top', 'bottom', 'middle',
style: {
fill: "#FFFFFF",
opacity: 0.6
}
},
xAxis: {
label: {
autoHide: true,
autoRotate: false
}
},
meta: {
projectName: {
alias: "项目"
},
money: {
alias: "金额(元)"
}
}
}
const plot = new G2Plot.Column(document.getElementById("payMoneyChart"), {
data,
...config
})
plot.render()
}
this.payMoneyLoading = false
},
async allUnionMoney() {
this.all_union_loading = true
const resp = await this.$axios.post("/platform/member/payment/chartSummary/allUnionMoney", {
paymentProjectId: this.unionForm.paymentProjectId
})
if (resp.code === 0) {
let { data } = resp
document.getElementById("allUnionChart").innerHTML = ""
const config = {
isStack: true,
legend: {
position: "top-right",
flipPage: false
},
autoFit: true,
title: {
visible: true,
text: ""
},
description: {
visible: true,
text: "单位(元)"
},
xField: "unionname",
yField: "money",
stackField: "type",
color: ["#5B8FF9", "#5AD8A6"],
xAxis: {
label: {
formatter: (v) => {
if (data.length > 30 && v.length > 3) {
return v.substr(0, 2) + "..."
} else if (data.length > 20 && v.length > 4) {
return v.substr(0, 3) + "..."
} else if (data.length > 10 && v.length > 6) {
return v.substr(0, 5) + "..."
}
return v
}
}
},
yAxis: {},
meta: {
unionname: {
alias: "工会"
},
money: {
alias: "金额"
}
},
connectedArea: {
visible: true,
triggerOn: false
}
}
const plot = new G2Plot.Column(document.getElementById("allUnionChart"), {
data,
...config
})
plot.render()
}
this.all_union_loading = false
},
async getProjectList() {
const resp = await this.$axios.post("/platform/member/payment/project/getAllProject", { year: this.unionForm.year })
if (resp.code === 0) {
this.paymentProjectList = resp.data
this.$set(this.unionForm, "paymentProjectId", (this.paymentProjectList && this.paymentProjectList.length > 0) ? this.paymentProjectList[0].id : null)
await this.allUnionMoney()
}
}
},
async created() {
await this.getPayProjectChart()
await this.getPayMoneyChart()
await this.getNumData()
await this.getProjectList()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,370 @@
<!--#
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">
<template>
<el-card shadow="never">
<search @search="doSearch" ref="search">
<search-item label="缴费配置">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入缴费配置"
style="width: 100%"
v-model="pageForm.name">
</el-input>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="缴费配置列表">
<el-button @click="openAdd" size="small" type="primary">
新增缴费配置
</el-button>
</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)=>{configStatusChange(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:'edit',data:scope.row}">
编辑
</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" ref="addForm" :rules="rules"
label-width="120px"
style="margin: 10px 0 0 0">
<div class="process-title">缴费配置</div>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="配置名称" prop="name">
<el-input v-model="formData.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="缴费月份" prop="paymentMonth" size="medium">
<el-date-picker
v-model="formData.paymentMonth"
type="monthrange"
range-separator="至"
style="width: 100%"
value-format="yyyy-MM"
start-placeholder="开始月份"
end-placeholder="结束月份">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<div class="process-title">缴纳标准</div>
<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-select placeholder="请选择在职状态" v-model="row.payPersonnel"
style="width: 100%" clearable>
<el-option v-for="item in userStateList" :label="item.name" :value="item.code"></el-option>
</el-select>
<!-- <el-input clearable maxlength="100" placeholder="请输入缴费人员"
v-model="row.payPersonnel"></el-input>-->
<!--<el-select placeholder="请选择人员类型" v-model="row.payPersonnel"
style="width: 100%" clearable>
<el-option v-for="item in memberTypeList" :label="item.name" :value="item.code"></el-option>
</el-select>-->
</el-form-item>
</template>
</el-table-column>
<el-table-column label="教职工类别" prop="personType" >
<template slot-scope="{row,$index}">
<el-select @change="row.payMode=null" placeholder="请选择人员类型" v-model="row.personType"
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="payMode" >
<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 label="固定金额缴纳" value="1"></el-option>
<el-option label="按比例缴纳" value="2"></el-option>
<el-option label="导入" value="3"></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<!-- <el-table-column label="在职状态" prop="userState" >
<template slot-scope="{row,$index}">
<el-select placeholder="请选择在职状态" v-model="row.userState"
style="width: 100%" clearable>
<el-option v-for="item in userStateList" :label="item.name" :value="item.code"></el-option>
</el-select>
</template>
</el-table-column>-->
<el-table-column label="缴费标准" prop="payModeValue" width="650">
<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: 100px;"
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="5" 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>
</el-form>
<div>
<el-button @click="doSubmit" v-if="isSubmit" v-loading="submitLoading" style="float: right"
type="primary">
提交
</el-button>
</div>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
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: null, personTypes: null, payModeValue: null,payModeValueList:[{name:'',value:''}]}]
},
rules: {
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
paymentMonth: [{required: true, message: '必填', trigger: ['blur', 'change']}],
exit: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
personTypeList:[],
userStateList:[],
memberTypeList:[],
pageForm:{},
tableData:[],
tableColumns:[
{prop: 'name', label: '配置名称'},
{prop: 'paymentStartMonth', label: '缴费起始月份'},
{prop: 'paymentEndMonth', label: '缴费截止月份'},
{prop: 'isDisabled', label: '开启状态'},
],
isSubmit: true,
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data)
} else if (type === 'edit') {
this.openEdit(data)
} else if (type === 'remove') {
this.doRemove(data.id)
}
},
openAdd(){
this.$refs.guava.view()
},
async doRemove(id) {
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await this.$axios.post(loc() + '/doRemove', {id: id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
}
},
async configStatusChange(id) {
const resp = await this.$axios.post(loc() + '/openClosedConfig', { id: id })
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
},
openEdit(data) {
this.formData = {}
this.formData = {
...data,
paymentMonth:[data.paymentStartMonth, data.paymentEndMonth],
}
this.formData.payStandards= JSON.parse(this.formData.payStandards)
this.isSubmit = true
this.$refs.guava.view()
},
async doSubmit(){
this.formData.paymentStartMonth = this.formData.paymentMonth[0]
this.formData.paymentEndMonth = this.formData.paymentMonth[1]
const formData = clone(this.formData)
formData.payStandards = JSON.stringify(this.formData.payStandards)
const resp = await this.$axios.post(loc() + '/doAddOrModify',formData)
if (resp.code === 0){
this.$refs.guava.index()
await this.getPaymentConfig()
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
async getPaymentConfig(){
const resp = await this.$axios.post(loc() + '/getPaymentConfig')
if (resp.code === 0){
this.formData = {...resp.data}
if (!this.formData.payStandards){
this.formData = {
payStandards: [{payPersonnel: null, payMode: '1', personTypes: null, payModeValue: null,payModeValueList:[{name:'',value:''}]}]
}
}
}
}
},
async created() {
this.pageData()
this.personTypeList = await this.$businessTool.getDictOptions('USER_PERSON_TYPE')
//在职状态
this.userStateList = await this.$businessTool.getDictOptions('USER_STATE')
//会员类型
// this.memberTypeList = await getDictOptions('memberType')
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,368 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.payForm .el-form-item__label {
font-weight: bold;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
:clearable="false"
@change="doSearch"
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="缴费列表">
<el-radio-group @change="doSearch" class="mr10" size="small"
v-model="pageForm.isPay">
<el-radio-button :label="true">已缴</el-radio-button>
<el-radio-button :label="false">未缴</el-radio-button>
</el-radio-group>
</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==='isPayment'">
<template v-if="row.isPayment">
<el-tag v-if="row.isPayment && !row.isRefund" type="success">已缴费</el-tag>
<el-tag v-else type="danger">
{{ getRefundStates(row.refundState) }}
</el-tag>
</template>
<el-tag v-else type="danger">未缴费</el-tag>
</template>
<template scope="{row}" v-else-if="column.prop==='paymentStartMonth'">
{{row.paymentStartMonth}}至{{row.paymentEndMonth}}
</template>
<template scope="{row}" v-else-if="column.prop==='paymentMoney'">
{{ row.payMoney ? (Number(row.paymentMoney) / 100) : 0 }}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="200px">
<template scope="{row}">
<el-button @click="showPayInfo(row)" size="mini" type="primary">查看详情</el-button>
<el-button v-if="!row.isPayment" @click="openPay(row)" size="mini" type="primary">缴费</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<pay-info :trading-states="tradingStates" :refund-states="refundStates"
:trading-channels="tradingChannels" ref="payInfoRef"></pay-info>
</template>
</guava>
<el-diaLog :close-on-click-modal="false" :visible.sync="payVisible" title="缴费" width="50%"
:before-close="clickClose">
<el-form ref="form" :model="formData" :rules="formRules" label-width="170px"
label-suffix="" class="payForm">
<el-steps :active="payActive" finish-status="success">
<el-step title="计算缴费金额"></el-step>
<el-step title="生成缴费二维码"></el-step>
<el-step title="完成"></el-step>
</el-steps>
<div v-if="payActive===0" class="mt25">
<el-form-item label="缴费所属时间">
<div>{{formData.paymentStartMonth}}至{{formData.paymentEndMonth}}</div>
</el-form-item>
<el-form-item label="缴费标准">
<div style="color: red"
v-if="formData.payModeValueList&&formData.payModeValueList.length>0">
(
<template v-for="(o,i) in formData.payModeValueList">
{{o.name}}
<template v-if="i !=formData.payModeValueList.length-1">+</template>
</template>
) * 0.5% * {{formData.paymentMonth}}个月
</div>
<div v-else>固定金额缴费</div>
</el-form-item>
<!--如果是根据比例算的-->
<div v-if="formData.payModeValueList&&formData.payModeValueList.length>0">
<div v-for="(o,i) in formData.payModeValueList" :key="o.id">
<el-form-item :label="o.name">
<el-input-number v-model="o.value" :min="0" :max="1000000"
:precision="2"
placeholder="请输入缴费金额"
@change="changePayModeValue(o)"></el-input-number>
</el-form-item>
</div>
</div>
<el-form-item label="支付金额">
<div style="color: #2cd000;font-size: 25px">¥ {{formData.paymentMoney}}</div>
</el-form-item>
</div>
<div v-if="payActive===1" class="mt25">
<el-form-item label="商品订单">
{{formData.transactionId}}
</el-form-item>
<el-form-item label="支付金额">
<div style="color: #2cd000;font-size: 25px">¥ {{formData.paymentMoney}}</div>
</el-form-item>
<div style="width: 100%;">
<el-row :gutter="20">
<el-col :span="12" v-loading="qrcodeLoading">
<div style="text-align: center">
<image :src="paySrc" style="width: 60%;left: 0;right: 0;margin: auto"></image>
<div style="display: flex;justify-content: center">
<span
style="font-weight: bold;
font-size: 15px;
color: #fbfbfb;
background-color: rgb(44, 208, 0);
height: 30px;
width: 60%;
display: flex;
justify-content: center;
align-items: center;">
请打开手机微信,扫一扫完成支付</span>
</div>
</div>
</el-col>
<el-col :span="12">
<div>
<el-image src="/assets/mobile/svg/memberPay/wx_img.png"></el-image>
</div>
</el-col>
</el-row>
</div>
</div>
<div v-if="payActive===3">
<div v-loading="submitLoading">
<div style="margin-top: 35px;background-color: RGB(245, 254, 243);">
<div
style="display: flex;align-items: center;height: 100px;margin-left: 10%">
<div>
<el-image
src="/assets/mobile/svg/memberPay/pcPaySuccess.svg"></el-image>
</div>
<div style="font-weight: bold;font-size: 25px;margin-left: 10px;">
支付成功!
</div>
</div>
</div>
<el-form-item label="商品订单">
{{formData.transactionId}}
</el-form-item>
<el-form-item label="支付金额">
<div style="color: #2cd000;font-size: 25px">¥ {{formData.paymentMoney}}
</div>
</el-form-item>
</div>
</div>
</el-form>
<div style="text-align: right">
<span>
<el-button @click="clickClose">关 闭</el-button>
<el-button @click="next" v-if="payActive===0&&formData.paymentMoney>0"
type="primary">下一步</el-button>
</span>
</div>
</el-diaLog>
</div>
<script src="${base!}/assets/platform/plugins/jr-qrcode/jr-qrcode.js"></script>
<script nonce="${cspNonce!}">
<!--#include("minePayInfo.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
'pay-info': MINE_PAY_INFO,
},
data() {
return {
tableColumns: [
{ prop: "year", label: "年度", sortable: true },
{ prop: "projectName", label: "项目名称", sortable: true },
{ prop: "startTime", label: "缴费开始时间", sortable: true },
{ prop: "endTime", label: "缴费截止时间", sortable: true },
{ prop: "paymentStartMonth", label: "缴费所属时间", sortable: true },
{ prop: "paymentMoney", label: "缴费金额(元)", sortable: true },
{ prop: "isPayment", label: "缴费状态", sortable: true }
],
pageForm: {
isPay: false,
year: moment().format("YYYY")
},
payVisible: false,
payActive: 0,
intervalTimer: null,
qrcodeLoading: false,
payInfo: {},
tradingStates: [],
refundStates: [],
tradingChannels: [],
paySrc: ''
}
},
methods: {
async showPayInfo(row) {
this.$refs.guava.view(() => {
this.$refs.payInfoRef.onOpen(row.id)
})
},
clickClose() {
if (this.payActive === 3) {
this.payVisible = false
} else {
this.$confirm("您确定要关闭当前缴费吗?关闭后将不会保存当前数据", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.payVisible = false
})
}
clearInterval(this.intervalTimer)
},
next() {
this.$confirm("您确定要生成缴费二维码吗?当前需缴费【" + this.formData.paymentMoney + "】元", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
this.qrcodeLoading = true
const paymentMoney = Math.floor(this.formData.paymentMoney * 100)
this.payActive = this.payActive + 1
const resp = await $.post("/platform/member/payment/mine/pcOrderPay", {
paymentMoney: paymentMoney,
paymentInfoId: this.formData.paymentInfoId
})
if (resp.code === 0) {
const data = JSON.parse(resp.data)
this.$nextTick(() => {
// $("#qrcode").html("")
// $("#qrcode").qrcode({
// render: "canvas",
// width: $("#qrcode").width(),
// height: $("#qrcode").width(),
// text: data.code_url,
// correctLevel: 3
// })
this.paySrc = jrQrcode.getQrBase64(data.code_url, {
padding: 10, // 内边距
width: 200, // 图片宽度
height: 200, // 图片高度
correctLevel: 2, // 容错级别 0-3
foreground: '#000', // 前景色
background: '#fff' // 背景色
})
})
this.formData.transactionId = data.transactionId
await this.getIsPay()
}
this.qrcodeLoading = false
})
},
async getIsPay() {
this.intervalTimer = setInterval(async () => {
const resp = await this.$axios.post(loc() + "/getIsPay", { paymentInfoId: this.formData.paymentInfoId })
if (resp.code === 0) {
if (resp.data) {
this.payActive = 3
this.submitLoading = true
clearInterval(this.intervalTimer)
setTimeout(() => {
this.submitLoading = false
this.pageData()
}, 1500)
}
}
}, 4000)
},
changePayModeValue() {
let paymentMoney = this.formData.payModeValueList.reduce((a, b) => {
return a + b.value
}, 0)
this.$set(this.formData, "paymentMoney", parseFloat((paymentMoney * 0.005 * this.formData.paymentMonth).toFixed(2)))
},
openPay(row) {
debugger
this.payActive = 0
const payStandards = JSON.parse(row.payStandards)
const payStandard = payStandards.find(p => p.payPersonnel === row.userState && p.personType === row.personType)
this.$set(this.formData, "paymentMonth", row.paymentMonth)
this.$set(this.formData, "paymentStartMonth", row.paymentStartMonth)
this.$set(this.formData, "paymentEndMonth", row.paymentEndMonth)
this.$set(this.formData, "paymentInfoId", row.id)
if (payStandard && payStandard.payModeValue) {
this.$set(this.formData, "payModeValueList", [])
this.$set(this.formData, "paymentMoney", payStandard.payModeValue)
} else {
this.$set(this.formData, "payModeValueList", payStandard.payModeValueList)
this.$set(this.formData, "paymentMoney", 0)
}
this.payVisible = true
},
getRefundStates(data) {
if (!data) {
return
}
return this.refundStates.find(item => item.name === data).refundStateName
},
async getPaymentEnums() {
this.tradingStates = await this.$businessTool.getEnumOptions("TradingStateEnum")
this.refundStates = await this.$businessTool.getEnumOptions("RefundStateEnum")
this.tradingChannels = await this.$businessTool.getEnumOptions("TradingChannelEnum")
}
},
created() {
this.pageData()
this.getPaymentEnums()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,125 @@
const MINE_PAY_INFO = {
template: /*language=html*/ `
<div>
<el-descriptions title="缴费信息" :column="3" border>
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="缴费项目">{{ viewData.projectName }}</el-descriptions-item>
<el-descriptions-item label="所在工会">{{ viewData.unionname }}</el-descriptions-item>
<el-descriptions-item label="所在单位">{{ viewData.unitname }}</el-descriptions-item>
<el-descriptions-item label="教职工类别">{{ viewData.personType }}</el-descriptions-item>
<el-descriptions-item label="缴费情况">
<el-tag v-if="viewData.personType">已缴费</el-tag>
<el-tag v-else type="warning">未缴费</el-tag>
</el-descriptions-item>
<el-descriptions-item label="缴费金额">{{ viewData.paymentMoney }}</el-descriptions-item>
<el-descriptions-item label="缴费月份时长">{{ viewData.paymentMonth }}</el-descriptions-item>
<template v-if="viewData.transList">
<el-descriptions-item label="缴费订单详情" :span="3">
<el-table :data="viewData.transList" class="vi-table" ref="table" row-key="id"
style="width: 100%" border>
<el-table-column label="系统单号" prop="outTradeNo"></el-table-column>
<el-table-column label="商户订单号" prop="transactionId"></el-table-column>
<el-table-column label="付款方式" prop="tradingChannel">
<template scope="{row}">
{{ getTradingChannel(row.tradingChannel) }}
</template>
</el-table-column>
<el-table-column label="订单金额(¥)" prop="tradingAmount">
<template scope="{row}">
{{ row.tradingAmount ? (Number(row.tradingAmount) / 100 ) : 0 }}
</template>
</el-table-column>
<el-table-column label="下单时间" prop="createdAt">
<template scope="{row}">
{{ moment(row.createdAt).format("YYYY-MM-DD HH:mm:ss") }}
</template>
</el-table-column>
<el-table-column label="订单状态" prop="tradingState">
<template scope="{row}">
{{ getTradingStates(row.tradingState) }}
</template>
</el-table-column>
<el-table-column label="退款详情" prop="isRefund" width="200">
<template scope="{row}">
<el-tag v-if="!row.isRefund">未退款</el-tag>
<el-tag v-else type="danger" style="cursor: pointer;"
@click="showRefundInfo(row)">此订单有退款,点我查看详情</el-tag>
</template>
</el-table-column>
</el-table>
</el-descriptions-item>
</template>
</el-descriptions>
<el-dialog title="退款详情" :visible.sync="refundDialogVisible" width="50%" append-to-body>
<el-descriptions :column="1" border>
<el-descriptions-item label="退款单号">{{ refundData.outRefundTradeNo }}</el-descriptions-item>
<el-descriptions-item label="退款商户号">{{ refundData.refundNo }}</el-descriptions-item>
<el-descriptions-item label="退款金额(¥)">
{{ refundData.total ? (Number(refundData.total) / 100) : 0 }}
</el-descriptions-item>
<el-descriptions-item label="退款时间">{{ moment(refundData.updatedAt).format("YYYY-MM-DD HH:mm:ss") }}</el-descriptions-item>
<el-descriptions-item label="退款状态">
{{ getRefundStates(refundData.refundState) }}
</el-descriptions-item>
</el-descriptions>
<span slot="footer" class="dialog-footer">
<el-button @click="refundDialogVisible = false;refundData = {}">关 闭</el-button>
</span>
</el-dialog>
</div>
`,
props: {
tradingStates: { type: Array, default: () => [] },
refundStates: { type: Array, default: () => [] },
tradingChannels: { type: Array, default: () => [] },
},
data() {
return{
viewData: {},
refundData: {},
refundDialogVisible: false
}
},
methods: {
showRefundInfo(row) {
this.refundData = {}
this.refundData = this.viewData.refundRecordList.find(item => item.paymentTransactionId === row.id)
if (this.refundData) {
this.refundDialogVisible = true
} else {
this.$message.error("此订单无退款记录")
}
},
async onOpen(id) {
const resp = await $.post('/platform/member/payment/mine/getPaymentInfoById', {id})
if (resp.code === 0) {
this.viewData = resp.data
} else {
this.$message.error("操作失败")
}
},
getTradingStates(data) {
if (!data) {
return
}
return this.tradingStates.find(item => item.name === data).tradingStateName
},
getRefundStates(data) {
if (!data) {
return
}
debugger
return this.refundStates.find(item => item.name === data).refundStateName
},
getTradingChannel(data) {
if (!data) {
return
}
return this.tradingChannels.find(item => item.name === data).tradingChannelName
},
}
}
@@ -0,0 +1,410 @@
<!--#
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">
<search @search="doSearch" ref="searchRef">
<search-item label="年度">
<el-date-picker
:clearable="false"
clearable
@change="doSearch"
placeholder="请选择年度"
type="year" style="width: 100%"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="缴费项目">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入缴费项目"
style="width: 100%"
v-model="pageForm.projectName">
</el-input>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="缴费项目列表">
<el-button @click="openAdd" size="small" type="primary">
新增缴费项目
</el-button>
</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">
<div class="process-title">缴费项目信息</div>
<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"
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="12">
<el-form-item label="缴费配置" prop="configId" size="medium">
<el-select placeholder="请选择缴费配置" v-model="formData.configId"
style="width: 100%" clearable>
<el-option
v-for="item in configList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="缴费时间" prop="paymentTime" size="medium">
<el-date-picker
v-model="formData.paymentTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
style="width: 100%"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</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>
<el-dialog title="二维码" width="30%" :visible.sync="dialogVisible" style="text-align: center">
<img :src="qrSrc" alt="二维码" />
</el-dialog>
</div>
<script src="${base!}/assets/platform/plugins/jr-qrcode/jr-qrcode.js"></script>
<script nonce="${cspNonce!}">
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: 'startTime', label: '缴费开始时间', sortable: true},
{prop: 'endTime', 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']}],
paymentTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
configId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
paymentConfig: {},
monthSelect: [],
configList:[],
// 二维码展示
dialogVisible: false,
qrSrc: '',
}
},
components: {
// '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')
this.qrSrc = jrQrcode.getQrBase64("/mobile/memberCost/list", {
padding: 10, // 内边距
width: 400, // 图片宽度
height: 400, // 图片高度
correctLevel: 2, // 容错级别 0-3
foreground: '#000', // 前景色
background: '#fff' // 背景色
})
this.dialogVisible = true
},
openView(data) {
this.formData = {}
this.formData = {
...data,
paymentTime:[data.startTime, data.endTime],
}
this.isSubmit = false
this.$refs.guava.view()
},
openEdit(data) {
this.formData = {}
this.formData = {
...data,
paymentTime:[data.startTime, data.endTime],
}
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 this.$axios.post(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 this.$axios.post(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 this.$axios.post(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()
},
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)'
});
this.formData.startTime=this.formData.paymentTime[0]
this.formData.endTime=this.formData.paymentTime[1]
const formData = clone(this.formData)
const resp = await this.$axios.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 this.$axios.post(loc() + '/openClosedProject', {id: id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
},
async getPaymentConfigList(id) {
const resp = await this.$axios.post('/platform/member/payment/config/getPaymentConfigList')
if (resp.code === 0) {
this.configList = resp.data
}
},
},
async created() {
await this.getPaymentConfigList()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,185 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
:clearable="false"
@change="doSearch();getProjectList()"
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="缴费项目">
<el-select
placeholder="请选择项目"
v-model="pageForm.paymentProjectId"
style="width: 100%"
:clearable="false"
@change="doSearch"
@clear="doSearch"
filterable="true"
>
<el-option v-for="item in paymentProjectList"
:label="item.projectName" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" v-model="pageForm.searchKeyword" clearable></el-input>
</search-item>
<search-item label="交易单号">
<el-input placeholder="请输入交易单号"
v-model="pageForm.transactionId" clearable>
</el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="缴费列表">
<el-radio-group @change="doSearch" class="mr10" size="small"
v-model="pageForm.isRefund">
<el-radio-button :label="3">全部</el-radio-button>
<el-radio-button :label="0">未退款</el-radio-button>
<el-radio-button :label="1">已退款</el-radio-button>
</el-radio-group>
</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==='isRefund'">
<span v-if="row.isRefund" style="color: red">已全额退款</span>
<span v-else style="color: #2cd000">支付成功</span>
</template>
<template scope="{row}" v-else-if="column.prop==='tradingAmount'">
{{row.tradingAmount*0.01}}
</template>
<template scope="{row}" v-else-if="column.prop==='refundTime'">
<span v-if="!row.refundTime"></span>
<span
v-else>{{moment(row.refundTime).format("YYYY-MM-DD HH:mm:ss")}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="200px">
<template scope="{row}">
<el-button :disabled="row.isRefund" @click="doRefund(row)"
size="mini" type="danger" :loading="submitLoading">退款
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
return {
paymentProjectList: [],
pageForm: {
isRefund: 3,
year: moment().format("YYYY")
},
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "unitName", label: "单位", sortable: true },
{ prop: "unionName", label: "工会", sortable: true },
{ prop: "projectName", label: "项目名称", sortable: true },
{ prop: "tradingAmount", label: "缴费金额(元)", sortable: true },
{ prop: "paymentTime", label: "支付时间", sortable: true },
{ prop: "transactionId", label: "交易单号", sortable: true },
{ prop: "isRefund", label: "是否退款", sortable: true },
{ prop: "refundTime", label: "退款到账时间", sortable: true }
]
}
},
methods: {
doRefund(row) {
this.$confirm("退款将在24小时内到账,退款后将不能撤回!您确定要退款吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
this.submitLoading = true
const resp = await this.$axios.post("/platform/member/payment/refund/doRefund", {
id: row.id
})
this.submitLoading = false
if (resp.code === 0) {
this.doSearch()
this.$message({
type: "success",
message: resp.msg
})
} else {
this.$message({
type: "error",
message: resp.msg
})
}
})
},
async getProjectList() {
const resp = await this.$axios.post("/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 created() {
await this.getProjectList()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,486 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
:clearable="false"
@change="doSearch();getProjectList()"
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="缴费项目">
<el-select
placeholder="请选择项目"
v-model="pageForm.paymentProjectId"
style="width: 100%"
clearable
@change="doSearch"
@clear="doSearch"
filterable
>
<el-option v-for="item in paymentProjectList" :label="item.projectName" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="职工信息">
<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>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')">
<search-item label="所属工会">
<el-select
placeholder="请选择所属工会"
v-model="pageForm.unionId"
style="width: 100%"
clearable
@change="flushUnits"
@clear="flushUnits"
filterable
>
<el-option v-for="item in unions" :label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select
placeholder="请选择所属单位"
v-model="pageForm.unitId"
style="width: 100%"
clearable
filterable
>
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
</template>
<search-item label="教职工类别">
<dict-select v-model="pageForm.personType" style="width: 100%" clearable
placeholder="教职工类别" code="USER_PERSON_TYPE"></dict-select>
</search-item>
<search-item label="在职状态">
<dict-select v-model="pageForm.userState" style="width: 100%" clearable
placeholder="在职状态" code="USER_STATE"></dict-select>
</search-item>
<search-item label="入职时间">
<el-date-picker
@change="schoolDateChange"
end-placeholder="结束日期"
format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
style="width: 100%"
type="datetimerange"
v-model="pageForm.schoolTimeRange"
value-format="yyyy-MM-dd">
</el-date-picker>
</search-item>
<search-item label="退休时间">
<el-date-picker
@change="retireDateChange"
placeholder="请选择退休时间范围"
end-placeholder="结束日期"
format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
style="width: 100%"
type="datetimerange"
v-model="pageForm.retireDateRange"
value-format="yyyy-MM-dd">
</el-date-picker>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="缴费列表">
<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 v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" 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 v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" icon="el-icon-document-add" type="primary" size="small" :loading="submitLoading" @click="doExport(true)">
按基层工会导出
</el-button>
</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>
<template scope="{row}" v-else-if="column.prop==='paymentMoney'">
<span> {{ Number(row.paymentMoney) / 100 }}</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 nonce="${cspNonce!}">
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: "",
schoolTimeRange: [],
schoolTimeStart: "",
schoolTimeEnd: "",
retireDateRange: [],
retireDateStart: "",
retireDateEnd: "",
},
checkUsers: [],
modifyVisible: false,
formData: {
ids: []
},
formRules: {
paymentMoney: [{ required: true, message: "必填", trigger: ["blur", "change"] }]
}
}
},
components: {
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue"),
},
methods: {
schoolDateChange(val) {
if (val) {
this.pageForm.schoolTimeStart = val[0]
this.pageForm.schoolTimeEnd = val[1]
} else {
this.pageForm.schoolTimeStart = ""
this.pageForm.schoolTimeEnd = ""
}
},
retireDateChange(val) {
if (val) {
this.pageForm.retireDateStart = val[0]
this.pageForm.retireDateEnd = val[1]
} else {
this.pageForm.retireDateStart = ""
this.pageForm.retireDateEnd = ""
}
},
sendPaymentMsgAll() {},
async sendPaymentMsg(row) {
const confirm = await this.$confirm("您确定对【" + row.username + "】会员进行催缴吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm !== "confirm") return
const resp = await this.$axios.post(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 this.$axios.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 this.$axios.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 this.$axios.post(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.$nextTick(() => {
setTimeout(() => {
this.$refs.viewImport.resetImportData()
}, 500)
})
},
successImport() {
this.$refs.guava.index()
this.pageData()
},
doExport(isZip) {
const {year, paymentProjectId, searchName, searchKeyword, unionId, unitId, personType,
userState, isPay, schoolTimeStart, schoolTimeEnd, retireDateStart, retireDateEnd} = this.pageForm
this.$downLoad(loc() + '/doExport', {
searchName: searchName,
searchKeyword: searchKeyword,
unionId: unionId,
unitId: unitId,
isPay: isPay,
year: year,
isZip: isZip,
paymentProjectId: paymentProjectId,
personType: personType,
userState: userState,
schoolTimeStart: schoolTimeStart,
schoolTimeEnd: schoolTimeEnd,
retireDateStart: retireDateStart,
retireDateEnd: retireDateEnd
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
}
},
tableHandleSelectionChange(val) {
this.checkUsers = val
},
async getProjectList() {
const resp = await this.$axios.post("/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() {
if (this.$auth.hasRoleOr("SYSADMIN, SCHOOL_UNION_ADMIN")) {
this.unions = await this.$businessTool.listUnion()
} else {
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
this.$set(this.pageForm, "unionId", this.unions ? this.unions[0].id : null)
this.flushUnits()
}
await this.getProjectList()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,337 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="search">
<search-item label="年度">
<el-date-picker
:clearable="false"
clearable
@change="doSearch"
placeholder="请选择年度"
type="year" style="width: 100%"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="缴费项目">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入缴费项目"
style="width: 100%"
v-model="pageForm.projectName">
</el-input>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="个人缴费列表">
</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==='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="是否确认金额">
<template scope="{row}">
<span style="color: #00aa3a" v-if="row.paymentMoney!=null">已确定</span>
<span style="color: red" v-else>未确定</span>
</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:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="!scope.row.isPayment" :command="{type:'edit',data:scope.row}">
设为已缴
</el-dropdown-item>
<el-dropdown-item v-if="scope.row.paymentMoney==null" :command="{type:'pay',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 #pay>
<el-form :model="formData" :rules="formRules" label-width="100px" ref="form">
<div class="process-title">缴费信息</div>
<el-form-item label="缴费项目" prop="projectName">
<span>{{formData.projectName}}</span>
</el-form-item>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="教职工类别" size="medium">
<span>{{formData.personType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="会员类型" size="medium">
<span>{{formData.payPersonnel}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="需缴费用" size="medium">
<div v-for="item in payStandard" style="display:flex;justify-content: space-between;margin-left: 30px">
<template v-if="item.payModeValueList.length>0" >
(
<template v-for="(o,i) in item.payModeValueList">
<el-input @change="getMoney(item)" placeholder="" style="width: 200px;" v-model="o.value">
<template slot="prepend">{{o.name}}</template>
</el-input>
<span v-if="(i+1)!=item.payModeValueList.length">+</span>
</template>
) * 0.5% *{{formData.paymentMonth}}个月
</template>
<template v-else>
<span>{{item.payModeValue}}</span>*{{formData.paymentMonth}}个月
</template>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="缴费金额" prop="paymentMoney" size="medium">
<el-input disabled="true" placeholder="" style="width: 200px;" v-model="formData.paymentMoney">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div>
<el-button @click="doSave" v-loading="submitLoading" style="float: right"
type="primary">
提交
</el-button>
</div>
</template>
<template #view>
<el-form :model="formData" label-width="100px" ref="form">
<div class="process-title">缴费信息</div>
<el-form-item label="缴费项目" prop="projectName">
<span>{{formData.projectName}}</span>
</el-form-item>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="教职工类别" size="medium">
<span>{{formData.personType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="会员类型" size="medium">
<span>{{formData.payPersonnel}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="缴纳标准" size="medium">
<div v-for="item in payStandard" style="display:flex;justify-content: space-between;margin-left: 30px">
<span v-if="item.payModeValueList.length>0" >
(
<span v-for="(o,i) in item.payModeValueList">
<span>{{o.name}}</span>
<span v-if="(i+1)!=item.payModeValueList.length">+</span>
</span>
) * 0.5% *{{formData.paymentMonth}}个月
</span>
<template v-else>
<span>{{item.payModeValue}}</span>*{{formData.paymentMonth}}个月
</template>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="缴费金额" size="medium">
<span>{{formData.paymentMoney}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="缴费月份" size="medium">
<span>{{formData.paymentStartMonth}} - {{formData.paymentEndMonth}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="缴费开始时间" size="medium">
<span>{{formData.startTime}} - {{formData.endTime}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageForm: {
year: moment().format('YYYY'),
},
tableColumns: [
{prop: 'year', label: '年度'},
{prop: 'projectName', label: '缴费项目名称'},
{prop: 'paymentStartMonth', label: '缴费开始月份'},
{prop: 'paymentEndMonth', label: '缴费截止月份'},
{prop: 'paymentMonth', label: '需要缴费月数'},
{prop: 'startTime', label: '缴费开始时间'},
{prop: 'endTime', label: '缴费截止时间'},
{prop: 'paymentMoney', label: '缴费金额'},
{prop: "isPayment", label: "是否缴费", sortable: true},
],
payStandard:{},
formRules: {
paymentMoney: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type === 'edit') {
this.doPay(data)
} else if (type === 'pay'){
this.openPay(data)
} else if (type === 'view'){
this.openView(data)
}
},
openPay(data){
const payStandards=JSON.parse(data.payStandards)
this.payStandard=payStandards.filter(item => item.personType===data.personType&&item.payPersonnel===data.payPersonnel)
if (this.payStandard.length>0&&this.payStandard[0].payModeValueList===null){
this.formData.paymentMoney=+this.payStandard[0].payModeValue*+this.formData.paymentMonth
}
this.formData=data
this.$refs.guava.pay()
},
async doPay(data) {
const confirm = await this.$confirm("您确定要更改缴费信息吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const formData={
ids:JSON.stringify([data.id]),
paymentMoney:data.paymentMoney,
isPay:data.isPay,
remark:"缴费"
}
const resp = await this.$axios.post("/platform/member/payment/summary/modify", formData)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
}
},
openView(data) {
const payStandards=JSON.parse(data.payStandards)
this.payStandard=payStandards.filter(item => item.personType===data.personType&&item.payPersonnel===data.payPersonnel)
if (this.payStandard.length>0&&this.payStandard[0].payModeValueList===null){
this.formData.paymentMoney=+this.payStandard[0].payModeValue*+this.formData.paymentMonth
}
this.formData=data
this.$refs.guava.view()
},
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 resp = await this.$axios.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)
}
}
},
getMoney(item){
this.formData.paymentMoney=0
let money=0
item.payModeValueList.forEach(o=>{
money=+o.value+money
})
this.formData.paymentMoney=money*0.005*+this.formData.paymentMonth
}
},
async created() {
this.pageData()
}
})
</script>
<!--#
}
#-->