ソースを参照

应用数据团队、数据标签、数据跟进根据后台配置进行加载

xiaohaizhao 1 年間 前
コミット
2eaed3ce0e

+ 9 - 5
packageA/activity/detail.js

@@ -20,11 +20,13 @@ Page({
             label: "操作",
             icon: "icon-tabcaozuojilu1",
             model: "#Record"
-        }, {
+        }]
+        console.log("appAuth", appAuth)
+        if (appAuth.isdatafollowup) tabsList.push({
             label: "跟进动态",
             icon: "icon-tabgenjinjilu",
             model: "#Trace"
-        }]
+        })
         if (appAuth.istask) tabsList.push({
             label: "任务",
             icon: "icon-tabrenwu",
@@ -34,7 +36,8 @@ Page({
             sat_campaignid: options.id,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
             options: appAuth.options, //权限列表
-            tabsList
+            tabsList,
+            appAuth
         });
         this.getDetail();
     },
@@ -123,8 +126,9 @@ Page({
                     value: res.data.leader[0].leadernum
                 }]
             });
-            this.getTags();
-            this.getGroup();
+            let appAuth = this.data.appAuth;
+            if (appAuth.isdatatag) this.getTags();
+            if (appAuth.isdatateam) this.getGroup();
             this.partialRenewal(true);
             let isLeader = res.data.leader[0].userid == wx.getStorageSync('userMsg').userid;
             if (isLeader) {

+ 6 - 3
packageA/activity/detail.wxml

@@ -1,13 +1,16 @@
-<import src="detail.skeleton.wxml"/>
+<import src="detail.skeleton.wxml" />
 <template is="skeleton" wx:if="{{loading}}" />
 
 <view class="header">
     <view class="title">{{detail.name}}</view>
-    <Yl-tags id="Tags" add ownertable='sat_campaign' ownerid='{{sat_campaignid}}' />
+    <Yl-tags wx:if="{{appAuth.isdatatag}}" id="Tags" add ownertable='sat_campaign' ownerid='{{sat_campaignid}}' />
 </view>
+
+
+
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
-    <Yl-group slot='bottom' id='Group' add ownertable='sat_campaign' ownerid='{{sat_campaignid}}' />
+    <Yl-group wx:if="{{appAuth.isdatateam}}" slot='bottom' id='Group' add ownertable='sat_campaign' ownerid='{{sat_campaignid}}' />
 </Yl_Detail>
 <view style="height: 20rpx;" />
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">

+ 14 - 23
packageA/contract/detail.js

@@ -21,11 +21,12 @@ Page({
     },
     onLoad(options) {
         const appAuth = wx.getStorageSync('auth').wcontract;
+        console.log("appAuth", appAuth)
         this.setData({
             sa_contractid: options.id,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
             options: appAuth.options, //权限列表
-            istask: appAuth.istask
+            appAuth
         })
         this.getDetail(true);
     },
@@ -45,8 +46,8 @@ Page({
             let data = res.data,
                 tabsList = this.data.tabsList,
                 tabsActive = 0;
-            this.getTags();
-            this.getGroup();
+            if (this.data.appAuth.isdatatag) this.getTags();
+            if (this.data.appAuth.isdatateam) this.getGroup();
             this.setTabbar(data.status, res.data.leader.some(some => some.userid == wx.getStorageSync('userMsg').userid));
             switch (data.type) {
                 case "框架":
@@ -63,10 +64,6 @@ Page({
                         label: "业绩目标",
                         icon: "icon-tabrenwu",
                         model: '#Objective'
-                    }, {
-                        label: "跟进动态",
-                        icon: "icon-tabgenjindongtai1",
-                        model: '#Trace'
                     }]);
                     tabsActive = 1;
                     break;
@@ -84,10 +81,6 @@ Page({
                         label: "业绩目标",
                         icon: "icon-tabrenwu",
                         model: '#Objective'
-                    }, {
-                        label: "跟进动态",
-                        icon: "icon-tabgenjindongtai1",
-                        model: '#Trace'
                     }]);
                     tabsActive = 1;
                     break;
@@ -97,10 +90,6 @@ Page({
                         label: "工具清单",
                         icon: "icon-tabgongjuqingdan",
                         model: '#Product'
-                    }, {
-                        label: "跟进动态",
-                        icon: "icon-tabgenjindongtai1",
-                        model: '#Trace'
                     }])
                     tabsActive = 1;
                     break;
@@ -117,14 +106,15 @@ Page({
                         label: "产品类别折扣",
                         icon: "icon-tabchanpinleibie",
                         model: '#PiscountType'
-                    }, {
-                        label: "跟进动态",
-                        icon: "icon-tabgenjindongtai1"
                     }]);
                     tabsActive = 1;
                     break;
             };
-            if (this.data.istask) tabsList.push({
+            if (this.data.appAuth.isdatafollowup) tabsList.push({
+                label: "跟进动态",
+                icon: "icon-tabgenjindongtai1"
+            })
+            if (this.data.appAuth.istask) tabsList.push({
                 label: "任务",
                 icon: "icon-tabrenwu",
                 model: "#Work"
@@ -182,10 +172,11 @@ Page({
         let isLeader = Leader,
             isAdmin = this.data.isAdmin,
             editdataleader = true,
-            tabbarList = [{
-                icon: "icon-genjin",
-                label: "跟进"
-            }];
+            tabbarList = [];
+        if (this.data.appAuth.isdatafollowup) tabbarList.push({
+            icon: "icon-genjin",
+            label: "跟进"
+        })
         if (!isLeader) {
             let s = await getApp().agentOrNot("sa_contract", this.data.sa_contractid);
             isLeader = s.data.editable == 1;

+ 2 - 2
packageA/contract/detail.wxml

@@ -2,11 +2,11 @@
 <template is="skeleton" wx:if="{{loading}}" />
 <view class="header">
     <view class="title">{{detail.title}}</view>
-    <Yl-tags id="Tags" add ownertable='sa_contract' ownerid='{{sa_contractid}}' />
+    <Yl-tags wx:if="{{appAuth.isdatatag}}" id="Tags" add ownertable='sa_contract' ownerid='{{sa_contractid}}' />
 </view>
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
-    <Yl-group slot='bottom' id='Group' add ownertable='sa_contract' ownerid='{{sa_contractid}}' />
+    <Yl-group wx:if="{{appAuth.isdatateam}}" slot='bottom' id='Group' add ownertable='sa_contract' ownerid='{{sa_contractid}}' />
 </Yl_Detail>
 <view style="height: 20rpx;" />
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">

+ 16 - 12
packageA/offers/detail.js

@@ -14,6 +14,7 @@ Page({
     },
     onLoad(options) {
         const appAuth = wx.getStorageSync('auth').woffer;
+        console.log("appAuth", appAuth)
         let tabsList = [{
             label: "详细信息",
             icon: "icon-tabxiangxixinxi1"
@@ -33,10 +34,6 @@ Page({
             label: "历史报价",
             icon: "icon-tabbaojiadan",
             model: "#History"
-        }, {
-            label: "跟进动态",
-            icon: "icon-tabgenjinjilu",
-            model: "#Trace"
         }, {
             label: "操作记录",
             icon: "icon-tabcaozuojilu1",
@@ -46,6 +43,11 @@ Page({
             icon: "icon-tabfujian1",
             model: "#Files"
         }];
+        if (appAuth.isdatafollowup) tabsList.splice(5, 0, {
+            label: "跟进动态",
+            icon: "icon-tabgenjinjilu",
+            model: "#Trace"
+        })
         if (appAuth.istask) tabsList.push({
             label: "任务",
             icon: "icon-tabrenwu",
@@ -55,7 +57,8 @@ Page({
             sa_quotedpriceid: options.sa_quotedpriceid,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
             options: appAuth.options, //权限列表
-            tabsList
+            tabsList,
+            appAuth
         })
         this.getDetail(true);
     },
@@ -74,11 +77,11 @@ Page({
                 icon: "none"
             });
             this.setPreview(res);
-            this.setTabbar(res.data.status, res.data.leader.length ? res.data.leader[0].userid == wx.getStorageSync('userMsg').userid : false);
             this.setData({
                 loading: false,
                 detail: res.data,
             })
+            this.setTabbar(res.data.status, res.data.leader.length ? res.data.leader[0].userid == wx.getStorageSync('userMsg').userid : false);
             /* 更新列表数据 */
             let page = getCurrentPages().find(v => v.__route__ == 'packageA/offers/index');
             if (page) {
@@ -87,8 +90,8 @@ Page({
                     [`list[${i}].status`]: res.data.status
                 })
             }
-            this.getTags();
-            this.getGroup();
+            if (this.data.appAuth.isdatatag) this.getTags();
+            if (this.data.appAuth.isdatateam) this.getGroup();
             this.partialRenewal();
         })
     },
@@ -217,10 +220,11 @@ Page({
         let isLeader = Leader,
             isAdmin = this.data.isAdmin,
             editdataleader = true,
-            tabbarList = [{
-                icon: "icon-genjin",
-                label: "跟进"
-            }];
+            tabbarList = [];
+        if (this.data.appAuth.isdatafollowup) tabbarList.push({
+            icon: "icon-genjin",
+            label: "跟进"
+        })
         if (!isLeader) {
             let s = await getApp().agentOrNot("sa_quotedprice", this.data.sa_quotedpriceid);
             isLeader = s.data.editable == 1;

+ 2 - 2
packageA/offers/detail.wxml

@@ -3,11 +3,11 @@
 
 <view class="header">
     <view class="title">单号:{{detail.billno}}</view>
-    <Yl-tags id="Tags" add ownertable='sa_quotedprice' ownerid='{{sa_quotedpriceid}}' />
+    <Yl-tags wx:if="{{appAuth.isdatatag}}" id="Tags" add ownertable='sa_quotedprice' ownerid='{{sa_quotedpriceid}}' />
 </view>
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
-    <Yl-group slot='bottom' id='Group' add ownertable='sa_quotedprice' ownerid='{{sa_quotedpriceid}}' />
+    <Yl-group wx:if="{{appAuth.isdatateam}}" slot='bottom' id='Group' add ownertable='sa_quotedprice' ownerid='{{sa_quotedpriceid}}' />
 </Yl_Detail>
 <view style="height: 20rpx;" />
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">

+ 13 - 5
packageA/opponent/detail.js

@@ -11,6 +11,7 @@ Page({
     },
     onLoad(options) {
         const appAuth = wx.getStorageSync('auth').wPublicCustomer;
+        console.log("appAuth", appAuth)
         let tabsList = [{
             label: "详细信息",
             icon: "icon-tabxiangxixinxi1"
@@ -23,9 +24,6 @@ Page({
         }, {
             label: "联系人",
             icon: "icon-tablianxiren"
-        }, {
-            label: "跟进动态",
-            icon: "icon-tabgenjinjilu"
         }, {
             label: "操作记录",
             icon: "icon-tabcaozuojilu1"
@@ -33,6 +31,10 @@ Page({
             label: "附件",
             icon: "icon-tabfujian1"
         }];
+        if (appAuth.isdatafollowup) tabsList.splice(4, 0, {
+            label: "跟进动态",
+            icon: "icon-tabgenjinjilu"
+        })
         if (appAuth.istask) tabsList.push({
             label: "任务",
             icon: "icon-tabrenwu",
@@ -41,7 +43,8 @@ Page({
         this.setData({
             sa_competitorid: options.id,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
-            tabsList
+            tabsList,
+            appAuth
         })
         this.getDetail();
     },
@@ -183,7 +186,8 @@ Page({
                 tabbarList
             });
             //获取标签
-            this.getTags();
+            if (this.data.appAuth.isdatatag) this.getTags();
+            if (this.data.appAuth.isdatateam) this.getGroup();
             this.partialRenewal();
         });
     },
@@ -250,6 +254,10 @@ Page({
     getTags() {
         this.selectComponent("#Tags").getTags();
     },
+    //更新团队成员
+    getGroup() {
+        this.selectComponent("#Group").getList();
+    },
     onReachBottom() {
         this.partialRenewal();
     },

+ 4 - 2
packageA/opponent/detail.wxml

@@ -4,7 +4,7 @@
         <view class="portrait {{detail.enterprisename <=2?'min-portrait':''}}">{{handle.getName(detail.enterprisename)}}</view>
         <view class="mian">
             <view class="label line-1">{{detail.enterprisename}}</view>
-            <view class="tag-box">
+            <view class="tag-box" wx:if="{{appAuth.isdatatag}}">
                 <Yl-tags id="Tags" add ownertable='sa_competitor' bind:onGetList='onGetList' ownerid='{{detail.sa_competitorid}}' />
             </view>
         </view>
@@ -14,7 +14,9 @@
     </view>
 </view>
 <!-- 简介 -->
-<Yl_Detail list="{{briefs}}" />
+<Yl_Detail list="{{briefs}}">
+    <Yl-group wx:if="{{appAuth.isdatateam}}" slot='bottom' id='Group' add ownertable='sa_competitor' ownerid='{{detail.sa_competitorid}}' />
+</Yl_Detail>
 <view style="height: 20rpx;" />
 <!-- 功能 -->
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">

+ 12 - 8
packageA/project/detail.js

@@ -19,6 +19,7 @@ Page({
 
     onLoad(options) {
         const appAuth = wx.getStorageSync('auth').wproject;
+        console.log("appAuth", appAuth)
         let tabsList = [{
             label: "详细信息",
             icon: "icon-tabxiangxixinxi1"
@@ -72,11 +73,12 @@ Page({
             label: "操作记录",
             icon: "icon-tabcaozuojilu1",
             model: "#Record"
-        }, {
+        }])
+        if (appAuth.isdatafollowup) tabsList.push({
             label: "跟进动态",
             icon: "icon-tabgenjinjilu",
             model: "#Trace"
-        }])
+        })
         this.setData({
             sa_projectid: options.id,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
@@ -105,8 +107,8 @@ Page({
                 detail: res.data,
             })
             if (init) {
-                this.getTags();
-                this.getGroup();
+                if (this.data.appAuth.isdatatag) this.getTags();
+                if (this.data.appAuth.isdatateam) this.getGroup();
                 this.selectComponent("#TaskTabs").getList();
             }
             this.partialRenewal(init);
@@ -250,10 +252,12 @@ Page({
         let isLeader = Leader,
             isAdmin = this.data.isAdmin,
             editdataleader = true,
-            tabbarList = [{
-                icon: "icon-genjin",
-                label: "跟进"
-            }];
+            tabbarList = [];
+
+        if (this.data.appAuth.isdatafollowup) tabbarList.push({
+            icon: "icon-genjin",
+            label: "跟进"
+        });
         if (wx.getStorageSync('auth').wproject.options.some(v => v == "auditauthorization")) tabbarList.unshift({
             icon: "icon-shenheshouquan",
             label: "审核授权"

+ 2 - 2
packageA/project/detail.wxml

@@ -3,12 +3,12 @@
 
 <view class="header">
     <view class="title">{{detail.projectname}}</view>
-    <Yl-tags id="Tags" add='{{disabled}}' ownertable='sa_project' ownerid='{{sa_projectid}}' bindonGetList='onGetList' />
+    <Yl-tags wx:if="{{appAuth.isdatatag}}" id="Tags" add='{{disabled}}' ownertable='sa_project' ownerid='{{sa_projectid}}' bindonGetList='onGetList' />
 </view>
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
     <view slot='bottom'>
-        <Yl-group id='Group' add='{{disabled}}' ownertable='sa_project' ownerid='{{sa_projectid}}' />
+        <Yl-group wx:if="{{appAuth.isdatateam}}" id='Group' add='{{disabled}}' ownertable='sa_project' ownerid='{{sa_projectid}}' />
         <TaskTabs id='TaskTabs' disabled='{{(isAdmin||isLeader) && disabled}}' sa_projectid='{{sa_projectid}}' sa_projstagetempid='{{detail.sa_projstagetempid}}' bindchangeCallBack="taskTabsChange" />
     </view>
 </Yl_Detail>

+ 12 - 6
packageA/publicClue/detail.js

@@ -22,10 +22,12 @@ Page({
         }, {
             label: "操作",
             icon: "icon-tabcaozuojilu1"
-        }, {
+        }]
+        console.log("appAuth", appAuth)
+        if (appAuth.isdatafollowup) tabsList.push({
             label: "跟进动态",
             icon: "icon-tabgenjinjilu"
-        }]
+        })
         if (appAuth.istask) tabsList.push({
             label: "任务",
             icon: "icon-tabrenwu",
@@ -38,7 +40,8 @@ Page({
         this.setData({
             sat_orderclueid: options.sat_orderclueid || options.id,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
-            tabsList
+            tabsList,
+            appAuth
         });
         this.getDetail();
     },
@@ -212,7 +215,8 @@ Page({
                 })
             }
             this.setTabbarList(res.data.status)
-            this.getTags();
+            if (this.data.appAuth.isdatatag) this.getTags();
+            if (this.data.appAuth.isdatateam) this.getGroup();
             this.partialRenewal();
         })
     },
@@ -258,10 +262,12 @@ Page({
             tabsActive: detail
         });
         this.partialRenewal();
-    },
-    //更新标签
+    }, //更新标签
     getTags() {
         this.selectComponent("#Tags").getTags();
+    }, //更新团队成员
+    getGroup() {
+        this.selectComponent("#Group").getList();
     },
     //局部数据更新 tabs
     partialRenewal(init = false) {

+ 4 - 2
packageA/publicClue/detail.wxml

@@ -1,9 +1,11 @@
 <view class="header">
     <view class="title">{{detail.enterprisename_customer}}</view>
-    <Yl-tags id="Tags" add ownertable='sat_orderclue' ownerid='{{detail.sat_orderclueid}}' />
+    <Yl-tags wx:if="{{appAuth.isdatatag}}" id="Tags" add ownertable='sat_orderclue' ownerid='{{detail.sat_orderclueid}}' />
 </view>
 <!-- 简介 -->
-<Yl_Detail list="{{briefs}}" />
+<Yl_Detail list="{{briefs}}">
+    <Yl-group wx:if="{{appAuth.isdatateam}}" slot='bottom' id='Group' add ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' />
+</Yl_Detail>
 <view style="height: 20rpx;" />
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
     <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />

+ 14 - 6
packageA/publicCustomer/detail.js

@@ -11,13 +11,10 @@ Page({
     },
     onLoad(options) {
         const appAuth = wx.getStorageSync('auth').wPublicCustomer;
+        console.log("appAuth", appAuth)
         let tabsList = [{
             label: "详细信息",
             icon: "icon-tabxiangxixinxi1"
-        }, {
-            label: "跟进动态",
-            icon: "icon-tabgenjinjilu",
-            model: "#Trace"
         }, {
             label: "关联线索",
             icon: "icon-tabxiansuo",
@@ -55,6 +52,11 @@ Page({
             icon: "icon-tabbaojiadan",
             model: "#Financing"
         }];
+        if (appAuth.isdatafollowup) tabsList.splice(1, 0, {
+            label: "跟进动态",
+            icon: "icon-tabgenjinjilu",
+            model: "#Trace"
+        })
         if (appAuth.istask) tabsList.push({
             label: "任务",
             icon: "icon-tabrenwu",
@@ -73,7 +75,8 @@ Page({
             sa_customersid: options.id,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
             options: appAuth.options, //权限列表
-            tabsList
+            tabsList,
+            appAuth
         })
         this.getDetail();
     },
@@ -268,7 +271,8 @@ Page({
             })
             this.setPreview(res);
             //获取标签
-            this.getTags();
+            if (this.data.appAuth.isdatatag) this.getTags();
+            if (this.data.appAuth.isdatateam) this.getGroup();
             this.partialRenewal();
         });
     },
@@ -431,6 +435,10 @@ Page({
     getTags() {
         this.selectComponent("#Tags").getTags();
     },
+    //更新团队成员
+    getGroup() {
+        this.selectComponent("#Group").getList();
+    },
     onReachBottom() {
         this.partialRenewal();
     }

+ 5 - 2
packageA/publicCustomer/detail.wxml

@@ -4,7 +4,7 @@
         <view class="portrait {{detail.enterprisename <=2?'min-portrait':''}}">{{handle.getName(detail.enterprisename)}}</view>
         <view class="mian">
             <view class="label line-1">{{detail.enterprisename}}</view>
-            <view class="tag-box">
+            <view class="tag-box" wx:if="{{appAuth.isdatatag}}">
                 <Yl-tags id="Tags" add ownertable='sa_customers' bind:onGetList='onGetList' ownerid='{{detail.sa_customersid}}' />
             </view>
         </view>
@@ -14,7 +14,10 @@
     </view>
 </view>
 <!-- 简介 -->
-<Yl_Detail list="{{briefs}}" />
+<Yl_Detail list="{{briefs}}">
+    <!-- 团队管理 -->
+    <Yl-group wx:if="{{appAuth.isdatateam}}" id='Group' slot='bottom' add ownertable='sa_customers' ownerid='{{sa_customersid}}' />
+</Yl_Detail>
 <view style="height: 20rpx;" />
 <!-- 功能 -->
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">

+ 31 - 33
packageA/saleClue/detail.js

@@ -20,6 +20,7 @@ Page({
     },
     onLoad(options) {
         const appAuth = wx.getStorageSync('auth').worderclue;
+        console.log("appAuth", appAuth)
         let tabsList = [{
             label: "详细信息",
             icon: "icon-tabxiangxixinxi1"
@@ -36,11 +37,11 @@ Page({
             icon: "icon-tabcaozuojilu1",
             model: "#Record"
         }];
-        /* , {
+        if (appAuth.isdatafollowup) tabsList.push({
             label: "跟进动态",
             icon: "icon-tabgenjinjilu",
             model: "#Trace"
-        } */
+        })
         if (appAuth.istask) tabsList.push({
             label: "任务",
             icon: "icon-tabrenwu",
@@ -53,7 +54,8 @@ Page({
         this.setData({
             sat_orderclueid: options.sat_orderclueid || options.id,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
-            tabsList
+            tabsList,
+            appAuth
         });
         this.getDetail();
     },
@@ -152,34 +154,30 @@ Page({
                 loading: false,
                 detail: res.data,
                 briefs: [{
-                        label: "联系人",
-                        value: res.data.name
-                    }, {
-                        label: "手机号",
-                        value: res.data.phonenumber
-                    }, {
-                        label: "市场活动",
-                        value: res.data.campaign_name
-                    }, {
-                        label: "领域",
-                        value: res.data.tradefield
-                    }, {
-                        label: '负责人',
-                        value: res.data.leader && res.data.leader.length > 0 ? res.data.leader[0].name : ''
-                    },
-                    {
-                        label: '分配状态',
-                        value: res.data.allocationstatus
-                    },
-                    {
-                        label: '跟进状态',
-                        value: res.data.status
-                    },
-                    {
-                        label: '跟进次数',
-                        value: res.data.followcount || '0'
-                    },
-                ],
+                    label: "联系人",
+                    value: res.data.name
+                }, {
+                    label: "手机号",
+                    value: res.data.phonenumber
+                }, {
+                    label: "市场活动",
+                    value: res.data.campaign_name
+                }, {
+                    label: "领域",
+                    value: res.data.tradefield
+                }, {
+                    label: '负责人',
+                    value: res.data.leader && res.data.leader.length > 0 ? res.data.leader[0].name : ''
+                }, {
+                    label: '分配状态',
+                    value: res.data.allocationstatus
+                }, {
+                    label: '跟进状态',
+                    value: res.data.status
+                }, {
+                    label: '跟进次数',
+                    value: res.data.followcount || '0'
+                }],
                 list1,
                 list2: [{
                     label: "创建人",
@@ -228,8 +226,8 @@ Page({
                     [`list[${index}].status`]: res.data.status
                 })
             }
-            this.getTags();
-            this.getGroup();
+            if (this.data.appAuth.isdatatag) this.getTags();
+            if (this.data.appAuth.isdatateam) this.getGroup();
             this.partialRenewal();
             if (res.data.leader.some(some => some.userid == wx.getStorageSync('userMsg').userid)) {
                 this.setTabbarList(true, res)

+ 3 - 3
packageA/saleClue/detail.wxml

@@ -2,11 +2,11 @@
 <template is="skeleton" wx:if="{{loading}}" />
 <view class="header">
     <view class="title">{{detail.enterprisename_customer||'--'}}</view>
-    <Yl-tags id="Tags" add ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' />
+    <Yl-tags wx:if="{{appAuth.isdatatag}}" id="Tags" add ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' />
 </view>
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
-    <Yl-group slot='bottom' id='Group' add ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' />
+    <Yl-group wx:if="{{appAuth.isdatateam}}" slot='bottom' id='Group' add ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' />
 </Yl_Detail>
 <view style="height: 20rpx;" />
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
@@ -15,7 +15,7 @@
     <Work slot='任务' id='Work' ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' disabled="{{isAdmin||isLeader}}" />
     <Clue slot='来源线索' id='Clue' />
     <Record slot='操作' id="Record" ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' />
-    <!-- <Trace slot='跟进动态' id='Trace' ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' /> -->
+    <Trace slot='跟进动态' id='Trace' ownertable='sat_orderclue' ownerid='{{sat_orderclueid}}' />
     <Files slot="附件" id="Files" ownertable="sat_orderclue" ownerid="{{detail.sat_orderclueid}}" />
     <view style="height: 140rpx;" />
 </Yl_FunTabs>

+ 15 - 12
packageA/setclient/detail.js

@@ -19,11 +19,8 @@ Page({
     },
     onLoad(options) {
         const appAuth = wx.getStorageSync('auth').wCustomer;
+        console.log("appAuth", appAuth)
         let tabsList = [{
-            label: "跟进动态",
-            icon: "icon-tabgenjinjilu",
-            model: "#Trace"
-        }, {
             label: "详细信息",
             icon: "icon-tabxiangxixinxi1"
         }, {
@@ -63,6 +60,11 @@ Page({
             icon: "icon-tabbaojiadan",
             model: "#Financing"
         }];
+        if (appAuth.isdatafollowup) tabsList.unshift({
+            label: "跟进动态",
+            icon: "icon-tabgenjinjilu",
+            model: "#Trace"
+        })
         if (appAuth.istask) tabsList.push({
             label: "任务",
             icon: "icon-tabrenwu",
@@ -81,7 +83,8 @@ Page({
             sa_customersid: options.id,
             isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
             options: appAuth.options, //权限列表
-            tabsList
+            tabsList,
+            appAuth
         })
         this.getDetail();
     },
@@ -339,8 +342,8 @@ Page({
                 detail: res.data,
             })
             //获取标签
-            this.getTags();
-            this.getGroup()
+            if (this.data.appAuth.isdatatag) this.getTags();
+            if (this.data.appAuth.isdatateam) this.getGroup()
             this.partialRenewal();
         });
     },
@@ -349,10 +352,11 @@ Page({
         let isAdmin = this.data.isAdmin,
             isLeader = Leader,
             editdataleader = true,
-            tabbarList = [{
-                icon: "icon-genjin",
-                label: "跟进"
-            }];
+            tabbarList = [];
+        if (this.data.appAuth.isdatafollowup) tabbarList.push({
+            icon: "icon-genjin",
+            label: "跟进"
+        });
         if (!isLeader) {
             let s = await getApp().agentOrNot("sa_customers", this.data.sa_customersid);
             isLeader = s.data.editable == 1;
@@ -376,7 +380,6 @@ Page({
                 icon: "icon-shanchu",
                 label: "作废"
             })
-
         }
         //来自公海
         if (res.data.ispublic == 1) {

+ 2 - 2
packageA/setclient/detail.wxml

@@ -7,7 +7,7 @@
         <view class="portrait {{detail.enterprisename <=2?'min-portrait':''}}">{{handle.getName(detail.enterprisename)}}</view>
         <view class="mian">
             <view class="label line-1">{{detail.enterprisename}}</view>
-            <view class="tag-box">
+            <view class="tag-box" wx:if="{{appAuth.isdatatag}}">
                 <Yl-tags id="Tags" add ownertable='sa_customers' bind:onGetList='onGetList' ownerid='{{sa_customersid}}' />
             </view>
         </view>
@@ -19,7 +19,7 @@
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
     <!-- 团队管理 -->
-    <Yl-group id='Group' slot='bottom' add ownertable='sa_customers' ownerid='{{sa_customersid}}' />
+    <Yl-group wx:if="{{appAuth.isdatateam}}" id='Group' slot='bottom' add ownertable='sa_customers' ownerid='{{sa_customersid}}' />
 </Yl_Detail>
 <view style="height: 20rpx;" />
 <!-- 功能 -->