소스 검색

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss_wx_app

wangyingjie 2 년 전
부모
커밋
c0dbd813a3
32개의 변경된 파일475개의 추가작업 그리고 1898개의 파일을 삭제
  1. 21 0
      api/pages/mst/cusFollow.js
  2. 6 1
      api/pages/mst/customer.js
  3. 2 1
      app.js
  4. 69 42
      components/dkbase/dk-form-bill/dk-form-bill.js
  5. 5 5
      components/dkbase/dk-form-bill/dk-form-bill.wxml
  6. 4 1
      components/dkbase/dk-number-phone-input/dk-number-phone-input.js
  7. 1 1
      components/dkbase/dk-number-phone-input/dk-number-phone-input.wxml
  8. 1 0
      components/dkbase/dk-tabs/dk-tabs.js
  9. 1 1
      components/dkbase/dk-tabs/dk-tabs.wxml
  10. 1 1
      config/config.js
  11. 14 3
      i18n/zh-CN.js
  12. 19 1236
      package-basic-data/pages/customer-follow-up/customer-follow-up.js
  13. 121 220
      package-basic-data/pages/customer-follow-up/customer-follow-up.wxml
  14. 21 2
      package-basic-data/pages/customer-list/add/add.js
  15. 34 170
      package-basic-data/pages/customer-list/customer-list.js
  16. 7 9
      package-basic-data/pages/customer-list/customer-list.wxml
  17. 0 4
      package-basic-data/pages/customer-list/customer-list.wxss
  18. 1 1
      package-basic-data/pages/register/company-param-setting/company-param-setting.wxml
  19. 11 15
      package-basic-data/pages/register/company-setting/company-setting.js
  20. 1 1
      package-basic-data/pages/register/company-setting/company-setting.wxml
  21. 1 1
      package-basic-data/pages/test/add/add.js
  22. 1 1
      package-basic-data/pages/test/add/add.wxml
  23. 20 5
      pages/add-company/add-company.js
  24. 5 5
      pages/add-company/add-company.wxml
  25. 12 14
      pages/add-company/add-company.wxss
  26. 61 21
      pages/company/company.js
  27. 1 1
      pages/company/company.wxml
  28. 8 3
      pages/login/login.js
  29. 7 7
      pages/login/login.wxml
  30. 0 42
      pages/mine/mine-report-params.js
  31. 19 7
      pages/welcome/welcome.js
  32. 0 77
      pages/welcome/welcome.wxss

+ 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')

+ 69 - 42
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -34,57 +34,62 @@ Component({
     routeObjName: {
       type: String
     },
-    titleTagCol:{
-      type:String,
-      value:'titleTag'
+    titleTagCol: {
+      type: String,
+      value: 'titleTag'
     },
-    titleCol:{
-      type:String,
-      value:'title'
+    titleCol: {
+      type: String,
+      value: 'title'
     },
-    iconCol:{
-      type:String,
-      value:'iconThumPath'
+    iconCol: {
+      type: String,
+      value: 'iconThumPath'
     },
     // 价格列
-    priceCol:{
-      type:String,
-      value:'priceSale'
+    priceCol: {
+      type: String,
+      value: 'priceSale'
     },
     // 数量列
-    quantityCol:{
-      type:String,
-      value:'itemQuantity'
+    quantityCol: {
+      type: String,
+      value: 'itemQuantity'
     },
     // 数量列
-    descCol:{
-      type:String,
-      value:'desc'
+    descCol: {
+      type: String,
+      value: 'desc'
     },
-    sumStandardCol:{
-      type:String,
-      value:'sumStandard'
+    sumStandardCol: {
+      type: String,
+      value: 'sumStandard'
     },
-    discountStandardCol:{
-      type:String,
-      value:'discountStandard'
+    discountStandardCol: {
+      type: String,
+      value: 'discountStandard'
     },
-    sumAmountCol:{
-      type:String,
-      value:'sumAmount'
+    sumAmountCol: {
+      type: String,
+      value: 'sumAmount'
     },
     // 可用收款列
-    canUseCollectCol:{
-      type:String,
-      value:'canUseCollect'
+    canUseCollectCol: {
+      type: String,
+      value: 'canUseCollect'
     },
     // 收款列
-    useCollectCol:{
-      type:String,
-      value:'useCollect'
+    useCollectCol: {
+      type: String,
+      value: 'useCollect'
     },
-    popContent:{
-      type:Array,
+    // 弹框的内容
+    popContent: {
+      type: Array,
+    },
+    // 是否只读
+    readonly: {
+      type: Boolean,
     },
     // 结果集
     value: {
@@ -159,13 +164,16 @@ Component({
      * @date   : 2024/1/26 11:46
      */
     openChoosedItemInfo(e) {
+      if(this.data.readonly){
+        return;
+      }
       let ds = e.currentTarget.dataset;
       this.setData({
         dataIndex: ds.index,
         dataItem: JSON.stringify(ds.item),
         showPop: true,
       })
-      console.log('ffff', this.data.form, this.data.form[this.data.itemName][ds.index]);
+      // console.log('ffff', this.data.form, this.data.form[this.data.itemName][ds.index]);
     },
     /**
      * @desc   : 关闭Pop后修改数据
@@ -173,7 +181,7 @@ Component({
      * @date   : 2024/1/26 11:46
      */
     editItems(data) {
-      console.log('data', data);
+      // console.log('data', data);
       let form = this.data.form;
       let itemName = this.data.itemName;
       if (form[itemName]) {
@@ -190,6 +198,10 @@ Component({
      * @date   : 2024/1/26 11:46
      */
     open(e) {
+      // 只读
+      if(this.data.readonly){
+        return;
+      }
       let item = e.currentTarget.dataset;
       if (item.item.type == 'drop') {
         this.setData({
@@ -200,7 +212,7 @@ Component({
           index: item.index,
           card: item.card
         })
-      }else if (item.item.type == 'mutidrop') {
+      } else if (item.item.type == 'mutidrop') {
         this.setData({
           mutishow: true,
           dropCode: item.key,
@@ -239,6 +251,9 @@ Component({
      * @date   : 2024/2/20 11:46
      */
     openMulti(e) {
+      if(this.data.readonly){
+        return;
+      }
       let type = e.currentTarget.dataset.type
       let _this = this
       // 选择主从业务员
@@ -343,6 +358,10 @@ Component({
    * @date   : 2024/1/26 11:46
    */
     openDatePop(e) {
+      // 只读
+      if(this.data.readonly){
+        return;
+      }
       let item = e.currentTarget.dataset;
       this.setData({
         showDate: true,
@@ -417,13 +436,13 @@ Component({
     chooseData(e) {
       let contentObj = this.data.contentObj;
       let form = this.data.form
-      if(e.detail.ids){
+      if (e.detail.ids) {
         form[this.data.dropCode + 's'] = e.detail.ids;
         form[this.data.dropName + 's'] = e.detail.names;
-      }else{
+      } else {
         form[this.data.dropCode] = e.detail.value;
         form[this.data.dropName] = e.detail.text;
-      } 
+      }
       let card = this.data.card;
       // 选择后清空校验提示信息
       if (card && contentObj[card][this.data.index]?.errMsg && e.detail) {
@@ -527,6 +546,10 @@ Component({
      * @date : 2024/2/18 18:16
      */
     onClickWxchartAddress(e) {
+      // 只读
+      if(this.data.readonly){
+        return;
+      }
       // 跳转新建地图实例
       common.onClickWxchartAddress();
       let item = e.currentTarget.dataset;
@@ -541,6 +564,10 @@ Component({
      * @date   : 2024/1/26 11:46
      */
     onChange(e) {
+      // 只读
+      if(this.data.readonly){
+        return;
+      }
       let key = e.currentTarget.dataset.key
       let checkFlag = e.currentTarget.dataset.value
       let form = this.data.form
@@ -549,7 +576,7 @@ Component({
         value: JSON.stringify(form),
         form: form
       })
-      console.log('form',this.data.form);
+      console.log('form', this.data.form);
     },
     /**
      * @desc : 设置地址

+ 5 - 5
components/dkbase/dk-form-bill/dk-form-bill.wxml

@@ -21,7 +21,7 @@
       <view style="width: 35%;text-align: right;">
         <dk-tag wx:if="{{card.expandFlag}}" type="primary" padding="0 20rpx" height="40rpx" color="#9FAEE5" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="{{!card.expand?'展开':'收起'}}" catchtap="expandCard" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
         <!--明细,增加选择商品按钮-->
-        <dk-tag wx:if="{{card.name == 'items' && (card.chooseGoodsFlag == undefined || card.chooseGoodsFlag)}}" type="primary" padding="0 20rpx" height="40rpx" color="#77C5D5" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="选商品" catchtap="openChooseItems" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
+        <dk-tag wx:if="{{card.name == 'items' && !readonly && ( card.chooseGoodsFlag == undefined || card.chooseGoodsFlag)}}" type="primary" padding="0 20rpx" height="40rpx" color="#77C5D5" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="选商品" catchtap="openChooseItems" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
       </view>
     </view>
     <view wx:if="{{card.expandFlag && card.expand || !card.expandFlag}}">
@@ -55,7 +55,7 @@
                 </view>
               </view>
             </van-card>
-            <view slot="right">删除</view>
+            <view wx:if="{{!readonly}}" slot="right">删除</view>
           </van-swipe-cell>
         </view>
         <view class="amount-item-class" wx:if="{{type === 'sale'}}">
@@ -111,14 +111,14 @@
         <van-field wx:if="{{item.type=='address'}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="{{item.required?'red-label':'nomal-label' }}" input-align="left" data-key="address" type="textarea" value="{{ wxmlUtil.addressToIndexOf(form.address.address) }}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" right-icon="location" data-type='address' catchtap="onClickWxchartAddress" readonly="{{true}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" errorMessage="{{item.errMsg}}">
         </van-field>
         <!--联系电话-->
-        <dk-number-phone-input wx:if="{{item.type=='phone'}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" label-class="{{item.required?'red-label':'nomal-label' }}" rightIcon="phone" model:value="{{ form[item.code]}}" bind:changeField="changePhone" bind:changeFieldblur="changePhoneblur" errorMessage="{{item.errMsg}}" id="{{item.code}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.code)}}"></dk-number-phone-input>
+        <dk-number-phone-input wx:if="{{item.type=='phone'}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" readonly="{{!!readonly || !!item.readonly}}"  label-class="{{item.required?'red-label':'nomal-label' }}" rightIcon="phone" model:value="{{ form[item.code]}}" bind:changeField="changePhone" bind:changeFieldblur="changePhoneblur" errorMessage="{{item.errMsg}}" id="{{item.code}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.code)}}"></dk-number-phone-input>
         <!--日期-->
         <van-field wx:if="{{item.type=='date'}}" label-class="{{item.required?'red-label':'nomal-label' }}" is-link value="{{ form[item.code]}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" data-item="{{item}}" data-key="{{item.code}}" data-index="{{index}}" data-card="{{card.name}}" errorMessage="{{item.errMsg}}" border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" catchtap="openDatePop">
         </van-field>
         <!--数字类-->
-        <dk-number-input wx:if="{{item.type=='number'}}" sign="{{(item.sign || item.sign == '')?item.sign:'¥'}}" digits="{{(item.digits || item.digits == 0)?item.digits:2}}" fontSize="14" left="30rpx" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" center="left" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="#CAA977" titleFontWeight="bold" titleColor="{{item.required?'#E4002B':'#95A8CB'}}" inputValue="{{form[item.code]}}" bind:triggerBindValue="changeNumberField"></dk-number-input>
+        <dk-number-input wx:if="{{item.type=='number'}}" sign="{{(item.sign || item.sign == '')?item.sign:'¥'}}" digits="{{(item.digits || item.digits == 0)?item.digits:2}}" fontSize="14" left="30rpx" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" center="left" readonly="{{!!readonly || !!item.readonly}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="#CAA977" titleFontWeight="bold" titleColor="{{item.required?'#E4002B':'#95A8CB'}}" inputValue="{{form[item.code]}}" bind:triggerBindValue="changeNumberField"></dk-number-input>
         <!--备注-->
-        <van-field wx:if="{{item.type=='textarea'}}" type="textarea" label-class="{{item.required?'red-label':'nomal-label' }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ form[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" readonly="{{!!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:500}}" right-icon="{{item.rightIcon}}" bind:change="changeField" errorMessage="{{item.errMsg}}">
+        <van-field wx:if="{{item.type=='textarea'}}" type="textarea" label-class="{{item.required?'red-label':'nomal-label' }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ form[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" readonly="{{!!readonly || !!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:500}}" right-icon="{{item.rightIcon}}" bind:change="changeField" errorMessage="{{item.errMsg}}">
         </van-field>
         <!--附件-->
         <view style="display:flex;width:100%;margin: 1vw; padding-top: 20rpx;" wx:if="{{item.type=='uploader'}}">

+ 4 - 1
components/dkbase/dk-number-phone-input/dk-number-phone-input.js

@@ -67,8 +67,11 @@ Component({
     fontWeight: {
       type: String,
       value: 'nomal'
+    },
+    // 是否只读
+    readonly:{
+      type:Boolean,
     }
-
   },
 
   options: {

+ 1 - 1
components/dkbase/dk-number-phone-input/dk-number-phone-input.wxml

@@ -1,3 +1,3 @@
-<van-field input-width="{{inputWidth + 'rpx'}}" disabled="{{disabled}}" input-class="dk-cell-class" style="--fontWeight--:{{fontWeight}};--color--:{{disabled?'#95A8CB':'#1B365D'}}" label-class="{{labelClass}}" input-align="{{inputAlign}}" data-key="{{dataKey}}" maxlength="{{maxlength}}" type="{{type}}" value="{{ value }}" placeholder="{{placeholder}}" autosize border="{{ false }}" bind:change="changeField" right-icon="{{rightIcon}}" color="#95A8CB" bind:blur="changeFieldblur" data-value="{{value}}" data-icon="{{rightIcon}}" bind:onBindInput="{{disabledInput ? 'clickFieldInput': ''}}" error-message="{{errorMessage}}" bind:click-icon="onClickphone">
+<van-field input-width="{{inputWidth + 'rpx'}}" disabled="{{disabled}}" input-class="dk-cell-class" style="--fontWeight--:{{fontWeight}};--color--:{{disabled?'#95A8CB':'#1B365D'}}" label-class="{{labelClass}}" input-align="{{inputAlign}}" data-key="{{dataKey}}" maxlength="{{maxlength}}" type="{{type}}" value="{{ value }}" placeholder="{{placeholder}}" autosize border="{{ false }}" bind:change="changeField" right-icon="{{rightIcon}}" color="#95A8CB" readonly="{{readonly}}" bind:blur="changeFieldblur" data-value="{{value}}" data-icon="{{rightIcon}}" bind:onBindInput="{{disabledInput ? 'clickFieldInput': ''}}" error-message="{{errorMessage}}" bind:click-icon="onClickphone">
   <view slot="label" catchtap="copyPhone">{{label}}</view>
 </van-field>

+ 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

+ 14 - 3
i18n/zh-CN.js

@@ -26,7 +26,8 @@ const button = {
   allValidInvalid: '全部、有效、无效',
   valid: '有效',
   invalid: '无效',
-
+  collapse:'收起',
+  expand:'展开',
 }
 
 //  首页
@@ -52,8 +53,18 @@ const home = {
   cpInfo: '商户信息',
   paramSetting:'参数设置',
   productDetail:'产品详情',
-
-
+  homeTitle:'泛家居建陶行业云服务',
+  homeProduct:'了解产品',
+  homeFreeLogin:'免费体验',
+  homeAddCompany:'加入企业',
+  homeCreateCompany:'创建企业',
+  agreementPrivacy:'我已阅读并同意《用户协议》和《隐私条款》',
+  checkPrivacy:'请勾选用户协议和隐私条款',
+  scanQrcode:'请同事扫下方二维码',
+  requestAddCompany:'邀请你进入企业',
+  wechatScan:'使用微信扫码',
+  waitAddCom:'等待加入企业中...',
+  selectCompany:'请选择进入企业',
 }
 
 //  基础数据

+ 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;
-  }
-  

+ 1 - 1
package-basic-data/pages/register/company-param-setting/company-param-setting.wxml

@@ -9,7 +9,7 @@
       <view style="display: flex;">
         <view class="corner-view-text font" style="width: 70%;">{{item.itemName}}</view>
         <view style="width: 30%;text-align: right;" data-index="{{index}}" data-item="{{item}}" catch:tap="collapseAndExpand">
-          {{item.checked?'收起':'展开'}}
+          {{item.checked?$t["collapse"]:$t["expand"]}}
         </view>
       </view>
     </view>

+ 11 - 15
package-basic-data/pages/register/company-setting/company-setting.js

@@ -1,6 +1,14 @@
+/*******************************************************************************
+* Copyright(c) 2022 dongke All rights reserved. / Confidential
+* 类的信息:
+*		1.程序名称:
+*		2.功能描述:商户设置画面
+* 编辑履历:
+*		作者				日期					版本				修改内容
+*		姜永辉		  	2022-11-22			1.00		   	新建
+*******************************************************************************/
 const mixins = require('@/mixins/index.js')
-const Constants = require('@/utils/Constants.js');
-const api = require('@/utils/api.js');
+const Constants = require('@/utils/Constants.js'); 
 
 const app = getApp()
 Page({
@@ -21,8 +29,7 @@ Page({
                 { code: 'shopSize', type: 'str', readonly: 'true', title: mixins.$t('shopSize') },
                 { code: 'feedback', type: 'textarea', readonly: 'true', title: mixins.$t('feedback') },
             ],
-        },
-        cpId: 1,
+        }, 
     },
 
     /**
@@ -79,15 +86,4 @@ Page({
         })
     },
 
-
-    /**
-    * @desc : 加载数据
-    * @date : 2024/2/1 15:49
-    * @author : 姜永辉
-    */
-    loadInit() {
-
-    },
-
-
 })

+ 1 - 1
package-basic-data/pages/register/company-setting/company-setting.wxml

@@ -18,6 +18,6 @@
 
 <!--  保存 -->
 <view class="bottom-class">
-  <van-button custom-class="save-button-class" disabled="{{loading}}" loading="{{loading}}" bind:click="close" type="default">关闭
+  <van-button custom-class="save-button-class" disabled="{{loading}}" loading="{{loading}}" bind:click="close" type="default">{{$t['close']}}
   </van-button>
 </view>

+ 1 - 1
package-basic-data/pages/test/add/add.js

@@ -18,7 +18,7 @@ Page({
       { code: 'telephone', type: 'phone', title: '客户电话', required: true }, { code: 'address', type: 'address', title: '客户地址', required: true }, { code: 'designStatus', type: 'switch', title: '设计制图' }],
       items:[{ code: 'collectType', name: 'collectName', type: 'drop', required: true, dropType: 'collect' },{ code: 'collectAmount', type: 'number', title: '收款金额', required: true }],
       relation:[{ code: 'invoice', type: 'choose',title:'关联源单'}],
-      other:[{ code: 'deliveryDate', type: 'date', title: '送货日期' },{ code: 'remarks', type: 'textarea', title: '备注' }, { code: 'file', type: 'uploader', title: '附件' }]
+      other:[{ code: 'deliveryDate', type: 'date', title: '送货日期' },{ code: 'remarks', type: 'textarea', title: '备注',readonly:false }, { code: 'file', type: 'uploader', title: '附件' }]
     },
      // 路由
      routeObjName: 'customer',

+ 1 - 1
package-basic-data/pages/test/add/add.wxml

@@ -6,7 +6,7 @@
 <!-- <dk-form id="{{formName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
 </dk-form> -->
 
-<dk-form-bill id="{{formName}}" type="sale" routeObjName="{{routeObjName}}" objCol="customerId" objLabel="客户名称" objType="customer" dateCol="accountDate" dateLabel="收款日期"  cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
+<dk-form-bill id="{{formName}}" readonly="{{true}}" type="sale" routeObjName="{{routeObjName}}" objCol="customerId" objLabel="客户名称" objType="customer" dateCol="accountDate" dateLabel="收款日期"  cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
 </dk-form-bill>
 
 <!-- <dk-form-more-items id="{{formName}}" type="sale" objCol="customerId" objLabel="客户名称" objType="customer" dateCol="accountDate" dateLabel="收款日期"  cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">

+ 20 - 5
pages/add-company/add-company.js

@@ -1,17 +1,30 @@
-const app = getApp()
-
+/*******************************************************************************
+* Copyright(c) 2022 dongke All rights reserved. / Confidential
+* 类的信息:
+*		1.程序名称:
+*		2.功能描述:同事扫码邀请页面画面
+* 编辑履历:
+*		作者				日期					版本				修改内容
+*		姜永辉		  	2022-11-22			1.00		   	新建
+*******************************************************************************/
 const api = require('@/utils/api.js');
 const config = require('@/config/config.js');
 const Constants = require('@/utils/Constants.js');
 
+const app = getApp()
+
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
-        img: '',
+        // 返回邀请码的地址
+        imgQrcode: '',
+        // 每隔3秒执行一次 看是否 已经被邀请成功
         interval: null,
+        // 语言包
+        $t: app.globalData.lang,
     },
 
     /**
@@ -19,7 +32,9 @@ Page({
      */
     onLoad(options) {
         let that = this
+        // 获取二维码
         that.loadQrCodeData()
+        // 每隔3秒执行一次 看是否 已经被邀请成功
         let interval = setInterval(function () {
             that.gettoken()
         }, 3000)
@@ -35,7 +50,7 @@ Page({
         clearInterval(this.data.interval)
     },
 
-    /**
+   /**
    * @desc : 获取二维码
    * @date : 2022/5/12 13:49
    * @author : 姜永辉
@@ -49,7 +64,7 @@ Page({
             console.log("getQrCode", res);
             if (res.data.code == Constants.SUCESS_CODE) {
                 this.setData({
-                    img: config.server_add + ':' + config.server_port + res.data.data
+                    imgQrcode: config.server_add + ':' + config.server_port + res.data.data
                 })
             }
         })

+ 5 - 5
pages/add-company/add-company.wxml

@@ -1,10 +1,10 @@
 <view class="card-view">
-	<view class="card-view-title">请同事扫下方二维码</view>
-	<view class="card-view-sub-title">邀请你进入企业</view>
+	<view class="card-view-title">{{$t['scanQrcode']}}</view>
+	<view class="card-view-sub-title">{{$t['requestAddCompany']}}</view>
 	<view class="card-view-sub-title-line"></view>
-	<view class="card-view-sub-title">使用微信扫码</view>
+	<view class="card-view-sub-title">{{$t['wechatScan']}}</view>
 	<view class="card-view-sub-title">
-		<image src="{{img}}" mode="aspectFit" />
+		<image src="{{imgQrcode}}" mode="aspectFit" />
 	</view>	
 </view>
-<view class="card-view"  style="text-align: center;">等待加入企业中。。。</view>
+<view class="card-view"  style="text-align: center;">{{$t['waitAddCom']}}</view>

+ 12 - 14
pages/add-company/add-company.wxss

@@ -7,31 +7,29 @@
 	padding: 24rpx;
 	margin-top: 30rpx;
 	z-index: 2;
-  }
+}
 
-  
-  .card-view-title {
+
+.card-view-title {
 	font-style: normal;
 	font-weight: 500;
 	font-size: 20px;
 	text-align: center;
 	font-family: 'PingFang SC';
-  }
+}
 
-  .card-view-sub-title{
-	  margin-top: 40rpx;
+.card-view-sub-title {
+	margin-top: 40rpx;
 	font-style: normal;
 	font-weight: 500;
 	font-size: 14px;
 	text-align: center;
 	font-family: 'PingFang SC';
-  }
+}
 
-  .card-view-sub-title-line{
+.card-view-sub-title-line {
 	margin-top: 40rpx;
-	  width: 100%;
-	  height: 1rpx;
-	  border-bottom: 1px solid rgb(189, 185, 185);
-  }
-
-  
+	width: 100%;
+	height: 1rpx;
+	border-bottom: 1px solid rgb(189, 185, 185);
+}

+ 61 - 21
pages/company/company.js

@@ -1,48 +1,88 @@
+/*******************************************************************************
+* Copyright(c) 2022 dongke All rights reserved. / Confidential
+* 类的信息:
+*		1.程序名称:
+*		2.功能描述:企业选择画面
+* 编辑履历:
+*		作者				日期					版本				修改内容
+*		姜永辉		  	2022-11-22			1.00		   	新建
+*******************************************************************************/
+const api = require('@/utils/api.js');
+const config = require('@/config/config.js');
+const Constants = require('@/utils/Constants.js');
+
+const app = getApp()
 Page({
     /**
      * 页面的初始数据
      */
     data: {
-        companyList: [
-            {
-                cpId: 1,
-                companyName: '东科智云-标准版',
-            },
-           
-            {
-                cpId: 2,
-                companyName: '东科智云-标准版-体验',
-            },
-        ],
-
+        // 加入企业的列表
+        companyList: [],
+        // 语言包
+        $t: app.globalData.lang,
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad(options) {
-
+        let that = this
+        // 获取二维码
+        that.loadCompanyData()
     },
 
+    /**
+   * @desc : 获取当前用户所有的公司
+   * @date : 2022/5/12 13:49
+   * @author : 姜永辉
+   */
+    loadCompanyData() {
+        let _this = this
+        let param = {
+            openid: app.globalData.openid
+        }
+        api.request(Constants.SYS_OPENID_API + 'oauth/wx/select_company', 'POST', param).then(res => {
+            if (res.data.code == Constants.SUCESS_CODE) {
+                this.setData({
+                    companyList: res.data.list
+                })
+
+            }
+        })
+    },
 
     /**
-     * 生命周期函数--监听页面显示
+     * @desc : 更新当前用户所在的公司id
+     * @date : 2022/5/12 13:49
+     * @author : 姜永辉
      */
-    onShow() {
-
+    updateCompanyID(item) {
+        let _this = this
+        let param = {
+            openid: app.globalData.openid,
+            cpId: item.cpId
+        }
+        api.request(Constants.SYS_OPENID_API + 'oauth/wx/update_cpid', 'POST', param).then(res => {
+            if (res.data.code == Constants.SUCESS_CODE) {
+                // 调转主页
+                wx.reLaunch({
+                    url: '../../pages/welcome/welcome',
+                })
+            }
+        })
     },
 
+
     /**
     * @desc : 点击公司进入主页
     * @date : 2022/5/12 13:49
     * @author : 姜永辉
     */
     clickCompany(e) {
-        console.log(e);
-        // 调转主页
-        wx.reLaunch({
-            url: '../../pages/home-page/home-page',
-        })
+        // 点击企业时候反写当前公司
+        let item = e.currentTarget.dataset.item
+        this.updateCompanyID(item)
     },
 
 })

+ 1 - 1
pages/company/company.wxml

@@ -1,6 +1,6 @@
 <view style="background-color: white;width: 100%; height: 100%;">
 	<view style="font-size: 26px;margin-bottom: 10rpx;padding-top: 100rpx;padding-left: 20rpx;">
-		请选择进入企业
+		{{$t['selectCompany']}}
 	</view>
 	<view wx:for="{{companyList}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" catch:tap="clickCompany">
 		<van-cell  title-class="title-class" title="{{item.companyName}}" is-link />

+ 8 - 3
pages/login/login.js

@@ -17,16 +17,21 @@ Page({
    * 页面的初始数据
    */
   data: {
-    backgroud: '/static/img/login.png',
-    flgCompany: null, //创建企业 加入企业
+    //创建企业 加入企业
+    flgCompany: null,
+    // 隐私
     agreementPrivacy: false,
+    // 电话授权标识
     openType: '-',
+    // 语言包
+    $t: app.globalData.lang,
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    console.log("app.global", app.globalData);
   },
 
   /**
@@ -75,7 +80,7 @@ Page({
   addCompany(e) {
     if (!this.data.agreementPrivacy) {
       wx.showToast({
-        title: '请勾选用户协议和隐私条款',
+        title: this.data.$t['checkPrivacy'],
         duration: 1000
       })
     }

+ 7 - 7
pages/login/login.wxml

@@ -2,23 +2,23 @@
 <view style="height: 100vh;width:100%;">
   <image style=" height: 100%;width:100%;" mode="scaleToFill" src="../../static/img/login.png" />
   <view class="base-absolute">
-    <view style="font-size: 24px;margin-top: 60rpx;">
-      泛家居建陶行业云服务
+    <view style="font-size: 24px;margin-top: 60rpx;"> 
+      {{$t['homeTitle']}}
     </view>
     <view style="margin-top: 190rpx; display: flex;">
-      <van-button custom-style="border-radius: 30rpx;  height:60rpx;width:180rpx; " size="small" color="#1B365D" type="default" bindtap="freeClick">免费体验</van-button>
-      <van-button custom-style="border-radius: 30rpx; margin-left:30rpx;height:60rpx;width:180rpx; " size="small" color="#1B365D" type="default" bindtap="productClick">了解产品</van-button>
+      <van-button custom-style="border-radius: 30rpx;  height:60rpx;width:180rpx; " size="small" color="#1B365D" type="default" bindtap="freeClick"> {{$t['homeFreeLogin']}}</van-button>
+      <van-button custom-style="border-radius: 30rpx; margin-left:30rpx;height:60rpx;width:180rpx; " size="small" color="#1B365D" type="default" bindtap="productClick">{{$t['homeProduct']}}</van-button>
 
     </view>
 
     <view style="margin-top: 60rpx; display: flex;">
-      <van-button size="small" custom-style="border-radius: 30rpx; margin-left:10rpx;height:60rpx;width:180rpx; " type="default" data-company='add' bind:click="addCompany" open-type="{{openType}}" bindgetphonenumber="handleGetPhoneNumber">加入企业</van-button>
-      <van-button size="small" open-type="{{openType}}" data-company='create' bind:click="addCompany" bindgetphonenumber="handleGetPhoneNumber" custom-style="border-radius: 30rpx;margin-left:30rpx ;height:60rpx;width:180rpx; " type="default">创建企业</van-button>
+      <van-button size="small" custom-style="border-radius: 30rpx; margin-left:10rpx;height:60rpx;width:180rpx; " type="default" data-company='add' bind:click="addCompany" open-type="{{openType}}" bindgetphonenumber="handleGetPhoneNumber">{{$t['homeAddCompany']}}</van-button>
+      <van-button size="small" open-type="{{openType}}" data-company='create' bind:click="addCompany" bindgetphonenumber="handleGetPhoneNumber" custom-style="border-radius: 30rpx;margin-left:30rpx ;height:60rpx;width:180rpx; " type="default"> {{$t['homeCreateCompany']}}</van-button>
     </view>
 
     <view class="foot-agreement-privacy">
       <van-checkbox value="{{agreementPrivacy}}" bind:change="onCheckboxChange" />
-      <view style="padding-left: 10rpx;">我已阅读并同意《用户协议》和《隐私条款》</view>
+      <view style="padding-left: 10rpx;"> {{$t['agreementPrivacy']}}</view>
     </view>
   </view>
 </view>

+ 0 - 42
pages/mine/mine-report-params.js

@@ -1,42 +0,0 @@
-const util = require('../../utils/util.js')
-const app = getApp()
-
-
-const getDateQuery = (type) => {
-  let date = new Date()
-  switch (type) {
-    case 'today':
-      return { beginDate: util.formatDayTimeApple(date), endDate: util.formatDayTimeApple(date) };
-    case 'yesterday':
-      return { beginDate: util.formatDayTimeApple(new Date(util.getobjDateApple(date.getTime() - (1000 * 60 * 60 * 24)))), endDate: util.formatDayTimeApple(new Date(util.getobjDateApple(date.getTime() - (1000 * 60 * 60 * 24)))) };
-    case 'nearly30days':
-      return { beginDate: util.formatDayTimeApple(new Date(util.getobjDateApple(date.getTime() - (1000 * 60 * 60 * 24 * 30)))), endDate: util.formatDayTimeApple(date) };
-    case 'nearly7days':
-      return { beginDate: util.formatDayTimeApple(new Date(util.getobjDateApple(date.getTime() - (1000 * 60 * 60 * 24 * 7)))), endDate: util.formatDayTimeApple(date) };
-    default:
-      return {};  
-  }
-}
-
-const getQueryData = (type) => {
-  switch (type) {
-    case 'storeHelper':
-      return { cpId: app.globalData.user.cpId, orgId: app.globalData.user.orgId, type: 'f_my_sale_info' }
-    case 'staffHelper':
-      return { cpId: app.globalData.user.cpId, orgId: app.globalData.user.orgId, userId: app.globalData.user.userId, type: 'f_my_sale_info' }
-    case 'storeOrderRate':
-    case 'storeRepayRate':  
-      return { cpId: app.globalData.user.cpId, orgId: app.globalData.user.orgId,rateDate: util.formatDayTime(new Date()) }
-    case 'staffOrderRate':
-    case 'staffRepayRate':  
-      return { cpId: app.globalData.user.cpId, orgId: app.globalData.user.orgId, userId: app.globalData.user.userId,rateDate: util.formatDayTime(new Date()) } 
-  }
-}
-
-
-const getReportQuery = (reportType, dateType) => {
-  return Object.assign(getQueryData(reportType), getDateQuery(dateType));
-}
-
-
-module.exports = { getReportQuery,getDateQuery };

+ 19 - 7
pages/welcome/welcome.js

@@ -2,10 +2,10 @@
 * Copyright(c) 2022 dongke All rights reserved. / Confidential
 * 类的信息:
 *		1.程序名称:
-*		2.功能描述:登录画面
+*		2.功能描述:欢迎页面画面
 * 编辑履历:
 *		作者				日期					版本				修改内容
-*		admin		  	2022-11-22			1.00		   	新建
+*		姜永辉		  	2022-11-22			1.00		   	新建
 *******************************************************************************/
 const app = getApp()
 
@@ -17,14 +17,14 @@ Page({
      * 页面的初始数据
      */
     data: {
-        backgroud: '/static/img/login.png'
+        
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        console.log("welcome",options); 
+        console.log("welcome", options);
         // options 中的 scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
         if (options.scene) {
             var scene = decodeURIComponent(options.scene)
@@ -58,6 +58,7 @@ Page({
     onShow: function () {
         // 登录 code
         this.wx_login()
+        console.log("app.global", app.globalData);
     },
 
     /**
@@ -123,8 +124,8 @@ Page({
             app.globalData.user = res.data.data
             app.globalData.token = res.data.data.accessToken
             wx.reLaunch({
-                // url: '../../pages/home-page/home-page'  ,
-                url: '../../pages/home-page/home-page' ,
+                // url: '../../pages/login/login'  ,
+                url: '../../pages/home-page/home-page',
             })
 
             // if (res.data.code === Constants.SUCESS_CODE) {
@@ -172,6 +173,17 @@ Page({
         })
     },
 
-
+    /**
+     * @desc : 获取语言的方法
+     * @author : 周兴
+     * @date : 2024/1/19
+     */
+    $t(name) {
+        if (this.data.$t[name]) {
+            return this.data.$t[name];
+        } else {
+            return name;
+        }
+    },
 
 })

+ 0 - 77
pages/welcome/welcome.wxss

@@ -1,77 +0,0 @@
-page {
-	overflow: hidden;
-  }
-
-  .button-login{
-	width: 100%;
-	position: absolute;
-	left: 0rpx;
-	bottom: 210rpx; 
-  }
-
-  .pf-btn-auth,
-.pf-btn-save {
-	opacity: 1;
-	border-radius: 4px;
-	width: 500rpx;
-	color: rgb(94, 62, 235);
-	text-align: center;
-	font-size: 14px;
-	height: 30px;
-	line-height: 30px;
-}
-  
-  .out-view {
-	background-color: #fff;
-  }
-  
-  .login-btn {
-	float: left;
-	width: 90% !important;
-	margin-left: 5%;
-  }
-  
-  .form-item {
-	width: 90%;
-	margin-left: 5%;
-	margin-bottom: 20rpx;
-  }
-  
-  .form-item input {
-	background-color: #f2f2f2;
-	font-size: 30rpx;
-	border: 2rpx solid #f2f2f2;
-	height: 62rpx;
-	line-height: 62rpx;
-	border-radius: 10rpx;
-	text-align: center;
-  }
-  
-  .pop-class {
-	width: 92%;
-	text-align: center;
-  }
-  
-  .van-popup-box {
-	width: 100vw;
-	height: 100vw;
-	display: flex;
-	align-content: center;
-	justify-items: center;
-  }
-  
-  .logo-image{
-	margin-top: 50%;opacity: 0;
-  }
-  
-  .logo-image-active{
-	margin-top: 30%;opacity: 1;
-  }
-
-  .base-absolute{
-	width: 100%; 
-	position: absolute;
-	left: 60rpx;
-	top: 200rpx;
-	color: #17319c;
-  }