-
-
个
+
+
+
@@ -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: '请检查手续费格式',