瀏覽代碼

销售线索

codeMan 3 年之前
父節點
當前提交
871f1c7ed9

+ 10 - 10
packageA/saleClue/addClue.js

@@ -44,6 +44,16 @@ Page({
             valueName: "province",
             valueName: "province",
             checking: "base",
             checking: "base",
             required: false
             required: false
+        }, {
+            label: "详细地址",
+            error: false,
+            errMsg: "",
+            type: "label",
+            value: "",
+            placeholder: "详细地址",
+            valueName: "address",
+            checking: "base",
+            required: false
         }, {
         }, {
             label: "市场活动",
             label: "市场活动",
             error: false,
             error: false,
@@ -69,16 +79,6 @@ Page({
             idName:'sat_campaignid',
             idName:'sat_campaignid',
             checking: "base",
             checking: "base",
             required: false
             required: false
-        }, {
-            label: "详细地址",
-            error: false,
-            errMsg: "",
-            type: "label",
-            value: "",
-            placeholder: "详细地址",
-            valueName: "address",
-            checking: "base",
-            required: false
         }, {
         }, {
             label: "来源",
             label: "来源",
             error: false,
             error: false,

+ 12 - 6
packageA/saleClue/addFollow.js

@@ -6,10 +6,10 @@ Page({
         sat_orderclueid: null,
         sat_orderclueid: null,
         deleteItem: false,
         deleteItem: false,
         actionShow: false,
         actionShow: false,
-        time: getTime.formatTime(new Date(), "-"),
+        time: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay() > 9 ? new Date().getDay() : '0' + new Date().getDay()}`,
         actions: [],
         actions: [],
         disabled: true,
         disabled: true,
-        loading: false
+        loading: false,
     },
     },
     onLoad(options) {
     onLoad(options) {
         if (options.sat_orderclueid) this.setData({
         if (options.sat_orderclueid) this.setData({
@@ -19,9 +19,15 @@ Page({
         this.init();
         this.init();
 
 
 
 
+    },
+    bindDateChange: function (e) {
+    this.setData({
+        time: e.detail.value
+    })
     },
     },
     /* 跟进初始化 */
     /* 跟进初始化 */
     init() {
     init() {
+        let that = this
         _Http.basic({
         _Http.basic({
             id: "20221208100602",
             id: "20221208100602",
             "content": {
             "content": {
@@ -47,9 +53,8 @@ Page({
                 }, 300)
                 }, 300)
                 return
                 return
             } else {
             } else {
-                this.setData({
+                that.setData({
                     content: res.data,
                     content: res.data,
-                    time: res.data.createdate,
                     deleteItem: true,
                     deleteItem: true,
                 });
                 });
                 wx.getLocation({
                 wx.getLocation({
@@ -62,7 +67,7 @@ Page({
                     }) {
                     }) {
                         console.log("获取经纬度", latitude,
                         console.log("获取经纬度", latitude,
                             longitude)
                             longitude)
-                        this.setData({
+                        that.setData({
                             "content.latitude": latitude,
                             "content.latitude": latitude,
                             "content.longitude": longitude
                             "content.longitude": longitude
                         })
                         })
@@ -77,6 +82,7 @@ Page({
     submit() {
     submit() {
         if (this.data.loading) return;
         if (this.data.loading) return;
         let content = this.data.content;
         let content = this.data.content;
+        content.createdate = this.data.time
         this.setData({
         this.setData({
             loading: true
             loading: true
         })
         })
@@ -177,7 +183,7 @@ Page({
     isDisabled() {
     isDisabled() {
         let data = this.data.content;
         let data = this.data.content;
         this.setData({
         this.setData({
-            disabled: (data.followupmode != '' && data.content != '' && data.logtype != '') ? false : true
+            disabled: (data.followupmode != '' && data.content != '') ? false : true
         })
         })
     },
     },
     onUnload() {
     onUnload() {

+ 2 - 1
packageA/saleClue/addFollow.json

@@ -1,6 +1,7 @@
 {
 {
     "usingComponents": {
     "usingComponents": {
-        "My_upload": "/components/My_upload/index"
+        "My_upload": "/components/My_upload/index",
+        "van-datetime-picker": "@vant/weapp/datetime-picker/index"
     },
     },
     "navigationBarTitleText": "线索跟进"
     "navigationBarTitleText": "线索跟进"
 }
 }

+ 12 - 5
packageA/saleClue/addFollow.wxml

@@ -1,17 +1,24 @@
 <view class="box">
 <view class="box">
-    <view class="label"><text>*</text>跟进时间:</view>
-    <view class="time">{{time}}</view>
+    <view class="label"><text>*</text>选择时间</view>
+    <picker mode="date" value="{{time}}" bindchange="bindDateChange">
+        <view class="picker">
+            <view class="selector">
+                <view>{{time}}</view>
+                <van-icon name="arrow-down" />
+            </view>
+        </view>
+    </picker>
     <view class="label"><text>*</text>本次跟进方式:</view>
     <view class="label"><text>*</text>本次跟进方式:</view>
     <view class="selector" bindtap="selectWay">
     <view class="selector" bindtap="selectWay">
         <view>{{content.followupmode?content.followupmode:'请选择'}}</view>
         <view>{{content.followupmode?content.followupmode:'请选择'}}</view>
         <van-icon name="arrow-down" />
         <van-icon name="arrow-down" />
     </view>
     </view>
-    <view class="label"><text>*</text>本次跟进结果:</view>
-    <view class="results" bindtap="changeType">
+    <!-- <view class="label"><text>*</text>本次跟进结果:</view> -->
+    <!-- <view class="results" bindtap="changeType">
         <view class="{{content.logtype=='继续跟进'?'op':''}}" data-name="继续跟进">继续跟进</view>
         <view class="{{content.logtype=='继续跟进'?'op':''}}" data-name="继续跟进">继续跟进</view>
         <view class="{{content.logtype=='预约到店'?'op':''}}" data-name="预约到店">预约到店</view>
         <view class="{{content.logtype=='预约到店'?'op':''}}" data-name="预约到店">预约到店</view>
         <view class="{{content.logtype=='互加微信'?'op':''}}" data-name="互加微信">互加微信</view>
         <view class="{{content.logtype=='互加微信'?'op':''}}" data-name="互加微信">互加微信</view>
-    </view>
+    </view> -->
     <view class="label"><text>*</text>本次跟进内容</view>
     <view class="label"><text>*</text>本次跟进内容</view>
     <textarea value='{{content.content}}' class="textarea selector" bind:input="inputChange" placeholder="请描述跟进情况及内容" />
     <textarea value='{{content.content}}' class="textarea selector" bind:input="inputChange" placeholder="请描述跟进情况及内容" />
 
 

+ 10 - 21
packageA/saleClue/detail.js

@@ -22,10 +22,7 @@ Page({
             label: "任务",
             label: "任务",
             num: 132
             num: 132
         }],
         }],
-        tabbarList: [{
-            icon: "icon-genjin",
-            label: "跟进"
-        }],
+        tabbarList: [],
     },
     },
     onLoad(options) {
     onLoad(options) {
         this.setData({
         this.setData({
@@ -50,8 +47,11 @@ Page({
             });
             });
 
 
             let isLeader = res.data.leader.some(some => some.userid == wx.getStorageSync('userMsg').userid),
             let isLeader = res.data.leader.some(some => some.userid == wx.getStorageSync('userMsg').userid),
-                tabbarList = this.data.tabbarList;
-            if (this.data.isAdmin || isLeader) tabbarList = [{
+                tabbarList =[{
+                    icon: "icon-genjin",
+                    label: "跟进"
+                }];
+            if (this.data.isAdmin || isLeader) tabbarList = tabbarList.concat([{
                 icon: "icon-bianji",
                 icon: "icon-bianji",
                 label: "编辑"
                 label: "编辑"
             }, {
             }, {
@@ -63,7 +63,7 @@ Page({
             }, {
             }, {
                 icon: "icon-dibu-jieshu",
                 icon: "icon-dibu-jieshu",
                 label: "作废"
                 label: "作废"
-            }].concat(tabbarList);
+            }]);
             if (isLeader) tabbarList = tabbarList.concat([{
             if (isLeader) tabbarList = tabbarList.concat([{
                 icon: "icon-dibu-tuihui",
                 icon: "icon-dibu-tuihui",
                 label: "退回"
                 label: "退回"
@@ -103,10 +103,6 @@ Page({
                         label: '跟进次数',
                         label: '跟进次数',
                         value: res.data.followcount || '0'
                         value: res.data.followcount || '0'
                     },
                     },
-                    {
-                        label: '转化次数',
-                        value: res.data.changecount
-                    }
                 ],
                 ],
                 list1: [{
                 list1: [{
                         label: "联系人",
                         label: "联系人",
@@ -133,10 +129,6 @@ Page({
                         label: '跟进次数',
                         label: '跟进次数',
                         value: res.data.followcount || '0'
                         value: res.data.followcount || '0'
                     },
                     },
-                    {
-                        label: '转化次数',
-                        value: res.data.changecount
-                    }
                 ],
                 ],
                 list2: [{
                 list2: [{
                     label: "创建人",
                     label: "创建人",
@@ -150,12 +142,12 @@ Page({
                 }, {
                 }, {
                     label: "最近跟进人",
                     label: "最近跟进人",
                     value: res.data.followBy
                     value: res.data.followBy
-                }, {
-                    label: "转移人",
-                    value: res.data.changeBy
                 }, {
                 }, {
                     label: "最近编辑人",
                     label: "最近编辑人",
                     value: res.data.editBy
                     value: res.data.editBy
+                }, {
+                    label: "转手次数",
+                    value: res.data.changecount
                 }, {
                 }, {
                     label: "创建时间",
                     label: "创建时间",
                     value: res.data.createDate
                     value: res.data.createDate
@@ -165,9 +157,6 @@ Page({
                 }, {
                 }, {
                     label: "最近跟进时间",
                     label: "最近跟进时间",
                     value: res.data.followDate
                     value: res.data.followDate
-                }, {
-                    label: "最近转移时间",
-                    value: res.data.changeDate
                 }, {
                 }, {
                     label: "最近编辑时间",
                     label: "最近编辑时间",
                     value: res.data.editDate
                     value: res.data.editDate