业绩结算列表改为只能查看当前登录用户

This commit is contained in:
yyy 2025-03-07 09:59:31 +08:00
parent ceee093e2c
commit 524d3d0695
2 changed files with 25 additions and 12 deletions

View File

@ -57,6 +57,9 @@
getSalesPerformance, getSalesPerformance,
updateSalesPerformance updateSalesPerformance
} from '@/api/customer' } from '@/api/customer'
import {
userGetUserInfo
} from '@/api/user'
import { import {
useMainStore useMainStore
} from '@/store/store' } from '@/store/store'
@ -110,8 +113,8 @@
if (uni.getStorageSync('userinfo')) { if (uni.getStorageSync('userinfo')) {
userInfo.value = uni.getStorageSync('userinfo') userInfo.value = uni.getStorageSync('userinfo')
} else { } else {
userInfo = await userGetUserInfo() userInfo.value = await userGetUserInfo()
main.SET_MEMBER(userInfo) main.SET_MEMBER(userInfo.value)
} }
} }
</script> </script>

View File

@ -18,11 +18,17 @@
@scroll="scroll" @scrolltolower="reachBottom"> @scroll="scroll" @scrolltolower="reachBottom">
<view class="page-box" @touchmove="handletouchstart" @touchend="handletouchend"> <view class="page-box" @touchmove="handletouchstart" @touchend="handletouchend">
<block v-if="dataList.length > 0"> <block v-if="dataList.length > 0">
<view class="client" v-for="(item, index) in dataList" :key="index" @click.stop="toDetail(item)"> <view class="client" v-for="(item, index) in dataList" :key="index">
<view style="display: flex;align-items: center;justify-content: space-between;">
<view class="content"> <view class="content">
<view class="title ">用户名称</view> <view class="title ">用户名称</view>
<view class="value ">{{item.nickname}}</view> <view class="value ">{{item.nickname}}</view>
</view> </view>
<div @click.stop="toDetail(item)">
<uv-text color="#09b4f1" suffixIcon="arrow-right" iconStyle="font-size: 18px;color:#09b4f1"
text="查看详情"></uv-text>
</div>
</view>
<view class="content"> <view class="content">
<view class="title ">日期</view> <view class="title ">日期</view>
<view class="value ">{{item.year}}-{{item.month}}</view> <view class="value ">{{item.year}}-{{item.month}}</view>
@ -58,7 +64,7 @@
</view> </view>
<view @click.stop="onSubmitItem(item)" <view @click.stop="onSubmitItem(item)"
v-if="userInfo.id == item.userId && item.canConfirmFlag === 1 && item.confirmFlag === 0"> v-if="userInfo.id == item.userId && item.canConfirmFlag === 1 && item.confirmFlag === 0">
<uv-button type="primary" color="#09b4f1" text="确定">确认</uv-button> <button type="primary" style="background-color: #09b4f1;width: 120rpx;">确定</button>
</view> </view>
</view> </view>
</view> </view>
@ -117,6 +123,9 @@
getSalesPerformancePage, getSalesPerformancePage,
updateSalesPerformance updateSalesPerformance
} from '@/api/customer' } from '@/api/customer'
import {
userGetUserInfo
} from '@/api/user'
import { import {
formatDateTime formatDateTime
} from '@/utils/util' } from '@/utils/util'
@ -261,9 +270,9 @@
}) })
}) })
onLoad((e) => { onLoad(async (e) => {
getCustomerList(); await isConfirmShow()
isConfirmShow() await getCustomerList();
}) })
onShow(() => { onShow(() => {
@ -282,8 +291,8 @@
if (uni.getStorageSync('userinfo')) { if (uni.getStorageSync('userinfo')) {
userInfo.value = uni.getStorageSync('userinfo') userInfo.value = uni.getStorageSync('userinfo')
} else { } else {
userInfo = await userGetUserInfo() userInfo.value = await userGetUserInfo()
main.SET_MEMBER(userInfo) main.SET_MEMBER(userInfo.value)
} }
} }
const onSubmitItem = (item) => { const onSubmitItem = (item) => {
@ -361,6 +370,7 @@
nickname: keyword.value, nickname: keyword.value,
month: dealMonth.value, month: dealMonth.value,
year: dealYear.value, year: dealYear.value,
userId: userInfo.value.id
}).then(res => { }).then(res => {
res.list.forEach((item, index) => { res.list.forEach((item, index) => {
if (item.tags) { if (item.tags) {