From 13e5beaf97cd23ee72b87c000375a117303a0f42 Mon Sep 17 00:00:00 2001 From: shilei <965026003@qq.com> Date: Mon, 18 Nov 2024 18:32:51 +0800 Subject: [PATCH] =?UTF-8?q?11.18=20=20=E5=85=85=E5=80=BC=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 8 + .../order/chargorder/detailInf/detailInf.vue | 14 +- pages/userCenter/userCenter.vue | 28 +++ pagesCenter/accountBalance/accountBalance.vue | 75 ++++++- .../billingPage/addInvoice/addInvoice.vue | 197 +++++++++--------- pagesCenter/pay/index.vue | 2 +- sheep/request/index.js | 2 +- 7 files changed, 214 insertions(+), 112 deletions(-) diff --git a/pages.json b/pages.json index e45f5b5..f3e14bc 100644 --- a/pages.json +++ b/pages.json @@ -233,6 +233,14 @@ "enablePullDownRefresh": false } + }, + { + "path": "billingPage/addInvoice/addInvoice", + "style": { + "navigationBarTitleText": "开发票", + "enablePullDownRefresh": false + } + }, { "path": "billingPage/billingMean/billingMean", diff --git a/pages/order/chargorder/detailInf/detailInf.vue b/pages/order/chargorder/detailInf/detailInf.vue index 7dada10..ac667ed 100644 --- a/pages/order/chargorder/detailInf/detailInf.vue +++ b/pages/order/chargorder/detailInf/detailInf.vue @@ -236,7 +236,19 @@ }); istipsonly.value++ } - + } else if (res.data.data.orderStatus == 5) { + uni.showModal({ + title: '支付结果', + showCancel: false, + content: '已自动支付完成,请点击确认退出当前页面', + success: function(res) { + if (res.confirm) { + uni.switchTab({ + url: '/pages/index/index' + }) + } + } + }); } }).catch((err) => { uni.showToast({ diff --git a/pages/userCenter/userCenter.vue b/pages/userCenter/userCenter.vue index 1cc0a0b..15fd138 100644 --- a/pages/userCenter/userCenter.vue +++ b/pages/userCenter/userCenter.vue @@ -113,6 +113,14 @@ + + + + + 开发票 + + + @@ -232,6 +240,26 @@ url: '/pages/userCenter/about/about' }) } + + const goAddinvoice = () => { + if (!uni.getStorageSync("userInfo")) { + uni.showToast({ + title: '请先完成登录', + duration: 2000, + icon: 'error' + }); + return; + } else { + uni.navigateTo({ + url: '/pagesCenter/billingPage/addInvoice/addInvoice' + }) + } + // else if (realNameAuthFlag.value != 1) { + // errornotify.value.show() + // return + // } + } + const gologin = () => { uni.navigateTo({ url: '../../pagesCenter/login/enter' diff --git a/pagesCenter/accountBalance/accountBalance.vue b/pagesCenter/accountBalance/accountBalance.vue index 2344819..23d03ea 100644 --- a/pagesCenter/accountBalance/accountBalance.vue +++ b/pagesCenter/accountBalance/accountBalance.vue @@ -23,6 +23,7 @@ + @@ -30,12 +31,13 @@ - - - + 付款成功 + 退款 {{item.payTime}} {{item.createTime}} @@ -43,7 +45,8 @@ - {{tab_current == 0? (item.payPrice / 100): (item.price / 100) }} + {{tab_current == 0? (item.payPrice / 100): (item.price / 100) }} + 实际到账金额: {{item.totalPrice?item.totalPrice / 100: 0}}元 @@ -91,7 +94,7 @@ const tab_current = ref(0) onLoad(() => { handle_bindType() - getPayconsumption() + // getPayconsumption() }) onShow(() => { getPayList(0) @@ -122,6 +125,59 @@ url: '/pages/index/recharge/recharge' }) } + + const handle_refund = (id) => { + uni.showModal({ + title: '提示', + content: '是否确认提交退款申请?', + success: function(res) { + if (res.confirm) { + handle_refund_submit(id) + } else if (res.cancel) { + // console.log('用户点击取消'); + } + } + }); + } + + const handle_refund_submit = async (id) => { + await uni.$request({ + url: config.baseUrl + + `app-api/pay/wallet-recharge/refund?id=${id}` + }).then(res => { + // console.log(res, '退款'); + uni.showLoading({ + title: '申请中...请稍后' + }) + if (res.data.code == 0) { + setTimeout(() => { + uni.showToast({ + title: '申请成功', + duration: 2000, + icon: 'success' + }); + }, 2000) + setTimeout(() => { + handle_bindType() + uni.hideLoading() + }, 4000) + } else { + setTimeout(() => { + uni.showToast({ + title: res.data.msg, + duration: 2000, + icon: 'error' + }); + }, 2000) + setTimeout(() => { + handle_bindType() + uni.hideLoading() + }, 4000) + + } + // if() + }) + } const getPayList = async (type) => { let param = { pageNo: pageNo.value, @@ -168,7 +224,7 @@ data, code } = await PayWalletApi.getWalletTransactionPage(param) - console.log(data, 'data') + // console.log(data, 'data') } onReachBottom(async () => { if (payData.value.length == totalPages.value) { @@ -303,6 +359,13 @@ overflow: hidden; overflow-y: scroll; } + + .refund_moneny { + font-size: 13px; + text-decoration: underline; + margin-left: 10rpx; + color: red; + }