Explorar o código

销售漏斗添加筛选项

xiaohaizhao hai 1 ano
pai
achega
997f5062c0
Modificáronse 1 ficheiros con 21 adicións e 3 borrados
  1. 21 3
      packageA/salesHourglass/index.js

+ 21 - 3
packageA/salesHourglass/index.js

@@ -53,10 +53,25 @@ Page({
                 begdate: "",
                 enddate: "",
                 tradefield: "",
-                isleave: 0
+                isleave: 0,
+                unfinish: 0
             }
         },
         filtratelist: [{
+            label: "是否包含失败、结案项目",
+            showName: "name", //显示字段
+            valueKey: "unfinish", //返回Key
+            selectKey: "value",
+            index: 0,
+            default: 0,
+            list: [{
+                name: "包含",
+                value: 0
+            }, {
+                name: "不包含",
+                value: 1
+            }]
+        }, {
             label: "时间筛选",
             showName: "name", //显示字段
             valueKey: "dateType", //返回Key
@@ -99,7 +114,7 @@ Page({
             console.log("获取领域", res)
             let filtratelist = this.data.filtratelist
             if (res.msg == '成功') {
-                filtratelist.splice(filtratelist.length - 1, 0, {
+                filtratelist.splice(filtratelist.length - 2, 0, {
                     label: "领域",
                     index: null,
                     showName: "tradefield", //显示字段
@@ -134,13 +149,15 @@ Page({
     handleFilter({
         detail
     }) {
+        console.log(detail)
         if (detail.name == 'reset') {
-            this.selectComponent("#organization").initDepAndUser()
+            // this.selectComponent("#organization").initDepAndUser()
             this.setData({
                 'content.dataid': wx.getStorageSync('userMsg').userid,
                 'content.type': 0,
                 'content.where.isleave': 0,
                 'content.where.tradefield': "",
+                'content.where.unfinish': 0,
             })
         } else {
             let active = this.selectComponent("#organization").data.result;
@@ -151,6 +168,7 @@ Page({
                 'content.type': type,
                 'content.where.tradefield': detail.tradefield,
                 'content.where.isleave': active.isleave || 0,
+                'content.where.unfinish': detail.unfinish || 0,
             })
         }
         if (detail.startdate && detail.enddate) {