Browse Source

🎈 perf: 金币充值明细、金币消耗明细

zhangrenyuan/feature-20251104133449-现金管理二期
zhangrenyuan 3 weeks ago
parent
commit
58ee708037
  1. 21
      src/views/consume/gold/coinConsumeDetail.vue
  2. 23
      src/views/recharge/gold/coinRechargeDetail.vue

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

@ -1,13 +1,24 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
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";
import { storeToRefs } from 'pinia'
import { useAdminStore } from '@/store/index.js'
const adminStore = useAdminStore()
const { flag } = storeToRefs(adminStore)
//
// flag
watch(flag, (newFlag, oldFlag) => {
if(newFlag !== oldFlag) {
ConsumeSelectBy()
}
})
/*
====================工具方法==============================
*/
@ -226,7 +237,7 @@ const ConsumeSelectBy = async function (val) {
...consumeUser.value,
sortField: sortField.value,
sortOrder: sortOrder.value,
flag: showEmployeeData.value ? 0 : 1 // flag
flag: flag.value // flag
}
}
})
@ -235,7 +246,7 @@ const ConsumeSelectBy = async function (val) {
//
// detail.value
const detailWithoutSort = { ...consumeUser.value, flag: showEmployeeData.value ? 0 : 1 }
const detailWithoutSort = { ...consumeUser.value, flag: flag.value }
delete detailWithoutSort.sortField
delete detailWithoutSort.sortOrder
@ -247,7 +258,7 @@ const ConsumeSelectBy = async function (val) {
totalGoldSearch.value.market = consumeUser.value.market
totalGoldSearch.value.goodsName = consumeUser.value.goodsName
totalGoldSearch.value.jwcode = consumeUser.value.jwcode
totalGoldSearch.value.flag = showEmployeeData.value ? 0 : 1 // flag
totalGoldSearch.value.flag = flag.value // flag
//
const resultTotalGold = await request({
// url: '/consume/statsGold',
@ -446,7 +457,7 @@ const exportExcel = async function () {
goodsName: consumeUser.value.goodsName || '',
sortField: sortField.value || '',
sortOrder: sortOrder.value || '',
flag: showEmployeeData.value ? 0 : 1 // flag
flag: flag.value // flag
}
}

23
src/views/recharge/gold/coinRechargeDetail.vue

@ -1,13 +1,24 @@
<script setup>
import { onMounted, ref } from 'vue'
import { onMounted, ref, watch } from 'vue'
import { ElMessage } from 'element-plus'
import moment from 'moment'
import API from '@/util/http.js'
import { reverseMarketMapping } from '@/utils/marketMap.js';
import dayjs from "dayjs";
import { storeToRefs } from 'pinia'
import { useAdminStore } from '@/store/index.js'
const adminStore = useAdminStore()
const { flag } = storeToRefs(adminStore)
//
const showEmployeeData = ref(false)
// const showEmployeeData = ref(false)
// flag
watch(flag, (newFlag, oldFlag) => {
if(newFlag !== oldFlag) {
get()
}
})
const trimJwCode = () => {
if (rechargeUser.value.jwcode) {
@ -334,7 +345,7 @@ const get = async function (val) {
url: '/recharge/selectBy',
data: {
...getObj.value,
rechargeUser: { ...rechargeUser.value, flag: showEmployeeData.value ? 0 : 1 }//flag
rechargeUser: { ...rechargeUser.value, flag: flag.value }//flag
}
})
// rechargeUser.value
@ -342,7 +353,7 @@ const get = async function (val) {
...rechargeUser.value,
sortField: undefined,
sortOrder: undefined,
flag: showEmployeeData.value ? 0 : 1 // flag
flag: flag.value // flag
})
const resultTotalGold = await API({
url: '/recharge/statsGold',
@ -488,7 +499,7 @@ const exportExcel = async function () {
const params = {
rechargeUser: {
...rechargeUser.value,
flag: showEmployeeData.value ? 0 : 1
flag: flag.value
},
page: getObj.value.pageNum,
size: total.value
@ -608,7 +619,7 @@ const getTagText = (state) => {
<el-option v-for="item in platform" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
<!-- <el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox> -->
</div>
</el-col>
<el-col>

Loading…
Cancel
Save