缴费
This commit is contained in:
@@ -267,7 +267,7 @@ layout("/mobile/platform.html"){
|
||||
const payStandards = this.configData.payStandards
|
||||
resp.data.forEach((r) => {
|
||||
payStandards.map((p) => {
|
||||
if (p.personTypes.includes(personType)) {
|
||||
if (p.personType===personType) {
|
||||
r.selectMode = p.payMode
|
||||
if (p.c === "1") {
|
||||
r.modeValue = p.payModeValue
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" left-arrow title="缴费汇总"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-search v-model="pageForm.searchKeyword" placeholder="请输入搜索关键词" @search="doSearch">
|
||||
</van-search>
|
||||
</div>
|
||||
<div>
|
||||
<van-tabs @change="doSearch" v-model="pageForm.isPay">
|
||||
<van-tab title="未缴费" :name="false"></van-tab>
|
||||
<van-tab title="已缴费" :name="true"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
finished-text="没有更多了"
|
||||
@load="pageData"
|
||||
>
|
||||
<van-cell-group inset>
|
||||
<van-cell v-for="item in tableData" :value="item.isPayment?'已缴':'未缴'">
|
||||
<template #title>
|
||||
<span class="custom-title">{{item.username}}</span>
|
||||
<van-tag type="danger">{{item.isPayment?'已缴':'未缴'}}</van-tag>
|
||||
</template>
|
||||
<template #label>
|
||||
<div class="custom-title">工会:{{item.unionname}}</div>
|
||||
<div class="custom-title">单位:{{item.unitname}}</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-list>
|
||||
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无缴费记录"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
v-if="tableData&&tableData.length===0"
|
||||
></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
memberActive: 0,
|
||||
loading: false,
|
||||
finished: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
username: "",
|
||||
isPay:false,
|
||||
searchName:'u.username',
|
||||
searchKeyword:''
|
||||
},
|
||||
option1: [
|
||||
{ text: '姓名', value: 'u.username' },
|
||||
{ text: '工号', value: 'u.loginname' },
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const resp = await $.post("/platform/member/payment/summary/pageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
console.log(this.tableData.length >= this.pageForm.totalCount)
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
doSearch(){
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -18,7 +18,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.projectName">
|
||||
v-model="pageForm.name">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,7 +60,7 @@ layout("/layouts/platform.html"){
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{projectStatusChange(row.id)}"
|
||||
@change="(val)=>{configStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
@@ -100,9 +100,22 @@ layout("/layouts/platform.html"){
|
||||
style="margin: 10px 0 0 0">
|
||||
<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"></el-input>
|
||||
<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>
|
||||
@@ -178,12 +191,8 @@ layout("/layouts/platform.html"){
|
||||
<div style="display:flex;justify-content: space-between;margin-left: 30px">
|
||||
(
|
||||
<template v-for="(o,i) in row.payModeValueList" >
|
||||
<el-input maxlength="5" placeholder="" style="width: 200px;"
|
||||
v-model="o.value">
|
||||
<el-select style="width: 105px;" v-model="o.name" slot="prepend" placeholder="请选择">
|
||||
<el-option label="岗位工资" value="1"></el-option>
|
||||
<el-option label="薪级工资" value="2"></el-option>
|
||||
</el-select>
|
||||
<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>
|
||||
@@ -294,6 +303,8 @@ layout("/layouts/platform.html"){
|
||||
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:[],
|
||||
@@ -303,23 +314,70 @@ layout("/layouts/platform.html"){
|
||||
tableData:[],
|
||||
tableColumns:[
|
||||
{prop: 'name', label: '配置名称'},
|
||||
{prop: 'unPaidExitDuration', label: '未缴费退会时长'},
|
||||
{prop: 'exitMode', label: '退会模式'},
|
||||
{prop: 'paidDuration', 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 $.get(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 $.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 $.post(loc() + '/doAddOrModify',formData)
|
||||
if (resp.code === 0){
|
||||
this.$refs.guava.index()
|
||||
await this.getPaymentConfig()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
|
||||
@@ -83,9 +83,6 @@ layout("/layouts/platform.html"){
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row}" v-if="column.prop==='paymentMonth'">
|
||||
<span>{{row.paymentStartMonth}} 至 {{row.paymentEndMonth}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
@@ -163,20 +160,16 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<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-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 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">
|
||||
@@ -220,7 +213,6 @@ layout("/layouts/platform.html"){
|
||||
tableColumns: [
|
||||
{prop: 'year', label: '年度', sortable: true},
|
||||
{prop: 'projectName', label: '项目名称', sortable: true},
|
||||
{prop: 'paymentMonth', label: '缴费月份', sortable: true},
|
||||
{prop: 'startTime', label: '缴费开始时间', sortable: true},
|
||||
{prop: 'endTime', label: '缴费截止时间', sortable: true},
|
||||
{prop: 'createTime', label: '创建时间', sortable: true},
|
||||
@@ -234,9 +226,11 @@ layout("/layouts/platform.html"){
|
||||
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: []
|
||||
monthSelect: [],
|
||||
configList:[]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -265,7 +259,10 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
openView(data) {
|
||||
this.formData = {}
|
||||
this.formData = {...data}
|
||||
this.formData = {
|
||||
...data,
|
||||
paymentTime:[data.startTime, data.endTime],
|
||||
}
|
||||
this.isSubmit = false
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
@@ -273,7 +270,6 @@ layout("/layouts/platform.html"){
|
||||
this.formData = {}
|
||||
this.formData = {
|
||||
...data,
|
||||
paymentMonth:[data.paymentStartMonth, data.paymentEndMonth],
|
||||
paymentTime:[data.startTime, data.endTime],
|
||||
}
|
||||
this.isSubmit = true
|
||||
@@ -369,8 +365,6 @@ layout("/layouts/platform.html"){
|
||||
});
|
||||
this.formData.startTime=this.formData.paymentTime[0]
|
||||
this.formData.endTime=this.formData.paymentTime[1]
|
||||
this.formData.paymentStartMonth=this.formData.paymentMonth[0]
|
||||
this.formData.paymentEndMonth=this.formData.paymentMonth[1]
|
||||
const formData = clone(this.formData)
|
||||
const resp = await $.post(loc() + '/doSave', formData)
|
||||
loading.close()
|
||||
@@ -393,8 +387,15 @@ layout("/layouts/platform.html"){
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getPaymentConfigList(id) {
|
||||
const resp = await $.post('/platform/member/payment/config/getPaymentConfigList')
|
||||
if (resp.code === 0) {
|
||||
this.configList = resp.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.getPaymentConfigList()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,352 @@
|
||||
<!--#
|
||||
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"
|
||||
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="个人缴费列表">
|
||||
</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">
|
||||
<vi-title title="缴费信息"></vi-title>
|
||||
<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">
|
||||
<vi-title title="缴费信息"></vi-title>
|
||||
<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>
|
||||
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']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'edit') {
|
||||
this.doPay(data)
|
||||
}
|
||||
if (type === 'pay'){
|
||||
this.openPay(data)
|
||||
}
|
||||
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 $.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 $.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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user