فهرست منبع

销售线索权限来源修改

xiaohaizhao 2 سال پیش
والد
کامیت
64b8d198d8

+ 1 - 3
pages/threadedTree/details/index.js

@@ -91,12 +91,10 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad(options) {
-        let auth = [];
-        options.auth ? auth = options.auth.split(",") : getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['营销工具'], ['销售线索'])[0].apps[0].meta.auth.forEach(v => auth.push(v.optionname));
         this.setData({
             sat_orderclueid: options.id,
             tagColor: options.color,
-            auth
+            auth:wx.getStorageSync('authList').worderclue.optionnames
         })
         this.selectDetail();
         this.getFollowList();

+ 3 - 7
pages/threadedTree/index.js

@@ -21,13 +21,10 @@ Page({
         isReverse: false,
     },
     onLoad(options) {
-        let auth = [],
-            apps = options.auth ? JSON.parse(options.auth) : getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['营销工具'], ['销售线索'])[0].apps;
-        apps[0].meta.auth.forEach(v => auth.push(v.optionname))
+        this.getList()
         this.setData({
-            auth
+            isInsert: wx.getStorageSync('authList').worderclue.options.some(v => v == 'insert')
         })
-        this.getList()
     },
     /* 打开弹窗 */
     openSheet(e) {
@@ -135,6 +132,5 @@ Page({
                 scrollHeight: res
             })
         })
-    },
-    onShareAppMessage(res) { }
+    }
 })

+ 2 - 1
pages/threadedTree/index.json

@@ -4,6 +4,7 @@
         "Search": "./modules/search/search",
         "List": "./modules/list/list",
         "Insert": "./modules/insert/insert",
-        "Popup": "./modules/popup/index"
+        "Popup": "./modules/popup/index",
+        "Yl_FloatingButton":"/components/Yl_FloatingButton/index"
     }
 }

+ 3 - 7
pages/threadedTree/index.wxml

@@ -4,16 +4,14 @@
     <van-tab title="待跟进" />
     <van-tab title="跟进中" />
     <van-tab title="已成交" />
-    <!-- <van-tab title="已过期" /> -->
-    <!-- <van-tab title="丢单" /> -->
     <van-tab title="已无效" />
 </van-tabs>
 
 <!-- 浮动按钮 -->
-<Yl_FloatingButton wx:if="{{per.query(auth,'新增')}}" radius='32' bindtap="openSheet" />
+<Yl_FloatingButton wx:if="{{isInsert}}" radius='32' bindtap="openSheet" />
 
 <My_listBox id='ListBox' bindgetlist="getList" height='{{scrollHeight}}'>
-    <List list='{{list}}' tagColor='{{tagColor}}' auth="{{auth}}" />
+    <List list='{{list}}' tagColor='{{tagColor}}' />
     <My_empty wx:if="{{list.length==0}}" />
     <view style="height: 50px;" />
 </My_listBox>
@@ -21,6 +19,4 @@
 <!-- 抽屉 -->
 <Popup sheetTitle='{{sheetTitle}}'>
     <Insert wx:if="{{initInsert}}" type="{{sheetTitle}}" bind:endInsert='endInsert' />
-</Popup>
-
-<wxs src='../../utils/wxmlQueryPer.wxs' module="per" />
+</Popup>

+ 1 - 12
pages/threadedTree/modules/list/list.js

@@ -8,22 +8,11 @@ Component({
         tagColor: {
             type: String,
             value: "#FA8C16"
-        },
-        auth: Array
+        }
     },
     options: {
         addGlobalClass: true
     },
-    /**
-     * 组件的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 组件的方法列表
-     */
     methods: {
         callOut(e) {
             wx.makePhoneCall({

+ 1 - 2
pages/threadedTree/modules/list/list.wxml

@@ -1,4 +1,4 @@
-<navigator class="box" url="/pages/threadedTree/details/index?id={{item.sat_orderclueid}}&color={{tagColor!='#ffffff'?tagColor:''}}&auth={{auth}}" wx:for="{{list}}">
+<navigator class="box" url="/pages/threadedTree/details/index?id={{item.sat_orderclueid}}&color={{tagColor!='#ffffff'?tagColor:''}}" wx:for="{{list}}" wx:key="sat_orderclueid">
     <view class="title">
         <view class="line-1">{{item.name}}</view>
         <text wx:if="{{item.lognum}}">{{item.lognum}}次跟进</text>
@@ -11,5 +11,4 @@
         <text class="iconfont icon-bodadianhua" style="color: #52C41A; font-size: 24rpx;margin-right: 10rpx;" />手机号:{{item.phonenumber}}
     </view>
     <view class="r-t-state {{tagColor=='#ffffff'?'fff':''}}" style="background: {{tagColor}};">{{item.status}}</view>
-    <!-- <view class="r-b-state" wx:if="{{item.isMemberFollow==1}}">成员跟进</view> -->
 </navigator>