From 553f88b5ac885268f1fe5fc9f61bd3bfaf9c018c Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Fri, 7 Nov 2025 15:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E9=80=82=E9=85=8D=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=BA=BF=E4=B8=8A=E9=80=80=E6=AC=BE=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moneyManage/receiveDetail/receiveFinance.vue | 95 +++++++++++++++++++--- .../receiveDetail/utils/recriveFormRules.js | 2 + 2 files changed, 84 insertions(+), 13 deletions(-) diff --git a/src/views/moneyManage/receiveDetail/receiveFinance.vue b/src/views/moneyManage/receiveDetail/receiveFinance.vue index 34cc35f..92fc712 100644 --- a/src/views/moneyManage/receiveDetail/receiveFinance.vue +++ b/src/views/moneyManage/receiveDetail/receiveFinance.vue @@ -250,6 +250,30 @@ + +
+ + +
+
+
+
+ 永久金币: + +
+
+ 免费金币: + +
+
@@ -333,10 +357,11 @@ -
- - +
+ +
@@ -403,10 +428,10 @@ - + - + @@ -452,8 +477,10 @@
产品数量 - +
@@ -462,8 +489,7 @@ v-model="refundFormData.permanentGold" disabled />
- 免费金币: + 免费金币:
@@ -513,6 +539,18 @@ 部分退款
+
+
+ 永久金币: + +
+
+ 免费金币: + +
+
退款理由 { refundFormData.value = {} } +const refundCoinData = ref({ + permanentGold: 0, + freeGold: 0 +}) const isRefundGold = ref(false) const ifRefundGold = () => { if (refundFormData.value.goodsName === '金币充值') { @@ -716,8 +758,18 @@ const getlist = async () => { //提交退款 const submitRefund = async () => { try { + if (refundFormData.value.goodsName != '金币充值') { + + return ElMessage.error('线上数据仅支持金币充值退款'); + } + if (!refundFormData.value.refundModel) { + return ElMessage.error('请选择退款方式'); + } + if (!refundFormData.value.refundReason) { + return ElMessage.error('请输入退款原因'); + } const result = await request({ - url: '/Money/add', + url: '/Money/addOnline', data: { jwcode: refundFormData.value.jwcode, // 精网号(必填) name: refundFormData.value.name, // 姓名(必填) @@ -743,8 +795,8 @@ const submitRefund = async () => { refundModel: refundFormData.value.refundModel, // 退款方式:0-全额,1-部分(可选) id: refundFormData.value.id, //订单id orderCode: refundFormData.value.orderCode, - permanentGold: (refundFormData.value.permanentGold) * 100 || 0, - freeGold: (refundFormData.value.freeGold) * 100 || 0 + permanentGold: (refundCoinData.value.permanentGold) * 100 || 0, + freeGold: (refundCoinData.value.freeGold) * 100 || 0 } }) if (result.code == 200) { @@ -784,6 +836,9 @@ const navigateTo = async (tab) => { // 打开审核弹窗 const openAuditForm = (row) => { auditFormData.value = { ...row, market: row.marketName }; + ifGold(auditFormData.value) + console.log('isGold', isGold.value); + auditFormisible.value = true; }; @@ -850,6 +905,17 @@ const handelAuditReject = async () => { } }; +//判断产品类型 +const isGold = ref(false) +const ifGold = (data) => { + console.log('data', data); + if (data.goodsName === '金币充值') { + isGold.value = true + } else { + isGold.value = false + } +} + // 审核按钮倒计时(防止误操作) watch(auditFormisible, (val) => { if (val) { @@ -888,6 +954,7 @@ const openEditForm = (row) => { const closeEditForm = () => { editFormisible.value = false; editFormData.value = {}; + editFormRef.value.resetFields(); }; // 提交编辑(补充手续费) @@ -1022,7 +1089,9 @@ const getActivitys = async () => { // 2.8 节流函数(防止重复提交) const throttledhandelAuditReject = _.throttle(handelAuditReject, 3000, { trailing: false }); const throttledsubmitEditForm = _.throttle(submitEditForm, 3000, { trailing: false }); - +const throttledsubmitRefund = _.throttle(submitRefund, 5000, { + trailing: false +}) // 2.9 页面初始化 onMounted(async () => { await getAdminData(); diff --git a/src/views/moneyManage/receiveDetail/utils/recriveFormRules.js b/src/views/moneyManage/receiveDetail/utils/recriveFormRules.js index 7f1bb2d..24906d4 100644 --- a/src/views/moneyManage/receiveDetail/utils/recriveFormRules.js +++ b/src/views/moneyManage/receiveDetail/utils/recriveFormRules.js @@ -87,6 +87,7 @@ export const addFormRule = { export const editFormRule = { // 到账金额:最大6位(整数部分最多4位,小数2位),支持两位小数 receivedAmount: [ + { required: true, message: '请输入到账金额', trigger: 'blur' }, { pattern: /^\d{1,6}(\.\d{1,2})?$/, message: '请检查到账金额格式', @@ -95,6 +96,7 @@ export const editFormRule = { ], // 手续费:同到账金额规则 handlingCharge: [ + { required: true, message: '请输入手续费', trigger: 'blur' }, { pattern: /^\d{1,6}(\.\d{1,2})?$/, message: '请检查手续费格式',