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