codeMan il y a 3 ans
Parent
commit
4040fc00bb

+ 22 - 7
packageA/publicClue/detail.js

@@ -20,6 +20,9 @@ Page({
         tabbarList: [{
             icon: "icon-bianji",
             label: "编辑"
+        }, {
+            icon: "icon-zhuanyi",
+            label: "分配"
         }, {
             icon: "icon-dibu-tuihui",
             label: "撤回"
@@ -31,6 +34,9 @@ Page({
             label: "作废"
         }],
         oldtabbarList: [{
+            icon: "icon-bianji",
+            label: "编辑"
+        },{
             icon: "icon-dibu-tuihui",
             label: "撤回"
         }, {
@@ -159,12 +165,14 @@ Page({
                 }],
                 tabsList: this.data.tabsList,
             });
-            let arr = this.data.oldtabbarList
+            var arr = this.data.tabbarList
             if (res.data.status != '待跟进') {
-                arr = this.data.tabbarList.filter(item => {
+                arr = arr.filter(item => {
                     return item.label != '编辑' && item.label != '撤回'
                 })
-            };
+            }
+            
+
 
             /* 更新列表中状态 */
             let page = getCurrentPages().find(v => v.__route__ == 'packageA/publicClue/index');
@@ -243,6 +251,11 @@ Page({
                     url: `/packageA/publicClue/addClue?rowData=${JSON.stringify(this.data.detail)}`,
                 })
                 break;
+            case "分配":
+                wx.navigateTo({
+                url: `/packageA/publicClue/distribution?data=${JSON.stringify(this.data.detail)}`,
+                })
+                break;
             case "作废":
                 wx.showModal({
                     title: '提示',
@@ -261,12 +274,14 @@ Page({
                                 icon: "none"
                             });
                             setTimeout(() => {
-                                let pages = getCurrentPages(),
-                                    page = pages[pages.length - 2];
-                                if (page.getList) page.setData({
-                                    list: page.data.list.filter(v => v.sat_orderclueid != that.data.detail.sat_orderclueid)
+                                wx.navigateBack()
+                                getCurrentPages().forEach(v => {
+                                    if (v.__route__=="packageA/publicClue/index") {
+                                        v.getList(true)
+                                    }
                                 })
                             }, 300)
+                            
                         })
                     }
                 })

+ 8 - 4
packageA/publicClue/distribution.js

@@ -74,13 +74,17 @@ Page({
                     });
                     if (res.msg != '成功') return;
                     wx.navigateBack()
-
                     getCurrentPages().forEach(v => {
-                        console.log(v.__route__);
                         if(v.__route__=="packageA/publicClue/index") {
-                            console.log('触发路由');
                             v.getList(true)
-                        }
+                        } else if(v.__route__=="packageA/publicClue/detail") {
+                            wx.navigateBack()
+                            getCurrentPages().forEach(v => {
+                                if(v.__route__=="packageA/publicClue/index") {
+                                    v.getList(true)
+                                }
+                            })
+                        } 
                     })
                 })
             }

+ 2 - 2
packageA/publicClue/modules/list/list.wxml

@@ -2,7 +2,7 @@
 <navigator class="offer-list" url="/packageA/publicClue/detail?sat_orderclueid={{item.sat_orderclueid}}" wx:for="{{list}}" wx:key="item.sat_orderclueid">
     <view class="title">
         <text class="line-1">{{item.enterprisename_customer}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{item.status}}</view>
+        <view class="status" style="background-color: {{backColor.getColor(item.allocationstatus)}};">{{item.allocationstatus}}</view>
     </view>
     <view class="exp line-1">省市县:{{item.province?item.province+item.city+item.county:"暂无"}}</view>
     <view class="exp line-1">联系人:<text>{{item.name}}</text></view>
@@ -10,7 +10,7 @@
     <view class="exp line-1">来源:<text>{{item.cluesource ? item.cluesource : '--'}}</text></view>
     <view class="exp line-1">线索类型:<text>{{item.cluetype ? item.cluetype : '--'}}</text></view>
     
-    <view wx:if="{{item.status=='待分配'}}" class="action" catchtap="distribution" data-item="{{item}}">
+    <view wx:if="{{item.allocationstatus=='待分配'}}" class="action" catchtap="distribution" data-item="{{item}}">
         <navigator url="#" class="distribution">分配</navigator>
     </view>
 </navigator>