Browse Source

🎈 perf: 目前已有的员工数据页面已集成完毕,包括(金币充值明细,金币消耗明细,客户金币账户明细,客户金币账户余额,金币退款明细)

zhangrenyuan/feature-20251104133449-现金管理二期
zhangrenyuan 3 weeks ago
parent
commit
995e7dd37c
  1. 6
      src/views/consume/gold/coinConsumeDetail.vue
  2. 23
      src/views/refund/gold/coinRefundDetail.vue
  3. 22
      src/views/usergold/gold/clientCountBalance.vue

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

@ -9,7 +9,7 @@ import {hasMenuPermission, permissionMapping} from "@/utils/menuTreePermission.j
import { storeToRefs } from 'pinia'
import { useAdminStore } from '@/store/index.js'
const adminStore = useAdminStore()
const { flag } = storeToRefs(adminStore)
const { menuTree, flag } = storeToRefs(adminStore)
//
// flag
@ -50,7 +50,7 @@ const defaultTime = [
*/
//
const showEmployeeData = ref(false)
// const showEmployeeData = ref(false)
//
const adminData = ref({})
@ -615,7 +615,7 @@ const getMarket = async function () {
<el-option v-for="item in consumePlatform" :key="item.id" :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>

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

@ -1,6 +1,6 @@
<script setup>
// 退
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref,watch } from 'vue'
import { ElMessage } from 'element-plus'
import moment from 'moment'
import API from '@/util/http.js'
@ -12,8 +12,17 @@ import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js"
import dayjs from "dayjs";
const adminStore = useAdminStore();
const { adminData, menuTree } = storeToRefs(adminStore);
const showEmployeeData = ref(false)
const { adminData, menuTree, flag } = storeToRefs(adminStore);
// flag
watch(flag, (newFlag, oldFlag) => {
// flag
if (newFlag !== oldFlag) {
console.log('员工数据flag状态改变,重新加载数据', newFlag)
getSelectBy()
}
})
// const showEmployeeData = ref(false)
const canLook = ref(findMenuById(menuTree.value, permissionMapping.gold_coin_refund_details))
const defaultTime = [
@ -159,14 +168,14 @@ const getSelectBy = async function (val) {
url: '/refund/selectBy',
data: {
...getObj.value,
refundUser: { ...refundUser.value, flag: showEmployeeData.value ? 0 : 1 }
refundUser: { ...refundUser.value, flag: flag.value }
}
})
console.log('===============================', refundUser.value)
// refundUser.value
const detailWithoutSort = {
...refundUser.value,
flag: showEmployeeData.value ? 0 : 1
flag: flag.value
}
delete detailWithoutSort.sortField
delete detailWithoutSort.sortOrder
@ -357,7 +366,7 @@ const exportExcel = async function () {
startTime: refundUser.value.startTime || '',
endTime: refundUser.value.endTime || '',
goodsName: refundUser.value.goodsName || '',
flag: showEmployeeData.value ? 0 : 1,
flag: flag.value,
refundType: refundUser.value.refundType || '',
},
page: getObj.pageNum,
@ -527,7 +536,7 @@ const getMarket = async function () {
<el-option v-for="item in refundType" :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>

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

@ -4,15 +4,23 @@ import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia"
import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js"
const adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore)
import { onMounted, ref } from 'vue'
const { adminData, menuTree, flag } = storeToRefs(adminStore)
// flag()
watch(flag, (newFlag, oldFlag) => {
// flag
if (newFlag !== oldFlag) {
console.log('员工数据flag状态改变,重新加载数据', newFlag)
get()
}
})
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";
//
const showEmployeeData = ref(false)
// const showEmployeeData = ref(false)
//
@ -102,7 +110,7 @@ const get = async function (val) {
const result = await API({
url: '/goldDetail/getGold',
method: 'post',
data: { ...getObj.value, user: { ...user.value, flag: showEmployeeData.value ? 0 : 1 } }
data: { ...getObj.value, user: { ...user.value, flag: flag.value } }
})
console.log('响应数据', result)
tableData.value = result.data.list
@ -115,7 +123,7 @@ const get = async function (val) {
data: {
jwcode: user.value.jwcode,
markets: user.value.markets,
flag: showEmployeeData.value ? 0 : 1
flag: flag.value
}
})
// result.data.list
@ -242,7 +250,7 @@ const exportExcel = async function () {
user: {
jwcode: user.value.jwcode || '',
markets: user.value.markets || [],
flag: showEmployeeData.value ? 0 : 1
flag: flag.value
}
}
@ -394,7 +402,7 @@ const format3 = (num) => {
@change="handleMarketChange" />
</div>
<div class="head-card-element">
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
<!-- <el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox> -->
</div>
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" @click="exportExcel()">导出Excel</el-button>

Loading…
Cancel
Save