Commit b1028c8b by zhangxw

fixbug修复

1 parent 0d7c3fc8
...@@ -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 ? 19 : item.stage?.length == 4 ? 23 : 15 // 根据质检环节最小宽度 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
}, },
......
...@@ -489,7 +489,8 @@ Component({ ...@@ -489,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 => {
......
...@@ -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
}) })
......
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
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!