Browse Source

Merge branch 'lihuilin/feature-20251104102812-现金二期' into milestone-20251104-现金二期

zhangyong/milestone-20250913-现金管理二期^2
lihuilin 4 weeks ago
parent
commit
0381c433e4
  1. 4
      src/utils/menuUtils.js
  2. 4
      src/views/history/history.vue
  3. 7
      src/views/history/newHistory.vue
  4. 6
      src/views/history/oldHistory.vue
  5. 4
      src/views/refund/gold/addCoinRefund.vue
  6. 5
      src/views/refund/gold/coinRefundDetail.vue
  7. 5
      src/views/usergold/bean/userbean.vue
  8. 4
      src/views/usergold/gold/clientCount.vue
  9. 2
      src/views/usergold/gold/clientCountBalance.vue
  10. 2
      src/views/usergold/gold/clientCountDetail.vue

4
src/utils/menuUtils.js

@ -62,7 +62,6 @@ export const getRoutePath = (menu) => {
'退款管理': '/coinRefund',
// '金豆退款': '/beanRefund',
'历史数据查询': '/history',
'新版金币查询': '/history/newHistory',
@ -77,9 +76,6 @@ export const getRoutePath = (menu) => {
'金币客户账户明细': '/usergold',
'金豆客户账户明细': '/userbean',
// '用户管理': '/permissions/userPermission',
// '角色管理': '/permissions/rolePermission',
'收款明细': '/moneyManage/receiveDetail',
'收款-地区客服':'/moneyManage/receiveDetail/receiveService',
'收款-地区财务':'/moneyManage/receiveDetail/receiveArea',

4
src/views/history/history.vue

@ -28,8 +28,8 @@
const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return
hasNew.value = hasMenuPermission(menuTree.value, permissionMapping.newCoinSelect)
hasOld.value = hasMenuPermission(menuTree.value, permissionMapping.oldCoinSelect)
hasNew.value = hasMenuPermission(menuTree.value, permissionMapping.new_version_gold_query)
hasOld.value = hasMenuPermission(menuTree.value, permissionMapping.old_version_gold_query)
}
//

7
src/views/history/newHistory.vue

@ -51,11 +51,12 @@ import dayjs from 'dayjs'
const adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
]
const canLook = ref(findMenuById(menuTree.value, permissionMapping.new_version_gold_query))
const tableData = ref([])
const dateRange = ref([])
const searchObj = ref({
@ -69,6 +70,10 @@ const pagination = ref({
})
//
const get = async function () {
if(!canLook.value){
ElMessage.error('无此权限')
return
}
try {
if (searchObj.value.name || searchObj.value.jwcode) {
const startTime = dateRange.value && dateRange.value[0] ? moment(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : ""

6
src/views/history/oldHistory.vue

@ -52,7 +52,7 @@ const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
]
const canLook = ref(findMenuById(menuTree.value, permissionMapping.old_version_gold_query))
const tableData = ref([])
const dateRange = ref([])
const searchObj = ref({
@ -67,6 +67,10 @@ const pagination = ref({
//
const getOld = async function () {
if(!canLook.value){
ElMessage.error('无此权限')
return
}
try {
if (searchObj.value.name || searchObj.value.jwcode) {
const startTime = dateRange.value && dateRange.value[0] ? moment(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : ""

4
src/views/refund/gold/addCoinRefund.vue

@ -112,7 +112,7 @@ const getRefund = async function () {
// 退
const add = async function () {
//
if (!findMenuById(menuTree.value, permissionMapping.add_gold_coin_refund)) {
if (!canAdd.value) {
ElMessage.error('无此权限')
return
}
@ -413,7 +413,7 @@ const calculatedRechargeGoods = computed(() => {
const taskGold = addRefund.value.taskGold === '' ? 0 : +addRefund.value.taskGold;
return Number((permanentGold + freeGold + taskGold).toFixed(2));
})
const canAdd = findMenuById(menuTree.value,permissionMapping.addCoinRefund)
const canAdd = ref(findMenuById(menuTree.value,permissionMapping.add_gold_coin_refund))
watch(calculatedRechargeGoods, (newVal) => {
addRefund.value.sumGold = newVal
})

5
src/views/refund/gold/coinRefundDetail.vue

@ -14,7 +14,7 @@ import dayjs from "dayjs";
const adminStore = useAdminStore();
const { adminData, menuTree } = storeToRefs(adminStore);
const showEmployeeData = ref(false)
const canLook = findMenuById(menuTree.value, permissionMapping.gold_coin_refund_details)
const canLook = ref(findMenuById(menuTree.value, permissionMapping.gold_coin_refund_details))
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
@ -114,7 +114,8 @@ const getRefundTypes = async function () {
// ==============================================================
//
const getSelectBy = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.gold_coin_refund_details)) {
if (!canLook.value) {
console.log('无此权限', canLook.value)
ElMessage.error('无此权限')
return
}

5
src/views/usergold/bean/userbean.vue

@ -57,6 +57,7 @@ const { adminData, menuTree } = storeToRefs(adminStore);
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
import { ElMessage } from 'element-plus';
const canLook = ref(findMenuById(menuTree.value, permissionMapping.gold_bean_customer_details))
const tableData = ref([])
const marketOptions = ref([])
const searchObj = ref({
@ -78,6 +79,10 @@ const pagination = ref({
})
const get = async function () {
try {
if(!canLook.value){
ElMessage.error('无此权限')
return
}
trim()
if (searchObj.value.jwcode) {
const numRef = /^\d{1,9}$/;

4
src/views/usergold/gold/clientCount.vue

@ -54,8 +54,8 @@ const navigateTo = (name) => {
const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return;
hasDetail.value = hasMenuPermission(menuTree.value, permissionMapping.coinCustomerDetail);
hasBalance.value = hasMenuPermission(menuTree.value, permissionMapping.coinCustomerMoney);
hasDetail.value = hasMenuPermission(menuTree.value, permissionMapping.gold_coin_customer_bill);
hasBalance.value = hasMenuPermission(menuTree.value, permissionMapping.gold_coin_customer_balance);
};
//

2
src/views/usergold/gold/clientCountBalance.vue

@ -65,7 +65,7 @@ const sortOrder = ref('')
// ===========================================================================
//
const get = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.coinCustomerMoney)) {
if (!findMenuById(menuTree.value, permissionMapping.gold_coin_customer_balance)) {
ElMessage.error('无此权限')
return
}

2
src/views/usergold/gold/clientCountDetail.vue

@ -129,7 +129,7 @@ const getObj = ref({
// ===========================================================================
//
const get = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.coinCustomerDetail)) {
if (!findMenuById(menuTree.value, permissionMapping.gold_coin_customer_bill)) {
ElMessage.error('无此权限')
return
}

Loading…
Cancel
Save