zhaoxiaohai 3 лет назад
Родитель
Сommit
de84a543a0
3 измененных файлов с 272 добавлено и 231 удалено
  1. 2 1
      packageA/contract/add/type2/index.js
  2. 44 21
      pages/tabbar/workbench/index.js
  3. 226 209
      static/work-icon.wxss

+ 2 - 1
packageA/contract/add/type2/index.js

@@ -138,8 +138,9 @@ Page({
                 params: {
                     "id": 20221201090802,
                     "content": {
+                        nocache: true,
                         sys_enterpriseid: data.sys_enterpriseid[1][0],
-                        type: 1, //1直销 2经销 3居间
+                        type: 2, //1直销 2经销 3居间
                         where: {
                             condition: "",
                         }

+ 44 - 21
pages/tabbar/workbench/index.js

@@ -16,19 +16,7 @@ Page({
                     label: "通用",
                     appid: "wx08b337e860e3ea58",
                     icon: "work-tongyong",
-                    list: dye([{
-                        name: "签到",
-                        path: "/packageA/clockIn/index",
-                        icon: "work-a-wodemendianxinxidizhi"
-                    }, {
-                        name: "任务",
-                        path: "/packageA/work/index",
-                        icon: "work-a-woderenwuzhongxin"
-                    }, {
-                        name: "通讯录",
-                        path: "/packageA/contacts/index",
-                        icon: "work-xiaochengxutongxunlu"
-                    }])
+                    list: getapps()
                 }, {
                     label: "营销工具",
                     appid: "wx08b337e860e3ea58",
@@ -50,6 +38,41 @@ Page({
                     icon: "work-E-fuwu",
                     list: geteservice()
                 }, ];
+            //通用
+            function getapps() {
+                const paths = [{
+                    name: "签到",
+                    path: "/packageA/clockIn/index",
+                    icon: "work-a-wodemendianxinxidizhi"
+                }, {
+                    name: "任务",
+                    path: "/packageA/work/index",
+                    icon: "work-a-woderenwuzhongxin"
+                }, {
+                    name: "通讯录",
+                    path: "/packageA/contacts/index",
+                    icon: "work-xiaochengxutongxunlu"
+                }];
+                let app = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['通用']),
+                    list = [];
+                app.forEach((v, i) => {
+                    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)
+            }
             //营销工具
             function gettool() {
                 const paths = [{
@@ -239,20 +262,20 @@ Page({
                 let paths = [{
                     name: "工单",
                     path: "/Eservice/workOrder/index",
-                    icon: "work-yejimubiao"
-                }, {
+                    icon: "work-gongdan"
+                  }, {
                     name: "申请单",
                     path: "/Eservice/agent/serviceBillList/index",
-                    icon: "work-shangcheng"
-                }, {
+                    icon: "work-shenqingdan"
+                  }, {
                     name: "申请单管理",
                     path: "/Eservice/workerLeader/serviceBillList/index",
-                    icon: "work-dingdan"
-                }, {
+                    icon: "work-shenqingdanguanli"
+                  }, {
                     name: "业务员服务申请单",
                     path: "/Eservice/saler/serviceBillList/index",
-                    icon: "work-shouhuo"
-                }];
+                    icon: "work-yewuyuanfuwushenqingdan"
+                  }];
                 let eservice = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["E-服务"], ["工单管理"]),
                     list = [];
                 eservice.forEach(v => {

+ 226 - 209
static/work-icon.wxss

@@ -1,210 +1,227 @@
 @font-face {
-  font-family: "work"; /* Project id 3902307 */
-  src: url('//at.alicdn.com/t/c/font_3902307_s4g8mtua5si.woff2?t=1676634797922') format('woff2'),
-       url('//at.alicdn.com/t/c/font_3902307_s4g8mtua5si.woff?t=1676634797922') format('woff'),
-       url('//at.alicdn.com/t/c/font_3902307_s4g8mtua5si.ttf?t=1676634797922') format('truetype');
-}
-
-.work {
-  font-family: "work" !important;
-  font-size: 16px;
-  font-style: normal;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-.work-jujianfeijiesuan:before {
-  content: "\e684";
-}
-
-.work-dakuanpingzheng:before {
-  content: "\e685";
-}
-
-.work-yingxiaogongju:before {
-  content: "\e683";
-}
-
-.work-a-shangxueyuanxuexi:before {
-  content: "\e63d";
-}
-
-.work-a-tibaoguanlitibao:before {
-  content: "\e63f";
-}
-
-.work-xiaochengxu_xiaoshouyuce:before {
-  content: "\e68e";
-}
-
-.work-gouwuche:before {
-  content: "\e682";
-}
-
-.work-a-woderenwuzhongxin:before {
-  content: "\e649";
-}
-
-.work-a-wodemendianxinxidizhi:before {
-  content: "\e64b";
-}
-
-.work-xiaochengxutongxunlu:before {
-  content: "\e68c";
-}
-
-.work-xiaoshouxiansuo:before {
-  content: "\e680";
-}
-
-.work-xiaochengxu_xiaoshoumubiao:before {
-  content: "\e68d";
-}
-
-.work-tianjialianxiren:before {
-  content: "\e690";
-}
-
-.work-a-shouyejingangqushangxueyuan:before {
-  content: "\e60d";
-}
-
-.work-a-shouyejingangquhehuoren:before {
-  content: "\e60e";
-}
-
-.work-a-shouyejingangqutongxunlu:before {
-  content: "\e610";
-}
-
-.work-a-shouyejingangqutonggao:before {
-  content: "\e613";
-}
-
-.work-a-shouyejingangqutuiguangsucai:before {
-  content: "\e614";
-}
-
-.work-a-shouyejingangquxiaoshouxiansuo:before {
-  content: "\e616";
-}
-
-.work-a-shouyejingangqutibao:before {
-  content: "\e617";
-}
-
-.work-a-shouyejingangquyingxiaowuliao:before {
-  content: "\e618";
-}
-
-.work-webshangxueyuan:before {
-  content: "\e665";
-}
-
-.work-webtonggaoguanli:before {
-  content: "\e666";
-}
-
-.work-webtibaoguanli:before {
-  content: "\e667";
-}
-
-.work-webyingxiaowuliao:before {
-  content: "\e668";
-}
-
-.work-kehu:before {
-  content: "\e6ba";
-}
-
-.work-hetong:before {
-  content: "\e6bb";
-}
-
-.work-xiangmubaojia:before {
-  content: "\e6bc";
-}
-
-.work-gonghaikehu:before {
-  content: "\e6bd";
-}
-
-.work-xiangmushangji:before {
-  content: "\e6be";
-}
-
-.work-jingzhengduishou:before {
-  content: "\e6c4";
-}
-
-.work-shichanghuodong:before {
-  content: "\e6c5";
-}
-
-.work-gonghaixiansuo:before {
-  content: "\e6c6";
-}
-
-.work-zuijinshiyong:before {
-  content: "\e6df";
-}
-
-.work-tongyong:before {
-  content: "\e6e0";
-}
-
-.work-E-dingdan:before {
-  content: "\e6e1";
-}
-
-.work-CRM:before {
-  content: "\e6e2";
-}
-
-.work-E-fuwu:before {
-  content: "\e6e3";
-}
-
-.work-a-biaoqianlanshouyexuanzhong:before {
-  content: "\e606";
-}
-
-.work-shouhuo:before {
-  content: "\e677";
-}
-
-.work-dingdan:before {
-  content: "\e678";
-}
-
-.work-zhanghu:before {
-  content: "\e679";
-}
-
-.work-kaipiao:before {
-  content: "\e67a";
-}
-
-.work-tuifan:before {
-  content: "\e67b";
-}
-
-.work-shangcheng:before {
-  content: "\e67c";
-}
-
-.work-shujuchaxun:before {
-  content: "\e67d";
-}
-
-.work-cuxiaohuodong:before {
-  content: "\e67e";
-}
-
-.work-yejimubiao:before {
-  content: "\e67f";
-}
-
-.work-gongjuchaxun:before {
-  content: "\e681";
-}
+    font-family: "work"; /* Project id 3902307 */
+    src: url('//at.alicdn.com/t/c/font_3902307_h2gzokzadc9.woff2?t=1677073678140') format('woff2'),
+         url('//at.alicdn.com/t/c/font_3902307_h2gzokzadc9.woff?t=1677073678140') format('woff'),
+         url('//at.alicdn.com/t/c/font_3902307_h2gzokzadc9.ttf?t=1677073678140') format('truetype');
+  }
+  
+  .work {
+    font-family: "work" !important;
+    font-size: 16px;
+    font-style: normal;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+  }
+  
+  .work-shenqingdan:before {
+    content: "\e686";
+  }
+  
+  .work-gongdan:before {
+    content: "\e687";
+  }
+  
+  .work-yewuyuanfuwushenqingdan:before {
+    content: "\e688";
+  }
+  
+  .work-shenqingdanguanli:before {
+    content: "\e689";
+  }
+  
+  .work-jujianfeijiesuan:before {
+    content: "\e684";
+  }
+  
+  .work-dakuanpingzheng:before {
+    content: "\e685";
+  }
+  
+  .work-yingxiaogongju:before {
+    content: "\e683";
+  }
+  
+  .work-a-shangxueyuanxuexi:before {
+    content: "\e63d";
+  }
+  
+  .work-a-tibaoguanlitibao:before {
+    content: "\e63f";
+  }
+  
+  .work-xiaochengxu_xiaoshouyuce:before {
+    content: "\e68e";
+  }
+  
+  .work-gouwuche:before {
+    content: "\e682";
+  }
+  
+  .work-a-woderenwuzhongxin:before {
+    content: "\e649";
+  }
+  
+  .work-a-wodemendianxinxidizhi:before {
+    content: "\e64b";
+  }
+  
+  .work-xiaochengxutongxunlu:before {
+    content: "\e68c";
+  }
+  
+  .work-xiaoshouxiansuo:before {
+    content: "\e680";
+  }
+  
+  .work-xiaochengxu_xiaoshoumubiao:before {
+    content: "\e68d";
+  }
+  
+  .work-tianjialianxiren:before {
+    content: "\e690";
+  }
+  
+  .work-a-shouyejingangqushangxueyuan:before {
+    content: "\e60d";
+  }
+  
+  .work-a-shouyejingangquhehuoren:before {
+    content: "\e60e";
+  }
+  
+  .work-a-shouyejingangqutongxunlu:before {
+    content: "\e610";
+  }
+  
+  .work-a-shouyejingangqutonggao:before {
+    content: "\e613";
+  }
+  
+  .work-a-shouyejingangqutuiguangsucai:before {
+    content: "\e614";
+  }
+  
+  .work-a-shouyejingangquxiaoshouxiansuo:before {
+    content: "\e616";
+  }
+  
+  .work-a-shouyejingangqutibao:before {
+    content: "\e617";
+  }
+  
+  .work-a-shouyejingangquyingxiaowuliao:before {
+    content: "\e618";
+  }
+  
+  .work-webshangxueyuan:before {
+    content: "\e665";
+  }
+  
+  .work-webtonggaoguanli:before {
+    content: "\e666";
+  }
+  
+  .work-webtibaoguanli:before {
+    content: "\e667";
+  }
+  
+  .work-webyingxiaowuliao:before {
+    content: "\e668";
+  }
+  
+  .work-kehu:before {
+    content: "\e6ba";
+  }
+  
+  .work-hetong:before {
+    content: "\e6bb";
+  }
+  
+  .work-xiangmubaojia:before {
+    content: "\e6bc";
+  }
+  
+  .work-gonghaikehu:before {
+    content: "\e6bd";
+  }
+  
+  .work-xiangmushangji:before {
+    content: "\e6be";
+  }
+  
+  .work-jingzhengduishou:before {
+    content: "\e6c4";
+  }
+  
+  .work-shichanghuodong:before {
+    content: "\e6c5";
+  }
+  
+  .work-gonghaixiansuo:before {
+    content: "\e6c6";
+  }
+  
+  .work-zuijinshiyong:before {
+    content: "\e6df";
+  }
+  
+  .work-tongyong:before {
+    content: "\e6e0";
+  }
+  
+  .work-E-dingdan:before {
+    content: "\e6e1";
+  }
+  
+  .work-CRM:before {
+    content: "\e6e2";
+  }
+  
+  .work-E-fuwu:before {
+    content: "\e6e3";
+  }
+  
+  .work-a-biaoqianlanshouyexuanzhong:before {
+    content: "\e606";
+  }
+  
+  .work-shouhuo:before {
+    content: "\e677";
+  }
+  
+  .work-dingdan:before {
+    content: "\e678";
+  }
+  
+  .work-zhanghu:before {
+    content: "\e679";
+  }
+  
+  .work-kaipiao:before {
+    content: "\e67a";
+  }
+  
+  .work-tuifan:before {
+    content: "\e67b";
+  }
+  
+  .work-shangcheng:before {
+    content: "\e67c";
+  }
+  
+  .work-shujuchaxun:before {
+    content: "\e67d";
+  }
+  
+  .work-cuxiaohuodong:before {
+    content: "\e67e";
+  }
+  
+  .work-yejimubiao:before {
+    content: "\e67f";
+  }
+  
+  .work-gongjuchaxun:before {
+    content: "\e681";
+  }
+