Commit 5f87901b by 张立顺

fix 督导逻辑兼容处理

1 parent ad3f7fb9
......@@ -195,7 +195,7 @@ Component({
pageNum: pageNum,
pageSize: 10,
keyword: searchValue,
sellerMerchantId: userInfo?.isSuper ? '' : (userInfo?.merchantId || '')
sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : (userInfo?.merchantId || '')
}
if (nothing) return
api.searchOrderCustomer(params).then(res => {
......@@ -265,30 +265,30 @@ Component({
// wx.$util.hideLoading()
// this.eventCallback(item, userInfo?.sceneType, userInfo?.isSuper)
// } else {
api.selectMerchantScene({
merchantId: item?.merchantId,
merchantName: item?.merchantName,
sceneType: userInfo?.sceneType
api.selectMerchantScene({
merchantId: item?.merchantId,
merchantName: item?.merchantName,
sceneType: userInfo?.sceneType
})
.then(res => {
let { data, message } = res
if (data) {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), subLoginUser: data.subLoginUser })
wx.$util.hideLoading()
// wx.$storage.rm('dateStaffPop')
this.eventCallback(item, userInfo?.sceneType, false, data)
} else {
wx.$util.showToast(message)
}
// let { uuid } = wx.$util.getUserInfo()
let now = new Date()
api.loginRecordSave({
staffUuid: userInfo.uuid,
loginTime: now.format('yyyy-MM-dd hh:mm:ss'),
merchantId: item?.merchantId,
merchantName: item?.merchantName
}, 'sidepop')
})
.then(res => {
let { data, message } = res
if (data) {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), subLoginUser: data.subLoginUser })
wx.$util.hideLoading()
// wx.$storage.rm('dateStaffPop')
this.eventCallback(item, userInfo?.sceneType, false, data)
} else {
wx.$util.showToast(message)
}
// let { uuid } = wx.$util.getUserInfo()
let now = new Date()
api.loginRecordSave({
staffUuid: userInfo.uuid,
loginTime: now.format('yyyy-MM-dd hh:mm:ss'),
merchantId: item?.merchantId,
merchantName: item?.merchantName
}, 'sidepop')
})
// }
},
......
......@@ -7,12 +7,12 @@ page {
position: relative;
}
.layout_box{
.layout_box {
height: 100%;
overflow: scroll;
}
.main{
.main {
/* padding-bottom: var(--fontSize100); */
height: calc(100% - var(--fontSize104));
background: #F7F8FA;
......@@ -347,8 +347,12 @@ page {
}
.logout-box {
position: sticky;
/* position: sticky; */
position: absolute;
position: -webkit-sticky;
top: calc(100% - var(--fontSize150));
left: 50%;
transform: translateX(-50%);
display: flex;
flex-flow: column;
justify-content: center;
......
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 2;
let index = 1;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
......@@ -4,14 +4,14 @@
<navigation-bar showBack class="navigation-header" showWhiteMenu bindback="containerBack" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar>
</block>
<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-text text-hide">{{(userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName) || '全部'}}</view>
</view>
<block wx:elif="{{tabIndex == 1}}">
<view class="navigation-title">
<view class="navigation-title-text text-hide">
<block wx:if="{{userInfo && userInfo.isSuper}}">
<block wx:if="{{userInfo && (userInfo.isSuper||userInfo.loginRole == 3)}}">
数字报价
</block>
<block wx:else>
......
......@@ -18,7 +18,7 @@ Component({
userInfo
} = this.data
// 非超管 获取转化人员 销售顾问
if (!userInfo?.isSuper) {
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({
'form.referrerIds': [],
......@@ -343,7 +343,7 @@ Component({
e.value = [e.uuid]
arr.push(e)
})
if (!userInfo.isSuper) arr.map(e => {
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) arr.map(e => {
if (type == 0) {
e.active = false
if (e.uuid == userInfo.uuid) e.active = true
......@@ -382,8 +382,8 @@ Component({
})
transferIds?.map((val, index) => {
val.active = false
if (!userInfo.isSuper && userInfo.uuid == val.uuid) val.active = true
if (userInfo.isSuper && index == 0) val.active = true
if (!(userInfo?.isSuper || userInfo.loginRole == 3) && userInfo.uuid == val.uuid) val.active = true
if ((userInfo?.isSuper || userInfo.loginRole == 3) && index == 0) val.active = true
})
orderStatus?.map((val, index) => {
val.active = false
......@@ -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]
})
if (isReset) obj = {}
......
......@@ -189,6 +189,12 @@ Component({
lifetimes: {
attached() {
let userInfo = wx.$util.getUserInfo()
const loginRole = userInfo.subLoginUser?.loginRole
this.setData({
loginRole,
userInfo
})
this.onLoad();
},
},
......
// pages/tabWorkOrder/components/OrderScreen/OrderScreen.js
// pages/tabWorkOrder/components/OrderScreen/OrderScreen.js
import api from '~/api/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
......@@ -16,7 +16,7 @@ Component({
this.setViewData()
let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问
if (!userInfo?.isSuper) {
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({
'form.userIdList': [],
......@@ -50,50 +50,50 @@ Component({
IMG_URL,
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销
statusList: [{
name: '全部',
active: true,
value: []
},
{
name: '待跟进',
value: [1]
},
{
name: '已支付',
value: [4]
},
{
name: '待支付',
value: [3]
},
{
name: '已撤销',
value: [9]
},
{
name: '战败',
value: [2]
},
{
name: '已评价',
value: [6]
},
{
name: '已关闭',
value: [10]
},
{
name: '已失效',
value: [11]
},
{
name: '未施工',
value: ['N']
},
{
name: '已施工',
value: ['Y']
}
name: '全部',
active: true,
value: []
},
{
name: '待跟进',
value: [1]
},
{
name: '已支付',
value: [4]
},
{
name: '待支付',
value: [3]
},
{
name: '已撤销',
value: [9]
},
{
name: '战败',
value: [2]
},
{
name: '已评价',
value: [6]
},
{
name: '已关闭',
value: [10]
},
{
name: '已失效',
value: [11]
},
{
name: '未施工',
value: ['N']
},
{
name: '已施工',
value: ['Y']
}
],
maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [{
......@@ -131,21 +131,21 @@ Component({
employShowMore: false,
salesmanShowMore: false,
payTypeList: [{
name: '门店收款',
value: 2
},
{
name: '微信支付',
value: 1
},
{
name: 'POS机支付',
value: 3
},
{
name: '支付宝支付',
value: 4
}
name: '门店收款',
value: 2
},
{
name: '微信支付',
value: 1
},
{
name: 'POS机支付',
value: 3
},
{
name: '支付宝支付',
value: 4
}
],
storeType: 1, // 门店数据类型 默认园区店
showStoreSelectPopup: false
......@@ -170,16 +170,16 @@ Component({
},
showStoreSelectPopup(e) {
let { type } = e.currentTarget.dataset
this.setData({storeType: type, showStoreSelectPopup: true})
this.setData({ storeType: type, showStoreSelectPopup: true })
},
hideStorePopup() {
this.setData({showStoreSelectPopup: false})
this.setData({ showStoreSelectPopup: false })
},
storeConfirm(e) {
let { storeType } = this.data
if (storeType == 1) this.setData({'form.selectedYqMerchantList': e?.detail})
if (storeType == 2) this.setData({'form.selectedMerchantList': e?.detail})
this.setData({showStoreSelectPopup: false, isReset: false})
if (storeType == 1) this.setData({ 'form.selectedYqMerchantList': e?.detail })
if (storeType == 2) this.setData({ 'form.selectedMerchantList': e?.detail })
this.setData({ showStoreSelectPopup: false, isReset: false })
},
yqMerchantChoose() {
this.setData({
......@@ -200,9 +200,9 @@ Component({
init() {
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
if (code == 0) {
let obj = res.data || {}
......@@ -225,7 +225,7 @@ Component({
})
} else {
wx.$util.showToast(message)
}
}
})
} else {
let payArr = [{
......@@ -263,11 +263,11 @@ Component({
orderEndDate: end,
type: 'custom'
} : {
active: true,
payStartDate: start,
payEndDate: end,
type: 'custom'
}
active: true,
payStartDate: start,
payEndDate: end,
type: 'custom'
}
data[index] = obj
this.setData({
[`form.${name}`]: data,
......@@ -331,7 +331,7 @@ Component({
getsellerUserIdList(merchantId, type) {
let target = type == 0 ? 'form.sellerUserIdList' : 'form.userIdList'
let targetItem = type == 0 ? 'sellerUserIdList' : 'userIdList'
let {form} = this.data
let { form } = this.data
wx.showLoading()
if (merchantId) {
api
......
......@@ -315,6 +315,7 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv
delete options.scene
let all = { merchantName: '全部' }
let event = noScene || !isSupervision ? 'getSceneMerchantRefStoreList' : 'getCurShopList'
console.log(event, isSupervision, 'get4SStoreList');
// let event = 'getSceneMerchantRefStoreList'
api[event](options)
.then(res => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!