commit
This commit is contained in:
@@ -0,0 +1,416 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.parent-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 22px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
.content-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.left-child-card {
|
||||
display: table;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.left-child-card img {
|
||||
display: table-cell;
|
||||
width: 40px;
|
||||
}
|
||||
.footer-card {
|
||||
text-align: right;
|
||||
}
|
||||
.footer-card .van-button {
|
||||
border-radius: 6px;
|
||||
height: 28px;
|
||||
}
|
||||
.pay-content {
|
||||
|
||||
}
|
||||
.pay-content .van-cell {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.pay-content .van-cell__title {
|
||||
color: #646566;
|
||||
}
|
||||
.pay_img {
|
||||
display: table;
|
||||
}
|
||||
.pay_img img {
|
||||
display: table-cell;
|
||||
}
|
||||
.costFormula {
|
||||
|
||||
}
|
||||
.costFormula .van-cell__title {
|
||||
max-width: 100px;
|
||||
}
|
||||
.van-action-sheet__content {
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
.van-dropdown-menu__bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
.van-empty {
|
||||
position: relative;
|
||||
transform: none;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" left-arrow title="会费支付"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="doSearch" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isPay" @change="doSearch" :options="payList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<div class="parent-card">
|
||||
<div v-for="item in tableData">
|
||||
<div class="content-card">
|
||||
<div class="left-child-card">
|
||||
<img src="/assets/mobile/svg/memberPay/icon_xsgj.svg"/>
|
||||
</div>
|
||||
<div class="right-child-card">
|
||||
<div>
|
||||
<span>项目名称:</span>
|
||||
<span>{{item.projectName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>所属时间:</span>
|
||||
<span>{{item.paymentStartMonth}} 至 {{item.paymentEndMonth}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>缴费时间:</span>
|
||||
<span>{{moment(item.startTime).format('MM-DD') + ' 至 ' + moment(item.endTime).format('MM-DD')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-card">
|
||||
<van-button v-if="!item.isPayment" @click.stop="openPay(item)" color="#1867b0" size="small" type="primary">
|
||||
我要缴费
|
||||
</van-button>
|
||||
<template v-else>
|
||||
<van-button v-if="item.isPayment && !item.isRefund" size="small" type="primary" :disabled="true">
|
||||
您已缴费
|
||||
</van-button>
|
||||
<van-button v-else size="small" type="danger" :disabled="true">
|
||||
{{ getRefundStates(item.refundState) }}
|
||||
</van-button>
|
||||
|
||||
<!-- <van-button size="small" type="primary" @click.stop="showPayInfo(item)">-->
|
||||
<!-- 查看详情-->
|
||||
<!-- </van-button>-->
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
<van-action-sheet :close-on-click-overlay="false" :title="payInfo.projectName" style="height: 60%" v-model="payVisible" @close="payVisibleClose">
|
||||
<div class="pay-content">
|
||||
<template>
|
||||
<van-cell class="costFormula" title="缴费所属时间">
|
||||
<template #right-icon>
|
||||
{{formData.paymentStartMonth}} 至 {{formData.paymentEndMonth}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell class="costFormula" title="缴费标准">
|
||||
<template #right-icon>
|
||||
<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>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-field
|
||||
:label="o.name"
|
||||
:placeholder="'请输入' + o.name"
|
||||
@input="moneyInput"
|
||||
input-align="right"
|
||||
type="number"
|
||||
v-for="(o,index) in formData.payModeValueList"
|
||||
v-model="o.value"
|
||||
>
|
||||
<template #left-icon>
|
||||
<div class="pay_img">
|
||||
<img src="/assets/mobile/svg/memberPay/money.svg"/>
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
|
||||
<van-radio-group checked-color="#1867b0" v-model="moneyModel">
|
||||
<van-cell @click="moneyModel = 1" clickable title="支付宝">
|
||||
<template #icon>
|
||||
<div class="pay_img" style="margin-right: 4px">
|
||||
<img src="/assets/mobile/svg/memberPay/zfb.svg"/>
|
||||
</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" style="margin-right: 4px">
|
||||
<img src="/assets/mobile/svg/memberPay/wx.svg"/>
|
||||
</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-radio :name="2"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-radio-group>
|
||||
<van-submit-bar :loading="loading" :price="formData.paymentMoney" @submit="doPay" button-color="#1867b0" button-text="支付"></van-submit-bar>
|
||||
</div>
|
||||
|
||||
</van-action-sheet>
|
||||
|
||||
<van-popup :style="{ height: '100%', width: '100%'}" @close="imgClose" closeable position="right" v-model="payToOtherPage">
|
||||
<van-image src="/assets/mobile/svg/memberPay/zf_img.png" style="margin-top: 40px; height: 95%; width: 100%"></van-image>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
|
||||
<script>
|
||||
function onBridgeReady(json) {
|
||||
// const data = JSON.parse(json)
|
||||
WeixinJSBridge.invoke("getBrandWCPayRequest", JSON.parse(json), function (res) {
|
||||
if (res.err_msg === "get_brand_wcpay_request:ok") {
|
||||
// 使用以上方式判断前端返回,微信团队郑重提示:
|
||||
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
||||
}
|
||||
})
|
||||
}
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
payToOtherPage: false,
|
||||
costFormula: "",
|
||||
payVisible: false,
|
||||
loading: false,
|
||||
viewData: {},
|
||||
tableData: [],
|
||||
payList: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已缴费', value: true},
|
||||
{text: '未缴费', value: false},
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isPay: false
|
||||
},
|
||||
payInfo: {},
|
||||
formData: {},
|
||||
moneyModel: 2,
|
||||
intervalTimer: null,
|
||||
hasPayed: false,
|
||||
|
||||
tradingStates: [],
|
||||
refundStates: [],
|
||||
tradingChannels: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// showPayInfo(data) {
|
||||
//
|
||||
// },
|
||||
async payVisibleClose() {
|
||||
clearInterval(this.intervalTimer)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
imgClose() {
|
||||
this.loading = false
|
||||
this.payToOtherPage = false
|
||||
},
|
||||
moneyInput() {
|
||||
let paymentMoney = this.formData.payModeValueList.reduce((a, b) => {
|
||||
return Number(a) + Number(b.value)
|
||||
}, 0)
|
||||
console.log(paymentMoney)
|
||||
const pr = parseFloat((Number(paymentMoney) * 0.005 * this.formData.paymentMonth).toFixed(2))
|
||||
this.$set(this.formData, "paymentMoney", pr * 100)
|
||||
},
|
||||
async doPay() {
|
||||
if (!this.formData.paymentMoney) {
|
||||
this.$toast('请计算会费金额')
|
||||
return
|
||||
}
|
||||
if (!this.moneyModel) {
|
||||
this.$toast('请选择支付方式')
|
||||
return
|
||||
}
|
||||
if(this.moneyModel === 1) {
|
||||
this.$toast('暂未开通,敬请期待')
|
||||
return
|
||||
}
|
||||
const u = navigator.userAgent
|
||||
const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) //ios终端
|
||||
let userAgent = window.navigator.userAgent.toLowerCase()
|
||||
if (this.moneyModel === 1) {
|
||||
//是否微信浏览器
|
||||
if (userAgent.match(/MicroMessenger/i) && userAgent.match(/MicroMessenger/i)[0] === "micromessenger") {
|
||||
this.payToOtherPage = true
|
||||
} else {
|
||||
const resp = await $.get("/mobile/memberCost/AlipayClient/tradePagePay", {
|
||||
money: paymentMoney,
|
||||
paymentProjectId: this.payInfo.id
|
||||
})
|
||||
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 if(this.moneyModel === 2) {
|
||||
if (userAgent.match(/MicroMessenger/i) && userAgent.match(/MicroMessenger/i)[0] === "micromessenger") {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要支付吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '支付中...',
|
||||
forbidClick: true,
|
||||
})
|
||||
this.hasPayed = false
|
||||
await this.pullWeChatPay()
|
||||
await this.getIsPay(loading)
|
||||
}
|
||||
} else {
|
||||
this.$toast('微信支付只能在微信APP中使用,请切换支付方式')
|
||||
}
|
||||
}
|
||||
},
|
||||
//拉起微信支付
|
||||
async pullWeChatPay() {
|
||||
const resp = await $.post("/mobile/memberCost/list/pullWeChatPay", {
|
||||
money: this.formData.paymentMoney,
|
||||
busId: this.payInfo.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
if (typeof WeixinJSBridge == "undefined") {
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener("WeixinJSBridgeReady", onBridgeReady(resp.data))
|
||||
} else if (document.attachEvent) {
|
||||
document.attachEvent("WeixinJSBridgeReady", onBridgeReady(resp.data))
|
||||
document.attachEvent("onWeixinJSBridgeReady", onBridgeReady(resp.data))
|
||||
}
|
||||
} else {
|
||||
onBridgeReady(resp.data)
|
||||
}
|
||||
}
|
||||
},
|
||||
async getIsPay(loading) {
|
||||
this.intervalTimer = setInterval(async () => {
|
||||
const resp = await $.get("/platform/member/payment/mine/getIsPay", { paymentInfoId: this.payInfo.id })
|
||||
if (resp.code === 0) {
|
||||
loading.close()
|
||||
if(resp.data > 0) {
|
||||
this.hasPayed = true
|
||||
}
|
||||
}
|
||||
}, 2000)
|
||||
},
|
||||
async openPay(row) {
|
||||
this.payInfo = row
|
||||
const payStandards = JSON.parse(row.payStandards)
|
||||
const payStandard = payStandards.find(p => p.payPersonnel === row.payPersonnel && 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.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
|
||||
},
|
||||
async pageData() {
|
||||
const res = await $.post("/platform/member/payment/mine/pageData", this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
getRefundStates(data) {
|
||||
if (!data) {
|
||||
return
|
||||
}
|
||||
return this.refundStates.find(item => item.name === data).refundStateName
|
||||
},
|
||||
async getPaymentEnums() {
|
||||
this.tradingStates = await getEnumOptions("TradingStateEnum")
|
||||
this.refundStates = await getEnumOptions("RefundStateEnum")
|
||||
this.tradingChannels = await getEnumOptions("TradingChannelEnum")
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({ text: i, value: i })
|
||||
}
|
||||
await this.pageData()
|
||||
await this.getPaymentEnums()
|
||||
},
|
||||
watch: {
|
||||
"hasPayed"(val) {
|
||||
if(val === true) {
|
||||
clearInterval(this.intervalTimer)
|
||||
this.$dialog.alert({title: '温馨提示', message: '支付成功'})
|
||||
this.doSearch()
|
||||
this.payVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,134 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.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,198 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.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.search" 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>
|
||||
<van-swipe-cell v-for="item in tableData">
|
||||
<template #left>
|
||||
<van-button @click="sendPaymentMsg(item)" style="height: 100%" square type="info" text="催缴" />
|
||||
</template>
|
||||
<van-cell >
|
||||
<template #title>
|
||||
<span class="custom-title">{{item.username}}</span>({{item.loginname}})
|
||||
<van-tag :type="item.isPayment?'primary':'danger'">{{item.isPayment?'已缴':'未缴'}}</van-tag>
|
||||
</template>
|
||||
<template #label>
|
||||
<div class="custom-title">人员类型:{{item.personType}}</div>
|
||||
<div class="custom-title">在职状态:{{item.userState}}</div>
|
||||
<div class="custom-title">所属工会:{{item.unionname}}</div>
|
||||
<div class="custom-title">所属单位:{{item.unitname}}</div>
|
||||
<div class="custom-title">缴费金额:{{item.paymentMoney}}</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-button @click="openPay(item)" v-if="!item.isPayment" size="mini" plain type="info">设为已缴</van-button>
|
||||
</template>
|
||||
</van-cell>
|
||||
<template #right>
|
||||
<van-button style="height: 100%" @click="doDelete(item.id)" square type="danger" text="删除" />
|
||||
</template>
|
||||
</van-swipe-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>
|
||||
|
||||
<van-action-sheet v-model="show" title="标题">
|
||||
<div class="content">
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field
|
||||
v-model="formData.paymentMoney"
|
||||
name="缴费金额"
|
||||
label="缴费金额"
|
||||
type="digit"
|
||||
placeholder="缴费金额"
|
||||
:rules="[{ required: true, message: '请填写缴费金额' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.remark"
|
||||
name="备注"
|
||||
label="备注"
|
||||
placeholder="备注"
|
||||
></van-field>
|
||||
<div style="margin: 16px;">
|
||||
<van-button round block type="info" native-type="submit">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</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,
|
||||
search:''
|
||||
},
|
||||
option1: [
|
||||
{ text: '姓名', value: 'u.username' },
|
||||
{ text: '工号', value: 'u.loginname' },
|
||||
],
|
||||
show:false,
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
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
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
doSearch(){
|
||||
this.pageForm.pageNumber = 1
|
||||
if(this.tableData.length==this.pageForm.totalCount){
|
||||
this.finished = true
|
||||
}else{
|
||||
this.finished = false
|
||||
}
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async doDelete(id) {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.get("/platform/member/payment/summary/doRemoveById", { id: id })
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
await this.doSearch()
|
||||
loading.close()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
async sendPaymentMsg(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: "您确定对【" + row.username + "】会员进行催缴吗?",
|
||||
}).then(async () => {
|
||||
const resp = await $.get("/platform/member/payment/summary/sendPaymentMsg", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
await this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
openPay(item){
|
||||
this.show=true
|
||||
this.formData=item
|
||||
},
|
||||
onSubmit(){
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: "您确定要更改缴费信息吗?",
|
||||
}).then(async () => {
|
||||
const data={
|
||||
ids:JSON.stringify([this.formData.id]),
|
||||
paymentMoney:this.formData.paymentMoney,
|
||||
remark:this.formData.remark,
|
||||
isPay:this.formData.isPayment
|
||||
}
|
||||
const resp = await $.get("/platform/member/payment/summary/modify", data)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
await this.doSearch()
|
||||
this.show=false
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user