From 63f4fcfbf443d56375b168457af55a44583475ba Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Fri, 2 Feb 2024 15:31:02 +0800 Subject: [PATCH] bug --- fuintAdmin/src/api/giftCard/giftcard.js | 10 ++++ fuintAdmin/src/views/member/userInfo.vue | 47 ++++++++++++++++++- .../views/staffCommission/staffCommission.vue | 7 ++- 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 fuintAdmin/src/api/giftCard/giftcard.js diff --git a/fuintAdmin/src/api/giftCard/giftcard.js b/fuintAdmin/src/api/giftCard/giftcard.js new file mode 100644 index 000000000..359c122a7 --- /dev/null +++ b/fuintAdmin/src/api/giftCard/giftcard.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 测试支付接口 +export function giftCardExchange(query) { + return request({ + url: '/business/marketingActivity/cardGift/exchange', + method: 'get', + data:query + }) +} diff --git a/fuintAdmin/src/views/member/userInfo.vue b/fuintAdmin/src/views/member/userInfo.vue index c8e7599d6..f0455cf1f 100644 --- a/fuintAdmin/src/views/member/userInfo.vue +++ b/fuintAdmin/src/views/member/userInfo.vue @@ -277,7 +277,7 @@ - +
@@ -365,6 +365,28 @@ 取 消
+ + + + + + + + + + + + + + + + + +
+ 确认充值 + 取 消 +
+
@@ -834,6 +856,7 @@ import { listCardValueChild, listCardValueChildOrder } from "@/api/staff/user/cardvaluechild"; import {getOilOrderAllAmount} from "@/api/order/oilorder"; +import {giftCardExchange} from "@/api/giftCard/giftcard"; export default { components: { @@ -964,6 +987,7 @@ export default { id: '', // 会员信息 form: {}, + form2: {}, refuelMoney:[], form1: {}, cardChildPhones: "", @@ -1002,6 +1026,11 @@ export default { fixingLevel: [{required: true, message: "请选择认证信息", trigger: "blur"}], userId:[{ required: true, message: '请选择主卡信息', trigger: 'change' }], cardChildPhones:[{required: true, message: "请输入子卡手机号", trigger: "blur"}], + }, + // 表单校验 + rules1: { + number: [{required: true, message: "请输入卡号", trigger: "blur"}], + cardPassword: [{required: true, message: "请输入卡密", trigger: "blur"}], } } }, @@ -1381,6 +1410,20 @@ export default { this.title = this.payment }, + confirm1(){ + this.$refs["form"].validate(valid => { + if (valid) { + giftCardExchange(this.form2).then(res => { + if (res.data.id == '' || res.data.id == null) { + this.$message.error('兑换失败!'); + } else { + this.$message.success('兑换成功!'); + this.openRecharge = false + } + }) + } + }) + }, // 支付方式 payMethod(payType, flag) { // this.map.payType = payType; @@ -1756,6 +1799,8 @@ export default { reset() { this.resetForm("form"); this.form = {} + this.form1 = {} + this.form2 = {} }, // 取消按钮 cancel() { diff --git a/fuintAdmin/src/views/staffCommission/staffCommission.vue b/fuintAdmin/src/views/staffCommission/staffCommission.vue index 182002b3e..fa5137c73 100644 --- a/fuintAdmin/src/views/staffCommission/staffCommission.vue +++ b/fuintAdmin/src/views/staffCommission/staffCommission.vue @@ -242,9 +242,12 @@ - + {{ dict.label }} + + {{ dict.label }} + @@ -602,7 +605,7 @@ export default { this.form = { type:'orderAmount', status:'qy', - commissionSource:'油品' + commissionSource:'储值卡充值' }; }else { this.form = {