Browse Source

add:汇率、金币消耗、金币充值

zhangyong/milestone-20250913-现金管理二期^2
lihui 3 weeks ago
parent
commit
96692819c1
  1. 13
      src/views/consume/gold/addCoinConsume.vue
  2. 4
      src/views/consume/gold/coinConsume.vue
  3. 16
      src/views/consume/gold/coinConsumeDetail.vue
  4. 4
      src/views/managerecharge/rate.vue
  5. 4
      src/views/recharge/gold/coinRecharge.vue

13
src/views/consume/gold/addCoinConsume.vue

@ -8,6 +8,7 @@ import { useAdminStore } from "@/store/index.js";
import { storeToRefs } from "pinia";
import { WarnTriangleFilled } from "@element-plus/icons-vue";
import dayjs from "dayjs";
import {hasMenuPermission, permissionMapping} from "@/utils/menuTreePermission.js";
const adminStore = useAdminStore();
const { adminData, menuTree } = storeToRefs(adminStore);
@ -213,8 +214,20 @@ const WriteCookiesTime = ref(null)
const ReadCookies = ref(null)
// cookie value
const ReadCookiesTime = ref(null)
const addCoinConsumePermission = ref(false) //
//
const initPermissions = async() => {
if (!menuTree.value || !menuTree.value.length) return;
addCoinConsumePermission.value = hasMenuPermission(menuTree.value, permissionMapping.add_gold_coin_consumption);
};
//
const add = async function () {
if (!addCoinConsumePermission) {
ElMessage.error('暂无权限')
return
}
try {
//
if (!validateInput()) {

4
src/views/consume/gold/coinConsume.vue

@ -52,8 +52,8 @@ const navigateTo = (name) => {
//
const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return;
hasAdd.value = hasMenuPermission(menuTree.value, permissionMapping.addCoinConsume);
hasDetail.value = hasMenuPermission(menuTree.value, permissionMapping.coinConsumeDetail);
hasAdd.value = hasMenuPermission(menuTree.value, permissionMapping.add_gold_coin_consumption);
hasDetail.value = hasMenuPermission(menuTree.value, permissionMapping.gold_coin_consumption_details);
};
//

16
src/views/consume/gold/coinConsumeDetail.vue

@ -5,6 +5,7 @@ import request from '@/util/http.js'
import API from '@/util/http.js'
import moment from 'moment'
import { reverseMarketMapping } from "@/utils/marketMap.js";
import {hasMenuPermission, permissionMapping} from "@/utils/menuTreePermission.js";
//
/*
@ -141,6 +142,15 @@ const totalGoldSearch = ref({
goodsName: ""
})
const selectPermission = ref(false)
//
const initPermissions = async() => {
if (!menuTree.value || !menuTree.value.length) return;
selectPermission.value = hasMenuPermission(menuTree.value, permissionMapping.gold_coin_consumption_details);
};
/*
====================方法=================================
*/
@ -161,6 +171,12 @@ const getAdminData = async function () {
const ConsumeSelectBy = async function (val) {
if (!hasrechargeWaitShow) {
ElMessage.error('暂无权限')
return
}
try {
//

4
src/views/managerecharge/rate.vue

@ -128,8 +128,8 @@ const hasrateEdit = ref(false)
//
const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return;
hasrateShow.value = hasMenuPermission(menuTree.value, permissionMapping.rateShow);
hasrateEdit.value = hasMenuPermission(menuTree.value, permissionMapping.rateEdit);
hasrateShow.value = hasMenuPermission(menuTree.value, permissionMapping.view_exchange_rate);
hasrateEdit.value = hasMenuPermission(menuTree.value, permissionMapping.edit_exchange_rate);
};
//

4
src/views/recharge/gold/coinRecharge.vue

@ -45,8 +45,8 @@ const navigateTo = (name) => {
const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return;
hasAdd.value = hasMenuPermission(menuTree.value, permissionMapping.addCoinRecharge);
hasDetail.value = hasMenuPermission(menuTree.value, permissionMapping.coinRechargeDetail);
hasAdd.value = hasMenuPermission(menuTree.value, permissionMapping.add_gold_coin_recharge);
hasDetail.value = hasMenuPermission(menuTree.value, permissionMapping.gold_coin_recharge_details);
};
//

Loading…
Cancel
Save