Commit ad3f7fb9 by 张立顺

Merge branch 'SAAS+V4.43-0807' of http://192.168.3.233:8090/saas_plus/dj-car-bou…

…tique-work-wechat into SAAS+V4.43-0807
2 parents 0a247ab0 b1028c8b
Showing 36 changed files with 309 additions and 150 deletions
...@@ -104,10 +104,12 @@ Component({ ...@@ -104,10 +104,12 @@ Component({
*/ */
methods: { methods: {
onLoad(noGetList) { onLoad(noGetList) {
let userInfo = wx.$util.getUserInfo() || {};
this.setData({ this.setData({
nothing: false, nothing: false,
pageNum: 1, pageNum: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {} storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3)
}) })
this.getTotal() this.getTotal()
if (!noGetList) this.getList(true) if (!noGetList) this.getList(true)
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<view class="item-footer"> <view class="item-footer">
<view>{{item.createdDate}}</view> <view>{{item.createdDate}}</view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 --> <!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{ (!userInfo.isSuper && userInfo.userType == 2&&item.orderStatus!=4)||(item.orderStatus==2) }}"> <block wx:if="{{ ((!userInfo.isSuper && userInfo.userType == 2&&item.orderStatus!=4)||(item.orderStatus==2))&&isOrder }}">
<view class="btn_box_class"> <view class="btn_box_class">
<view <view
wx:if="{{ item.orderStatus == '2' }}" wx:if="{{ item.orderStatus == '2' }}"
......
...@@ -200,10 +200,13 @@ Component({ ...@@ -200,10 +200,13 @@ Component({
}, },
// 获取数据 // 获取数据
onLoad(noGetList) { onLoad(noGetList) {
let userInfo = wx.$util.getUserInfo() || {};
this.setData({ this.setData({
nothing: false, nothing: false,
currentPage: 1, currentPage: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {}, storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3)
}); });
// this.getTotal() // this.getTotal()
if (!noGetList) this.getList(true); if (!noGetList) this.getList(true);
...@@ -305,7 +308,9 @@ Component({ ...@@ -305,7 +308,9 @@ Component({
orderStatus, orderStatus,
merchantId, merchantId,
}; };
if (!userInfo.isSuper) {
if (!userInfo.isSuper && userInfo.loginRole != 3) {
// debugger
params.transferIds = [userInfo.uuid]; params.transferIds = [userInfo.uuid];
} }
if (staffUuid) { if (staffUuid) {
...@@ -547,7 +552,7 @@ Component({ ...@@ -547,7 +552,7 @@ Component({
{ screenForm } = this, { screenForm } = this,
obj = {} obj = {}
let searchTemp = wx.$util.deepClone(screenForm || {}); let searchTemp = wx.$util.deepClone(screenForm || {});
if (!userInfo.isSuper) { if (!userInfo.isSuper && userInfo.loginRole != 3) {
obj.transferIds = [userInfo.uuid]; obj.transferIds = [userInfo.uuid];
} }
if (staffUuid) { if (staffUuid) {
...@@ -614,6 +619,9 @@ Component({ ...@@ -614,6 +619,9 @@ Component({
}, },
//滑动事件处理 //滑动事件处理
touchmove: function (e) { touchmove: function (e) {
if(!this.data.isOrder){
return
}
// console.log(e) // console.log(e)
// if (condition) { // if (condition) {
// } // }
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<image wx:if="{{ item.ownerGender }}" class="icon-sex" src="{{ item.ownerGender == '男' ? '../../../images/icon-man.png' : '../../../images/icon-woman.png' }}" /> <image wx:if="{{ item.ownerGender }}" class="icon-sex" src="{{ item.ownerGender == '男' ? '../../../images/icon-man.png' : '../../../images/icon-woman.png' }}" />
</view> </view>
<!-- 标记为已开票的 不可编辑客户信息 invoicing 2已开票 --> <!-- 标记为已开票的 不可编辑客户信息 invoicing 2已开票 -->
<block wx:if="{{ !staffUuid }}"> <block wx:if="{{ !staffUuid &&isOrder}}">
<view wx:if="{{ item.orderStatus == '3'||item.orderStatus =='5' || item.orderStatus == '-1' }}" data-item="{{ item }}" bindtap="jumpUpdate" class="updateInfo {{ item.orderStatus == '6' || item.invoicing == '2' ? 'isHide' : '' }}"> <view wx:if="{{ item.orderStatus == '3'||item.orderStatus =='5' || item.orderStatus == '-1' }}" data-item="{{ item }}" bindtap="jumpUpdate" class="updateInfo {{ item.orderStatus == '6' || item.invoicing == '2' ? 'isHide' : '' }}">
<image src="{{ IMG_URL }}/miniProgram/edit_icon.png" class="iconImage"></image> <image src="{{ IMG_URL }}/miniProgram/edit_icon.png" class="iconImage"></image>
客户信息 客户信息
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
<block wx:if="{{ item.orderStatus != '0' }}"> <block wx:if="{{ item.orderStatus != '0' }}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view> <view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view>
</block> </block>
<block wx:if="{{ !staffUuid }}"> <block wx:if="{{ !staffUuid&&isOrder }}">
<view wx:if="{{ item.orderStatus == '-1' || item.orderStatus == '0' }}" class="order-btn" bindtap="handleClickBtn" data-target="{{ item }}">{{btnTxt[item.orderStatus]}}</view> <view wx:if="{{ item.orderStatus == '-1' || item.orderStatus == '0' }}" class="order-btn" bindtap="handleClickBtn" data-target="{{ item }}">{{btnTxt[item.orderStatus]}}</view>
<block wx:elif="{{ item.orderStatus != 6 }}"> <block wx:elif="{{ item.orderStatus != 6 }}">
<block wx:if="{{ item.orderStatus == '2' || item.orderStatus == '3' || item.orderStatus == '5' }}"> <block wx:if="{{ item.orderStatus == '2' || item.orderStatus == '3' || item.orderStatus == '5' }}">
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
<image data-target="addOrder" bind:tap="handleClickOrderBtn" class="addOrder" src="{{IMG_URL}}/miniProgram/crateOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" /> <image data-target="addOrder" bind:tap="handleClickOrderBtn" class="addOrder" src="{{IMG_URL}}/miniProgram/crateOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" />
<view class="label">新增提单</view> <view class="label">新增提单</view>
</view> --> </view> -->
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2&&mode!=-1 && showIcon1 }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2&&mode!=-1 && showIcon1 &&isOrder}}">
<view class="fixed-btns"> <view class="fixed-btns">
<view class="btn text-center" bindtap="handleClickOrderBtn" data-name="createOrder"> <view class="btn text-center" bindtap="handleClickOrderBtn" data-name="createOrder">
<image src="{{ IMG_URL2 }}upgrade/scancode_verification02.png" /> <image src="{{ IMG_URL2 }}upgrade/scancode_verification02.png" />
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
</view> --> </view> -->
</view> </view>
</block> </block>
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2&&mode!=-1 && !showIcon1 }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2&&mode!=-1 && !showIcon1 &&isOrder}}">
<view class="arrowIcon"> <view class="arrowIcon">
<image class="image" src="{{ IMG_URL2 }}upgrade/arrow-left.png" /> <image class="image" src="{{ IMG_URL2 }}upgrade/arrow-left.png" />
</view> </view>
......
...@@ -72,9 +72,9 @@ Component({ ...@@ -72,9 +72,9 @@ Component({
if (event.left < (events[index - 2]?.left + events[index - 2]?.width)) { if (event.left < (events[index - 2]?.left + events[index - 2]?.width)) {
if ((events[index - 2]?.left + events[index - 2]?.width + event.width) > 90) { // 两个质检环节的偏移量和宽度总和超出时间轴 if ((events[index - 2]?.left + events[index - 2]?.width + event.width) > 90) { // 两个质检环节的偏移量和宽度总和超出时间轴
let translateLeft = 90 - (events[index - 2]?.left + events[index - 2]?.width + event.width) let translateLeft = 90 - (events[index - 2]?.left + events[index - 2]?.width + event.width)
events[index - 2].left = translateLeft > 0 ? translateLeft : 0 // 将质检点往时间轴起始位置偏移 尽量保证不重叠 events[index - 2].left = translateLeft > 2 ? translateLeft : 2 // 将质检点往时间轴起始位置偏移 尽量保证不重叠
} }
event.left = (events[index - 2]?.left + events[index - 2]?.width) // 出现重叠将第二个质检环节向时间轴结束方向偏移 event.left = (events[index - 2]?.left + events[index - 2]?.width) > 2 ? (events[index - 2]?.left + events[index - 2]?.width) : 2 // 出现重叠将第二个质检环节向时间轴结束方向偏移
} }
if (event.left > (90 - event.width)) { // 处理会超出时间轴的质检环节 if (event.left > (90 - event.width)) { // 处理会超出时间轴的质检环节
...@@ -123,8 +123,8 @@ Component({ ...@@ -123,8 +123,8 @@ Component({
}, },
getWidth(item, totalMinutes) { getWidth(item, totalMinutes) {
let diff = item.mergedOffset && Math.max(...item.mergedOffset) - Math.min(...item.mergedOffset) let diff = item.mergedOffset && Math.max(...item.mergedOffset) - Math.min(...item.mergedOffset)
let width = diff / totalMinutes * 100 let width = diff / totalMinutes * 90
let minWidth = item.stage?.length == 3 ? 18 : item.stage?.length == 4 ? 23 : 14 // 根据质检环节最小宽度 let minWidth = item.stage?.length == 3 ? 19 : item.stage?.length == 4 ? 24 : 15 // 根据质检环节最小宽度
let filterWidth = width > minWidth ? width : minWidth // 最小宽度 let filterWidth = width > minWidth ? width : minWidth // 最小宽度
return filterWidth return filterWidth
}, },
......
...@@ -338,8 +338,7 @@ Component({ ...@@ -338,8 +338,7 @@ Component({
let userInfo = wx.$util.getUserInfo() || {}; let userInfo = wx.$util.getUserInfo() || {};
// let issta // let issta
let { menuList, newMenuList, mode } = this.data; let { menuList, mode } = this.data;
console.log(menuList)
if ( if (
isStaff && isStaff &&
menuList.every((item) => item.menuText != "战败下单" && mode) menuList.every((item) => item.menuText != "战败下单" && mode)
...@@ -380,7 +379,7 @@ Component({ ...@@ -380,7 +379,7 @@ Component({
customerTypes: searchForm?.customerTypes, customerTypes: searchForm?.customerTypes,
carModels: searchForm?.carModels, carModels: searchForm?.carModels,
orderResult: searchForm?.orderResult, orderResult: searchForm?.orderResult,
merchantNo: (userInfo?.isSuper || userInfo?.loginRole == 3) && !searchForm?.merchantNo?.length ? storeRangeList.map(v => { if (v.merchantNo) return v.merchantNo }) : (searchForm?.merchantNo || [userInfo.default4SStoreInfo.merchantId]), merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => { if (v.merchantNo) return v.merchantNo }) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper ? searchForm?.staffUuids : [userInfo.uuid] staffUuids: userInfo.isSuper ? searchForm?.staffUuids : [userInfo.uuid]
} }
return obj return obj
...@@ -391,7 +390,6 @@ Component({ ...@@ -391,7 +390,6 @@ Component({
wx.$router.go('receptionDetail', item) wx.$router.go('receptionDetail', item)
}, },
onLoad() { onLoad() {
// console.log('onLoad');
const isStaff = app.globalData.isStaff; const isStaff = app.globalData.isStaff;
let userInfo = wx.$util.getUserInfo() || {}; let userInfo = wx.$util.getUserInfo() || {};
if (userInfo.isSuper) this.setData({ showEmployeeName: true, isShowDefeatBtn: false }) if (userInfo.isSuper) this.setData({ showEmployeeName: true, isShowDefeatBtn: false })
...@@ -399,8 +397,9 @@ Component({ ...@@ -399,8 +397,9 @@ Component({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {}, storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
userInfo, userInfo,
isStaff, isStaff,
isWait: !(userInfo?.isSuper || userInfo?.loginRole == 3)
}); });
let { menuList, newMenuList, mode } = this.data; let { menuList, mode } = this.data;
if (isStaff && menuList.every((item) => item.menuText != "新建工单")) { if (isStaff && menuList.every((item) => item.menuText != "新建工单")) {
menuList.unshift({ menuList.unshift({
menuText: "新建工单", menuText: "新建工单",
...@@ -421,7 +420,7 @@ Component({ ...@@ -421,7 +420,7 @@ Component({
sortVal: 3 sortVal: 3
}); });
} }
if ((userInfo.isSuper || userInfo?.loginRole == 3) && menuList.every((item) => item.menuText != "BI报表")) { if ((userInfo.isSuper || userInfo.loginRole == 3) && menuList.every((item) => item.menuText != "BI报表")) {
menuList.unshift({ menuList.unshift({
menuText: "BI报表", menuText: "BI报表",
path: "tabOperating.index", path: "tabOperating.index",
...@@ -466,14 +465,14 @@ Component({ ...@@ -466,14 +465,14 @@ Component({
sortVal: 9 sortVal: 9
}); });
} }
// if (menuList.every((item) => item.menuText != "培训资料")) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3) && menuList.every((item) => item.menuText != "培训资料")) {
// menuList.push({ menuList.push({
// menuText: "培训资料", menuText: "培训资料",
// icon: "peixun_icon", icon: "peixun_icon",
// path: "packageEquity.trainingMaterials", path: "packageEquity.trainingMaterials",
// sortVal: 7 sortVal: 7
// }); });
// } }
if (!app.globalData.isStaff || userInfo?.loginRoleOnSelectMerchant != 4) { if (!app.globalData.isStaff || userInfo?.loginRoleOnSelectMerchant != 4) {
let index = menuList?.findIndex((val) => val.menuText == "交车目标"); let index = menuList?.findIndex((val) => val.menuText == "交车目标");
index > -1 && menuList.splice(index, 1); index > -1 && menuList.splice(index, 1);
...@@ -490,7 +489,8 @@ Component({ ...@@ -490,7 +489,8 @@ Component({
}) })
// 将开单预警弹窗提醒移到equityPage页去校验 // 将开单预警弹窗提醒移到equityPage页去校验
// if (isStaff) this.checkStaffOrderStatus(); // if (isStaff) this.checkStaffOrderStatus();
this.getMerchantCarBrandList(); // 非区域督导和超管角色
if (!userInfo?.isSuper && userInfo?.loginRole != 3) this.getMerchantCarBrandList();
}, },
getStoreList() { getStoreList() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -505,7 +505,7 @@ Component({ ...@@ -505,7 +505,7 @@ Component({
} = 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)
if (userInfo?.isSuper || userInfo?.loginRole == 3 || index > -1) { if (userInfo.isSuper || index > -1 || userInfo.loginRole === 3) {
if (menuList.every((item) => item.menuText != "接待记录")) { if (menuList.every((item) => item.menuText != "接待记录")) {
menuList.push({ menuList.push({
menuText: "接待记录", menuText: "接待记录",
...@@ -1063,6 +1063,7 @@ Component({ ...@@ -1063,6 +1063,7 @@ Component({
}, },
/**根据手机号查询工牌设备号 */ /**根据手机号查询工牌设备号 */
async getInspectionBadgeCode() { async getInspectionBadgeCode() {
const { userInfo } = this.data;
return new Promise(async resolve => { return new Promise(async resolve => {
// const { phone } = wx.$util.getUserInfo(), // const { phone } = wx.$util.getUserInfo(),
// result = await this.getSelectByMerchantId() // result = await this.getSelectByMerchantId()
...@@ -1100,7 +1101,7 @@ Component({ ...@@ -1100,7 +1101,7 @@ Component({
// }); // });
// const { aiPhone } = await setConfigInfo({}); // const { aiPhone } = await setConfigInfo({});
let index_d = menuList.findIndex((e) => e.menuText == "AI趣练"); let index_d = menuList.findIndex((e) => e.menuText == "AI趣练");
if (index_d == -1) if (index_d == -1 && (userInfo.isSuper || userInfo.loginRole === 3))
menuList.push({ menuList.push({
menuText: "AI趣练", menuText: "AI趣练",
icon: "ai_chat", icon: "ai_chat",
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<view wx:for="{{3}}" wx:key="index" wx:for-index="idx" class="dot {{current==idx?'active':''}}"></view> <view wx:for="{{3}}" wx:key="index" wx:for-index="idx" class="dot {{current==idx?'active':''}}"></view>
</view> </view>
</view> </view>
<block wx:if="{{isStaff&&todoList.length>0}}"> <block wx:if="{{isWait&&todoList.length>0}}">
<view class="todo-list"> <view class="todo-list">
<view class="title">今日待办·{{todoList.length}}</view> <view class="title">今日待办·{{todoList.length}}</view>
<view class="todo-items"> <view class="todo-items">
......
...@@ -70,7 +70,7 @@ Page({ ...@@ -70,7 +70,7 @@ Page({
customerTypes: searchForm?.customerTypes, customerTypes: searchForm?.customerTypes,
carModels: searchForm?.carModels, carModels: searchForm?.carModels,
orderResult: searchForm?.orderResult, orderResult: searchForm?.orderResult,
merchantNo: (userInfo?.isSuper || userInfo?.loginRole == 3) && !searchForm?.merchantNo?.length ? storeRangeList?.map(v => {if (v.merchantNo) return v.merchantNo}) : (searchForm?.merchantNo || [userInfo.default4SStoreInfo.merchantId]), merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {if (v.merchantNo) return v.merchantNo}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper ? searchForm?.staffUuids : [userInfo.uuid] staffUuids: userInfo.isSuper ? searchForm?.staffUuids : [userInfo.uuid]
} }
return obj return obj
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<block wx:else> <block wx:else>
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack navStyle="{{'background-color: #FFFFFF;box-shadow:none;' }}" bindback="back"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack navStyle="{{'background-color: #FFFFFF;box-shadow:none;' }}" bindback="back">
<view class="navigation-title"> <view class="navigation-title">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.isSuper ? '接待记录' : (userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName)}}</view> <view class="navigation-title-text text-hide">{{(userInfo && (userInfo.isSuper || userInfo.loginRole == 3)) ? '接待记录' : (userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName)}}</view>
</view> </view>
</navigation-bar> </navigation-bar>
</block> </block>
......
...@@ -33,10 +33,14 @@ Page({ ...@@ -33,10 +33,14 @@ Page({
id ? this.qrCodeScene(id) : this.getListSelectAccount() id ? this.qrCodeScene(id) : this.getListSelectAccount()
}, },
async getSceneArr(yqMerchantId, loginUserObj) { async getSceneArr(yqMerchantId, loginUserObj) {
let checkAgree = await this.checkAgree() if (!loginUserObj?.isSuper && loginUserObj?.loginRole != 3) {
if (!checkAgree) return false let checkAgree = await this.checkAgree(loginUserObj)
if (!checkAgree) return wx.$router.go('pages.accountItems')
}
// let checkAgree = await this.checkAgree()
// if (!checkAgree) return false
// 超管开通全部场景 // 超管开通全部场景
if (loginUserObj?.isSuper) return if (loginUserObj?.isSuper || loginUserObj?.loginRole == 3) return
// 获取4s店关联场景数据 // 获取4s店关联场景数据
getShopSceneConfig({ yqMerchantId }).then(result => { getShopSceneConfig({ yqMerchantId }).then(result => {
if (!result?.length) return wx.$util.showToast('暂无开通业务,请联系总部管理员') if (!result?.length) return wx.$util.showToast('暂无开通业务,请联系总部管理员')
...@@ -248,7 +252,7 @@ Page({ ...@@ -248,7 +252,7 @@ Page({
if (code == '0') { if (code == '0') {
// const loginControlList = [] // const loginControlList = []
// const loginControlList = [0, 1] // const loginControlList = [0, 1]
if (loginControlList.includes(envName) || loginControlList.length == 0) { if (loginControlList == null || loginControlList.includes(envName) || loginControlList.length == 0) {
resolve(true) resolve(true)
} else { } else {
wx.hideLoading() wx.hideLoading()
...@@ -362,6 +366,10 @@ Page({ ...@@ -362,6 +366,10 @@ Page({
this.get4SStoreList(data.loginUserInfoList[0]) this.get4SStoreList(data.loginUserInfoList[0])
return return
} }
if (data.loginUserInfoList[0] && data.loginUserInfoList[0].loginRole == 3 && (wx.$SCENE?.path != 'tabWorkOrder/staffDaily' || wx.$SCENE?.path != 'tabWorkOrder/upgradeStaffDaily')) {
this.get4SStoreList(data.loginUserInfoList[0])
return
}
const SCENE = wx.$SCENE const SCENE = wx.$SCENE
console.log(wx.$SCENE, ' wx.$SCENE'); console.log(wx.$SCENE, ' wx.$SCENE');
// 展会用逻辑 // 展会用逻辑
......
...@@ -18,9 +18,9 @@ Page({ ...@@ -18,9 +18,9 @@ Page({
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
let { sceneList, openSceneArr, jumpPageFlag } = this.data let { sceneList, openSceneArr, jumpPageFlag } = this.data
if (jumpPageFlag) return if (jumpPageFlag) return
this.setData({jumpPageFlag: true}) this.setData({ jumpPageFlag: true })
if (!openSceneArr.includes(scene) && !userInfo?.isSuper) { if (!openSceneArr.includes(scene) && (!userInfo?.isSuper && !userInfo?.loginRole == 3)) {
this.setData({jumpPageFlag: false}) this.setData({ jumpPageFlag: false })
return wx.$util.showToast('暂未开通此场景') return wx.$util.showToast('暂未开通此场景')
} }
sceneList.map(i => (i.actived = false)) sceneList.map(i => (i.actived = false))
...@@ -30,26 +30,26 @@ Page({ ...@@ -30,26 +30,26 @@ Page({
// wx.$router.reLaunch(constantData?.pageUrl[scene], {resetStoreList: true}) // wx.$router.reLaunch(constantData?.pageUrl[scene], {resetStoreList: true})
// this.setData({jumpPageFlag: false}) // this.setData({jumpPageFlag: false})
// } else { // } else {
api.selectMerchantScene({ api.selectMerchantScene({
merchantId: userInfo?.shopMerchantId, merchantId: userInfo?.shopMerchantId,
merchantName: userInfo?.shopMerchantName, merchantName: userInfo?.shopMerchantName,
sceneType: scene sceneType: scene
}).then(res => { }).then(res => {
let {code, data, message} = res let { code, data, message } = res
this.setData({jumpPageFlag: false}) this.setData({ jumpPageFlag: false })
if (code == 0) { if (code == 0) {
wx.$util.setUserInfo({ ...userInfo, sceneType: scene, loginRoleOnSelectMerchant: data?.loginRoleOnSelectMerchant }) wx.$util.setUserInfo({ ...userInfo, sceneType: scene, loginRoleOnSelectMerchant: data?.loginRoleOnSelectMerchant })
wx.$router.reLaunch(constantData?.pageUrl[scene], {resetStoreList: true}) wx.$router.reLaunch(constantData?.pageUrl[scene], { resetStoreList: true })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}) })
// } // }
this.setData({ this.setData({
sceneList sceneList
}) })
wx.$util.pointRecord( sceneList[index].recordId) wx.$util.pointRecord(sceneList[index].recordId)
}, },
/** /**
...@@ -57,7 +57,7 @@ Page({ ...@@ -57,7 +57,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
wx.hideHomeButton({ wx.hideHomeButton({
success: res => {} success: res => { }
}) })
this.getSceneArr() this.getSceneArr()
}, },
...@@ -68,16 +68,16 @@ Page({ ...@@ -68,16 +68,16 @@ Page({
if (userInfo?.isSuper) return if (userInfo?.isSuper) return
wx.$util.showLoading() wx.$util.showLoading()
// 获取4s店关联场景数据 // 获取4s店关联场景数据
getShopSceneConfig({yqMerchantId: userInfo?.subLoginUser?.merchantId, merchantId: userInfo?.shopMerchantId}).then(result => { getShopSceneConfig({ yqMerchantId: userInfo?.subLoginUser?.merchantId, merchantId: userInfo?.shopMerchantId }).then(result => {
wx.$util.hideLoading() wx.$util.hideLoading()
this.setData({openSceneArr: result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []}) this.setData({ openSceneArr: result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || [] })
}) })
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -98,25 +98,25 @@ Page({ ...@@ -98,25 +98,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
...@@ -23,7 +23,7 @@ Page({ ...@@ -23,7 +23,7 @@ Page({
if (jumpPageFlag) return if (jumpPageFlag) return
this.setData({ jumpPageFlag: true }) this.setData({ jumpPageFlag: true })
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
if (!openSceneArr.includes(scene) && !userInfo?.isSuper) { if (!openSceneArr.includes(scene) && (!userInfo?.isSuper && !userInfo?.loginRole == 3)) {
this.setData({ jumpPageFlag: false }) this.setData({ jumpPageFlag: false })
return wx.$util.showToast('暂未开通此场景') return wx.$util.showToast('暂未开通此场景')
} }
......
...@@ -88,7 +88,8 @@ Page({ ...@@ -88,7 +88,8 @@ Page({
searchObj: {}, searchObj: {},
pageNum: 1, pageNum: 1,
keyword: '', keyword: '',
list: [] list: [],
isMake:true
}, },
delBtn(e) { delBtn(e) {
let _this = this let _this = this
...@@ -204,6 +205,9 @@ Page({ ...@@ -204,6 +205,9 @@ Page({
// console.log(e) // console.log(e)
// if (condition) { // if (condition) {
// } // }
if (!this.data.isMake) {
return
}
let { let {
item: li item: li
} = e.currentTarget.dataset } = e.currentTarget.dataset
...@@ -331,8 +335,10 @@ Page({ ...@@ -331,8 +335,10 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3)
}) })
// this.getStatByPeriod() // this.getStatByPeriod()
// this.getiIviteRecord() // this.getiIviteRecord()
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view> <view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view>
<view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view> <view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view>
<view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view> <view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view>
<image class="icon-cal" src="{{IMG_URL}}miniProgram/date_icon.png" bindtap="jump" data-item="{}" data-recorderId='22' data-name="tabDate.apprManage"/> <image class="icon-cal" wx:if="{{isMake}}" src="{{IMG_URL}}miniProgram/date_icon.png" bindtap="jump" data-item="{}" data-recorderId='22' data-name="tabDate.apprManage"/>
</view> </view>
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<scroll-view <scroll-view
...@@ -117,12 +117,12 @@ ...@@ -117,12 +117,12 @@
</view> </view>
<view class="order-control"> <view class="order-control">
<!-- 预约时间按钮 已支付状态置灰不可操作 --> <!-- 预约时间按钮 已支付状态置灰不可操作 -->
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && li.customerCoupon.usedFlag !='Y'&&li.inviteStatus !=4&&li.inviteStatus !=6}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && li.customerCoupon.usedFlag !='Y'&&li.inviteStatus !=4&&li.inviteStatus !=6&&isMake}}">
<view class="control-item {{li.inviteStatus == 7 ? 'disabled' : ''}}" catchtap="showDateBox" data-item="{{li}}"> <view class="control-item {{li.inviteStatus == 7 ? 'disabled' : ''}}" catchtap="showDateBox" data-item="{{li}}">
<image src="{{IMG_URL}}miniProgram/reservation_icon.png" class="date-icon" /> <image src="{{IMG_URL}}miniProgram/reservation_icon.png" class="date-icon" />
</view> </view>
</block> </block>
<block wx:if="{{li.customer.customerPhone&&!phoneShow}}"> <block wx:if="{{(li.customer.customerPhone&&!phoneShow)&&isMake}}">
<view class="control-item" data-phone="{{li.customer.customerPhone}}" catchtap="phoneCall"> <view class="control-item" data-phone="{{li.customer.customerPhone}}" catchtap="phoneCall">
<image src="{{IMG_URL}}miniProgram/phone_icon.png" class="phone-icon" /> <image src="{{IMG_URL}}miniProgram/phone_icon.png" class="phone-icon" />
</view> </view>
......
...@@ -58,7 +58,8 @@ Page({ ...@@ -58,7 +58,8 @@ Page({
}, },
selectedSceneName: '', selectedSceneName: '',
selectedSceneDesc: '', selectedSceneDesc: '',
versionData: {} versionData: {},
isForbidden:false
}, },
jump(e) { jump(e) {
let { url } = e.currentTarget.dataset let { url } = e.currentTarget.dataset
...@@ -125,9 +126,10 @@ Page({ ...@@ -125,9 +126,10 @@ Page({
touchEnd, touchEnd,
userInfo: { userInfo: {
userType userType
} },
userInfo
} = this.data } = this.data
if (userType == 2) return if (userType == 2 || userInfo.loginRole == 3) return
let value = workItem[index].maxCount let value = workItem[index].maxCount
value += count value += count
if (value < 0) value = 0 if (value < 0) value = 0
...@@ -173,9 +175,10 @@ Page({ ...@@ -173,9 +175,10 @@ Page({
sundayFlag, sundayFlag,
userInfo: { userInfo: {
userType userType
} },
userInfo
} = this.data } = this.data
if (userType == 2) { if (userType == 2 || userInfo.loginRole == 3) {
this.showWork() this.showWork()
return return
} }
...@@ -335,6 +338,7 @@ Page({ ...@@ -335,6 +338,7 @@ Page({
// this.getTotal() // this.getTotal()
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
this.setData({ this.setData({
isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName, selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName,
selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc
...@@ -345,7 +349,7 @@ Page({ ...@@ -345,7 +349,7 @@ Page({
}, },
// jump: e => wx.$router.jump(e), // jump: e => wx.$router.jump(e),
onPageScroll({scrollTop}){ onPageScroll({ scrollTop }) {
this.setData({ this.setData({
navStyle: scrollTop > 90 ? 'background-color: #FFFFFF;box-shadow:none;' : 'background-color: rgba(0,0,0,0);box-shadow:none;' navStyle: scrollTop > 90 ? 'background-color: #FFFFFF;box-shadow:none;' : 'background-color: rgba(0,0,0,0);box-shadow:none;'
}) })
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</view> </view>
</view> </view>
<view class="set_box"> <view class="set_box">
<view class="set_item " bindtap="showWork"> <view class="set_item " bindtap="showWork" wx:if="{{isForbidden}}">
<view class="title">工位设置 <view class="title">工位设置
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> -->
</view> </view>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<view class="set_tips" wx:else>根据门店设置工位数</view> <view class="set_tips" wx:else>根据门店设置工位数</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="../../images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="showMerchantPop"> <view class="set_item " bindtap="showMerchantPop" wx:if="{{isForbidden}}">
<view class="title">录单设置 <view class="title">录单设置
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> -->
</view> </view>
...@@ -66,21 +66,21 @@ ...@@ -66,21 +66,21 @@
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="../../images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="goReservationCouponPage"> <view class="set_item " bindtap="goReservationCouponPage" wx:if="{{isForbidden}}">
<view class="title">领券预约 <view class="title">领券预约
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> -->
</view> </view>
<view class="set_tips">设置接待电话</view> <view class="set_tips">设置接待电话</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="../../images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="goTechnicianSetupPage"> <view class="set_item " bindtap="goTechnicianSetupPage" wx:if="{{isForbidden}}">
<view class="title">技师设置 <view class="title">技师设置
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> -->
</view> </view>
<view class="set_tips">设置园区店技师</view> <view class="set_tips">设置园区店技师</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="../../images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="goConstructSetupPage"> <view class="set_item " bindtap="goConstructSetupPage" wx:if="{{isForbidden}}">
<view class="title">完成施工 <view class="title">完成施工
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> -->
</view> </view>
...@@ -168,13 +168,13 @@ ...@@ -168,13 +168,13 @@
<view class="item hasborder"> <view class="item hasborder">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="value"> <view class="value">
<view class="minus {{userInfo.userType == 2 ?'disabled':''}}" bindtap="addWorkCount" data-count="{{-1}}" data-index="{{index}}" bindlongtap="addWorkCount" bindtouchend="touchend" bindtouchstart="touchstart"> <view class="minus {{userInfo.userType == 2 || userInfo.loginRole ==3 ?'disabled':''}}" bindtap="addWorkCount" data-count="{{-1}}" data-index="{{index}}" bindlongtap="addWorkCount" bindtouchend="touchend" bindtouchstart="touchstart">
- -
</view> </view>
<view class="input text-center {{userInfo.userType == 2 ?'disabled':''}}"> <view class="input text-center {{userInfo.userType == 2 || userInfo.loginRole ==3 ?'disabled':''}}">
{{item.maxCount}} {{item.maxCount}}
</view> </view>
<view class="add {{userInfo.userType == 2 ?'disabled':''}}" bindtap="addWorkCount" data-count="{{1}}" data-index="{{index}}" bindlongtap="addWorkCount" bindtouchend="touchend" bindtouchstart="touchstart"> <view class="add {{userInfo.userType == 2 || userInfo.loginRole ==3 ?'disabled':''}}" bindtap="addWorkCount" data-count="{{1}}" data-index="{{index}}" bindlongtap="addWorkCount" bindtouchend="touchend" bindtouchstart="touchstart">
+ +
</view> </view>
个 个
...@@ -183,17 +183,17 @@ ...@@ -183,17 +183,17 @@
</block> </block>
<view class="item hasborder"> <view class="item hasborder">
<view class="label">周六施工</view> <view class="label">周六施工</view>
<switch class="{{userInfo.userType == 2 ?'disabled':''}}" disabled="{{userInfo.userType == 2}}" color="#347BFF" isYqdSuper="{{isYqdSuper}}" checked="{{saturdayFlag}}" bindchange="changeSwitch" data-target="saturdayFlag" /> <switch class="{{userInfo.userType == 2 || userInfo.loginRole ==3 ?'disabled':''}}" disabled="{{userInfo.userType == 2 || userInfo.loginRole ==3 }}" color="#347BFF" isYqdSuper="{{isYqdSuper}}" checked="{{saturdayFlag}}" bindchange="changeSwitch" data-target="saturdayFlag" />
</view> </view>
<view class="item hasborder"> <view class="item hasborder">
<view class="label">周日施工</view> <view class="label">周日施工</view>
<switch class="{{userInfo.userType == 2 ?'disabled':''}}" disabled="{{userInfo.userType == 2}}" color="#347BFF" checked="{{sundayFlag}}" bindchange="changeSwitch" data-target="sundayFlag" /> <switch class="{{userInfo.userType == 2 || userInfo.loginRole ==3 ?'disabled':''}}" disabled="{{userInfo.userType == 2 || userInfo.loginRole ==3 }}" color="#347BFF" checked="{{sundayFlag}}" bindchange="changeSwitch" data-target="sundayFlag" />
</view> </view>
<view class="tips">设置门店每日每个时段可接待的客户人数, 施工时段以1个半小时为准,请合理安排施工进度</view> <view class="tips">设置门店每日每个时段可接待的客户人数, 施工时段以1个半小时为准,请合理安排施工进度</view>
</view> </view>
<view class="work-footer"> <view class="work-footer">
<view class="cancel text-center" bindtap="showWork">取消</view> <view class="cancel text-center" bindtap="showWork">取消</view>
<view class="confirm text-center" bindtap="confirm">确定</view> <view class="confirm text-center {{userInfo.userType == 2 || userInfo.loginRole ==3 ?'disabled':''}}" bindtap="confirm">确定</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -36,7 +36,8 @@ Page({ ...@@ -36,7 +36,8 @@ Page({
list: [], list: [],
tabIndex: 0, tabIndex: 0,
tabList: ['全部', '待跟进', '已升级', '战败'], tabList: ['全部', '待跟进', '已升级', '战败'],
tabListTemplate: ['全部', '待跟进', '已升级', '战败'] tabListTemplate: ['全部', '待跟进', '已升级', '战败'],
isMake: true
}, },
// 创建一个动画实例 // 创建一个动画实例
// createAnimation: function () { // createAnimation: function () {
...@@ -138,6 +139,7 @@ Page({ ...@@ -138,6 +139,7 @@ Page({
// wx.$router.go('constructionOrderDetail', item) // wx.$router.go('constructionOrderDetail', item)
let { let {
userInfo, userInfo,
isMake,
userInfo: { userInfo: {
userType userType
} }
...@@ -147,7 +149,7 @@ Page({ ...@@ -147,7 +149,7 @@ Page({
// return // return
// console.log(item) // console.log(item)
if (name == 'createOrder' || name == 'premiumUpgrade') { if (name == 'createOrder' || name == 'premiumUpgrade') {
if (userInfo.merchantType && !userInfo.isSuper) { if (userInfo.merchantType && !userInfo.isSuper&&isMake) {
// 是微信支付直接跳转确认页面 // 是微信支付直接跳转确认页面
if (userType == 2 && item?.selectPayType == 1) { if (userType == 2 && item?.selectPayType == 1) {
wx.$router.go('tabWorkOrder.confirmOrder', item) wx.$router.go('tabWorkOrder.confirmOrder', item)
...@@ -315,6 +317,9 @@ Page({ ...@@ -315,6 +317,9 @@ Page({
}, },
//滑动事件处理 //滑动事件处理
touchmove: function (e) { touchmove: function (e) {
if (!this.data.isMake) {
return
}
// console.log(e) // console.log(e)
// if (condition) { // if (condition) {
// } // }
...@@ -452,7 +457,7 @@ Page({ ...@@ -452,7 +457,7 @@ Page({
let list = [] let list = []
if (code == 0) { if (code == 0) {
// 这个是用来判断哪些用户可以撤销的 // 这个是用来判断哪些用户可以撤销的
let userType = !userInfo.isSuper && userInfo.merchantType let userType = (!userInfo.isSuper && userInfo.merchantType) || userInfo.loginRole !== 3
// let userType = true // let userType = true
data.list.map(e => { data.list.map(e => {
...@@ -621,6 +626,10 @@ Page({ ...@@ -621,6 +626,10 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
// this.test() // this.test()
let userInfo = wx.$util.getUserInfo();
this.setData({
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3)
})
}, },
/** /**
......
...@@ -134,13 +134,16 @@ ...@@ -134,13 +134,16 @@
<!-- </block> --> <!-- </block> -->
<!-- </block> --> <!-- </block> -->
</view> </view>
<view wx:if="{{!li['confirmIndex']}}" class="del" catchtap="delBtn" data-ind="{{ind}}" data-item="{{li}}" data-index="{{index}}"> <block wx:if="{{isMake}}">
<view>撤销</view> <view wx:if="{{!li['confirmIndex']}}" class="del" catchtap="delBtn" data-ind="{{ind}}" data-item="{{li}}" data-index="{{index}}">
<view>工单</view> <view>撤销</view>
</view> <view>工单</view>
<view wx:else class="del confirm" catchtap="repeal" data-item="{{li}}" data-index="{{index}}"> </view>
确认删除 <view wx:else class="del confirm" catchtap="repeal" data-item="{{li}}" data-index="{{index}}">
</view> 确认删除
</view>
</block>
</view> </view>
</block> </block>
</block> </block>
...@@ -154,7 +157,7 @@ ...@@ -154,7 +157,7 @@
</scroll-view> </scroll-view>
</block> </block>
</view> </view>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && showIcon1}}"> <block wx:if="{{(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && showIcon1)||isMake}}">
<view class="fixed-btns"> <view class="fixed-btns">
<view class="btn text-center" bindtap="jump" data-name="createOrder"> <view class="btn text-center" bindtap="jump" data-name="createOrder">
<image src="{{IMG_URL}}upgrade/scancode_verification02.png" /> <image src="{{IMG_URL}}upgrade/scancode_verification02.png" />
......
...@@ -36,6 +36,12 @@ Page({ ...@@ -36,6 +36,12 @@ Page({
noLoginAgreeChoose: agree noLoginAgreeChoose: agree
}) })
}, },
/**显示隐藏密码 */
pwdSwitch() {
this.setData({
showPwd: !this.data.showPwd
})
},
authChoose(e) { authChoose(e) {
let { detail: agree } = e let { detail: agree } = e
this.setData({ this.setData({
......
...@@ -315,7 +315,7 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv ...@@ -315,7 +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, 'event'); // let event = 'getSceneMerchantRefStoreList'
api[event](options) api[event](options)
.then(res => { .then(res => {
wx.$util.hideLoading() wx.$util.hideLoading()
......
...@@ -74,7 +74,8 @@ Page({ ...@@ -74,7 +74,8 @@ Page({
key: 'remark' key: 'remark'
} }
], ],
remark: '' remark: '',
isOrder:true
}, },
showPopup(e) { showPopup(e) {
let _this = this let _this = this
...@@ -130,6 +131,10 @@ Page({ ...@@ -130,6 +131,10 @@ Page({
}) })
this.getInviteDetail(options.id) this.getInviteDetail(options.id)
} }
let userInfo = wx.$util.getUserInfo();
this.setData({
isOrder:!(userInfo?.isSuper || userInfo?.loginRole == 3)
})
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
}, },
checkPhoneShow(config) { checkPhoneShow(config) {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
复制 复制
</view> </view>
</block> </block>
<block wx:if="{{item.portrait}}"> <block wx:if="{{item.portrait&&isOrder}}">
<view class="copy" catchtap="editProtrait">编辑</view> <view class="copy" catchtap="editProtrait">编辑</view>
</block> </block>
</view> </view>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</view> </view>
</view> </view>
<view class="box "> <view class="box ">
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder}}">
<!-- 已施工/已撤销/已支付 不显示 --> <!-- 已施工/已撤销/已支付 不显示 -->
<view wx:if="{{detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7}}" class="icon date-icon" bindtap="showPopup" data-name="showDate"> <view wx:if="{{detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7}}" class="icon date-icon" bindtap="showPopup" data-name="showDate">
<image src="../../images/date.png" /> <image src="../../images/date.png" />
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<view class="date text-center {{detail.inviteStatus == 6 ? 'gray' : ''}}"> <view class="date text-center {{detail.inviteStatus == 6 ? 'gray' : ''}}">
{{detail.inviteDate}} {{detail.inviteDate}}
<!-- 已施工/已支付/已撤销 不显示 --> <!-- 已施工/已支付/已撤销 不显示 -->
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder}}">
<view class="cancel y-center" bindtap="cancelInvite">取消预约</view> <view class="cancel y-center" bindtap="cancelInvite">取消预约</view>
</block> </block>
</view> </view>
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</view> </view>
</view> </view>
</block> </block>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder}}">
<view class="icon" bindtap="showPopup" data-name="showRemark"> <view class="icon" bindtap="showPopup" data-name="showRemark">
<image src="../../images/edit.png" /> <image src="../../images/edit.png" />
</view> </view>
...@@ -126,7 +126,8 @@ ...@@ -126,7 +126,8 @@
</block> </block>
</view> </view>
<!-- 已施工/已撤销/已支付 不显示 --> <!-- 已施工/已撤销/已支付 不显示 -->
<view wx:if="{{detail.inviteStatus != 4&&detail.inviteStatus != 6 && detail.inviteStatus != 7}}" class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<view wx:if="{{detail.inviteStatus != 4&&detail.inviteStatus != 6 && detail.inviteStatus != 7&&isOrder}}" class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn text-center" bindtap="orderSubmit">去下单</view> <view class="btn text-center" bindtap="orderSubmit">去下单</view>
</view> </view>
</view> </view>
......
...@@ -60,7 +60,8 @@ Page({ ...@@ -60,7 +60,8 @@ Page({
}, },
styleHight: "auto", styleHight: "auto",
ispopUp: true, ispopUp: true,
isPad: false isPad: false,
isWait: false //今日待办
}, },
// showStorePicker() { // showStorePicker() {
// let { // let {
...@@ -309,7 +310,9 @@ Page({ ...@@ -309,7 +310,9 @@ Page({
} }
if (userInfo?.isSuper || loginRole == 3) { // 超管或区域督导 if (userInfo?.isSuper || loginRole == 3) { // 超管或区域督导
if (result[0]?.merchantName !== '全部' && result[0]?.merchantId) { if (result[0]?.merchantName !== '全部' && result[0]?.merchantId) {
result.unshift({merchantName: '全部'}) result.unshift({
merchantName: '全部'
})
} }
} }
this.setData({ this.setData({
...@@ -414,7 +417,7 @@ Page({ ...@@ -414,7 +417,7 @@ Page({
url: item.url, url: item.url,
}) })
} }
if (item.name = "培训资料") { if (item.name == "培训资料") {
let params = { let params = {
merchantId: userInfo?.default4SStoreInfo?.merchantId, merchantId: userInfo?.default4SStoreInfo?.merchantId,
staffUuid: userInfo?.uuid, staffUuid: userInfo?.uuid,
...@@ -423,6 +426,16 @@ Page({ ...@@ -423,6 +426,16 @@ Page({
}; };
commonApi.shutDownTaskApi(params) commonApi.shutDownTaskApi(params)
} }
if (item.name == "生意助手") {
wx.navigateToMiniProgram({
appId: "wx2c28337db96364d2",
path: `pages/tab/index/index`,
envVersion: "trial",
success(res) {
// 打开成功
},
});
}
// 判断是不是门店员工 // 判断是不是门店员工
if (userInfo?.merchantType && !userInfo.isSuper && type == 2) { if (userInfo?.merchantType && !userInfo.isSuper && type == 2) {
wx.$util.pointRecord(item.recordId); wx.$util.pointRecord(item.recordId);
...@@ -704,7 +717,7 @@ Page({ ...@@ -704,7 +717,7 @@ Page({
// 1-超管 2-商户管理员 3-区域督导 4-驻店人员 // 1-超管 2-商户管理员 3-区域督导 4-驻店人员
const yqMerchantId = merchantRange[subIndex]?.merchantId || ""; const yqMerchantId = merchantRange[subIndex]?.merchantId || "";
const merchantId = userInfo?.isSuper ? "" : userInfo?.shopMerchantId; const merchantId = userInfo?.isSuper ? "" : userInfo?.shopMerchantId;
const loginRole = userInfo.subLoginUser?.loginRole; const loginRole = userInfo?.loginRole;
this.setData({ this.setData({
loginRole, loginRole,
}); });
...@@ -829,6 +842,7 @@ Page({ ...@@ -829,6 +842,7 @@ Page({
}); });
}, },
initData(userInfo) { initData(userInfo) {
console.log('切换门店')
userInfo = userInfo ? userInfo : wx.$util.getUserInfo() userInfo = userInfo ? userInfo : wx.$util.getUserInfo()
getYQInfo(userInfo).then((result) => { getYQInfo(userInfo).then((result) => {
wx.$util.hideLoading(); wx.$util.hideLoading();
...@@ -837,7 +851,7 @@ Page({ ...@@ -837,7 +851,7 @@ Page({
this.initTime(); this.initTime();
this.getUserStat(userInfo); this.getUserStat(userInfo);
this.getOutputValue(result); this.getOutputValue(result);
if (app.globalData.isStaff) this.getStaffRemindList(); if (this.data.isWait) this.getStaffRemindList();
this.setData({ this.setData({
...result, ...result,
}); });
...@@ -897,7 +911,7 @@ Page({ ...@@ -897,7 +911,7 @@ Page({
// if (wx.__HAS_NOREPORT_MODAL || wx.__HAS_NOTLOGIN_MODAL) return false; // if (wx.__HAS_NOREPORT_MODAL || wx.__HAS_NOTLOGIN_MODAL) return false;
// wx.__HAS_NOREPORT_MODAL = true; // wx.__HAS_NOREPORT_MODAL = true;
if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false
this.addModalToQueue('开单预警', '您已超过三天未开单', '确定', false, 1, () => { }) this.addModalToQueue('开单预警', '您已超过三天未开单', '确定', false, 1, () => {})
// this.showNextModal() // this.showNextModal()
// wx.showModal({ // wx.showModal({
// title: "开单预警", // title: "开单预警",
...@@ -1114,17 +1128,20 @@ Page({ ...@@ -1114,17 +1128,20 @@ Page({
let today = new Date(); let today = new Date();
let startDate = today.format("yyyy-MM-dd"); let startDate = today.format("yyyy-MM-dd");
let endDate = today.format("yyyy-MM-dd"); let endDate = today.format("yyyy-MM-dd");
let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
maxDate: new Date().format("yyyy-MM-dd"), maxDate: new Date().format("yyyy-MM-dd"),
startDate, startDate,
endDate, endDate,
});
this.setData({
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isWait: !(userInfo?.isSuper || userInfo?.loginRole == 3)
}, () => {
if (this.data.isWait) this.getStaffRemindList();
}); });
this.checkIsPadOrNot() this.checkIsPadOrNot()
this.get4SStoreList(); this.get4SStoreList();
if (app.globalData.isStaff) this.getStaffRemindList();
// this.getIsBusinessSchoolEnableCurrentUser(); // this.getIsBusinessSchoolEnableCurrentUser();
// 获取驻店员工目标 // 获取驻店员工目标
if (app.globalData.isStaff) this.getStaffTargetTask(); if (app.globalData.isStaff) this.getStaffTargetTask();
...@@ -1251,12 +1268,6 @@ Page({ ...@@ -1251,12 +1268,6 @@ Page({
recordId: 8, recordId: 8,
icon: "booking_management", icon: "booking_management",
}, },
// {
// name: "BI报表",
// url: "tabOperating.index",
// recordId: 11,
// icon: "business_data",
// },
]; ];
// 判断是超管再加 这个菜单 // 判断是超管再加 这个菜单
// if (userInfo.isSuper) { // if (userInfo.isSuper) {
...@@ -1268,7 +1279,11 @@ Page({ ...@@ -1268,7 +1279,11 @@ Page({
// }) // })
// } // }
} }
if (userInfo.isSuper) { //超管、督导驻店日报、BI报表、生意助手
if(userInfo.loginRole === 3 || userInfo.isSuper){
menu=[]
}
if ((userInfo.isSuper || userInfo.loginRole === 3) && menu.every((item) => item.name != "BI报表")) {
menu.push({ menu.push({
name: "BI报表", name: "BI报表",
url: "tabOperating.index", url: "tabOperating.index",
...@@ -1276,6 +1291,15 @@ Page({ ...@@ -1276,6 +1291,15 @@ Page({
icon: "business_data", icon: "business_data",
}) })
} }
//区域督导和超管角色
if ((userInfo.isSuper || userInfo.loginRole === 3) && menu.every((item) => item.name != "生意助手")) {
menu.push({
name: "生意助手",
type: "mini",
recordId: 12,
icon: "boutique-syzs",
})
}
if (checklist.includes(userInfo?.accountName)) { if (checklist.includes(userInfo?.accountName)) {
menu = menu.filter((e) => e.name != "预约管理"); menu = menu.filter((e) => e.name != "预约管理");
} }
...@@ -1296,7 +1320,7 @@ Page({ ...@@ -1296,7 +1320,7 @@ Page({
}); });
} }
if ( if (
(app.globalData.isStaff || userInfo.isSuper) && (app.globalData.isStaff || userInfo.isSuper || userInfo.loginRole === 3) &&
menu.every((item) => item.name != "驻店日报") menu.every((item) => item.name != "驻店日报")
) { ) {
menu.push({ menu.push({
...@@ -1317,17 +1341,26 @@ Page({ ...@@ -1317,17 +1341,26 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function (options) { onShow: function (options) {
let userInfo = wx.$util.getUserInfo();
this.customerOnReady(); this.customerOnReady();
this.getYqStoreConfig();
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
delayShow: true, delayShow: true,
}); });
}, 1000); }, 1000);
this.setData({ this.setData({
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isWait: !(userInfo?.isSuper || userInfo?.loginRole == 3)
}, () => {
if (this.data.isWait) {
this.getYqStoreConfig();
}
}); });
let userInfo = wx.$util.getUserInfo(); console.log(this.data.isWait, 'isWait')
if (userInfo) { if (userInfo) {
if (userInfo.merchantAccountList && userInfo.merchantAccountList.length) { if (userInfo.merchantAccountList && userInfo.merchantAccountList.length) {
try { try {
......
...@@ -49,8 +49,10 @@ Page({ ...@@ -49,8 +49,10 @@ Page({
}, },
getUserInfo() { getUserInfo() {
let userInfo =wx.$util.getUserInfo()
this.setData({ this.setData({
userInfo: wx.$util.getUserInfo() userInfo,
type:userInfo.sceneType===1?'qinggai':'yanbao'
}) })
}, },
init() { init() {
...@@ -59,6 +61,7 @@ Page({ ...@@ -59,6 +61,7 @@ Page({
let accountInfo = wx.getAccountInfoSync(); let accountInfo = wx.getAccountInfoSync();
let systemInfo = wx.getSystemInfoSync(); let systemInfo = wx.getSystemInfoSync();
let envName = accountInfo.miniProgram.envVersion; let envName = accountInfo.miniProgram.envVersion;
let {type} = this.data;
//手动控制体验版环境的请求 true就依据下面index false就默认2 //手动控制体验版环境的请求 true就依据下面index false就默认2
const manual = false; const manual = false;
const release = false; const release = false;
...@@ -76,10 +79,10 @@ Page({ ...@@ -76,10 +79,10 @@ Page({
break; break;
} }
const webUrls = { const webUrls = {
develop: `http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/?phone=`, develop: `http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/?type=${type}&phone=`,
trial: `http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/?phone=`, trial: `https://scrm.test.glsx.com.cn/glsx-bi-report/#/?type=${type}&phone=`,
release: `http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/?phone=`, release: `https://scrm.glsx.com.cn/glsx-bi-report/#/?type=${type}&phone=`,
preRelease: `http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/?phone=`, preRelease: `http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/?type=${type}&phone=`,
}; };
const target = ["ip", "develop", "trial", "release", "preRelease"]; const target = ["ip", "develop", "trial", "release", "preRelease"];
webUrl = webUrls[target[index]]; webUrl = webUrls[target[index]];
......
...@@ -22,7 +22,8 @@ Page({ ...@@ -22,7 +22,8 @@ Page({
showTip: false, showTip: false,
warrantyCardVisible: true, warrantyCardVisible: true,
showRatingPopup: false, showRatingPopup: false,
showRatingCard: true // 显示评价卡片 showRatingCard: true, // 显示评价卡片
isMake:true
}, },
RatingPopupSetting() { RatingPopupSetting() {
this.setData({ this.setData({
...@@ -188,12 +189,14 @@ Page({ ...@@ -188,12 +189,14 @@ Page({
if (options.orderCode) { if (options.orderCode) {
this.getOrderDetail(options.orderCode) this.getOrderDetail(options.orderCode)
} }
let userInfo = wx.$util.getUserInfo();
let o = wx.$util.getStorageSync('dj_boutique_user_info') let o = wx.$util.getStorageSync('dj_boutique_user_info')
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
this.setData({ this.setData({
userInfo: o, userInfo: o,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff isStaff: app.globalData.isStaff,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3)
}) })
}, },
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<!-- 已微信通知客户前往取车, --> <!-- 已微信通知客户前往取车, -->
<view class="tips">已完成施工,如客户有新需求,可点击再次下单。</view> <view class="tips">已完成施工,如客户有新需求,可点击再次下单。</view>
<view class="againBtn"> <view class="againBtn">
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}"> <block wx:if="{{!userInfo.isSuper && userInfo.userType == 2&&isMake}}">
<view class="btn text-center" bindtap="againOrder">再次下单</view> <view class="btn text-center" bindtap="againOrder">再次下单</view>
</block> </block>
</view> </view>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<view class="box"> <view class="box">
<view class="title infoTitle"> <view class="title infoTitle">
<text>工单信息</text> <text>工单信息</text>
<view class="operate" wx:if="{{orderInfo.canOperate&&(isYqdSuper||isStaff)}}"> <view class="operate" wx:if="{{orderInfo.canOperate&&(isYqdSuper||isStaff)&&isMake}}">
<text bindtap="targetOperate">操作</text> <text bindtap="targetOperate">操作</text>
<view class="tip {{showTip?'':'none'}}" bindtap="targetError"> <view class="tip {{showTip?'':'none'}}" bindtap="targetError">
<view class="tip-trangle-top" /> <view class="tip-trangle-top" />
...@@ -132,8 +132,8 @@ ...@@ -132,8 +132,8 @@
<view class="title userTitle"> <view class="title userTitle">
<view>客户信息</view> <view>客户信息</view>
<!-- 已退款或已开票不可修改客户任何信息 --> <!-- 已退款或已开票不可修改客户任何信息 -->
<view bindtap="jumpUserPortrait" class="updateInfo icon {{orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ? 'isHide' : ''}}"><image src="{{IMG_URL}}miniProgram/custom_portrait_icon.png" class="iconImage" ></image>画像</view> <view bindtap="jumpUserPortrait" class="updateInfo icon {{orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : ''}}"><image src="{{IMG_URL}}miniProgram/custom_portrait_icon.png" class="iconImage" ></image>画像</view>
<view wx:if="{{isYqdSuper||isStaff}}" bindtap="jumpUpdate" class="updateInfo {{orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ? 'isHide' : ''}}"><image src="{{IMG_URL}}miniProgram/edit_icon.png" class="iconImage" ></image>客户信息</view> <view wx:if="{{isYqdSuper||isStaff}}" bindtap="jumpUpdate" class="updateInfo {{orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : ''}}"><image src="{{IMG_URL}}miniProgram/edit_icon.png" class="iconImage" ></image>客户信息</view>
</view> </view>
<block wx:for="{{customerObj}}" wx:key="index"> <block wx:for="{{customerObj}}" wx:key="index">
<view class="cell"> <view class="cell">
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</view> </view>
</block> </block>
</view> </view>
<block wx:if="{{orderInfo.failureFlag == 'Y'}}"> <block wx:if="{{orderInfo.failureFlag == 'Y'&&isMake}}">
<!-- <view class="btn text-center" bindtap="showAgain">继续下单</view> --> <!-- <view class="btn text-center" bindtap="showAgain">继续下单</view> -->
<view class=" btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class=" btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="tips"> <view class="tips">
......
...@@ -34,7 +34,8 @@ Page({ ...@@ -34,7 +34,8 @@ Page({
showTips: true, showTips: true,
type: 1 type: 1
}, },
baseConfigData: {} baseConfigData: {},
isMake:true
}, },
jumpUserPortrait() { jumpUserPortrait() {
wx.$router.go('tabDate.userPortrait', this.data.orderInfo) wx.$router.go('tabDate.userPortrait', this.data.orderInfo)
...@@ -187,7 +188,7 @@ Page({ ...@@ -187,7 +188,7 @@ Page({
orderCode: options.orderCode orderCode: options.orderCode
}) })
} }
let userInfo = wx.$util.getUserInfo();
let o = wx.$util.getStorageSync('dj_boutique_user_info') let o = wx.$util.getStorageSync('dj_boutique_user_info')
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
...@@ -195,7 +196,8 @@ Page({ ...@@ -195,7 +196,8 @@ Page({
this.setData({ this.setData({
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
userInfo: o userInfo: o,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3)
}) })
}, },
......
...@@ -120,10 +120,10 @@ ...@@ -120,10 +120,10 @@
<view class="title userTitle"> <view class="title userTitle">
<text>客户信息</text> <text>客户信息</text>
<!-- 已退款或已开票不可修改客户任何信息 --> <!-- 已退款或已开票不可修改客户任何信息 -->
<view bindtap="jumpUserPortrait" class="updateInfo icon {{orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ? 'isHide' : ''}}"> <view bindtap="jumpUserPortrait" class="updateInfo icon {{orderInfo.status == 12 || orderInfo.invoiceStatus == 2||!isMake ? 'isHide' : ''}}">
<image src="{{IMG_URL}}miniProgram/custom_portrait_icon.png" class="iconImage"></image>画像 <image src="{{IMG_URL}}miniProgram/custom_portrait_icon.png" class="iconImage"></image>画像
</view> </view>
<view wx:if="{{isYqdSuper||isStaff}}" bindtap="jumpUpdate" class="updateInfo {{orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ? 'isHide' : ''}}"> <view wx:if="{{isYqdSuper||isStaff}}" bindtap="jumpUpdate" class="updateInfo {{orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : ''}}">
<image src="{{IMG_URL}}miniProgram/edit_icon.png" class="iconImage"></image>客户信息 <image src="{{IMG_URL}}miniProgram/edit_icon.png" class="iconImage"></image>客户信息
</view> </view>
</view> </view>
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
</view> </view>
</block> --> </block> -->
</view> </view>
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2&&orderInfo.status!=10&&orderInfo.status!=9}}"> <block wx:if="{{(!userInfo.isSuper && userInfo.userType == 2&&orderInfo.status!=10&&orderInfo.status!=9)||isMake}}">
<!-- 不需要走签名逻辑 --> <!-- 不需要走签名逻辑 -->
<view wx:if="{{signatureSwitch&&orderInfo.selectPayType!=0}}" class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view wx:if="{{signatureSwitch&&orderInfo.selectPayType!=0}}" class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn text-center" bindtap="navOrderSignature">客户签名确认</view> <view class="btn text-center" bindtap="navOrderSignature">客户签名确认</view>
......
...@@ -31,7 +31,13 @@ Component({ ...@@ -31,7 +31,13 @@ Component({
} }
}, },
show: { show: {
type: Boolean type: Boolean,
observer: function(n) {
this.setData({
searchValue: ''
})
this.triggerEvent('search', { value: '' })
}
}, },
pickerType: { pickerType: {
type: String, type: String,
...@@ -123,6 +129,9 @@ Component({ ...@@ -123,6 +129,9 @@ Component({
show: false show: false
}) })
}, },
cancel() {
this.triggerEvent('cancel')
},
changeStore(e) { changeStore(e) {
// console.log(e.detail.value[0]) // console.log(e.detail.value[0])
this.setData({ this.setData({
......
<!--packageEquity/components/storePicker/storePicker.wxml--> <!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindconfirm="confirm" height="var(--fontSize800)"> <popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindconfirm="confirm" bindcancel="cancel" height="var(--fontSize800)">
<view class="date-container"> <view class="date-container">
<view class="date-confirm"> <view class="date-confirm">
<view class="search-box"> <view class="search-box">
......
...@@ -121,6 +121,10 @@ Page({ ...@@ -121,6 +121,10 @@ Page({
} }
this.tapPicker(); this.tapPicker();
}, },
cancelPicker() {
this.setData({showPicker: false})
this.tapPicker()
},
// 切换园区 // 切换园区
tapPicker() { tapPicker() {
this.setData({ this.setData({
...@@ -306,6 +310,12 @@ Page({ ...@@ -306,6 +310,12 @@ Page({
* 点击了上一周,选择周数字减一,然后直接调用工具类中一个方法获取到数据 * 点击了上一周,选择周数字减一,然后直接调用工具类中一个方法获取到数据
*/ */
lastWeek: function (e) { lastWeek: function (e) {
let userInfo = wx.$util.getUserInfo()
let {
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return
var selectWeek = --this.data.selectWeek; var selectWeek = --this.data.selectWeek;
var timeBean = this.data.timeBean; var timeBean = this.data.timeBean;
timeBean = util.getWeekDayList(selectWeek); timeBean = util.getWeekDayList(selectWeek);
...@@ -336,6 +346,12 @@ Page({ ...@@ -336,6 +346,12 @@ Page({
* 点击了下一周,选择周数字加一,然后直接调用工具类中一个方法获取到数据 * 点击了下一周,选择周数字加一,然后直接调用工具类中一个方法获取到数据
*/ */
nextWeek: function (e) { nextWeek: function (e) {
let userInfo = wx.$util.getUserInfo()
let {
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return
var selectWeek = ++this.data.selectWeek; var selectWeek = ++this.data.selectWeek;
var timeBean = this.data.timeBean; var timeBean = this.data.timeBean;
// console.log(timeBean.weekDayList[6].date, 'timeBean.weekDayList[6].date'); // console.log(timeBean.weekDayList[6].date, 'timeBean.weekDayList[6].date');
...@@ -360,6 +376,12 @@ Page({ ...@@ -360,6 +376,12 @@ Page({
* 选中了某一日,改变selectDay为选中日 * 选中了某一日,改变selectDay为选中日
*/ */
dayClick: function (e) { dayClick: function (e) {
let userInfo = wx.$util.getUserInfo()
let {
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return
this.setData({ this.setData({
["timeBean.selectDay"]: e.detail, ["timeBean.selectDay"]: e.detail,
}); });
...@@ -725,7 +747,7 @@ Page({ ...@@ -725,7 +747,7 @@ Page({
} }
// console.log(result, 'result') // console.log(result, 'result')
}) })
.catch((err) => {}); .catch((err) => { wx.$util.hideLoading() });
}, },
jump() { jump() {
wx.$router.back(); wx.$router.back();
......
...@@ -105,6 +105,6 @@ ...@@ -105,6 +105,6 @@
</view> </view>
</view> </view>
</view> </view>
<store-picker subIndex="{{ pickerType == 'merchant' ? subIndex : staffCurrent }}" pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}" show="{{ showPicker }}" bindsearch="inputSearch" bindconfirm="changePicker" pickerType="{{ pickerType }}" /> <store-picker subIndex="{{ pickerType == 'merchant' ? subIndex : staffCurrent }}" pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}" show="{{ showPicker }}" bindsearch="inputSearch" bindconfirm="changePicker" bindcancel="cancelPicker" pickerType="{{ pickerType }}" />
<!-- 选择流量问题/技能问题/套餐问题 --> <!-- 选择流量问题/技能问题/套餐问题 -->
<select-item-popup show="{{showSelectItemPopup}}" title="{{selectItemTitle}}" optionList="{{formData[selectItemIndex].optionList}}" index="{{selectItemIndex}}" bindconfirm="changePromble" bindcancel="closeSlectItemPopup" bindclick="click" /> <select-item-popup show="{{showSelectItemPopup}}" title="{{selectItemTitle}}" optionList="{{formData[selectItemIndex].optionList}}" index="{{selectItemIndex}}" bindconfirm="changePromble" bindcancel="closeSlectItemPopup" bindclick="click" />
\ No newline at end of file \ No newline at end of file
...@@ -31,7 +31,13 @@ Component({ ...@@ -31,7 +31,13 @@ Component({
} }
}, },
show: { show: {
type: Boolean type: Boolean,
observer: function(n) {
this.setData({
searchValue: ''
})
this.triggerEvent('search', { value: '' })
}
}, },
pickerType: { pickerType: {
type: String, type: String,
...@@ -123,6 +129,9 @@ Component({ ...@@ -123,6 +129,9 @@ Component({
show: false show: false
}) })
}, },
cancel() {
this.triggerEvent('cancel')
},
changeStore(e) { changeStore(e) {
// console.log(e.detail.value[0]) // console.log(e.detail.value[0])
this.setData({ this.setData({
......
...@@ -93,7 +93,8 @@ Page({ ...@@ -93,7 +93,8 @@ Page({
['orderObj.merchantName']: merchantRange[value].merchantName, ['orderObj.merchantName']: merchantRange[value].merchantName,
["orderObj.staffUuid"]: '', ["orderObj.staffUuid"]: '',
["orderObj.staffName"]: '', ["orderObj.staffName"]: '',
staffCurrent: 0 staffCurrent: 0,
showPicker: false
// ['orderObj.yqMerchantId']: merchantRange[value].yqMerchantId, // ['orderObj.yqMerchantId']: merchantRange[value].yqMerchantId,
// ['orderObj.yqMerchantName']: merchantRange[value].yqMerchantName // ['orderObj.yqMerchantName']: merchantRange[value].yqMerchantName
}) })
...@@ -103,13 +104,18 @@ Page({ ...@@ -103,13 +104,18 @@ Page({
this.setData({ this.setData({
staffCurrent: value, staffCurrent: value,
['orderObj.staffUuid']: staffList[value].uuid, ['orderObj.staffUuid']: staffList[value].uuid,
['orderObj.staffName']: staffList[value].staffName ['orderObj.staffName']: staffList[value].staffName,
showPicker: false
}) })
this.getStaffReport() this.getStaffReport()
this.getStaffDailyReportDetailWeeklyList() this.getStaffDailyReportDetailWeeklyList()
} }
this.tapPicker() this.tapPicker()
}, },
cancelPicker() {
this.setData({showPicker: false})
this.tapPicker()
},
// 切换园区 // 切换园区
tapPicker() { tapPicker() {
this.setData({ this.setData({
...@@ -270,6 +276,12 @@ Page({ ...@@ -270,6 +276,12 @@ Page({
* 点击了上一周,选择周数字减一,然后直接调用工具类中一个方法获取到数据 * 点击了上一周,选择周数字减一,然后直接调用工具类中一个方法获取到数据
*/ */
lastWeek: function (e) { lastWeek: function (e) {
let userInfo = wx.$util.getUserInfo()
let {
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return
var selectWeek = --this.data.selectWeek var selectWeek = --this.data.selectWeek
var timeBean = this.data.timeBean var timeBean = this.data.timeBean
timeBean = util.getWeekDayList(selectWeek) timeBean = util.getWeekDayList(selectWeek)
...@@ -305,6 +317,12 @@ Page({ ...@@ -305,6 +317,12 @@ Page({
* 点击了下一周,选择周数字加一,然后直接调用工具类中一个方法获取到数据 * 点击了下一周,选择周数字加一,然后直接调用工具类中一个方法获取到数据
*/ */
nextWeek: function (e) { nextWeek: function (e) {
let userInfo = wx.$util.getUserInfo()
let {
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return
var selectWeek = ++this.data.selectWeek var selectWeek = ++this.data.selectWeek
var timeBean = this.data.timeBean var timeBean = this.data.timeBean
timeBean = util.getWeekDayList(selectWeek) timeBean = util.getWeekDayList(selectWeek)
...@@ -325,6 +343,12 @@ Page({ ...@@ -325,6 +343,12 @@ Page({
* 选中了某一日,改变selectDay为选中日 * 选中了某一日,改变selectDay为选中日
*/ */
dayClick: function (e) { dayClick: function (e) {
let userInfo = wx.$util.getUserInfo()
let {
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return
this.setData({ this.setData({
['timeBean.selectDay']: e.detail ['timeBean.selectDay']: e.detail
}) })
......
...@@ -160,7 +160,8 @@ ...@@ -160,7 +160,8 @@
pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}" pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}"
show="{{ showPicker }}" show="{{ showPicker }}"
bindsearch="inputSearch" bindsearch="inputSearch"
bindconfirm="changePicker" bindconfirm="changePicker"
bindcancel="cancelPicker"
pickerType="{{ pickerType }}" pickerType="{{ pickerType }}"
/> />
<!-- 选择流量问题/技能问题/套餐问题 --> <!-- 选择流量问题/技能问题/套餐问题 -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!