diff --git a/src/router/index.js b/src/router/index.js index 28dc0b8..7176533 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -319,7 +319,7 @@ const routes = [ { path: 'receiveManager', name: "receiveManager", - component: () => import("../views/moneyManage/receiveDetail/receiveManage.vue"), + component: () => import("../views/moneyManage/receiveDetail/receiveFinance.vue"), meta: { permissionId: [67, 79] } }, {//地区财务 diff --git a/src/views/moneyManage/receiveDetail/receiveFinance.vue b/src/views/moneyManage/receiveDetail/receiveFinance.vue index 26c2ea7..34cc35f 100644 --- a/src/views/moneyManage/receiveDetail/receiveFinance.vue +++ b/src/views/moneyManage/receiveDetail/receiveFinance.vue @@ -190,8 +190,7 @@ - + @@ -455,19 +454,17 @@ 产品数量 - {{ productUnit }} -
-
- 永久金币: - +
+ 永久金币: +
-
+
免费金币: - 免费金币: +
@@ -605,16 +602,28 @@ const textContent = ref('') //退款弹窗 const refundDialog = ref(false) +const refundFormData = ref({}) const openRefundDialog = () => { refundDialog.value = true closeConfirmRefund() + } const closeRefundForm = () => { refundDialog.value = false refundFormData.value = {} } +const isRefundGold = ref(false) +const ifRefundGold = () => { + if (refundFormData.value.goodsName === '金币充值') { + isRefundGold.value = true + refundFormData.value.goodNum = 0 + } else { + isRefundGold.value = false + } +} + // 基础数据 @@ -627,9 +636,13 @@ const paytypeOptions = ref([...paytypeList]); // ===================== 2. 核心功能函数(仅地区财务) ===================== //确认退款弹窗 -const openRefundConfirm = () => { +const openRefundConfirm = (row) => { textContent.value = '将要对该订单退款!' refundConfirmDialog.value = true + refundFormData.value = { ...row } + ifRefundGold() + console.log(row); + } const closeConfirmRefund = () => { @@ -1027,6 +1040,9 @@ onMounted(async () => { window.history.back(); }); } + //背景预加载 + const bgImg = new Image(); + bgImg.src = '/src/assets/收款明细撤回背景.png'; }); // 2.10 未使用函数占位(避免报错) @@ -1306,6 +1322,37 @@ const handlePagination = (type, val) => { font-weight: 800; padding-bottom: 15px; } + + .refundDialog { + .left { + width: 50%; + height: 70vh; + min-height: 700px; + padding: 0 2vw; + + .add-item { + display: flex; + align-items: center; + margin-bottom: 1vh; + } + + .image { + width: 4vw !important; + height: 4vw !important; + } + } + + .right { + width: 50%; + height: 50vh; + + .add-item { + display: flex; + align-items: center; + margin-bottom: 1vh; + } + } + } } // 表格样式统一 diff --git a/src/views/moneyManage/receiveDetail/receiveManage.vue b/src/views/moneyManage/receiveDetail/receiveManage.vue deleted file mode 100644 index 539f8c8..0000000 --- a/src/views/moneyManage/receiveDetail/receiveManage.vue +++ /dev/null @@ -1,1174 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/permissions/rolePermission.vue b/src/views/permissions/rolePermission.vue index d8f34d0..341a6b0 100644 --- a/src/views/permissions/rolePermission.vue +++ b/src/views/permissions/rolePermission.vue @@ -9,6 +9,7 @@ import { storeToRefs } from "pinia" 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) @@ -35,7 +36,7 @@ const addRole = ref({ market: '' }) const addRoleMarket = ref([]) - +const channelList = ref(['美股', '港股', 'hc第一频道']) const getRoleList = async function (val) { if (!findMenuById(menuTree.value, permissionMapping.view_role_information)) { ElMessage.error('无此权限') @@ -196,7 +197,8 @@ const handleAddRole = async function () { "roleName": addRole.value.roleName, "menuIds": finalCheckedKeys, "fatherId": addRole.value.parentId, - "market": addRole.value.market + "market": addRole.value.market, + channel: addRole.value.channel } }) if (res.code === 200) { @@ -317,6 +319,7 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => { // 判断是否有选中的节点 if (allCheckedNodes.length === 0) { permissionEditRoleObj.value.checkedKeys = [] + ifHasChannel.value = false return } @@ -326,13 +329,22 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => { console.log('编辑角色选中的权限ID:', checkedKeys) console.log('选中的节点数量:', allCheckedNodes.length) + if (checkedKeys.includes(124) || checkedKeys.includes(125) || checkedKeys.includes(126) || checkedKeys.includes(127)) { + ifHasChannel.value = true + } else { + ifHasChannel.value = false + } }; + +//用于标记是否勾选频道管理 +const ifHasChannel = ref(false) const handleCheckChange = async (checkedNodes, checkedInfo) => { const { checkedKeys, checkedNodes: allCheckedNodes } = checkedInfo // 判断是否有选中的节点 if (allCheckedNodes.length === 0) { addRole.value.checkedKeys = [] + ifHasChannel.value = false return } @@ -348,6 +360,12 @@ const handleCheckChange = async (checkedNodes, checkedInfo) => { // 将Set转换为数组并更新 addRole.value.checkedKeys = Array.from(allKeys) console.log('新增角色包含所有父级的选中项:', addRole.value.checkedKeys) + if (addRole.value.checkedKeys.includes(124)) { + ifHasChannel.value = true + console.log('勾选了频道'); + } else { + ifHasChannel.value = false + } } const selectParentNodes = (treeData, nodeId, checkedKeys) => { if (!Array.isArray(treeData)) return false @@ -413,18 +431,38 @@ const collectIds2 = (tree) => { return ids } +const collectIdsAll = (tree) => { + let ids = [] + tree.forEach((node) => { + ids.push(node.id) + // 如果当前节点没有 children 或 children 为空,说明是叶子节点 + if (node.children || node.children.length === 0) { + ids = ids.concat(collectIdsAll(node.children)) + } + }) + return ids +} + // 编辑角色初始化 const permissionEditRoleInit = async function (row) { console.log('row', row) console.log('row.tree', row.tree) + let EditIds = collectIdsAll(row.tree) + console.log(EditIds); + permissionEditRoleObj.value = {} permissionEditRoleObj.value.id = row.id permissionEditRoleObj.value.roleName = row.roleName permissionEditRoleObj.value.market = row.market permissionEditRoleObj.value.parentId = row.fatherId permissionEditRoleObj.value.parentName = row.fatherName - + permissionEditRoleObj.value.channel = row.channel + if (EditIds.includes(124)) { + ifHasChannel.value = true + } else { + ifHasChannel.value = false + } try { let roleId = permissionEditRoleObj.value.parentId; // 如果没有上级角色,设置为管理员的id @@ -636,9 +674,9 @@ onMounted(async function () {
- +
@@ -686,6 +724,11 @@ onMounted(async function () { 暂无数据 + + + + +
@@ -729,6 +772,12 @@ onMounted(async function () { 暂无数据
+ + + + + +