Commit 49bd1130 by 李伟康

feat: 调整接待记录菜单显示逻辑及页面条件渲染,修复飞行督导角色权限问题

1 parent 7bb26d5b
...@@ -620,8 +620,6 @@ Component({ ...@@ -620,8 +620,6 @@ Component({
return new Promise(resolve => { return new Promise(resolve => {
// if (wx.$receptionLoaded) return // if (wx.$receptionLoaded) return
let userInfo = wx.$util.getUserInfo() || {} let userInfo = wx.$util.getUserInfo() || {}
// 飞行督导角色不展示接待记录(0415四月中版本)
if (userInfo?.loginRole == 6) return
let { let {
menuList menuList
} = this.data } = this.data
...@@ -632,10 +630,10 @@ Component({ ...@@ -632,10 +630,10 @@ Component({
message message
} = res } = res
if (code == 0) { if (code == 0) {
let index = data?.findIndex(v => v.merchantNo == userInfo?.default4SStoreInfo?.merchantId) let index = data?.findIndex(v => v.merchantNo == userInfo?.default4SStoreInfo?.merchantId) //匹配质检门店
// 超管/区域运营/广联销售 // 超管/区域运营3/广联销售5/飞行督导6
if (userInfo.isSuper || index > -1 || userInfo.loginRole === 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6) { if (userInfo.isSuper || index > -1 || userInfo.loginRole === 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6) {
if (menuList.every((item) => item.menuText != "接待记录")) { if (menuList.every((item) => item.menuText != "接待记录") && userInfo?.loginRole != 6) { // 飞行督导角色不展示接待记录(0415四月中版本)
menuList.push({ menuList.push({
menuText: "接待记录", menuText: "接待记录",
icon: "reception-record-icon", icon: "reception-record-icon",
...@@ -656,7 +654,8 @@ Component({ ...@@ -656,7 +654,8 @@ Component({
this.setData({ this.setData({
storeRangeList: data, storeRangeList: data,
listData: [], listData: [],
nothing: false nothing: false,
showReceive:true
}, () => { }, () => {
this.getReceptionList() this.getReceptionList()
}) })
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
</block> </block>
</view> --> </view> -->
</view> </view>
<view class="receive-list" wx:if="{{storeRangeList.length || userInfo.loginRole== 3 || userInfo.loginRole== 5}}"> <view class="receive-list" wx:if="{{showReceive}}">
<view class="'screen-box' {{showScreen ? '' : 'sticky-screen'}} {{isScrollTop ? 'bg-white' : ''}}"> <view class="'screen-box' {{showScreen ? '' : 'sticky-screen'}} {{isScrollTop ? 'bg-white' : ''}}">
<view> <view>
<!-- <text class="title">接待记录</text> --> <!-- <text class="title">接待记录</text> -->
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<attack wx:elif="{{activeIndex==2}}" defenceResultFlag="{{record.defenceResultFlag}}" batchId="{{record.batchId}}"></attack> <attack wx:elif="{{activeIndex==2}}" defenceResultFlag="{{record.defenceResultFlag}}" batchId="{{record.batchId}}"></attack>
</block> </block>
</view> </view>
<block wx:if="{{showViolationBtn}}"> <block wx:if="{{showViolationBtn && (userInfo.isSuper || userInfo.loginRole == 3 || userInfo.loginRole == 6)}}">
<view class="violation-btn-box"> <view class="violation-btn-box">
<view class="violation-btn" bindtap="violationPopupToggle">去确认</view> <view class="violation-btn" bindtap="violationPopupToggle">去确认</view>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!