|
@@ -56,7 +56,7 @@ function getcrm() {
|
|
|
path: "/prsx/calendar/index",
|
|
path: "/prsx/calendar/index",
|
|
|
icon: "work-shichanghuodong",
|
|
icon: "work-shichanghuodong",
|
|
|
objectname: ""
|
|
objectname: ""
|
|
|
- },{
|
|
|
|
|
|
|
+ }, {
|
|
|
name: "市场活动",
|
|
name: "市场活动",
|
|
|
path: "/prsx/activity/index",
|
|
path: "/prsx/activity/index",
|
|
|
icon: "work-shichanghuodong",
|
|
icon: "work-shichanghuodong",
|
|
@@ -107,8 +107,13 @@ function getcrm() {
|
|
|
icon: "work-xiaochengxu_xiaoshoumubiao",
|
|
icon: "work-xiaochengxu_xiaoshoumubiao",
|
|
|
objectname: "sa_salestarget"
|
|
objectname: "sa_salestarget"
|
|
|
}];
|
|
}];
|
|
|
- let crm = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['CRM'], ['业务管理', '销售管理', '营销目标']),
|
|
|
|
|
|
|
+ let crm = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['CRM'], ['业务管理', '销售管理', '营销目标', '行事历']),
|
|
|
list = [];
|
|
list = [];
|
|
|
|
|
+ try {
|
|
|
|
|
+ crm.push(getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['行事历'], ['行事历'])[0])
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
crm.forEach(v => {
|
|
crm.forEach(v => {
|
|
|
v.apps.forEach(s => {
|
|
v.apps.forEach(s => {
|
|
|
authList[s.name] = {
|
|
authList[s.name] = {
|
|
@@ -131,38 +136,6 @@ function getcrm() {
|
|
|
});
|
|
});
|
|
|
return dye(list.sort((a, b) => a.index - b.index))
|
|
return dye(list.sort((a, b) => a.index - b.index))
|
|
|
};
|
|
};
|
|
|
-//行事历
|
|
|
|
|
-function getxsl() {
|
|
|
|
|
- const paths = [{
|
|
|
|
|
- name: "行事历",
|
|
|
|
|
- path: "/prsx/calendar/index",
|
|
|
|
|
- icon: "work-shichanghuodong",
|
|
|
|
|
- objectname: ""
|
|
|
|
|
- }];
|
|
|
|
|
- let xsl = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['行事历'], ['行事历']),
|
|
|
|
|
- list = [];
|
|
|
|
|
- xsl.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),
|
|
|
|
|
- istask: s.istask == 1,
|
|
|
|
|
- isdatafollowup: s.isdatafollowup == 1,
|
|
|
|
|
- isdatatag: s.isdatatag == 1,
|
|
|
|
|
- isdatateam: s.isdatateam == 1,
|
|
|
|
|
- }
|
|
|
|
|
- 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;
|
|
|
|
|
- paths[i].appName = s.name;
|
|
|
|
|
- list.push(paths[i])
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- });
|
|
|
|
|
- return dye(list.sort((a, b) => a.index - b.index))
|
|
|
|
|
-};
|
|
|
|
|
//染色
|
|
//染色
|
|
|
function dye(list) {
|
|
function dye(list) {
|
|
|
let colorList = [{
|
|
let colorList = [{
|
|
@@ -227,6 +200,5 @@ function dye(list) {
|
|
|
module.exports = {
|
|
module.exports = {
|
|
|
getapps,
|
|
getapps,
|
|
|
getcrm,
|
|
getcrm,
|
|
|
- getxsl,
|
|
|
|
|
authList
|
|
authList
|
|
|
};
|
|
};
|