浏览代码

移除转化功能无需考虑是否已转化状态

xiaohaizhao 2 年之前
父节点
当前提交
3a2738188c
共有 1 个文件被更改,包括 8 次插入16 次删除
  1. 8 16
      packageA/saleClue/detail.js

+ 8 - 16
packageA/saleClue/detail.js

@@ -269,7 +269,6 @@ Page({
             icon: "icon-dibu-zhuanhuan",
             label: "转化客户"
         }]);
-        if (this.data.detail.projectname1) tabbarList = tabbarList.filter(v => v.label != '转化项目')
         if (editdataleader) tabbarList.push({
             icon: "icon-zhuanyi",
             label: "更换负责人"
@@ -284,21 +283,14 @@ Page({
                 label: "退回"
             })
         }
-        if (res.data.status == '已转化') {
-            tabbarList = tabbarList.filter(item => {
-                return item.label == '编辑' || item.label == '跟进' || item.label == '转化客户' || item.label == '转化项目'
-            })
-            if (res.data.isproject == 1) {
-                let i = tabbarList.findIndex(item => item.label == '转化项目')
-                tabbarList.splice(i, 1)
-                console.log('触发项目');
-            }
-            if (res.data.iscustomer == 1) {
-                let i = tabbarList.findIndex(item => item.label == '转化客户')
-                tabbarList.splice(i, 1)
-                console.log('触发客户');
-            }
-        }
+
+        if (res.data.status == '已转化') tabbarList = tabbarList.filter(item => {
+            return item.label == '编辑' || item.label == '跟进' || item.label == '转化客户' || item.label == '转化项目'
+        })
+        
+        if (this.data.detail.isproject) tabbarList = tabbarList.filter(v => v.label != '转化项目')
+        if (this.data.detail.iscustomer) tabbarList = tabbarList.filter(v => v.label != '转化客户')
+
         if (res.data.status != '待跟进' && res.data.status != '跟进中' && res.data.status != '已转化') tabbarList = [];
         tabbarList.push({
             icon: "icon-dibu-jieshu",