于继渤 2 年 前
コミット
b34cd6b623

+ 21 - 0
api/pages/mst/cusFollow.js

@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.客户跟进
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		yjb		  	     2024-1-19       			1.00		       	新建
+ *******************************************************************************/
+module.exports = {
+  cusFollowService: {
+    // 前缀
+    prefix: 'mdm-server-dkic-b1/mst/cusFollow/',
+  
+  },
+  routeUrl: {
+    cusFollow: {
+ 
+    }
+  }
+};

+ 6 - 1
api/pages/mst/customer.js

@@ -15,7 +15,12 @@ module.exports = {
   },
   routeUrl: {
     customer: {
-    
+      add:{
+        key:'add',url:'/package-basic-data/pages/customer-list/add/add'
+      },
+      followUp:{
+        key:'followUp',url:'/package-basic-data/pages/customer-follow-up/customer-follow-up'
+      }
     }
   }
 };

+ 2 - 1
app.js

@@ -38,9 +38,10 @@ const inbound = require('./api/pages/ivt/inbound.js');
 const moneyAccount = require('./api/pages/mst/moneyAccount.js');
 const intoReturn = require('./api/pages/ivt/intoReturn.js');
 const intoReturnItem = require('./api/pages/ivt/intoReturnItem.js');
+const cusFollow = require('./api/pages/mst/cusFollow.js');
 
 // api服务路由文件
-var apiList = [common, oauth,setting, company, wechatPay,user, staff, staffRight, staffPurview, settingValue, customer, role, roleFun, org, roleSensitive, goodsBrand, goodsCategory, goodsSeries, unit, supplier, warehouse, saleChannel, goodsSku, basicData,customerMst,purchase,inbound,moneyAccount,intoReturn,intoReturnItem]
+var apiList = [common, oauth,setting, company, wechatPay,user, staff, staffRight, staffPurview, settingValue, customer, role, roleFun, org, roleSensitive, goodsBrand, goodsCategory, goodsSeries, unit, supplier, warehouse, saleChannel, goodsSku, basicData,customerMst,purchase,inbound,moneyAccount,intoReturn,intoReturnItem,cusFollow]
 
 const util = require('./utils/util.js')
 const baseMethod = require('./api/pages/baseMethod.js')

+ 1 - 0
components/dkbase/dk-tabs/dk-tabs.js

@@ -41,6 +41,7 @@ Component({
      * @param {*} event 
      */
     onChange(event) {
+      console.log('当前激活的标签改变时触发',event)
       this.triggerEvent('onChange', event)
     }
   }

+ 1 - 1
components/dkbase/dk-tabs/dk-tabs.wxml

@@ -1,4 +1,4 @@
 <!-- tabs组件 -->
 <van-tabs active="{{ active }}"  bind:change="onChange">
-  <van-tab wx:for="{{list}}" wx:key="index" title="{{item.title}}" name="{{index}}"> </van-tab> 
+  <van-tab wx:for="{{list}}" wx:key="index" title="{{item.title}}" code="{{item.code}}" name="{{index}}"> </van-tab> 
 </van-tabs>

+ 1 - 1
config/config.js

@@ -3,7 +3,7 @@ const profiles = 'dev';
 const configListObj = {
   // 北京东科企信软件有限公司 本地开发
   dev: {
-    server_add: 'http://192.168.0.84',     server_port: '7001',
+    server_add: 'http://192.168.0.90',     server_port: '7001',
     server_img_http: 'https://hgscrm-dev.oss-cn-shenzhen.aliyuncs.com/',
     server_hg_img_http: 'https://haip-dev.oss-cn-shenzhen.aliyuncs.com/',
     corpid: 'ww796c5d1684937b2f', //企业微信corpid

+ 19 - 1236
package-basic-data/pages/customer-follow-up/customer-follow-up.js

@@ -1,1251 +1,34 @@
-const api = require('../../../utils/api.js');
-const Constants = require('../../../utils/Constants.js');
-const util = require('../../../utils/util.js')
-const common = require('../../../utils/common');
-const config = require('../../../config/config.js'); 
-const app = getApp();
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		于继渤		 2024-1-23			1.00		    客户跟进
+ *******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
+const mixins = require('@/mixins/index.js')
+const app = getApp()
 Page({
-
+  mixins: [mixins],
   /**
    * 页面的初始数据
    */
   data: {
-
-    jobIds: [-101, -102], //销售顾问 设计师    -2022/08/20 于继渤
-    checked_1: false,
-    checked_2: false,
-    checked_3: false,
-    checked_4: false,
-    checked_5: false,
-    checked_6: false,
-    checked_7: false,
-    checked_8: false,
-    //数量
-    quantity_1: '0',
-    quantity_2: '0',
-    quantity_3: '0',
-    quantity_4: '0',
-    quantity_5: '0',
-    quantity_6: '0',
-    quantity_7: '0',
-    quantity_8: '0',
-    show: false,
-
-    form: {
-      CustomerName: '', //客户名称
-      CustomerPhone: '', //客户电话
-      AddressName: '', //住址
-      AddressNo: '', //门牌号
-      CustomerIntentionsName: '', //客户意向
-      CompetitionBrand: '', //竞品品牌
-      FollowUpContent: '', //跟进内容
-      NextFollowUpPlan: '', //下次跟进计划
-      InviteResult: '', //邀约结果
-      NextFollowTime: '', //提醒时间
-      InviteTime: '', //邀约到店时间
-      DesignUser: '', //设计师
-      DesignUserId: 0, //设计师
-      FollowTypeName: '', //跟进方式
-      loseReasonIds: [],//流失原因
-      OtherName: '其他',
-      addressArea: {
-        province: '',
-        city: '',
-        district: '',
-        // name: ''
-      },
-      competitionBrandFlag: false,
-
-    },
-    minDate: new Date().getTime(),
-    activeNames: [],
-    activeNameOthers: [],
-    radio_follow_up: '1',
-    customerIntentionsFlag: false,
-    inviteFollowTypeFlag: false,
-    inviteResultFlag: false,
-    followTypeFlag: false,
-    designFlag: false,
-    otherFlag: false,
-    //提醒时间
-    nextFollowTimeFlag: true,
-    //邀约到店时间
-    inviteTimeFlag: true,
-
-    inviteTimeSearch: new Date().getTime() + 100,
-    nextFollowTimeSearch: new Date().getTime() + 100,
-    formatter(type, value) {
-      if (type === 'year') {
-        return `${value}年`;
-      }
-      if (type === 'month') {
-        return `${value}月`;
-      }
-      if (type === 'day') {
-        return `${value}日`;
-      }
-      if (type === 'hour') {
-        return `${value}时`;
-      }
-      if (type === 'minute') {
-        return `${value}分`;
-      }
-      return value;
-    },
-    fileList: [], //图片
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-    const location = chooseLocation.getLocation();
-    if (location) {
-      if (!location.province && !location.city) {
-        wx.showToast({
-          title: '地址无效',
-          duration: 2000
-        })
-        return;
-      }
-      //直辖市省变更(去掉市)
-      let provinceTemp = util.updateProvince(location)
-      location.province = provinceTemp ? provinceTemp : location.province
-      location.district =  location.district == undefined ? '' : location.district
-      let temp = this.data.form;
-      // 小区或POI
-      temp['addressName'] = location.name;
-      temp['addressFull'] = location.address + location.name; //全路径
-      temp['addressGcj02'] = {
-        latitude: location.latitude,
-        longitude: location.longitude
-      };
-      // 行政区划
-      temp['addressArea'] = {
-        province: location.province,
-        city: location.city,
-        district: location.district == undefined || !location.district? location.city : location.district,
-      }
-      this.setData({
-        form: temp,
-      })
-    }
-
-  },
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-    // 页面卸载时设置插件选点数据为null,防止再次进入页面,geLocation返回的是上次选点结果
-    chooseLocation.setLocation(null);
-  },
-  /**
-   * @desc : 调取企业微信会话
-   * @date : 2022/5/18 15:49
-   * @author : 于继渤
-   */
-  openWeChat(e) {
-    let designuser = e.currentTarget.dataset.designuser
-    let qvChatId = this.data.form.qvChatId
-    let that = this
-    let qvexternaluserid = e.currentTarget.dataset.qvexternaluserid
-    let qvuserid = e.currentTarget.dataset.qvuserid
-    let staffqvuserid = e.currentTarget.dataset.staffqvuserid
-    let customerId = e.currentTarget.dataset.customerid
-    let CustomerName = e.currentTarget.dataset.customername
-    if (designuser == '' && qvChatId == null) {
-      wx.showToast({
-        title: '请选择设计师',
-        image: '/static/image/warning.png',
-        duration: 1000
-      })
-      return
-    }
-    if (qvexternaluserid == null || qvexternaluserid == undefined) {
-      wx.showToast({
-        title: '与该客户非好友关系',
-        image: '/static/image/warning.png',
-        duration: 1000
-      })
-      return
-    }
-    if (!app.globalData.SystemInfo.environment) {
-      wx.showToast({
-        title: '请在企业微信模式下运行',
-        icon: 'none'
-      })
-      return
-    }
-    if (qvChatId == null && qvChatId == undefined) {
-      wx.qy.openEnterpriseChat({
-        // 注意:userIds和externalUserIds至少选填一个,且userIds+externalUserIds总数不能超过2000,如果externalUserIds有微信联系人,则总数不能超过40人。
-        userIds: qvuserid + ';' + staffqvuserid + ';', //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
-        // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
-        externalUserIds: qvexternaluserid,
-        groupName: '讨论组' + '-' + CustomerName, // 必填,会话名称。单聊时该参数传入空字符串""即可。
-        chatId: "", //新建会话时,chatId必须为空串
-        success: function (res) {
-          // 回调
-          var chatId = res.chatId; //返回chatId仅在企业微信3.0.36及以后版本支持;
-          let param = {}
-          param.qvChatId = chatId
-          param.customerId = customerId
-          api.request(Constants.SALE_CUSTOMER_API + 'update_customer_qvChatId', 'POST', param).then(res => {
-            if (res.data.code === 200) {
-              let form = that.data.form
-              form.qvChatId = chatId
-              that.setData({
-                form: form
-              })
-            }
-          })
-        },
-        fail: function (res) {
-          // 失败处理
-          wx.showToast({
-            title: res.data,
-            icon: 'none'
-          })
-        }
-      });
-    } else {
-      wx.qy.openEnterpriseChat({
-        // 注意:userIds和externalUserIds至少选填一个,且userIds+externalUserIds总数不能超过2000,如果externalUserIds有微信联系人,则总数不能超过40人。
-        userIds: '', //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
-        // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
-        externalUserIds: '',
-        groupName: '' + '-' + CustomerName, // 必填,会话名称。单聊时该参数传入空字符串""即可。
-        chatId: qvChatId, //新建会话时,chatId必须为空串
-        success: function (res) {
-          // 回调
-          var chatId = res.chatId; //返回chatId仅在企业微信3.0.36及以后版本支持;
-        },
-        fail: function (res) {
-          // 失败处理
-          wx.showToast({
-            title: res.data,
-            icon: 'none'
-          })
-        }
-      });
-    }
-
-  },
-  /**
-   * 小程序地图调用
-   */
-  onClickWxchartAddress() {
-    // if (this.data.EditFlag) {
-    //   return
-    // }
-    // 跳转新建地图实例
-    common.onClickWxchartAddress();
-  },
-  /**
-   * 联系电话 拨打
-   */
-  onClickphone(e) {
-    let telephone = e.currentTarget.dataset.telephone
-    // 拨打电话
-    wx.makePhoneCall({
-      phoneNumber: telephone,
-    })
-  },
-
-  onnavigateToAddCustomer: function (e) {
-    if (!app.globalData.SystemInfo.environment) {
-      wx.showToast({
-        title: '请在企业微信模式下运行',
-        icon: 'none'
-      })
-      return
-    }
-    wx.qy.navigateToAddCustomer({
-      success: (res) => {
-      },
-      fail: (res) => {
-      },
-      complete: (res) => {
-      }
-    })
-
-  },
-  /* 上传方法 */
-  afterRead(event) {
-    const _this = this;
-    const {
-      file
-    } = event.detail;
-    file.forEach(res => {
-      // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
-      wx.uploadFile({
-        url: `${config.server_add}:${config.server_port}` + '/basic-server/file/upload',
-        filePath: res.path,
-        name: 'file',
-        formData: {
-          'folder': 't_csm_follow/annex_paths'
-        },
-        header: {
-          'Authorization': 'Bearer ' + app.globalData.token
-        },
-        success(res) {
-          res.data = JSON.parse(res.data)
-          if (res.data.code === 200) {
-            let arr = _this.data.fileList;
-            arr.push({
-              url: res.data.data.absolutelyPath,
-              FilePath: res.data.data.relativePath,
-              deletable: true
-            })
-            _this.setData({
-              fileList: arr
-            })
-          }
-        },
-      })
-    })
-  },
-
-  /**
-   * 删除图片
-   */
-  deleteImg(e) {
-    let index = e.detail.index;
-    let arr = this.data.fileList;
-    arr.splice(index, 1);
-    this.setData({
-      fileList: arr
-    })
-  },
-  /**
-   * 获取意向品类数据源
-   */
-  getGoodsSpecs() {
-    let param = {
-      dataSourceCode: "商品规格分类"
-    }
-    param.cpId = app.globalData.user.cpId
-    api.request(Constants.BASIC_COMMON_API + 'get_wx_init_data', 'POST', param).then(res => {
-      if (res.data.code === 200) {
-        let specsList = []
-        specsList = res.data.data
-        if (this.data.EditFlag) { //编辑的时候进
-          let itemList = this.data.item.intentionInfo
-          // 把数据库里的选择 赋值到控件上  编辑进
-          //todo 其他分类特殊 
-          specsList.forEach(function (item) {
-            item.quantity = 0
-            item.checked = false
-            item.other = false
-            if (itemList) {
-              itemList.forEach(element => {
-                if (item.id === element.specsId) {
-                  item.quantity = element.count
-                  item.checked = element.value
-                }
-                if ((item.name == "其他分类") && element.other) { //其他品类
-                  item.other = element.other
-                  item.quantity = element.count
-                  item.checked = element.value
-                  item.id = element.specsId
-                  item.name = element.specsName
-                }
-              });
-            }
-          });
-        }
-        this.setData({
-          specsList
-        })
-      }
-    })
-  },
-  /**
-   * 提交保存
-   */
-  submit() {
-    let onRadio_Follow_Up = this.data.onRadio_Follow_Up
-    let result = this.checkForm();
-    let specsList = this.data.specsList
-    let specsList_ = []
-    if (specsList) {
-      specsList.forEach(function (item) {
-        if (item.checked) {
-          specsList_.push({
-            "specsId": item.id,
-            "specsName": item.name,
-            "count": item.quantity,
-            "value": item.checked,
-            "other": item.other ? item.other : false
-          })
-        }
-      });
-    }
-    if (result.flag) {
-      let param = {}
-      param.ascpId = app.globalData.user.ascpId
-      param.sale1Id = app.globalData.user.sale1Id
-      param.sale2Id = app.globalData.user.sale2Id
-      if (this.data.radio_follow_up == '1') {
-        param.followStatus = '跟进状态-跟进' //跟进状态 
-        param.followType = '跟进方式-' + this.data.form.FollowTypeName //跟进方式 
-      } else if (this.data.radio_follow_up == '3') {
-        param.followStatus = '跟进状态-邀约' //跟进状态 
-        param.followType = '跟进方式-微信' //跟进方式 
-      } else if (this.data.radio_follow_up == '5') {
-        param.followStatus = '跟进状态-约尺' //跟进状态 
-        param.followType = '跟进方式-上门' //跟进方式 
-      }
-      param.customerId = this.data.form.CustomerId //客户名称 
-      param.customerPhone = this.data.form.CustomerPhone //客户电话
-      param.customerName = this.data.form.CustomerName //客户名称
-      param.addressName = this.data.form.addressName //客户地址
-      param.addressNo = this.data.form.AddressNo //门牌号
-      if (this.data.form.addressArea != null) {
-        param.addressFull = (this.data.form.addressArea.province + this.data.form.addressArea.city + this.data.form.addressArea.district + this.data.form.addressName + this.data.form.AddressNo) ? (this.data.form.addressArea.province + this.data.form.addressArea.city + this.data.form.addressArea.district + this.data.form.addressName + this.data.form.AddressNo) : '' //全路径
-        //  param.addressFull = this.data.form.addressFull + this.data.form.AddressNo //全路径
-        param.addressArea = this.data.form.addressArea //行政规划 省市区
-        param.addressGcj02 = this.data.form.addressGcj02
-      }
-
-      param.followData = this.data.form.FollowUpContent //跟进内容
-      param.nextFollowPlan = this.data.form.NextFollowUpPlan //下次跟进计划
-
-      if (this.data.radio_follow_up != 1) {
-        let InviteResult = this.data.form.InviteResult
-        if ((InviteResult == '接受邀约') && (InviteResult != '')) {
-          param.inviteResult = '邀约结果-接受'
-        } else if ((InviteResult == '拒绝邀约') && (InviteResult != '')) {
-          param.inviteResult = '邀约结果-拒绝'
-        }
-      } //邀约结果
-      param.designUser = this.data.form.DesignUserId //设计师 
-      if (this.data.radio_follow_up != 5) {
-        param.intention = '客户意向-' + this.data.form.CustomerIntentionsName //客户意向
-      }
-      //客户意向是放入公海时,客成状态改为公海
-      if (this.data.form.CustomerIntentionsName == '放入公海') {
-        param.saleStatus = '客成状态-公海'
-      }
-      //客户意向是流失时,客成状态改为流失
-      else if (this.data.form.CustomerIntentionsName == '已流失') {
-        param.saleStatus = '客成状态-流失'
-      }
-      //如果原来客户为公海或流失,跟进之后为潜客
-      else if (this.data.form.saleStatus == '客成状态-公海' || this.data.form.saleStatus == '客成状态-流失') {
-        param.saleStatus = '客成状态-潜客'
-      }
-      else {
-        param.saleStatus = this.data.form.saleStatus
-      }
-      param.competitiveBrands = this.data.form.CompetitionBrand //竞品品牌  
-      param.loseReasonIds = this.data.form.loseReasonIds //流失原因
-      param.inviteTime = this.data.form.InviteTime ? (this.data.form.InviteTime.length == 16 ? this.data.form.InviteTime + ":00" : this.data.form.InviteTime) : '' //邀约到店时间  
-      param.nextFollowTime = this.data.form.NextFollowTime ? (this.data.form.NextFollowTime.length == 16 ? this.data.form.NextFollowTime + ":00" : this.data.form.NextFollowTime) : '' //提醒时间  
-      param.cpId = app.globalData.user.cpId
-      param.followOrg = app.globalData.user.orgId
-      let fileList_ = this.data.fileList
-      let fileList = []
-      fileList_.forEach(item => {
-        fileList.push(item.FilePath)
-      })
-      // 跟进附件 20220613
-      param.annexPaths = {
-        annexPaths: fileList
-      }
-      param.intentionInfo = specsList_
-      this.setData({
-        loading: true,
-        loadingButtonFlag: true  //防止重复点击
-      })
-      if (this.data.EditFlag) { //true 编辑update  false 为新建 insert 
-        param.followId = this.data.form.FollowId
-        api.request(Constants.SALE_CUSTOMERFOLLOW_API + 'update', 'POST', param).then(res => {
-
-          if (res.data.code === 200) {
-            wx.showToast({
-              title: '保存成功',
-              image: '/static/image/success.png',
-              duration: 1000
-            })
-            var pages = getCurrentPages();
-            var prevPage = pages[pages.length - 2];
-            setTimeout(function () {
-              wx.navigateBack({
-                delta: 1
-              })
-            }, 1500)
-          } else {
-            this.setData({
-              loading: false,
-              loadingButtonFlag: false,
-            })
-          }
-        })
-      } else {
-        api.request(Constants.SALE_CUSTOMERFOLLOW_API + 'insert', 'POST', param).then(res => {
-          if (res.data.code === 200) {
-            wx.showToast({
-              title: '保存成功',
-              image: '/static/image/success.png',
-              duration: 1000
-            })
-            var pages = getCurrentPages();
-            var prevPage = pages[pages.length - 2];
-
-            prevPage.setData({
-              selectflag: true
-            })
-            setTimeout(function () {
-              wx.navigateBack({
-                delta: 1
-              })
-            }, 1500)
-          } else {
-            this.setData({
-              loading: false,
-              loadingButtonFlag: false,
-            })
-          }
-        })
-      }
-
-    } else {
-      wx.showToast({
-        title: result.msg,
-        image: '/static/image/warning.png',
-        duration: 1000
-      })
-      this.setData({
-        loading: false
-      })
-    }
-  },
-  /**
-   * 跟进内容
-   * @param {} event 
-   */
-  onFollowUpContentChange(event) {
-    let form = this.data.form
-    form.FollowUpContent = event.detail
-    this.setData({
-      form: form
-    })
-  },
-  /**
-   * 客户地址
-   * @param {*} event 
-   */
-  onAddressNameChange(event) {
-    let form = this.data.form
-    form.AddressName = event.detail
-    this.setData({
-      form: form
-    })
-  },
-  /**
-   * 门牌号
-   * @param {*} event 
-   */
-  onAddressNoChange(event) {
-    let form = this.data.form
-    form.AddressNo = event.detail
-    this.setData({
-      form: form
-    })
-  },
-  /**
-   * 竞品品牌
-   * @param {*} event 
-   */
-  onCompetitionBrandChange(event) {
-    let form = this.data.form
-    form.CompetitionBrand = event.detail
-    this.setData({
-      form: form
-    })
-  },
-  /**
-   * 下次跟进计划
-   * @param {} event 
-   */
-  onNextFollowUpPlanChange(event) {
-    let form = this.data.form
-    form.NextFollowUpPlan = event.detail
-    this.setData({
-      form: form
-    })
-  },
-  /* 表单校验 */
-  checkForm() {
-    if (!this.data.form.CustomerName) {
-      return {
-        flag: false,
-        msg: '客户名称为空'
-      };
-    }
-    if(!this.data.form.noTelephone){
-      if ( !this.data.form.CustomerPhone) {
-        return {
-          flag: false,
-          msg: '联系电话为空'
-        };
-      }
-      if (!util.isPoneAvailable(this.data.form.CustomerPhone)) {
-        return {
-          flag: false,
-          msg: '电话格式不正确'
-        };
-      }
-    }
-   
-    if (!this.data.form.FollowUpContent) {
-      return {
-        flag: false,
-        msg: '跟进内容为空'
-      };
-    }
-  
-    //日常跟进
-    if (this.data.radio_follow_up == 1) {
-      if (!this.data.form.CustomerIntentionsName) {
-        return {
-          flag: false,
-          msg: '客户意向为空'
-        };
-      }
-      if (this.data.form.CustomerIntentionsName == '已流失' && this.data.form.loseReasonIds.length == 0) {
-        return {
-          flag: false,
-          msg: '流失原因为空'
-        };
-      }
-      if (!this.data.form.FollowTypeName) {
-        return {
-          flag: false,
-          msg: '跟进方式为空'
-        };
-      }
-      if (!this.data.form.NextFollowTime && this.data.form.CustomerIntentionsName != '已流失') {
-        return {
-          flag: false,
-          msg: '提醒时间为空'
-        };
-      }
-    } else if (this.data.radio_follow_up == 3) {
-      if (!this.data.form.InviteResult) {
-        return {
-          flag: false,
-          msg: '邀约结果为空'
-        };
-      }
-      if (this.data.form.InviteResult == '接受邀约' && !this.data.form.InviteTime) {
-        return {
-          flag: false,
-          msg: '邀约到店时间为空'
-        };
-      }
-      if (this.data.form.InviteResult == '拒绝邀约' && !this.data.form.NextFollowTime) {
-        return {
-          flag: false,
-          msg: '提醒时间为空'
-        };
-      }
-      if (!this.data.form.CustomerIntentionsName) {
-        return {
-          flag: false,
-          msg: '客户意向为空'
-        };
-      }
-      if (this.data.form.CustomerIntentionsName == '已流失' && this.data.form.loseReasonIds.length == 0) {
-        return {
-          flag: false,
-          msg: '流失原因为空'
-        };
-      }
-    } else if (this.data.radio_follow_up == 5) {
-      if (!this.data.form.DesignUser) {
-        return {
-          flag: false,
-          msg: '设计师为空'
-        };
-      }
-      if (!this.data.form.InviteResult) {
-        return {
-          flag: false,
-          msg: '邀约结果为空'
-        };
-      }
-      if (this.data.form.InviteResult == '接受邀约' && !this.data.form.InviteTime) {
-        return {
-          flag: false,
-          msg: '服务时间为空'
-        };
-      }
-      if (this.data.form.InviteResult == '拒绝邀约' && !this.data.form.NextFollowTime) {
-        return {
-          flag: false,
-          msg: '提醒时间为空'
-        };
-      }
-    }
-
-    return {
-      flag: true,
-      msg: '表单校验通过'
-    }
+    radioFollowUp: '1',
+    routeObjName:'cusFollow',
   },
 
-    /**
-   * 客户名称
-   * @param {*} event 
-   */
-  onCustomerNameChange(event) {
-    let form = this.data.form
-    form.CustomerName = event.detail
-    this.setData({
-      form: form
-    })
-  },
-  /**
-   * 跟进方式单选
-   * @param {} event 
-   */
-  onRadio_Follow_Up(event) {
-    if (this.data.EditFlag) { //编辑界面 不让修改跟进方式
-      return
-    }
-    this.setData({
-      radio_follow_up: event.detail,
-    });
-  },
-  /**
-   * 客户意向
-   */
-  showCustomerIntentionsPopup() {
-    this.setData({
-      customerIntentionsFlag: true
-    });
-  },
-  /**
-   * 邀约进店的客户意向
-   */
-  showCustomerIntentionsPopupInvite() {
-    this.setData({
-      inviteFollowTypeFlag: true
-    });
-  },
-  /**
-   * 流失原因
-   */
-  showLoseReason() {
-    this.setData({
-      loseReasonFlag: true
-    });
-  },
-  /**
- * @desc : 下拉多选确定
- * @author : 于继渤
- * @date : 2022/5/26 12:16
- */
-  mutiSearchAll(e) {
-    let id = e.currentTarget.id
-    let form = this.data.form
-    if (id === 'loseReason') {
-      form.loseReasonIds = e.detail.idList
-      form.loseReasonNames = e.detail.names
-      this.setData({
-        loseReasonFlag: false,
-        form: form
-      })
-    }
-
-  },
   /**
- * @desc : 下拉多选关闭
+ * @desc : 顶部选择
+ * @date : 2024/2/1 15:49
  * @author : 于继渤
- * @date : 2022/5/26 12:16
  */
-  muticloseAll(e) {
-    let id = e.currentTarget.id
-    if (id === 'loseReason') {
-      this.setData({
-        loseReasonFlag: false
-      })
-    }
-  },
-  /**
-   * 邀约结果
-   */
-  showInviteResultPopup() {
-    this.setData({
-      inviteResultFlag: true
-    });
-  },
-  /**
-   * 跟进方式
-   */
-  showFollowTypePopup() {
-    this.setData({
-      followTypeFlag: true
-    });
-  },
-  /**
-   * 设计师
-   */
-  showDesignPopup() {
+  onRadioFollowUp(e) {
     this.setData({
-      designFlag: true
+      radioFollowUp: e.detail,
     });
   },
 
-  /**
-   *手风琴 复选框 数据源监听事件
-   */
-  onDataChange(e) {
-    this.setData({
-      specsList: e.detail.dataList
-    })
-  },
-  //组件单选确定
-  mutiSearch(e) {
-    let id = e.target.id
-    let form = this.data.form
-    if (id === 'customerIntentions') {
-      form.CustomerIntentionsName = e.detail.name
-    }
-    if (id === 'followType') {
-      form.FollowTypeName = e.detail.name
-
-    }
-    if (id === 'other') {
-      let specsList = this.data.specsList
-      specsList[this.data.otherIndex].id = e.detail.id
-      specsList[this.data.otherIndex].name = e.detail.name
-      this.setData({
-        specsList
-      })
-    }
-    if (id === 'staff') {
-      form.DesignUser = e.detail.name
-      form.DesignUserId = e.detail.id
-      form.staffQvUserId = e.detail.qvUserid
-    }
-    //邀约结果
-    if (id === 'inviteResult') {
-      form.InviteResult = e.detail.name
-    }
-    this.setData({
-      form: form
-    })
-
-    if (form.CustomerIntentionsName == '已流失') {
-      this.setData({
-        competitionBrandFlag: true,
-        nextFollowTimeFlag: false,
-      })
-    } else if (form.CustomerIntentionsName == '放入公海') {
-      this.setData({
-        nextFollowTimeFlag: false,
-      })
-    } else {
-      this.setData({
-        competitionBrandFlag: false,
-        nextFollowTimeFlag: true,
-      })
-    }
-
-    if (form.InviteResult == '接受邀约') {
-      this.setData({
-        nextFollowTimeFlag: false,
-        inviteTimeFlag: true,
-      })
-    } else if (form.InviteResult == '拒绝邀约') {
-      this.setData({
-        nextFollowTimeFlag: true,
-        inviteTimeFlag: false,
-      })
-    }
-  },
-
-  /** 
-   * 通过cpid 外部联系人userid 查询客户
-   * @param {*} cpid 
-   */
-  getCurExternalContact(cpid) {
-    let that = this
-    // 需要从特定入口进入页面才可调用 
-    // 获取当前外部联系人userid
-    wx.qy.getCurExternalContact({
-      success: function (res) {
-        var userId = res.userId //返回当前外部联系人userId
-
-        let param = {
-          qvExternalUserid: userId,
-          cpId: cpid,
-        }
-        api.request(Constants.SALE_CUSTOMER_API + 'select_customer_detail', 'POST', param).then(res => {
-          if (res.data.code === 200) {
-            let form = that.data.form || {}
-            let item = res.data.data
-            form.CustomerId = item.customerId
-            form.CustomerName = item.customerName
-            form.CustomerPhone = item.customerPhone
-            form.addressName = item.addressName
-            form.addressArea = item.addressArea
-            form.AddressNo = item.addressNo
-            form.addressFull = item.addressFull
-            form.qvExternalUserid = item.qvExternalUserid
-            form.qvChatId = item.qvChatId
-            form.qvUserid = app.globalData.user.qvUserid
-            form.saleStatus = item.saleStatus
-            form.noTelephone = false;
-            if (form.qvExternalUserid && !form.CustomerPhone) {
-              form.noTelephone = true;
-            }
-            that.setData({
-              form: form,
-              loading: false,
-            })
-          }
-        })
-      },
-      fail: function (res) {
-      }
-    });
-  },
-
-  /**
-   * 解密当前用户信息数据后 返回改用户的cpid
-   * @param {*} e 
-   */
-  onBindGetEnterpriseUserInfo: function (e) {
-    let that = this
-    wx.qy.getEnterpriseUserInfo({
-      success: function (res) {
-        let param = {
-          encrypted: res.encryptedData,
-          sessionKey: app.globalData.code_to_session.session_key,
-          iv: res.iv,
-        }
-        api.request(Constants.SALE_CUSTOMER_API + 'wx_decrypt_customer_return_cpid', 'POST', param).then(res => {
-          if (res.data.code === 200) {
-            let cpid = res.data.data;
-            that.getCurExternalContact(cpid);
-          }
-        })
-      },
-      fail: function (res) {
-      }
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    if (app.globalData.user == undefined) { //如果 user为空 跳回登录页再重新进入本页面获取
-      wx.reLaunch({
-        url: 'pages/login/login?loginType=5',
-      })
-      return
-    }
-
-    let customerfollowup = wx.getStorageSync('customer-follow-up')
-
-    if (options.customerFlag === "true") { //客户详细界面过来的进
-      // let item = JSON.parse(options.item)
-      let item = JSON.parse(decodeURIComponent(options.item))
-      let form = this.data.form
-      form.CustomerId = item.customerId
-      form.CustomerName = item.customerName
-      form.CustomerPhone = item.customerPhone
-      form.addressName = item.addressName
-      form.addressArea = item.addressArea
-      form.AddressNo = item.addressNo
-      form.FollowUpContent = item.followData
-      form.CustomerIntentionsName = item.intention
-      form.FollowTypeName = item.followType
-      form.NextFollowUpPlan = item.nextFollowPlan
-      form.NextFollowTime = item.nextFollowTime
-      form.InviteResult = item.inviteResult
-      form.InviteTime = item.inviteTime
-      form.qvExternalUserid = item.qvExternalUserid
-      form.noTelephone = false;
-      if (form.qvExternalUserid && !form.CustomerPhone) {
-        form.noTelephone = true;
-      }
-      let radio_follow_up = ''
-      if (item.followStatus == "跟进状态-跟进") {
-        radio_follow_up = '1'
-      }
-      if (item.followStatus == "跟进状态-邀约") {
-        radio_follow_up = '3'
-      }
-      if (item.followStatus == "跟进状态-约尺") {
-        radio_follow_up = '5'
-      }
-      this.setData({
-        form: form,
-        radio_follow_up,
-        fileList: item.annexPaths ? item.annexPaths.annexPaths : [],
-        customerFlag: options.customerFlag
-      })
-    }
-    if (options.flg === "true") { //ture 为编辑  false 为新建 
-      // let item = JSON.parse(options.item)
-      let item = JSON.parse(decodeURIComponent(options.item))
-      let form = this.data.form
-      form.CustomerId = item.customerId
-      form.CustomerName = item.customerName
-      form.CustomerPhone = item.customerPhone
-      form.addressName = item.addressName
-      form.addressArea = item.addressArea
-      form.AddressNo = item.addressNo
-      form.addressFull = item.addressFull
-      form.CustomerIntentionsName = item.intentionName
-      form.CompetitionBrand = item.competitiveBrands
-      form.FollowTypeName = item.followTypeName
-      form.FollowUpContent = item.followData
-      form.NextFollowUpPlan = item.nextFollowPlan
-      form.NextFollowTime = item.nextFollowTime
-      form.saleStatus = item.saleStatus
-      if (item.inviteResult) {
-        if (item.inviteResult == '邀约结果-接受') {
-          form.InviteResult = '接受邀约'
-        } else if (item.inviteResult == '邀约结果-拒绝') {
-          form.InviteResult = '拒绝邀约'
-        }
-      }
-      form.InviteTime = item.inviteTime
-      form.DesignUserId = item.designUser
-      form.DesignUser = item.designName
-      form.FollowId = item.followId
-      form.qvExternalUserid = item.qvExternalUserid
-      form.qvChatId = item.qvChatId
-      form.qvUserid = app.globalData.user.qvUserid
-      form.noTelephone = false;
-      if (form.qvExternalUserid && !form.CustomerPhone) {
-        form.noTelephone = true;
-      }
-      let fileList = options.fileList ? JSON.parse(options.fileList) : []
-      let radio_follow_up = ''
-
-      if (item.followStatus == "跟进状态-跟进") {
-        radio_follow_up = '1'
-      }
-      if (item.followStatus == "跟进状态-邀约") {
-        radio_follow_up = '3'
-      }
-      if (item.followStatus == "跟进状态-约尺") {
-        radio_follow_up = '5'
-      }
-      this.setData({
-        form: form,
-        item,
-        EditFlag: true,
-        radio_follow_up,
-        fileList
-      })
-    } else if (options.flg === "false") {
-      // let item = JSON.parse(options.item)
-      let item = JSON.parse(decodeURIComponent(options.item))
-      let form = this.data.form
-      form.CustomerId = item.customerId
-      form.CustomerName = item.customerName
-      form.CustomerPhone = item.customerPhone
-      form.addressName = item.addressName
-      form.addressArea = item.addressArea
-      form.AddressNo = item.addressNo
-      form.addressFull = item.addressFull
-      form.qvExternalUserid = item.qvExternalUserid
-      form.qvChatId = item.qvChatId
-      form.qvUserid = app.globalData.user.qvUserid
-      form.saleStatus = item.saleStatus
-      form.noTelephone = false;
-      if (form.qvExternalUserid && !form.CustomerPhone) {
-        form.noTelephone = true;
-      }
-      this.setData({
-        form: form,
-      })
-    } else {
-      this.getCurExternalContact(app.globalData.user.cpId)
-    }
-    this.getGoodsSpecs()
-  },
-
-  /**
-     * 加载数据
-     * @param {*} options 
-     */
-  initData(options) {
-    // 清除登录信息 user
-    app.globalData.user = null;
-    this.setData({
-      loading: true,
-    })
-    let param = {
-      corpid: config.corpid, //'ww796c5d1684937b2f', //先用集团的id
-      corpsecret: config.corpsecret,//'19mqS_rUn8YzK47LUmjIDEl6PAx1gcn9v0BRIbEAJXU', //集团
-    }
-    //校验企业id和应用corpsecret是否正确
-    app.qy_login_is_true(param).then(res => {
-      //  解密当前用户信息数据后 返回改用户的cpid
-      // 在查询客户信息
-      this.onBindGetEnterpriseUserInfo();
-    })
-  },
-  /**
-   * 提醒时间展开
-   * 
-   */
-  onChangePickDate() {
-    this.setData({
-      show: true,
-      nextFollowTimeSearch: new Date().getTime() + 100
-    })
-  },
-  /**
-   * 提醒时间
-   * @param {} e 
-   */
-  onConfirmChooseDate(e) {
-    let form = this.data.form
-    form.NextFollowTime = util.formatDataTime(new Date(this.data.nextFollowTimeSearch))
-    this.setData({
-      form: form,
-      show: false
-    })
-  },
-  /**
-   * 提醒时间关闭
-   * 
-   */
-  onCloseChooseDate() {
-    this.setData({
-      show: false
-    })
-
-
-  },
-  /**
-   * 页面取消
-   */
-  cancle() {
-    wx.navigateBack({
-      delta: -1
-    });
-  },
-  /**
-   * 邀约到店时间展示
-   */
-  onChangePickDate_Month() {
-    this.setData({
-      show_Month: true
-    })
-  },
-  /**
-   * 邀约到店时间关闭
-   */
-  onCloseChooseDate_Month() {
-    this.setData({
-      show_Month: false
-    })
-  },
-  /**
-   * 邀约到店时间确定
-   */
-  onConfirmChooseDate_Month() {
-    let form = this.data.form
-    form.InviteTime = util.formatDataTime(new Date(this.data.inviteTimeSearch))
-    this.setData({
-      form: form,
-      show_Month: false
-    })
-  },
-
-  /**
-   * @desc : 标识日期变化事件
-   * @author : 秦祺
-   * @date : 2022/5/26 17:16
-   */
-  changeDate(e) {
-    let key = e.currentTarget.dataset.key
-    if (key === 'inviteTime') {
-      this.setData({
-        inviteTimeSearch: e.detail
-      })
-    }
-    //提醒时间
-    if (key === 'nextFollowTime') {
-      this.setData({
-        nextFollowTimeSearch: e.detail
-      })
-    }
-
-  },
-
-  /**
-   * 客户名称跳转客户详细
-   */
-  test01(e) {
-    if (this.data.customerFlag) {
-      return
-    }
-    wx.navigateTo({
-      url: '/package3/pages/customer/detail/detail?ID=' + JSON.stringify(e.currentTarget.dataset.item.CustomerId),
-    })
-  },
-  /**
-   * 意向品类勾选
-   * @param {*} event 
-   */
-  checkBoxChange(event) {
-    this.setData({
-      result: event.detail,
-    });
-  },
-  /**
-* @desc : 联系电话输入事件
-* @author : 于继渤
-* @date : 2022/5/24 12:16
-*/
-  changeCustomerFormFieldPhone(e) {
-    let key = e.detail.currentTarget.dataset.key
-    let form = this.data.form
-    form.CustomerPhone = e.detail.detail
-    this.setData({
-      form: form
-    })
-  },
-  /**
-   * 输入框 文字改变监听事件
-   */
-  fieldChange(e) {
-    let form = this.data.form
-    let type = e.currentTarget.dataset.key
-    if (type === "name") {
-      form.customerName = e.detail
-    }
-    if (type === "tephone") {
-      form.CustomerPhone = e.detail
-    }
-    if (type === "address") {
-      form.addressName = e.detail
-    }
-    if (type === "result") {
-      form.AddressNo = e.detail
-    }
-    if (type === "ortherName") {
-      form.ortherName = e.detail
-    }
-    if (type === "ortherPhone") {
-      form.ortherPhone = e.detail
-    }
-    this.setData({
-      form: form
-    })
-  },
 })

+ 121 - 220
package-basic-data/pages/customer-follow-up/customer-follow-up.wxml

@@ -3,76 +3,59 @@
 <!-- 设置金额和价格的小数位数 -->
 <view style="display:none">{{wxmlUtil.setNumberOfDecimalPlacesAmount(numberOfDecimalPlacesAmount)}}</view>
 
-<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+<loading wx:if="{{loading}}"></loading>
+
+<view class="dk-card-outer-class" style="border-radius: 15rpx;">
+  <view class="dk-card-class">
+    <van-radio-group value="{{ radioFollowUp }}" style="display:flex;background:white; padding-left: 40rpx;border-radius: 15rpx;" bind:change="onRadioFollowUp">
+      <view style="flex: 1;">
+        <van-radio name="1" style="margin: 5vw;font-size: 14px; font-weight: bold;" checked-color="#1B365D">日常跟进
+        </van-radio>
+      </view>
+      <view style="flex: 1;">
+        <van-radio name="2" style="margin: 5vw;font-size: 14px; font-weight: bold;" checked-color="#1B365D">邀约进店
+        </van-radio>
+      </view>
+      <view style="flex: 1;">
+        <van-radio name="3" style="margin: 5vw;font-size: 14px; font-weight: bold;" checked-color="#1B365D">预约量尺
+        </van-radio>
+      </view>
+    </van-radio-group>
+  </view>
+</view>
+
+
+<dk-form id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
+</dk-form>
+
+
+
 <view style="padding-top: 21rpx;">
 
   <van-cell-group>
-    <!-- 单据信息 -->
     <view>
 
 
-      <view class="dk-card-outer-class" style="border-radius: 15rpx;">
-        <view class="dk-card-class">
-          <van-radio-group value="{{ radio_follow_up }}"
-            style="display:flex;background:white; padding-left: 40rpx;border-radius: 15rpx;"
-            bind:change="onRadio_Follow_Up">
-            <view style="flex: 1;">
-              <van-radio name="1" style="margin: 5vw;font-size: 14px; font-weight: bold;" checked-color="#1B365D">日常跟进
-              </van-radio>
-            </view>
-            <view style="flex: 1;">
-              <van-radio name="3" style="margin: 5vw;font-size: 14px; font-weight: bold;" checked-color="#1B365D">邀约进店
-              </van-radio>
-            </view>
-            <view style="flex: 1;">
-              <van-radio name="5" style="margin: 5vw;font-size: 14px; font-weight: bold;" checked-color="#1B365D">预约量尺
-              </van-radio>
-            </view>
-          </van-radio-group>
-        </view>
-
-      </view>
-
 
       <view class="dk-card-outer-class">
         <view class="dk-card-class">
           <!-- 日常跟进 -->
           <view wx:if="{{radio_follow_up == 1}}">
-            <!-- 客户名称 EditFlag-->
-            <!-- <van-cell title-class="red-label" title="客户名称" value="" title-width="101px" use-label-slot
-              value-class="valueName-class" border="{{false}}">
-              <view Cell Slot="use-label-slot" style="text-align: left;width: 50%;color:#1B365D; white-space:nowrap"
-                catchtap="test01" data-item="{{form}}">{{ form.CustomerName }}</view>
-              <view Cell Slot="right-icon" style="text-align: right;width: 50%; ">
-                <view catchtap="onChooseCustomerClear" style="justify-content: space-between;flex-flow: row nowrap;">
 
-                  <view catchtap="onnavigateToAddCustomer" slot="button" style="text-align: right; "
-                    wx:if="{{!form.qvExternalUserid}}">
+            <van-field label="客户名称" data-index="{{index}}" label-class="red-label" value="{{ form.CustomerName }}" data-key="customerName" input-align="left" maxlength="50" placeholder="请输入客户名称" border="{{ false }}" bind:change="onCustomerNameChange" use-button-slot>
+              <view slot="button" style="text-align: right; ">
+                <view catchtap="onChooseCustomerClear" style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
+                  <view style="width: 10rpx;"></view>
+                  <view catchtap="onnavigateToAddCustomer" slot="button" style="text-align: right; ">
                     <view style="justify-content: flex-end;flex-flow: row nowrap;display: flex;">
                       <view>
-                        <image src="../../../../static/image/wx.png" style="width:38rpx;height:38rpx;" />
+                        <image src="/static/image/wx.png" style="width:38rpx;height:38rpx;" />
                       </view>
                     </view>
                   </view>
-
-
                 </view>
               </view>
-            </van-cell> -->
-            <van-field label="客户名称" data-index="{{index}}" label-class="red-label" value="{{ form.CustomerName }}" data-key="customerName" input-align="left" maxlength="50" placeholder="请输入客户名称" border="{{ false }}" bind:change="onCustomerNameChange" use-button-slot>
-          <view slot="button" style="text-align: right; ">
-            <view catchtap="onChooseCustomerClear" style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
-              <view style="width: 10rpx;"></view>
-              <view catchtap="onnavigateToAddCustomer" slot="button" style="text-align: right; ">
-                <view style="justify-content: flex-end;flex-flow: row nowrap;display: flex;">
-                  <view>
-                    <image src="/static/image/wx.png" style="width:38rpx;height:38rpx;" />
-                  </view>
-                </view>
-              </view>
-            </view>
-          </view>
-        </van-field>
+            </van-field>
             <!-- 联系电话 -->
             <!-- <van-field label="联系电话" data-index="{{index}}" disabled="{{EditFlag}}" label-class="red-label"
               copyValue="{{form.CustomerPhone}}" value="{{ form.CustomerPhone }}" data-key="tephone" input-align="left"
@@ -89,17 +72,11 @@
             </van-field> -->
 
             <!-- 联系电话 -->
-            <dk-number-phone-input  dataKey="phone" value="{{form.CustomerPhone}}"
-              bind:changeField="changeCustomerFormFieldPhone" bind:changeFieldblur="blurCustomerPhone"
-              errorMessage="联系电话格式错误" bind:click-icon="onClickphone" labelClass="{{form.noTelephone ? '' : 'red-label'}}" rightIcon="phone" label="客户电话"
-              placeholder="请输入客户电话">
+            <dk-number-phone-input dataKey="phone" value="{{form.CustomerPhone}}" bind:changeField="changeCustomerFormFieldPhone" bind:changeFieldblur="blurCustomerPhone" errorMessage="联系电话格式错误" bind:click-icon="onClickphone" labelClass="{{form.noTelephone ? '' : 'red-label'}}" rightIcon="phone" label="客户电话" placeholder="请输入客户电话">
             </dk-number-phone-input>
 
             <!-- 客户地址 -->
-            <van-field catchtap="onClickWxchartAddress" readonly="{{true}}"
-              value="{{ wxmlUtil.addressToIndexOf((form.addressArea.province?form.addressArea.province:'') +  (form.addressArea.city?form.addressArea.city:'') + (form.addressArea.district?form.addressArea.district:'') + (form.addressName?form.addressName:'')) }}"
-              input-align="left" label="客户地址" placeholder="请输入客户地址" autosize border="{{false}}" bind:change="change"
-              use-button-slot>
+            <van-field catchtap="onClickWxchartAddress" readonly="{{true}}" value="{{ wxmlUtil.addressToIndexOf((form.addressArea.province?form.addressArea.province:'') +  (form.addressArea.city?form.addressArea.city:'') + (form.addressArea.district?form.addressArea.district:'') + (form.addressName?form.addressName:'')) }}" input-align="left" label="客户地址" placeholder="请输入客户地址" autosize border="{{false}}" bind:change="change" use-button-slot>
               <view slot="button" style="text-align: right; ">
                 <view style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
                   <view>
@@ -110,49 +87,38 @@
             </van-field>
 
             <!-- 门牌号 -->
-            <van-field label="门牌号" data-index="{{index}}" value="{{form.AddressNo}}"
-              data-key="result" input-align="lef" maxlength="200" border="{{ false }}"
-              bind:change="onAddressNoChange" />
-
-             <!-- 客户意向 -->
-             <van-field   readonly="{{ true }}" label-class="red-label" value="{{ form.CustomerIntentionsName }}" input-align="left"label-width="180rpx"  label="客户意向" placeholder="请选择"  
-                    border="{{ false }}"  data-type='CustomerIntentions'  catchtap="showCustomerIntentionsPopup"  is-link />
-            
+            <van-field label="门牌号" data-index="{{index}}" value="{{form.AddressNo}}" data-key="result" input-align="lef" maxlength="200" border="{{ false }}" bind:change="onAddressNoChange" />
+
+            <!-- 客户意向 -->
+            <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.CustomerIntentionsName }}" input-align="left" label-width="180rpx" label="客户意向" placeholder="请选择" border="{{ false }}" data-type='CustomerIntentions' catchtap="showCustomerIntentionsPopup" is-link />
+
             <!-- 流失原因 -->
             <view wx:if="{{competitionBrandFlag}}">
-              <van-field  readonly="{{ true }}" label-class="red-label" value="{{ form.loseReasonNames }}" input-align="left"label-width="180rpx"  label="流失原因" placeholder="请选择"  
-                    border="{{ false}}"  data-type='CustomerLoseReason'  catchtap="showLoseReason"  is-link />
+              <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.loseReasonNames }}" input-align="left" label-width="180rpx" label="流失原因" placeholder="请选择" border="{{ false}}" data-type='CustomerLoseReason' catchtap="showLoseReason" is-link />
             </view>
 
             <!-- 竞品品牌 -->
             <view wx:if="{{competitionBrandFlag}}">
-              <van-field value="{{ form.CompetitionBrand }}" input-align="left" label="竞品品牌"
-                placeholder="请输入竞品品牌" autosize border="{{ false }}" bind:change="onCompetitionBrandChange">
+              <van-field value="{{ form.CompetitionBrand }}" input-align="left" label="竞品品牌" placeholder="请输入竞品品牌" autosize border="{{ false }}" bind:change="onCompetitionBrandChange">
               </van-field>
             </view>
 
             <!-- 手风琴,复选框输入 showOtherFlag :是否显示其他分类    showFieldFlag:是否显示输入框 
           disabledFlag:输入框是否输入 checkboxClinkFlag:box能否点动-->
-            <dk-accordion-box titleName="意向品类" dataList="{{specsList}}" bind:onDataChange="onDataChange"
-              showOtherFlag="{{true}}" showFieldFlag="{{true}}" disabledFlag="{{false}}" checkboxClinkFlag="{{true}}">
+            <dk-accordion-box titleName="意向品类" dataList="{{specsList}}" bind:onDataChange="onDataChange" showOtherFlag="{{true}}" showFieldFlag="{{true}}" disabledFlag="{{false}}" checkboxClinkFlag="{{true}}">
             </dk-accordion-box>
 
             <!-- 跟进方式 -->
-              <van-field   readonly="{{ true }}" label-class="red-label" value="{{ form.FollowTypeName }}" input-align="left"label-width="180rpx"  label="跟进方式" placeholder="请选择"  
-                    border="{{ false }}"  data-type='FollowType'  catchtap="showFollowTypePopup"  is-link />
+            <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.FollowTypeName }}" input-align="left" label-width="180rpx" label="跟进方式" placeholder="请选择" border="{{ false }}" data-type='FollowType' catchtap="showFollowTypePopup" is-link />
 
             <!-- 跟进内容 -->
-            <van-field rows="5" autosize label="跟进内容" label-class="red-label" value="{{ form.FollowUpContent }}"
-              type="textarea" maxlength="1000" placeholder="请输入跟进内容" show-word-limit input-class="input-class" 
-              bind:change="onFollowUpContentChange" border="{{false}}" />
-            <van-field rows="5" autosize label="下次跟进计划" type="textarea" maxlength="1000"
-              value="{{ form.NextFollowUpPlan }}" placeholder="请输入下次跟进计划" show-word-limit input-class="input-class"
-              bind:change="onNextFollowUpPlanChange" border="{{false}}" />
+            <van-field rows="5" autosize label="跟进内容" label-class="red-label" value="{{ form.FollowUpContent }}" type="textarea" maxlength="1000" placeholder="请输入跟进内容" show-word-limit input-class="input-class" bind:change="onFollowUpContentChange" border="{{false}}" />
+            <van-field rows="5" autosize label="下次跟进计划" type="textarea" maxlength="1000" value="{{ form.NextFollowUpPlan }}" placeholder="请输入下次跟进计划" show-word-limit input-class="input-class" bind:change="onNextFollowUpPlanChange" border="{{false}}" />
             <!-- <van-cell is-link title-class="red-label" value-class="PickDate_Month" title-width="29%" border="{{ true }}" catchtap="onChangePickDate" title="提醒时间" value="{{form.NextFollowTime ? form.NextFollowTime :'请选择'  }}" /> -->
-         
 
-              <van-field  readonly="{{ true }}"label-width="29%"  label-class="{{nextFollowTimeFlag ? 'red-label': ''}}" value="{{ form.NextFollowTime }}" value-class="PickDate_Month" input-align="left"   label="提醒时间" placeholder="请选择提醒时间"      border="{{ false }}"   catchtap="onChangePickDate"  is-link />
-            
+
+            <van-field readonly="{{ true }}" label-width="29%" label-class="{{nextFollowTimeFlag ? 'red-label': ''}}" value="{{ form.NextFollowTime }}" value-class="PickDate_Month" input-align="left" label="提醒时间" placeholder="请选择提醒时间" border="{{ false }}" catchtap="onChangePickDate" is-link />
+
 
 
             <!-- 图片 -->
@@ -161,9 +127,7 @@
                 <view style="font-size:14px;color: black; margin-bottom: 10px; color: #95A8CB;">
                   图片
                 </view>
-                <van-uploader max-count="5" accept="image" style="margin-left: 4%;" preview-size="160rpx;"
-                  file-list="{{ fileList }}" bind:delete="deleteImg" bind:after-read="afterRead" multiple="true"
-                  imageFit="aspectFit" />
+                <van-uploader max-count="5" accept="image" style="margin-left: 4%;" preview-size="160rpx;" file-list="{{ fileList }}" bind:delete="deleteImg" bind:after-read="afterRead" multiple="true" imageFit="aspectFit" />
                 <view style="font-size:10px;color: #95A8CB; margin-bottom: 10px;">
                   图片最多上传5张
                 </view>
@@ -193,19 +157,19 @@
             </van-cell> -->
 
             <van-field label="客户名称" data-index="{{index}}" label-class="red-label" value="{{ form.CustomerName }}" data-key="customerName" input-align="left" maxlength="50" placeholder="请输入客户名称" border="{{ false }}" bind:change="onCustomerNameChange" use-button-slot>
-          <view slot="button" style="text-align: right; ">
-            <view catchtap="onChooseCustomerClear" style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
-              <view style="width: 10rpx;"></view>
-              <view catchtap="onnavigateToAddCustomer" slot="button" style="text-align: right; ">
-                <view style="justify-content: flex-end;flex-flow: row nowrap;display: flex;">
-                  <view>
-                    <image src="/static/image/wx.png" style="width:38rpx;height:38rpx;" />
+              <view slot="button" style="text-align: right; ">
+                <view catchtap="onChooseCustomerClear" style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
+                  <view style="width: 10rpx;"></view>
+                  <view catchtap="onnavigateToAddCustomer" slot="button" style="text-align: right; ">
+                    <view style="justify-content: flex-end;flex-flow: row nowrap;display: flex;">
+                      <view>
+                        <image src="/static/image/wx.png" style="width:38rpx;height:38rpx;" />
+                      </view>
+                    </view>
                   </view>
                 </view>
               </view>
-            </view>
-          </view>
-        </van-field>
+            </van-field>
 
             <!-- 联系电话 -->
             <!-- <van-field label="联系电话" data-index="{{index}}" disabled="{{EditFlag}}" label-class="red-label"
@@ -224,17 +188,11 @@
             </van-field> -->
 
             <!-- 联系电话 -->
-            <dk-number-phone-input  dataKey="phone" value="{{form.CustomerPhone}}"
-              bind:changeField="changeCustomerFormFieldPhone" bind:changeFieldblur="blurCustomerPhone"
-              errorMessage="联系电话格式错误" bind:click-icon="onClickphone" labelClass="{{form.noTelephone ? '' : 'red-label'}}" rightIcon="phone" label="客户电话"
-              placeholder="请输入客户电话"></dk-number-phone-input>
+            <dk-number-phone-input dataKey="phone" value="{{form.CustomerPhone}}" bind:changeField="changeCustomerFormFieldPhone" bind:changeFieldblur="blurCustomerPhone" errorMessage="联系电话格式错误" bind:click-icon="onClickphone" labelClass="{{form.noTelephone ? '' : 'red-label'}}" rightIcon="phone" label="客户电话" placeholder="请输入客户电话"></dk-number-phone-input>
 
 
             <!-- 客户地址 -->
-            <van-field catchtap="onClickWxchartAddress" readonly="{{true}}"
-              value="{{ wxmlUtil.addressToIndexOf((form.addressArea.province?form.addressArea.province:'') +  (form.addressArea.city?form.addressArea.city:'') + (form.addressArea.district?form.addressArea.district:'') + (form.addressName?form.addressName:''))  }}"
-              input-align="left" label="客户地址" placeholder="请输入客户地址" autosize border="{{ false }}" bind:change="change"
-              use-button-slot>
+            <van-field catchtap="onClickWxchartAddress" readonly="{{true}}" value="{{ wxmlUtil.addressToIndexOf((form.addressArea.province?form.addressArea.province:'') +  (form.addressArea.city?form.addressArea.city:'') + (form.addressArea.district?form.addressArea.district:'') + (form.addressName?form.addressName:''))  }}" input-align="left" label="客户地址" placeholder="请输入客户地址" autosize border="{{ false }}" bind:change="change" use-button-slot>
               <view slot="button" style="text-align: right; ">
                 <view style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
                   <view catchtap="onClickWxchartAddress">
@@ -245,46 +203,37 @@
             </van-field>
 
             <!-- 门牌号 -->
-            <van-field label="门牌号"  data-index="{{index}}" value="{{form.AddressNo}}"
-              data-key="result" border="{{ false }}" bind:change="onAddressNoChange" />
-      
+            <van-field label="门牌号" data-index="{{index}}" value="{{form.AddressNo}}" data-key="result" border="{{ false }}" bind:change="onAddressNoChange" />
 
-                <!-- 邀约结果 -->
-             <van-field   readonly="{{ true }}" label-class="red-label" value="{{ form.InviteResult }}" input-align="left"label-width="180rpx"  label="邀约结果" placeholder="请选择"  
-                    border="{{ false }}"  data-type='InviteResult'  catchtap="showInviteResultPopup"  is-link />
+
+            <!-- 邀约结果 -->
+            <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.InviteResult }}" input-align="left" label-width="180rpx" label="邀约结果" placeholder="请选择" border="{{ false }}" data-type='InviteResult' catchtap="showInviteResultPopup" is-link />
 
             <!-- 邀约到店时间 -->
-              <van-field  readonly="{{ true }}"label-width="29%"  label-class="{{inviteTimeFlag ? 'red-label': ''}}" value="{{ form.InviteTime }}" value-class="PickDate_Month" input-align="left"   label="邀约到店时间" placeholder="请选择"      border="{{ false }}"   catchtap="onChangePickDate_Month"  is-link />
+            <van-field readonly="{{ true }}" label-width="29%" label-class="{{inviteTimeFlag ? 'red-label': ''}}" value="{{ form.InviteTime }}" value-class="PickDate_Month" input-align="left" label="邀约到店时间" placeholder="请选择" border="{{ false }}" catchtap="onChangePickDate_Month" is-link />
 
             <!-- 客户意向 -->
-              <van-field   readonly="{{ true }}" label-class="red-label" value="{{ form.CustomerIntentionsName }}" input-align="left"label-width="180rpx"  label="客户意向" placeholder="请选择"  
-                    border="{{ false }}"  data-type='CustomerIntentions'  catchtap="showCustomerIntentionsPopupInvite"  is-link />
-            
+            <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.CustomerIntentionsName }}" input-align="left" label-width="180rpx" label="客户意向" placeholder="请选择" border="{{ false }}" data-type='CustomerIntentions' catchtap="showCustomerIntentionsPopupInvite" is-link />
+
             <!-- 流失原因 -->
-              <view wx:if="{{competitionBrandFlag}}">
-              <van-field  readonly="{{ true }}" label-class="red-label" value="{{ form.loseReasonNames }}" input-align="left"label-width="180rpx"  label="流失原因" placeholder="请选择"  
-                    border="{{ false}}"  data-type='CustomerLoseReason'  catchtap="showLoseReason"  is-link />
+            <view wx:if="{{competitionBrandFlag}}">
+              <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.loseReasonNames }}" input-align="left" label-width="180rpx" label="流失原因" placeholder="请选择" border="{{ false}}" data-type='CustomerLoseReason' catchtap="showLoseReason" is-link />
             </view>
 
             <!-- 竞品品牌 -->
             <view wx:if="{{competitionBrandFlag}}">
-              <van-field value="{{ form.CompetitionBrand }}" input-align="left" label="竞品品牌"
-                placeholder="请输入竞品品牌" autosize border="{{ false }}" bind:change="onCompetitionBrandChange">
+              <van-field value="{{ form.CompetitionBrand }}" input-align="left" label="竞品品牌" placeholder="请输入竞品品牌" autosize border="{{ false }}" bind:change="onCompetitionBrandChange">
               </van-field>
             </view>
 
             <!-- 跟进内容 -->
-            <van-field rows="5" autosize label="跟进内容" label-class="red-label" value="{{ form.FollowUpContent }}"
-              type="textarea" maxlength="1000" placeholder="请输入跟进内容" show-word-limit input-class="input-class"
-              bind:change="onFollowUpContentChange" border="{{false}}" />
-            <van-field rows="5" autosize label="下次跟进计划" type="textarea" maxlength="1000"
-              value="{{ form.NextFollowUpPlan }}" placeholder="请输入下次跟进计划" show-word-limit input-class="input-class"
-              bind:change="onNextFollowUpPlanChange" border="{{false}}" />
+            <van-field rows="5" autosize label="跟进内容" label-class="red-label" value="{{ form.FollowUpContent }}" type="textarea" maxlength="1000" placeholder="请输入跟进内容" show-word-limit input-class="input-class" bind:change="onFollowUpContentChange" border="{{false}}" />
+            <van-field rows="5" autosize label="下次跟进计划" type="textarea" maxlength="1000" value="{{ form.NextFollowUpPlan }}" placeholder="请输入下次跟进计划" show-word-limit input-class="input-class" bind:change="onNextFollowUpPlanChange" border="{{false}}" />
             <!-- 提醒时间 -->
             <!-- <van-cell is-link title-class="red-label" value-class="PickDate_Month" title-width="29%" border="{{ true }}" catchtap="onChangePickDate" title="提醒时间" value="{{form.NextFollowTime ? form.NextFollowTime :'请选择'  }}" /> -->
-         
-            <van-field  readonly="{{ true }}"label-width="29%"  label-class="{{nextFollowTimeFlag ? 'red-label': ''}}" value="{{ form.NextFollowTime }}" value-class="PickDate_Month" input-align="left"   label="提醒时间" placeholder="请选择提醒时间"      border="{{ false }}"   catchtap="onChangePickDate"  is-link />
-            
+
+            <van-field readonly="{{ true }}" label-width="29%" label-class="{{nextFollowTimeFlag ? 'red-label': ''}}" value="{{ form.NextFollowTime }}" value-class="PickDate_Month" input-align="left" label="提醒时间" placeholder="请选择提醒时间" border="{{ false }}" catchtap="onChangePickDate" is-link />
+
 
             <!-- 图片 -->
             <view style="padding-left:32rpx;padding-top:11rpx;display:flex;background: white;">
@@ -292,8 +241,7 @@
                 <view style="font-size:14px;color: black; margin-bottom: 10px; color: #95A8CB;">
                   图片
                 </view>
-                <van-uploader max-count="5" accept="image" style="margin-left: 4%;" preview-size="160rpx;"
-                  file-list="{{ fileList }}" bind:after-read="afterRead" multiple="true" imageFit="aspectFit" />
+                <van-uploader max-count="5" accept="image" style="margin-left: 4%;" preview-size="160rpx;" file-list="{{ fileList }}" bind:after-read="afterRead" multiple="true" imageFit="aspectFit" />
                 <view style="font-size:10px;color: #95A8CB; margin-bottom: 10px;">
                   图片最多上传5张
                 </view>
@@ -322,20 +270,20 @@
               </view>
             </van-cell> -->
             <van-field label="客户名称" data-index="{{index}}" label-class="red-label" value="{{ form.CustomerName }}" data-key="customerName" input-align="left" maxlength="50" placeholder="请输入客户名称" border="{{ false }}" bind:change="onCustomerNameChange" use-button-slot>
-          <view slot="button" style="text-align: right; ">
-            <view catchtap="onChooseCustomerClear" style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
-              <view style="width: 10rpx;"></view>
-              <view catchtap="onnavigateToAddCustomer" slot="button" style="text-align: right; ">
-                <view style="justify-content: flex-end;flex-flow: row nowrap;display: flex;">
-                  <view>
-                    <image src="/static/image/wx.png" style="width:38rpx;height:38rpx;" />
+              <view slot="button" style="text-align: right; ">
+                <view catchtap="onChooseCustomerClear" style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
+                  <view style="width: 10rpx;"></view>
+                  <view catchtap="onnavigateToAddCustomer" slot="button" style="text-align: right; ">
+                    <view style="justify-content: flex-end;flex-flow: row nowrap;display: flex;">
+                      <view>
+                        <image src="/static/image/wx.png" style="width:38rpx;height:38rpx;" />
+                      </view>
+                    </view>
                   </view>
                 </view>
               </view>
-            </view>
-          </view>
-        </van-field> 
-            
+            </van-field>
+
             <!-- 联系电话 -->
             <!-- <van-field label="联系电话" data-index="{{index}}" label-class="red-label" disabled="{{EditFlag}}"
               copyValue="{{form.CustomerPhone}}" value="{{ form.CustomerPhone }}"
@@ -354,18 +302,12 @@
 
 
             <!-- 联系电话 -->
-            <dk-number-phone-input  dataKey="phone" value="{{form.CustomerPhone}}"
-              bind:changeField="changeCustomerFormFieldPhone" bind:changeFieldblur="blurCustomerPhone"
-              errorMessage="联系电话格式错误" bind:click-icon="onClickphone" labelClass="{{form.noTelephone ? '' : 'red-label'}}" rightIcon="phone" label="客户电话"
-              placeholder="请输入客户电话">
+            <dk-number-phone-input dataKey="phone" value="{{form.CustomerPhone}}" bind:changeField="changeCustomerFormFieldPhone" bind:changeFieldblur="blurCustomerPhone" errorMessage="联系电话格式错误" bind:click-icon="onClickphone" labelClass="{{form.noTelephone ? '' : 'red-label'}}" rightIcon="phone" label="客户电话" placeholder="请输入客户电话">
             </dk-number-phone-input>
 
 
             <!-- 客户地址 -->
-            <van-field catchtap="onClickWxchartAddress" readonly="{{true}}"
-              value="{{ wxmlUtil.addressToIndexOf((form.addressArea.province?form.addressArea.province:'') +  (form.addressArea.city?form.addressArea.city:'') + (form.addressArea.district?form.addressArea.district:'') + (form.addressName?form.addressName:''))  }}"
-              input-align="left" label="客户地址" placeholder="请输入客户地址" autosize border="{{ false }}" bind:change="change"
-              use-button-slot>
+            <van-field catchtap="onClickWxchartAddress" readonly="{{true}}" value="{{ wxmlUtil.addressToIndexOf((form.addressArea.province?form.addressArea.province:'') +  (form.addressArea.city?form.addressArea.city:'') + (form.addressArea.district?form.addressArea.district:'') + (form.addressName?form.addressName:''))  }}" input-align="left" label="客户地址" placeholder="请输入客户地址" autosize border="{{ false }}" bind:change="change" use-button-slot>
               <view slot="button" style="text-align: right; ">
                 <view style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
                   <view>
@@ -374,21 +316,15 @@
                 </view>
               </view>
             </van-field>
-            <van-field label="门牌号" data-index="{{index}}" value="{{form.AddressNo}}"
-              data-key="result" input-align="lef" maxlength="200" border="{{ false }}"
-              bind:change="onAddressNoChange" />
+            <van-field label="门牌号" data-index="{{index}}" value="{{form.AddressNo}}" data-key="result" input-align="lef" maxlength="200" border="{{ false }}" bind:change="onAddressNoChange" />
 
             <!-- 设计师 -->
             <view style="display: flex;">
-              <view style="flex: 1;">   
-             <van-field   readonly="{{ true }}" label-class="red-label" value="{{ form.DesignUser }}" input-align="left"label-width="180rpx"  label="设计师" placeholder="请选择"  
-                    border="{{ false }}"  data-type='DesignUser'  catchtap="showDesignPopup"  is-link />
+              <view style="flex: 1;">
+                <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.DesignUser }}" input-align="left" label-width="180rpx" label="设计师" placeholder="请选择" border="{{ false }}" data-type='DesignUser' catchtap="showDesignPopup" is-link />
               </view>
               <view slot="button" style="text-align:right;align-self:center;margin: 3vw;">
-                <view catchtap="openWeChat" style="justify-content: space-between;flex-flow: row nowrap;display: flex;"
-                  data-qvExternalUserid="{{form.qvExternalUserid}}" data-qvUserid="{{form.qvUserid}}"
-                  data-staffQvUserId="{{form.staffQvUserId}}" data-customerId="{{form.CustomerId}}"
-                  data-customerName="{{form.CustomerName}}" data-designUser="{{form.DesignUser}}">
+                <view catchtap="openWeChat" style="justify-content: space-between;flex-flow: row nowrap;display: flex;" data-qvExternalUserid="{{form.qvExternalUserid}}" data-qvUserid="{{form.qvUserid}}" data-staffQvUserId="{{form.staffQvUserId}}" data-customerId="{{form.CustomerId}}" data-customerName="{{form.CustomerName}}" data-designUser="{{form.DesignUser}}">
                   <!-- <view style="padding-right: 15rpx;">
               <van-icon name="/static/image/wechat.png" color="#00C800" size="38rpx" />
             </view> -->
@@ -400,24 +336,19 @@
             </view>
 
             <!-- 邀约结果 -->
-            <van-field   readonly="{{ true }}" label-class="red-label" value="{{ form.InviteResult }}" input-align="left"label-width="180rpx"  label="邀约结果" placeholder="请选择"  
-                    border="{{ false }}"  data-type='InviteResult'  catchtap="showInviteResultPopup"  is-link />
-      
+            <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.InviteResult }}" input-align="left" label-width="180rpx" label="邀约结果" placeholder="请选择" border="{{ false }}" data-type='InviteResult' catchtap="showInviteResultPopup" is-link />
+
 
             <!-- 服务时间 -->
-            <van-field  readonly="{{ true }}"label-width="29%"  label-class="{{inviteTimeFlag ? 'red-label': ''}}" value="{{ form.InviteTime }}" value-class="PickDate_Month" input-align="left"   label="服务时间" placeholder="请选择"      border="{{ false }}"   catchtap="onChangePickDate_Month"  is-link />
+            <van-field readonly="{{ true }}" label-width="29%" label-class="{{inviteTimeFlag ? 'red-label': ''}}" value="{{ form.InviteTime }}" value-class="PickDate_Month" input-align="left" label="服务时间" placeholder="请选择" border="{{ false }}" catchtap="onChangePickDate_Month" is-link />
 
             <!-- 跟进内容 -->
-            <van-field rows="5" autosize label="跟进内容" label-class="red-label" type="textarea"
-              value="{{ form.FollowUpContent }}" maxlength="1000" placeholder="请输入跟进内容" 
-              input-class="input-class" bind:change="onFollowUpContentChange" border="{{false}}" />
-            <van-field rows="5" autosize label="下次跟进计划" type="textarea" value="{{ form.NextFollowUpPlan }}"
-              maxlength="1000" placeholder="请输入下次跟进计划"  input-class="input-class"
-              bind:change="onNextFollowUpPlanChange" border="{{false}}" />
+            <van-field rows="5" autosize label="跟进内容" label-class="red-label" type="textarea" value="{{ form.FollowUpContent }}" maxlength="1000" placeholder="请输入跟进内容" input-class="input-class" bind:change="onFollowUpContentChange" border="{{false}}" />
+            <van-field rows="5" autosize label="下次跟进计划" type="textarea" value="{{ form.NextFollowUpPlan }}" maxlength="1000" placeholder="请输入下次跟进计划" input-class="input-class" bind:change="onNextFollowUpPlanChange" border="{{false}}" />
             <!-- <van-cell is-link title-class="red-label" value-class="PickDate_Month" title-width="29%" border="{{ true }}" catchtap="onChangePickDate" title="提醒时间" value="{{form.NextFollowTime ? form.NextFollowTime :'请选择'  }}" /> -->
-   
-            <van-field  readonly="{{ true }}"label-width="29%"  label-class="{{nextFollowTimeFlag ? 'red-label': ''}}" value="{{ form.NextFollowTime }}" value-class="PickDate_Month" input-align="left"   label="提醒时间" placeholder="请选择提醒时间"      border="{{ false }}"   catchtap="onChangePickDate"  is-link />
-            
+
+            <van-field readonly="{{ true }}" label-width="29%" label-class="{{nextFollowTimeFlag ? 'red-label': ''}}" value="{{ form.NextFollowTime }}" value-class="PickDate_Month" input-align="left" label="提醒时间" placeholder="请选择提醒时间" border="{{ false }}" catchtap="onChangePickDate" is-link />
+
           </view>
         </view>
 
@@ -428,30 +359,16 @@
   <view style="height:100px;">
   </view>
 
-  <!--  保存 -->
-  <!-- <view style="background:#f8f9fd;position:fixed;bottom:0;padding-bottom:20rpx;width:90%;margin-left:5%;border-top:2rpx solid #efefef;z-index:2">
-    <view style="display:flex;justify-content: space-around;width:100%;">
-      <view style="width:247rpx;height:88rpx; ">
-        <van-button custom-style="height:80rpx;width:100%;border-radius: 15rpx;border:1px solid #1B365D;color:#1B365D;" plain loading="{{loading}}" bind:click="cancle">取消
-        </van-button>
-      </view>
-      <view style="width:50%;height:80rpx; ">
-        <van-button color="#1B365D" custom-style="height:80rpx;width:100%;border-radius: 15rpx;" loading="{{loading}}" bind:click="submit" type="info">保存
-        </van-button>
-      </view>
-    </view>
-  </view> -->
+
 
   <view class="botton-class">
     <view style="padding:40rpx 34rpx 61rpx 43rpx; display: flex; ">
       <view style="width:247rpx;height:88rpx; ">
-        <van-button custom-style="height:80rpx;width:100%;border-radius: 15rpx;border:1px solid #1B365D;color:#1B365D;"
-          plain disabled="{{loadingButtonFlag}}" loading="{{loadingButtonFlag}}"bind:click="cancle">取消
+        <van-button custom-style="height:80rpx;width:100%;border-radius: 15rpx;border:1px solid #1B365D;color:#1B365D;" plain disabled="{{loadingButtonFlag}}" loading="{{loadingButtonFlag}}" bind:click="cancle">取消
         </van-button>
       </view>
       <view style="width:50%;height:80rpx; margin-left: 35px;">
-        <van-button color="#1B365D" custom-style="height:80rpx;width:100%;border-radius: 15rpx;" 
-          bind:click="submit"disabled="{{loadingButtonFlag}}" loading="{{loadingButtonFlag}}"type="info">保存
+        <van-button color="#1B365D" custom-style="height:80rpx;width:100%;border-radius: 15rpx;" bind:click="submit" disabled="{{loadingButtonFlag}}" loading="{{loadingButtonFlag}}" type="info">保存
         </van-button>
       </view>
     </view>
@@ -461,55 +378,39 @@
 <van-dialog id="van-dialog" />
 
 <!-- 提醒时间 -->
-<van-popup position="bottom" show="{{ show }}" data-key="nextFollowTime" bind:close="onCloseChooseDate" class="popup"
-  style="width:100%">
+<van-popup position="bottom" show="{{ show }}" data-key="nextFollowTime" bind:close="onCloseChooseDate" class="popup" style="width:100%">
   <view style="display:flex;justify-content: space-around;height:80rpx;">
-    <view style="width:45%;text-align: left;color:#b6b6b6;line-height:80rpx;" data-key="nextFollowTime"
-      catchtap="onCloseChooseDate">取消</view>
-    <view style="width:45%;text-align: right;color:#1989fa;line-height:80rpx;" data-key="nextFollowTime"
-      catchtap="onConfirmChooseDate">确定</view>
+    <view style="width:45%;text-align: left;color:#b6b6b6;line-height:80rpx;" data-key="nextFollowTime" catchtap="onCloseChooseDate">取消</view>
+    <view style="width:45%;text-align: right;color:#1989fa;line-height:80rpx;" data-key="nextFollowTime" catchtap="onConfirmChooseDate">确定</view>
   </view>
-  <van-datetime-picker min-date="{{ minDate }}" show-toolbar="{{false}}" bindonlyinput="changeDate"
-    data-key="nextFollowTime" data-index="0" type="datetime" loading="{true}" value="{{ nextFollowTimeSearch }}"
-    formatter="{{formatter}}" />
+  <van-datetime-picker min-date="{{ minDate }}" show-toolbar="{{false}}" bindonlyinput="changeDate" data-key="nextFollowTime" data-index="0" type="datetime" loading="{true}" value="{{ nextFollowTimeSearch }}" formatter="{{formatter}}" />
 </van-popup>
 
 <!-- 邀请时间 -->
-<van-popup show="{{ show_Month }}" position="bottom" bind:close="onCloseChooseDate_Month" data-key="inviteTime"
-  class="popup" style="width:100%">
+<van-popup show="{{ show_Month }}" position="bottom" bind:close="onCloseChooseDate_Month" data-key="inviteTime" class="popup" style="width:100%">
   <view style="display:flex;justify-content: space-around;height:80rpx;">
-    <view style="width:45%;text-align: left;color:#b6b6b6;line-height:80rpx;" data-key="inviteTime"
-      catchtap="onCloseChooseDate_Month">取消</view>
-    <view style="width:45%;text-align: right;color:#1989fa;line-height:80rpx;" data-key="inviteTime"
-      catchtap="onConfirmChooseDate_Month">确定</view>
+    <view style="width:45%;text-align: left;color:#b6b6b6;line-height:80rpx;" data-key="inviteTime" catchtap="onCloseChooseDate_Month">取消</view>
+    <view style="width:45%;text-align: right;color:#1989fa;line-height:80rpx;" data-key="inviteTime" catchtap="onConfirmChooseDate_Month">确定</view>
   </view>
-  <van-datetime-picker min-date="{{ minDate }}" show-toolbar="{{false}}" bindonlyinput="changeDate"
-    data-key="inviteTime" data-index="0" type="datetime" loading="{true}" value="{{ inviteTimeSearch }}"
-    formatter="{{formatter}}" />
+  <van-datetime-picker min-date="{{ minDate }}" show-toolbar="{{false}}" bindonlyinput="changeDate" data-key="inviteTime" data-index="0" type="datetime" loading="{true}" value="{{ inviteTimeSearch }}" formatter="{{formatter}}" />
 </van-popup>
 
 
 <!-- 邀约结果 -->
-<dk-single-dropdown-item show="{{inviteResultFlag}}"
-  content="{{form.InviteResult =='邀约结果-接受'?'接受邀约':(form.InviteResult =='邀约结果-拒绝'?'拒绝邀约':'' )}}" id='inviteResult'
-  typeName='inviteResult' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
+<dk-single-dropdown-item show="{{inviteResultFlag}}" content="{{form.InviteResult =='邀约结果-接受'?'接受邀约':(form.InviteResult =='邀约结果-拒绝'?'拒绝邀约':'' )}}" id='inviteResult' typeName='inviteResult' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
 <!-- 客户意向 -->
-<dk-single-dropdown-item show="{{customerIntentionsFlag}}" content="{{form.CustomerIntentionsName}}"
-  id='customerIntentions' typeName='customerIntentions' bind:muticommit='mutiSearch' bind:muticlose='muticlose'>
+<dk-single-dropdown-item show="{{customerIntentionsFlag}}" content="{{form.CustomerIntentionsName}}" id='customerIntentions' typeName='customerIntentions' bind:muticommit='mutiSearch' bind:muticlose='muticlose'>
 </dk-single-dropdown-item>
 
 <!-- 邀约进店的客户意向 -->
-<dk-single-dropdown-item show="{{inviteFollowTypeFlag}}" content="{{form.CustomerIntentionsName}}" choooseFlg="true"
-  id='customerIntentions' typeName='customerIntentions' bind:muticommit='mutiSearch' bind:muticlose='muticlose'>
+<dk-single-dropdown-item show="{{inviteFollowTypeFlag}}" content="{{form.CustomerIntentionsName}}" choooseFlg="true" id='customerIntentions' typeName='customerIntentions' bind:muticommit='mutiSearch' bind:muticlose='muticlose'>
 </dk-single-dropdown-item>
 
 <!-- 跟进方式 -->
-<dk-single-dropdown-item show="{{followTypeFlag}}" content="{{form.FollowTypeName}}" id='followType'
-  typeName='followType' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
+<dk-single-dropdown-item show="{{followTypeFlag}}" content="{{form.FollowTypeName}}" id='followType' typeName='followType' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
 
 <!-- 设计师 -->
-<dk-single-dropdown-item show="{{designFlag}}" jobIds="{{jobIds}}" contentID="{{form.DesignUserId}}" id='staff' typeName='staff'
-  bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
+<dk-single-dropdown-item show="{{designFlag}}" jobIds="{{jobIds}}" contentID="{{form.DesignUserId}}" id='staff' typeName='staff' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
 
-  <!-- 流失原因多选 -->
+<!-- 流失原因多选 -->
 <dk-muti-dropdown-item show="{{loseReasonFlag}}" docName="流失原因" id='loseReason' typeName='loseReason' bind:muticommit='mutiSearchAll' bind:muticlose='muticloseAll'></dk-muti-dropdown-item>

+ 21 - 2
package-basic-data/pages/customer-list/add/add.js

@@ -24,7 +24,7 @@ Page({
         { code: 'cusPhone', type: 'phone', title: '客户电话', required: true },
         { code: 'addressFull', type: 'address', title: '客户地址', required: true },
         { code: 'addressNo', type: 'str', required: true, title: '门牌号' },
-        { code: 'cusFromId', name: 'cusFromName', type: 'drop', required: true, dropType: 'customerFrom', title: '客户来源' },
+        { code: 'cusFrom', name: 'cusFromName', type: 'drop', required: true, dropType: 'customerFrom', title: '客户来源' },
         { code: 'contactName', type: 'str', required: false, title: '联系人' },
         { code: 'contactPhone', type: 'str', title: '联系电话', required: false },
       ],
@@ -32,7 +32,7 @@ Page({
         { code: 'channelId', name: 'channelName', type: 'drop', required: true, dropType: 'saleChannel', title: '销售渠道' },
         { code: 'staffId', name: 'staffName', type: 'drop', required: true, dropType: 'staff', title: '销售人员' },
         { code: 'orgId', name: 'orgName', type: 'drop', required: true, dropType: 'org', title: '销售部门' },
-        { code: 'addressNo', type: 'str', required: false, title: '初次欠款' },
+        { code: 'initialDebt', type: 'number', required: false, title: '初次欠款' },
       ],
       remarks: [
         { code: 'remarks', type: 'textarea', title: mixins.$t('remarks') }
@@ -60,9 +60,28 @@ Page({
 
   },
   /**
+   * @desc   : 处理数据
+   * @author : 于继渤
+   * @date   : 2024/1/26 11:46
+   */
+  handleData(data) {
+    this.setData({
+      formData: null
+    })
+    var pages = getCurrentPages();
+    var prevPage = pages[pages.length - 2]; //上一个页面
+    prevPage.setData({
+      refreshDataFlag: true
+    })
+    wx.navigateBack({
+      delta: 1
+    })
+  },
+  /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
+    //TODO  销售渠道默认 零售 ,销售部门销售员工默认当前登录人的
 
   },
 

+ 34 - 170
package-basic-data/pages/customer-list/customer-list.js

@@ -16,7 +16,7 @@ Page({
    * 页面的初始数据 
    */
   data: {
-    tagList: [{ title: "潜在客户" }, { title: "公海客户" }, { title: "邀约进店" }, { title: "预约量尺" }],
+    tagList: [{ title: "潜在客户" ,code:'销售状态-潜客'}, { title: "公海客户" ,code:'销售状态-公海' }, { title: "邀约进店" }, { title: "预约量尺" }],
     // 查询条件
     searchContent: [{
       code: 'createtime',
@@ -25,44 +25,12 @@ Page({
       searchType: Constants.searchType.date
     }, {
       code: 'staff',
-      title: '业务员',
+      title: '员',
       dropType: 'staff'
     }, {
-      code: 'orderStatus',
-      title: '订单状态',
-      searchType: Constants.searchType.switch,
-      list: [
-        {
-          checked: true,
-          text: "异常",
-          value: "审-异常"
-        },
-        {
-          checked: true,
-          text: "待审",
-          value: "审-待审"
-        },
-        {
-          checked: true,
-          text: "审批中",
-          value: "审-审中"
-        },
-        {
-          checked: true,
-          text: "通过",
-          value: "审-通过"
-        },
-        {
-          checked: true,
-          text: "拒绝",
-          value: "审-拒绝"
-        },
-        {
-          checked: false,
-          text: "冲正",
-          value: "订单状态-冲正"
-        }
-      ]
+      code: 'org',
+      title: '部门',
+      dropType: 'org'
 
     }, {
       code: 'choose',
@@ -94,14 +62,12 @@ Page({
 
     // 列表区(脚部信息)
     footerInfo: [{
-      name: 'categoryQuantity',
-      title: '跟进'
-    }, {
-      name: 'tsumQuantity',
-      title: '件'
-    }],
+      prefix: '跟进 ',
+      name: 'followCount',
+      title: ' 次'
+    },],
     // 列表区(内容)
-    contentList: [ {
+    contentList: [{
       name: 'cusPhone',
       title: '客户电话',
       phone: true
@@ -150,8 +116,8 @@ Page({
 
     // 弹出按钮
     buttonList: [{
-      name: 'customerRefund',
-      title: '出库办理'
+      name: 'followUp',
+      title: '客户跟进'
     }, {
       name: 'customerRefundList',
       title: '作废'
@@ -166,17 +132,17 @@ Page({
 
     // 路由
     routeObjName: 'customer',
-    active: 0
+    active: 0,
+    saleStatus: null,
   },
   /**
   * 切换 已出库 未出库
   */
   onChangeTabs(e) {
-    let index = e.detail.detail.index
-    console.log("qeaqwewa", index)
-    console.log("qeaqwewa", e)
+    console.log(e.detail)
+    let code = e.detail.detail.code
     this.setData({
-      active: index,
+      saleStatus: code,
     })
 
   },
@@ -190,144 +156,42 @@ Page({
     })
 
   },
-  toTitle(e) {
-    console.log('t1', e);
-  },
-  toStatus(e) {
-    console.log('t2', e);
-  },
-  toPoint(e) {
-    console.log('t3', e);
-    this.setData({
-      showShare: true
-    })
-  },
-  toAdd() {
-    wx.navigateTo({
-      url: './add/add',
-    })
-  },
-  /**
-   * @desc : 右上角三个小点 点击回调事件
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */
-  open(e) {
-    let name = e.detail.name
-    let item = e.detail.item
-    if (name == 'customerRefund') {  //客户收款
-      wx.navigateTo({
-        url: '/package-sales/pages/order-billing/customer-collection-refund/customer-collection-refund?form=' + encodeURIComponent(JSON.stringify(item)) + '&page=customer-collection' + '&pageIndex=customer-collection',
-      })
-    }
-    if (name == 'customerRefundList') {  //客户退款
-      wx.navigateTo({
-        url: '/package-sales/pages/order-billing/customer-collection/refund-record/refund-record?form=' + encodeURIComponent(JSON.stringify(item)) + '&page=customer-collection',
-      })
-    }
-
-
-
-  },
-  /**
-   * @desc : 校验
-   * @date : 2024/2/1 15:49
-   * @author : 周兴
-   */
-  openValidData(item, name) {
-    console.log('item', item, name, item.customerId);
-    if (!item.customerId) {
-      wx.showToast({
-        title: '无此联系人,或陌生接待',
-        icon: 'none'
-      })
-      return false;
-    }
-    return true;
-  },
 
   /**
    * @desc : 查询
    * @date : 2024/2/1 15:49
-   * @author : 周兴
+   * @author : 于继渤
    */
   getData(params) {
     return this.excute(this.data.service, this.data.service.selectByCond, params);
   },
-
+    /**
+   * @desc : 新建跳转
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  toAdd() {
+    wx.navigateTo({
+      url: this.data.route.add.url,
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', {  })
+      }
+    })
+  },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    //按钮权限
-
-    // let Customer_Follow = common.hasButtonRight(Constants.Customer_Follow) //跟进
-    // let Customer_Follow_Task = common.hasButtonRight(Constants.Customer_Follow_Task) //跟进任务
-    // let Customer_Order = common.hasButtonRight(Constants.Customer_Order) //销售订单
-    // let Customer_Receive = common.hasButtonRight(Constants.Customer_Receive) //客户收款
-    // let Customer_Add = common.hasButtonRight(Constants.Customer_Add) //客户新建
 
-    this.setData({
-      Customer_Follow: true,
-      Customer_Follow_Task: true,
-      Customer_Order: true,
-      Customer_Receive: true,
-      Customer_Add: true
 
-    })
-
-
-
-
-    if (JSON.stringify(options) !== '{}') {
-
-      if (options.frommine) {
-
-        let frommine = JSON.parse(options.frommine)
-        var createtime = this.selectComponent('#createtime');
-        createtime.data.dataDefaultSearch = util.jumpPageDate(frommine.date.value)
-        createtime.data.createTimeType = frommine.date
-
-        let keyType = this.selectComponent('#keyType')
-        let keyTypeList = keyType.data.moreList
-        keyTypeList.forEach(kIt => {
-          if (frommine.keyTypeList) {
-            if (frommine.keyTypeList.some(it => kIt.id === it)) {
-              kIt.infotype = 'info'
-            }
-          }
-        })
-        keyType.setData({
-          moreList: keyTypeList
-        })
-
-        let searchForm = {
-          ...this.data.searchForm
-        }
-        searchForm.keyTypeList = frommine.keyTypeNameList
-
-        this.setData({
-          active: frommine.active,
-          createTimeType: frommine.date,
-          searchForm: searchForm,
-          searchFormNumber: (frommine.keyTypeNameList && frommine.keyTypeNameList.length > 0) ? 1 : null,
-          createTimeSearch: util.jumpPageDate(frommine.date.value),
-          staffIds: frommine.staffId ? [frommine.staffId] : [],
-          staffNames: frommine.staffNames,
-        })
-
-        createtime.init()
-      }
-    } else {
-      // this.searchData()
-    }
   },
   /**
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-    if (this.data.selectflag) {
-      // this.searchData()
+    if (this.data.refreshDataFlag) {
+      this.searchData()
     }
   },
 })

+ 7 - 9
package-basic-data/pages/customer-list/customer-list.wxml

@@ -1,24 +1,22 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<loading wx:if="{{loading}}" ></loading>
+<loading wx:if="{{loading}}"></loading>
 <van-sticky scroll-top="0">
   <!-- 查询条件 -->
   <dk-dropdown-menu model:searchForm="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','orderNo','telephone','adddress','contractNumber'])}}">
   </dk-dropdown-menu>
- 
-  <dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs">    </dk-tabs>
+
+  <dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
 </van-sticky>
 
-<!-- 暂无数据 -->
-<van-empty wx:if="{{dataList.length<=0}}" description="{{$t['nodata']}}" />
 
 <!-- 列表区 -->
-<dk-list  list="{{tableData}}" footerTag="customerForm" titleCorner="salesChannelName" title="cusName"collectCol="collectAmount"  status="displayStatus" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}"  footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
+<dk-list list="{{tableData}}" footerTag="cusFromName" title="cusName" collectCol="collectAmount" status="saleStatusName" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
+
 
-<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
-<view style="height: 135rpx;"></view>
+<view style="height: 200rpx;"></view>
 
 
 
 <!-- 新建按钮 -->
-<dk-save-bottom   flagTypeName="customer-collection" totallength="{{totallength}}" bind:submit="toAdd" />
+<dk-save-bottom flagTypeName="customers" totallength="{{tableData.length}}" bind:submit="toAdd" />

+ 0 - 4
package-basic-data/pages/customer-list/customer-list.wxss

@@ -1,4 +0,0 @@
-.van-tabs__scroll{
-    background-color: #F5F5F5 !important;
-  }
-