|
|
@@ -44,7 +44,12 @@ Page({
|
|
|
appid: "wxc1b6ae925ac1d06a",
|
|
|
icon: "work-E-dingdan",
|
|
|
list: getedd()
|
|
|
- }];
|
|
|
+ }, {
|
|
|
+ label: "E-服务",
|
|
|
+ appid: "wxc1b6ae925ac1d06a",
|
|
|
+ icon: "work-E-fuwu",
|
|
|
+ list: geteservice()
|
|
|
+ }, ];
|
|
|
//营销工具
|
|
|
function gettool() {
|
|
|
const paths = [{
|
|
|
@@ -229,6 +234,44 @@ Page({
|
|
|
});
|
|
|
return dye(list.sort((a, b) => a.index - b.index))
|
|
|
};
|
|
|
+ //E服务
|
|
|
+ function geteservice() {
|
|
|
+ let paths = [{
|
|
|
+ name: "工单",
|
|
|
+ path: "/Eservice/workOrder/index",
|
|
|
+ icon: "work-yejimubiao"
|
|
|
+ }, {
|
|
|
+ name: "申请单",
|
|
|
+ path: "/Eservice/agent/serviceBillList/index",
|
|
|
+ icon: "work-shangcheng"
|
|
|
+ }, {
|
|
|
+ name: "申请单管理",
|
|
|
+ path: "/Eservice/workerLeader/serviceBillList/index",
|
|
|
+ icon: "work-dingdan"
|
|
|
+ }, {
|
|
|
+ name: "业务员服务申请单",
|
|
|
+ path: "/Eservice/saler/serviceBillList/index",
|
|
|
+ icon: "work-shouhuo"
|
|
|
+ }];
|
|
|
+ let eservice = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["E-服务"], ["工单管理"]),
|
|
|
+ list = [];
|
|
|
+ eservice.forEach(v => {
|
|
|
+ v.apps.forEach(s => {
|
|
|
+ authList[s.name] = {
|
|
|
+ options: s.meta.auth.map(a => a.option),
|
|
|
+ optionnames: s.meta.auth.map(a => a.optionname),
|
|
|
+ }
|
|
|
+ if (authList[s.name].options.some(s => s == "read")) {
|
|
|
+ let i = paths.findIndex(k => k.name == s.meta.title);
|
|
|
+ if (i != -1) {
|
|
|
+ paths[i].index = i;
|
|
|
+ list.push(paths[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ return dye(list.sort((a, b) => a.index - b.index))
|
|
|
+ }
|
|
|
//染色
|
|
|
function dye(list) {
|
|
|
let colorList = [{
|