-
-
个
+
+
+
@@ -403,10 +428,10 @@
-
+
-
+
@@ -452,8 +477,10 @@
产品数量
-
+
@@ -462,8 +489,7 @@
v-model="refundFormData.permanentGold" disabled />
- 免费金币:
+ 免费金币:
@@ -513,6 +539,18 @@
部分退款
+
+
+ 永久金币:
+
+
+
+ 免费金币:
+
+
+
退款理由
ps:请在退款理由表明用户的退款需求。
- 重置
+ 重置
提交
@@ -612,8 +650,16 @@ const openRefundDialog = () => {
const closeRefundForm = () => {
refundDialog.value = false
refundFormData.value = {}
+ refundCoinData.value = {
+ permanentGold: 0,
+ freeGold: 0
+ }
}
+const refundCoinData = ref({
+ permanentGold: 0,
+ freeGold: 0
+})
const isRefundGold = ref(false)
const ifRefundGold = () => {
if (refundFormData.value.goodsName === '金币充值') {
@@ -713,11 +759,30 @@ const getlist = async () => {
}
};
+//重置退款
+const resetRefund = () => {
+ refundFormData.value.refundModel = ''
+ refundFormData.value.refundReason = ''
+ refundCoinData.value = {
+ permanentGold: 0,
+ freeGold: 0
+ }
+}
//提交退款
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 +808,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 +849,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 +918,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 +967,7 @@ const openEditForm = (row) => {
const closeEditForm = () => {
editFormisible.value = false;
editFormData.value = {};
+ editFormRef.value.resetFields();
};
// 提交编辑(补充手续费)
@@ -1022,7 +1102,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: '请检查手续费格式',
diff --git a/src/views/permissions/rolePermission.vue b/src/views/permissions/rolePermission.vue
index 341a6b0..5468bd2 100644
--- a/src/views/permissions/rolePermission.vue
+++ b/src/views/permissions/rolePermission.vue
@@ -10,7 +10,7 @@ const adminStore = useAdminStore();
const { adminData, menuTree } = storeToRefs(adminStore);
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
import { tr } from 'element-plus/es/locales.mjs'
-
+
// 表单验证ref
const Ref = ref(null)
const roleData = ref([])
@@ -36,7 +36,7 @@ const addRole = ref({
market: ''
})
const addRoleMarket = ref([])
-const channelList = ref(['美股', '港股', 'hc第一频道'])
+const channelList = ref(['全部'])
const getRoleList = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.view_role_information)) {
ElMessage.error('无此权限')
@@ -275,6 +275,23 @@ const getLists = async function () {
}
}
+//获取频道列表
+const getChannelList = async () => {
+ try {
+ const res = await API({
+ url: '/role/getChannel',
+ })
+ console.log('res', res);
+ if (res.code == 200) {
+ channelList.value = [...channelList.value, ...res.data]
+ } else {
+ console.log('获取频道列表', res.msg);
+ }
+ } catch (err) {
+ console.log('获取频道列表出错', err);
+ }
+}
+
//金豆过滤
const goldenBeanMenuIds = new Set([
permissionMapping.gold_bean_audit,
@@ -411,7 +428,8 @@ const permissionEditRoleObj = ref({
market: '',
parentId: null,
parentName: '',
- checkedKeys: []
+ checkedKeys: [],
+ channel:''
})
// 编辑角色弹窗
@@ -458,6 +476,8 @@ const permissionEditRoleInit = async function (row) {
permissionEditRoleObj.value.parentId = row.fatherId
permissionEditRoleObj.value.parentName = row.fatherName
permissionEditRoleObj.value.channel = row.channel
+ console.log('permissionEditRoleObj.value',permissionEditRoleObj.value);
+
if (EditIds.includes(124)) {
ifHasChannel.value = true
} else {
@@ -533,11 +553,8 @@ const permissionEditRole = async function () {
const res = await API({
url: '/menu/update',
data: {
- "id": permissionEditRoleObj.value.id,
- "roleName": permissionEditRoleObj.value.roleName,
- "menuIds": finalCheckedKeys,
- "fatherId": permissionEditRoleObj.value.parentId,
- "market": permissionEditRoleObj.value.market
+ ...permissionEditRoleObj.value,
+ menuIds: finalCheckedKeys
}
});
if (res.code === 200) {
@@ -617,6 +634,7 @@ const canEdit = findMenuById(menuTree.value, permissionMapping.edit_role_informa
onMounted(async function () {
await getRoleList()
await getRoleArea()
+ await getChannelList()
})
@@ -725,7 +743,7 @@ onMounted(async function () {