Browse Source

退款,历史,客户账户权限改好

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

4
src/views/history/history.vue

@ -28,8 +28,8 @@
const initPermissions = () => { const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return 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 adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore) const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js" import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
const defaultTime = [ const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59), new Date(2000, 2, 1, 23, 59, 59),
] ]
const canLook = ref(hasMenuPermission(menuTree.value, permissionMapping.new_version_gold_query))
const tableData = ref([]) const tableData = ref([])
const dateRange = ref([]) const dateRange = ref([])
const searchObj = ref({ const searchObj = ref({
@ -69,6 +70,10 @@ const pagination = ref({
}) })
// //
const get = async function () { const get = async function () {
if(!canLook.value){
ElMessage.error('无此权限')
return
}
try { try {
if (searchObj.value.name || searchObj.value.jwcode) { 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') : "" 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, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59), new Date(2000, 2, 1, 23, 59, 59),
] ]
const canLook = ref(hasMenuPermission(menuTree.value, permissionMapping.old_version_gold_query))
const tableData = ref([]) const tableData = ref([])
const dateRange = ref([]) const dateRange = ref([])
const searchObj = ref({ const searchObj = ref({
@ -67,6 +67,10 @@ const pagination = ref({
// //
const getOld = async function () { const getOld = async function () {
if(!canLook.value){
ElMessage.error('无此权限')
return
}
try { try {
if (searchObj.value.name || searchObj.value.jwcode) { 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') : "" 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 () { const add = async function () {
// //
if (!findMenuById(menuTree.value, permissionMapping.add_gold_coin_refund)) {
if (!canAdd.value) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -413,7 +413,7 @@ const calculatedRechargeGoods = computed(() => {
const taskGold = addRefund.value.taskGold === '' ? 0 : +addRefund.value.taskGold; const taskGold = addRefund.value.taskGold === '' ? 0 : +addRefund.value.taskGold;
return Number((permanentGold + freeGold + taskGold).toFixed(2)); return Number((permanentGold + freeGold + taskGold).toFixed(2));
}) })
const canAdd = findMenuById(menuTree.value,permissionMapping.addCoinRefund)
const canAdd = findMenuById(menuTree.value,permissionMapping.add_gold_coin_refund)
watch(calculatedRechargeGoods, (newVal) => { watch(calculatedRechargeGoods, (newVal) => {
addRefund.value.sumGold = newVal addRefund.value.sumGold = newVal
}) })

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

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

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

@ -54,8 +54,8 @@ const navigateTo = (name) => {
const initPermissions = () => { const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return; 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) { const get = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.coinCustomerMoney)) {
if (!findMenuById(menuTree.value, permissionMapping.gold_coin_customer_balance)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }

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

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

Loading…
Cancel
Save