Commit 5f87901b by 张立顺

fix 督导逻辑兼容处理

1 parent ad3f7fb9
...@@ -195,7 +195,7 @@ Component({ ...@@ -195,7 +195,7 @@ Component({
pageNum: pageNum, pageNum: pageNum,
pageSize: 10, pageSize: 10,
keyword: searchValue, keyword: searchValue,
sellerMerchantId: userInfo?.isSuper ? '' : (userInfo?.merchantId || '') sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : (userInfo?.merchantId || '')
} }
if (nothing) return if (nothing) return
api.searchOrderCustomer(params).then(res => { api.searchOrderCustomer(params).then(res => {
......
...@@ -7,12 +7,12 @@ page { ...@@ -7,12 +7,12 @@ page {
position: relative; position: relative;
} }
.layout_box{ .layout_box {
height: 100%; height: 100%;
overflow: scroll; overflow: scroll;
} }
.main{ .main {
/* padding-bottom: var(--fontSize100); */ /* padding-bottom: var(--fontSize100); */
height: calc(100% - var(--fontSize104)); height: calc(100% - var(--fontSize104));
background: #F7F8FA; background: #F7F8FA;
...@@ -347,8 +347,12 @@ page { ...@@ -347,8 +347,12 @@ page {
} }
.logout-box { .logout-box {
position: sticky; /* position: sticky; */
position: absolute;
position: -webkit-sticky;
top: calc(100% - var(--fontSize150)); top: calc(100% - var(--fontSize150));
left: 50%;
transform: translateX(-50%);
display: flex; display: flex;
flex-flow: column; flex-flow: column;
justify-content: center; justify-content: center;
......
...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd"; ...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2; let index = 1;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
<navigation-bar showBack class="navigation-header" showWhiteMenu bindback="containerBack" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar> <navigation-bar showBack class="navigation-header" showWhiteMenu bindback="containerBack" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar>
</block> </block>
<block wx:else> <block wx:else>
<navigation-bar class="navigation-header" showWhiteMenu bindnavbarReady="navbarReady" showMenu="{{ staffUuid&&tabIndex == 1?false:true }}" showBack="{{staffUuid&&tabIndex == 1?true:false}}" navStyle="{{'background-color: rgba(0,0,0,0);box-shadow:none;' }}" bindback="back" bindshowMenuPopup="showMenuPopup" > <navigation-bar class="navigation-header" showWhiteMenu bindnavbarReady="navbarReady" showMenu="{{ staffUuid&&tabIndex == 1?false:true }}" showBack="{{staffUuid&&tabIndex == 1?true:false}}" navStyle="{{'background-color: rgba(0,0,0,0);box-shadow:none;' }}" bindback="back" bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" wx:if="{{ tabIndex == 0 || tabIndex == 2 }}"> <view class="navigation-title" wx:if="{{ tabIndex == 0 || tabIndex == 2 }}">
<view class="navigation-title-text text-hide">{{(userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName) || '全部'}}</view> <view class="navigation-title-text text-hide">{{(userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName) || '全部'}}</view>
</view> </view>
<block wx:elif="{{tabIndex == 1}}"> <block wx:elif="{{tabIndex == 1}}">
<view class="navigation-title"> <view class="navigation-title">
<view class="navigation-title-text text-hide"> <view class="navigation-title-text text-hide">
<block wx:if="{{userInfo && userInfo.isSuper}}"> <block wx:if="{{userInfo && (userInfo.isSuper||userInfo.loginRole == 3)}}">
数字报价 数字报价
</block> </block>
<block wx:else> <block wx:else>
......
...@@ -18,7 +18,7 @@ Component({ ...@@ -18,7 +18,7 @@ Component({
userInfo userInfo
} = this.data } = this.data
// 非超管 获取转化人员 销售顾问 // 非超管 获取转化人员 销售顾问
if (!userInfo?.isSuper) { if (!(userInfo?.isSuper || userInfo.loginRole == 3)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空 if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({ this.setData({
'form.referrerIds': [], 'form.referrerIds': [],
...@@ -343,7 +343,7 @@ Component({ ...@@ -343,7 +343,7 @@ Component({
e.value = [e.uuid] e.value = [e.uuid]
arr.push(e) arr.push(e)
}) })
if (!userInfo.isSuper) arr.map(e => { if (!(userInfo?.isSuper || userInfo.loginRole == 3)) arr.map(e => {
if (type == 0) { if (type == 0) {
e.active = false e.active = false
if (e.uuid == userInfo.uuid) e.active = true if (e.uuid == userInfo.uuid) e.active = true
...@@ -382,8 +382,8 @@ Component({ ...@@ -382,8 +382,8 @@ Component({
}) })
transferIds?.map((val, index) => { transferIds?.map((val, index) => {
val.active = false val.active = false
if (!userInfo.isSuper && userInfo.uuid == val.uuid) val.active = true if (!(userInfo?.isSuper || userInfo.loginRole == 3) && userInfo.uuid == val.uuid) val.active = true
if (userInfo.isSuper && index == 0) val.active = true if ((userInfo?.isSuper || userInfo.loginRole == 3) && index == 0) val.active = true
}) })
orderStatus?.map((val, index) => { orderStatus?.map((val, index) => {
val.active = false val.active = false
...@@ -446,7 +446,7 @@ Component({ ...@@ -446,7 +446,7 @@ Component({
} }
}) })
}) })
if (userInfo.isSuper)['selectedYqMerchantList', 'selectedMerchantList'].map(e => { if ((userInfo?.isSuper || userInfo.loginRole == 3))['selectedYqMerchantList', 'selectedMerchantList'].map(e => {
delete obj[e] delete obj[e]
}) })
if (isReset) obj = {} if (isReset) obj = {}
......
...@@ -189,6 +189,12 @@ Component({ ...@@ -189,6 +189,12 @@ Component({
lifetimes: { lifetimes: {
attached() { attached() {
let userInfo = wx.$util.getUserInfo()
const loginRole = userInfo.subLoginUser?.loginRole
this.setData({
loginRole,
userInfo
})
this.onLoad(); this.onLoad();
}, },
}, },
......
// pages/tabWorkOrder/components/OrderScreen/OrderScreen.js // pages/tabWorkOrder/components/OrderScreen/OrderScreen.js
import api from '~/api/api' import api from '~/api/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({ Component({
...@@ -16,7 +16,7 @@ Component({ ...@@ -16,7 +16,7 @@ Component({
this.setViewData() this.setViewData()
let { userInfo } = this.data let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问 // 非超管 获取转化人员 销售顾问
if (!userInfo?.isSuper) { if (!(userInfo?.isSuper || userInfo.loginRole == 3)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空 if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({ this.setData({
'form.userIdList': [], 'form.userIdList': [],
...@@ -170,16 +170,16 @@ Component({ ...@@ -170,16 +170,16 @@ Component({
}, },
showStoreSelectPopup(e) { showStoreSelectPopup(e) {
let { type } = e.currentTarget.dataset let { type } = e.currentTarget.dataset
this.setData({storeType: type, showStoreSelectPopup: true}) this.setData({ storeType: type, showStoreSelectPopup: true })
}, },
hideStorePopup() { hideStorePopup() {
this.setData({showStoreSelectPopup: false}) this.setData({ showStoreSelectPopup: false })
}, },
storeConfirm(e) { storeConfirm(e) {
let { storeType } = this.data let { storeType } = this.data
if (storeType == 1) this.setData({'form.selectedYqMerchantList': e?.detail}) if (storeType == 1) this.setData({ 'form.selectedYqMerchantList': e?.detail })
if (storeType == 2) this.setData({'form.selectedMerchantList': e?.detail}) if (storeType == 2) this.setData({ 'form.selectedMerchantList': e?.detail })
this.setData({showStoreSelectPopup: false, isReset: false}) this.setData({ showStoreSelectPopup: false, isReset: false })
}, },
yqMerchantChoose() { yqMerchantChoose() {
this.setData({ this.setData({
...@@ -200,9 +200,9 @@ Component({ ...@@ -200,9 +200,9 @@ Component({
init() { init() {
let { orderTimeList, payTimeList, userInfo } = this.data let { orderTimeList, payTimeList, userInfo } = this.data
// 非超管 // 非超管
if (!userInfo?.isSuper) { if (!(userInfo?.isSuper || userInfo.loginRole == 3)) {
// 获取支付方式 // 获取支付方式
api.getYqStoreConfig({yqMerchantId: userInfo?.merchantId}).then(res => { api.getYqStoreConfig({ yqMerchantId: userInfo?.merchantId }).then(res => {
let { code, message } = res let { code, message } = res
if (code == 0) { if (code == 0) {
let obj = res.data || {} let obj = res.data || {}
...@@ -331,7 +331,7 @@ Component({ ...@@ -331,7 +331,7 @@ Component({
getsellerUserIdList(merchantId, type) { getsellerUserIdList(merchantId, type) {
let target = type == 0 ? 'form.sellerUserIdList' : 'form.userIdList' let target = type == 0 ? 'form.sellerUserIdList' : 'form.userIdList'
let targetItem = type == 0 ? 'sellerUserIdList' : 'userIdList' let targetItem = type == 0 ? 'sellerUserIdList' : 'userIdList'
let {form} = this.data let { form } = this.data
wx.showLoading() wx.showLoading()
if (merchantId) { if (merchantId) {
api api
......
...@@ -315,6 +315,7 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv ...@@ -315,6 +315,7 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv
delete options.scene delete options.scene
let all = { merchantName: '全部' } let all = { merchantName: '全部' }
let event = noScene || !isSupervision ? 'getSceneMerchantRefStoreList' : 'getCurShopList' let event = noScene || !isSupervision ? 'getSceneMerchantRefStoreList' : 'getCurShopList'
console.log(event, isSupervision, 'get4SStoreList');
// let event = 'getSceneMerchantRefStoreList' // let event = 'getSceneMerchantRefStoreList'
api[event](options) api[event](options)
.then(res => { .then(res => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!