Bladeren bron

公海客户 销售线索 市场活动 bug修改

codeMan 3 jaren geleden
bovenliggende
commit
994621e63e

+ 18 - 4
packageA/activity/addActivity.js

@@ -26,14 +26,28 @@ Page({
             valueName: "name",
             checking: "base",
             required: true
-        }, {
+        },  {
             label: "负责人",
             error: false,
             errMsg: "",
-            type: "label",
+            type: "route",
+            url: "/packageA/select/contacts/select",
+            model: "#Form",
             value: "",
-            placeholder: "负责人",
-            valueName: "director",
+            radio: true,
+            params: {
+                "id": "20221022165503",
+                "version": 1,
+                "content": {
+                    "sys_enterpriseid": 2,
+                    "where": {
+                        "condition": "",
+                        "workaddress": 0
+                    }
+                }
+            },
+            placeholder: "选择客户联系人",
+            valueName: "contactsid",
             checking: "base",
             required: false
         }, {

+ 7 - 7
packageA/activity/detail.js

@@ -18,11 +18,11 @@ Page({
             num: 132
         }],
         tabbarList: [{
-            icon: "icon-dibu-chengjiao",
-            label: "发布"
-        }, {
             icon: "icon-bianji",
             label: "编辑"
+        },{
+            icon: "icon-dibu-chengjiao",
+            label: "发布"
         }, {
             icon: "icon-zhuanyi",
             label: "更换负责人"
@@ -31,11 +31,11 @@ Page({
             label: "结束"
         }, ],
         oldtabbarList: [{
-            icon: "icon-dibu-chengjiao",
-            label: "发布"
-        }, {
             icon: "icon-bianji",
             label: "编辑"
+        }, {
+            icon: "icon-dibu-chengjiao",
+            label: "发布"
         }, {
             icon: "icon-zhuanyi",
             label: "更换负责人"
@@ -135,7 +135,7 @@ Page({
             if (res.data.status == '结束') {
                 arr = []
             } else if (res.data.status == '发布') {
-                arr = this.data.tabbarList.filter(item => item.label != '编辑')
+                arr = this.data.tabbarList.filter(item => item.label != '编辑' && item.label != '更换负责人')
             }
             this.setData({
                 tabbarList: arr

+ 1 - 1
packageA/activity/detail.wxml

@@ -4,7 +4,7 @@
 </view>
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
-    <Yl-group slot='bottom' id='Group' add ownertable='sat_campaign' ownerid='{{detail.sat_campaignid}}' />
+    <!-- <Yl-group slot='bottom' id='Group' add ownertable='sat_campaign' ownerid='{{detail.sat_campaignid}}' /> -->
 </Yl_Detail>
 <view style="height: 20rpx;" />
 

+ 34 - 0
packageA/activity/index.js

@@ -7,6 +7,12 @@ Page({
      */
     data: {
         navList: [{
+            label: "全部",
+            icon: "icon-webxialaxuanxiangjiantou",
+            color: "",
+            width: "",
+            id: "1"
+        }, {
             label: "排序",
             icon: "icon-shengxu",
             color: "",
@@ -66,6 +72,7 @@ Page({
     onLoad(options) {
         this.getList();
         this.getTypeList()
+        this.getareaList()
     },
     /* 获取列表 */
     getList(init = false, data) {
@@ -126,6 +133,33 @@ Page({
             this.setListHeight();
         })
     },
+    /* 获取线索范围 */
+    getareaList () {
+        _Http.basic({
+            "classname": "sysmanage.develop.optiontype.optiontype",
+            "method": "optiontypeselect",
+            "content": {
+                "typename":'dataarea'
+            }
+        }).then(res => {
+            console.log("状态列表", res)
+            if (res.msg != '成功') return wx.showToast({
+                title: res.data,
+                icon: "none"
+            })
+            let classActions = res.data.map(item => {
+                return {
+                    name:item.value,
+                    index:item.remarks
+                }
+            })
+            this.setData({
+                classActions: classActions
+            });
+            console.log(this.data.classActions);
+            this.setListHeight();
+        })
+    },
     /* 处理搜索 */
     onSearch({
         detail

+ 3 - 3
packageA/activity/index.wxml

@@ -1,6 +1,6 @@
 <Yl_nav search list='{{navList}}' sort='{{content.sort}}' bind:onClick='navClick' bindonSearch="onSearch" />
 <!-- 显示类型 -->
-<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:select="classSelect" />
+<van-action-sheet show="{{ classShow }}" bind:click-overlay='classClose' actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:select="classSelect" />
 <view class="total">共{{content.total}}个</view>
 
 <My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
@@ -12,7 +12,7 @@
 <Yl_filtrate show="{{filter.show}}" bind:handle="handleFilter">
     <view class="groud">
         <view class="label">
-            报价单类型
+            活动类型
         </view>
         <view class="content">
             <van-button custom-class='but {{filter.typeActive==item?"active":""}}' wx:for="{{filter.type}}" wx:key="item" bindtap="typeStatus" data-item="{{item}}">{{item}}</van-button>
@@ -20,7 +20,7 @@
     </view>
     <view class="groud">
         <view class="label">
-            报价单状态
+            活动状态
         </view>
         <view class="content">
             <van-button custom-class='but {{filter.statusActive==item?"active":""}}' wx:for="{{filter.status}}" wx:key="item" bindtap="selectStatus" data-item="{{item}}">{{item}}</van-button>

+ 5 - 3
packageA/activity/modules/clue/clue.js

@@ -13,12 +13,14 @@ Component({
             "pageNumber": 1,
             pageTotal: 1,
             total: null,
-            cluetype:'',
+            where: {
+                cluetype:'业务员'
+            }
         },
         filter: {
             show: false,
             type: ['业务员', '经销商'], //状态项
-            typeActive: "",
+            typeActive: "业务员",
         }
     },
     methods: {
@@ -68,7 +70,7 @@ Component({
             content.sat_campaignid = id;
             if (init) content.pageNumber = 1
             if (data) {
-                content.cluetype = data.typeActive
+                content.where.cluetype = data.typeActive
             }
             _Http.basic({
                 "id": "20221102102602",

+ 6 - 0
packageA/publicClue/distribution.js

@@ -93,8 +93,14 @@ Page({
     //获取列表
     getList(init = false) {
         let params = this.data.params;
+        console.log(this.data.detail);
         if (init) params.content.pageNumber = 1;
         if (params.content.pageNumber > params.content.pageTotal) return;
+        if (this.data.detail.cluetype == '业务员') {
+            params.method = 'getMatchSalesList'
+        } else {
+            params.method = 'getMatchAgentList'
+        }
         _Http.basic(params).then(res => {
             console.log("联系人", res)
             if (res.msg != '成功') return wx.showToast({

+ 19 - 6
packageA/publicClue/index.js

@@ -20,7 +20,10 @@ Page({
             id: "sort"
         }],
         classShow: false,
-        classActions: [],
+        classActions: [{
+            name:'全部',
+            index:''
+        }],
         content: {
             "isExport":0,
             "nocache": true,
@@ -44,7 +47,7 @@ Page({
     },
     onLoad(options) {
         this.getList();
-        this.getTypeList()
+        // this.getTypeList()
     },
     /* 获取列表 */
     getList(init = false, data) {
@@ -197,10 +200,20 @@ Page({
         detail
     }) {
         if (this.data.content.type == detail.index) return this.classClose();
-        this.setData({
-            "content.where.status": detail.index,
-            'navList[0].label': detail.name
-        })
+        if (detail.index == '待分配') {
+            this.setData({
+                "content.where.allocationstatus": detail.index,
+                "content.where.status": '',
+                'navList[0].label': detail.name
+            })
+        } else {
+            this.setData({
+                "content.where.status": detail.index,
+                "content.where.allocationstatus":'',
+                'navList[0].label': detail.name
+            })
+        }
+        
         this.classClose();
         this.getList(true)
     },

+ 1 - 1
packageA/publicClue/index.wxml

@@ -1,6 +1,6 @@
 <Yl_nav search list='{{navList}}' sort='{{content.sort}}' bind:onClick='navClick' bindonSearch="onSearch" />
 <!-- 显示类型 -->
-<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:select="classSelect" />
+<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:click-overlay='classClose' bind:select="classSelect" />
 <view class="total">共{{content.total}}个</view>
 
 <My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>

+ 0 - 1
packageA/publicClue/modules/list/list.wxml

@@ -2,7 +2,6 @@
 <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.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>

+ 5 - 5
packageA/saleClue/detail.js

@@ -23,18 +23,18 @@ Page({
         }, {
             icon: "icon-bianji",
             label: "编辑"
-        }, {
-            icon: "icon-dibu-wuxiao",
-            label: "无效"
         }, {
             icon: "icon-dibu-zhuanhuan",
             label: "转化"
+        }, {
+            icon: "icon-zhuanyi",
+            label: "更换负责人"
         }, {
             icon: "icon-dibu-tuihui",
             label: "退回"
         }, {
-            icon: "icon-zhuanyi",
-            label: "更换负责人"
+            icon: "icon-dibu-wuxiao",
+            label: "无效"
         }, {
             icon: "icon-dibu-jieshu",
             label: "作废"

+ 1 - 1
packageA/saleClue/index.wxml

@@ -1,6 +1,6 @@
 <Yl_nav search list='{{navList}}' sort='{{content.sort}}' bind:onClick='navClick' bindonSearch="onSearch" />
 <!-- 显示类型 -->
-<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:select="classSelect" />
+<van-action-sheet bind:click-overlay='classClose' show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:select="classSelect" />
 <view class="total">共{{content.total}}个</view>
 
 <My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>