Commit 2ec1043c by 张立顺

feat 督导日报

1 parent 7666c796
...@@ -98,23 +98,23 @@ Component({ ...@@ -98,23 +98,23 @@ Component({
statisticsObj: {}, statisticsObj: {},
dataActive: "today", dataActive: "today",
staticDataList: [{ staticDataList: [{
label: "今日营业额", label: "今日营业额",
value: "todayTurnover", value: "todayTurnover",
tipsLabel: "今日成交量", tipsLabel: "今日成交量",
tipsValue: "todayOrderNumber", tipsValue: "todayOrderNumber",
}, },
{ {
label: "本月营业额", label: "本月营业额",
value: "monthTurnover", value: "monthTurnover",
tipsLabel: "本月成交量", tipsLabel: "本月成交量",
tipsValue: "monthOrderNumber", tipsValue: "monthOrderNumber",
}, },
{ {
label: "累计营业额", label: "累计营业额",
value: "totalTurnover", value: "totalTurnover",
tipsLabel: "累计成交量", tipsLabel: "累计成交量",
tipsValue: "totalOrderNumber", tipsValue: "totalOrderNumber",
}, },
], ],
itemDataList: [ itemDataList: [
// { // {
...@@ -168,7 +168,7 @@ Component({ ...@@ -168,7 +168,7 @@ Component({
menuText: "培训资料", menuText: "培训资料",
icon: "peixun_icon", icon: "peixun_icon",
path: "packageEquity.trainingMaterials", path: "packageEquity.trainingMaterials",
}, ], },],
loginRoleLabel: { loginRoleLabel: {
1: "超管", 1: "超管",
2: "商户管理员", 2: "商户管理员",
...@@ -341,10 +341,10 @@ Component({ ...@@ -341,10 +341,10 @@ Component({
changeSwiper(e) { changeSwiper(e) {
let name = let name =
e.detail.current == 0 ? e.detail.current == 0 ?
"today" : "today" :
e.detail.current == 1 ? e.detail.current == 1 ?
"month" : "month" :
"total"; "total";
this.setData({ this.setData({
current: e.detail.current, current: e.detail.current,
dataActive: name, dataActive: name,
...@@ -388,7 +388,7 @@ Component({ ...@@ -388,7 +388,7 @@ Component({
if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) { if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) {
menuList = menuList.filter((item) => item.menuText != "战败下单"); menuList = menuList.filter((item) => item.menuText != "战败下单");
} }
console.log('menuList', mode, menuList, ); console.log('menuList', mode, menuList,);
// 将menuList排序 // 将menuList排序
menuList.sort((a, b) => a.sortVal - b.sortVal) menuList.sort((a, b) => a.sortVal - b.sortVal)
this.setData({ this.setData({
...@@ -539,6 +539,15 @@ Component({ ...@@ -539,6 +539,15 @@ Component({
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);
} }
// userInfo?.loginRole == 3 && 督导
if (menuList.every((item) => item.name != '督导日报')) {
menuList.push({
menuText: "督导日报",
path: "pages.supervisorDaily",
icon: "supervisorDaily",
})
}
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.getData(); this.getData();
// 隐藏待办事项模块 // 隐藏待办事项模块
...@@ -780,8 +789,8 @@ Component({ ...@@ -780,8 +789,8 @@ Component({
} }
orderStaffValid({ orderStaffValid({
sceneType: userInfo.sceneType, sceneType: userInfo.sceneType,
}) })
.then((result) => { .then((result) => {
console.log(result, "orderStaffValid"); console.log(result, "orderStaffValid");
if (result.data) { if (result.data) {
...@@ -820,7 +829,7 @@ Component({ ...@@ -820,7 +829,7 @@ Component({
}); });
} }
}) })
.catch((err) => {}); .catch((err) => { });
}, },
getStaffTargetTask() { getStaffTargetTask() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -871,7 +880,7 @@ Component({ ...@@ -871,7 +880,7 @@ Component({
.setTaskDialog({ .setTaskDialog({
id: data[0]?.id, id: data[0]?.id,
}) })
.then(() => {}); .then(() => { });
} }
} else { } else {
wx.$util.showToast(message); wx.$util.showToast(message);
...@@ -1327,10 +1336,10 @@ Component({ ...@@ -1327,10 +1336,10 @@ Component({
wx.$router.go('packageEquity.receptionRecords') wx.$router.go('packageEquity.receptionRecords')
wx.$track.setTrackData(0, 'see_more') wx.$track.setTrackData(0, 'see_more')
}, },
onHide(){ onHide() {
this.onPageHide() this.onPageHide()
}, },
onUnload(){ onUnload() {
this.onPageHide() this.onPageHide()
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!