diff --git a/pages/customer/detail/index.wxml b/pages/customer/detail/index.wxml index 78be637..28e27bd 100644 --- a/pages/customer/detail/index.wxml +++ b/pages/customer/detail/index.wxml @@ -169,7 +169,7 @@ 客户跟进 - 生成订单 + 生成订单 diff --git a/pages/customer/editCard/index.js b/pages/customer/editCard/index.js index c0acfc5..8e473f9 100644 --- a/pages/customer/editCard/index.js +++ b/pages/customer/editCard/index.js @@ -337,7 +337,7 @@ Page({ title: '请输入客户姓名', icon: 'none' }) - } else if (that.data.mobile == '' ){ + } else if (that.data.mobile != that.data.baseinfo.mobile.value&&!/^1[3456789]\d{9}$/.test(that.data.mobile)){ wx.showToast({ title: '请输入正确的手机号码', icon: 'none' diff --git a/pages/order/detail/index2.wxml b/pages/order/detail/index2.wxml index 036d7bb..1993fb1 100644 --- a/pages/order/detail/index2.wxml +++ b/pages/order/detail/index2.wxml @@ -36,7 +36,7 @@ 车主身份证 {{info.owner_cardid}} - + 车主地址 {{info.address}} diff --git a/pages/order/editOwner/index.js b/pages/order/editOwner/index.js index 8b05a7d..de21fd4 100644 --- a/pages/order/editOwner/index.js +++ b/pages/order/editOwner/index.js @@ -99,12 +99,12 @@ Page({ icon: 'none' }) } - else if(this.data.main_type == 0&&this.data.address == ''){ - wx.showToast({ - title: '请填写车主地址', - icon: 'none' - }) - } + // else if(this.data.main_type == 0&&this.data.address == ''){ + // wx.showToast({ + // title: '请填写车主地址', + // icon: 'none' + // }) + // } else if(this.data.main_type == 1&&this.data.company == ''){ wx.showToast({ title: '请填写企业名称', diff --git a/pages/order/editOwner/index.wxml b/pages/order/editOwner/index.wxml index ac896f9..1182e16 100644 --- a/pages/order/editOwner/index.wxml +++ b/pages/order/editOwner/index.wxml @@ -21,13 +21,13 @@ - + 企业信息 diff --git a/pages/order/register/index.js b/pages/order/register/index.js index 58f5e0b..8bbd008 100644 --- a/pages/order/register/index.js +++ b/pages/order/register/index.js @@ -108,6 +108,11 @@ Page({ }) } + this.setData({ + org_mobile:this.data.mobile, + }) + + this.getAppSeriesBrands() this.getUserInfo() this.getAppCityOncard() @@ -137,7 +142,7 @@ Page({ title: '请输入客户姓名', icon: 'none' }) - }else if (!/^1[3456789]\d{9}$/.test(this.data.mobile)){ + }else if (this.data.mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.mobile)){ wx.showToast({ title: '请输入客户手机号', icon: 'none' @@ -155,7 +160,7 @@ Page({ icon: 'none' }) } - else if(this.data.main_type == 0&&!/^1[3456789]\d{9}$/.test(this.data.owner_mobile)){ + else if(this.data.main_type == 0&&this.data.owner_mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.owner_mobile)){ wx.showToast({ title: '请填写车主手机号', icon: 'none' @@ -167,12 +172,12 @@ Page({ icon: 'none' }) } - else if(this.data.main_type == 0&&(this.data.address == '')){ - wx.showToast({ - title: '请填写车主地址', - icon: 'none' - }) - } + // else if(this.data.main_type == 0&&(this.data.address == '')){ + // wx.showToast({ + // title: '请填写车主地址', + // icon: 'none' + // }) + // } else if(this.data.main_type == 1&&this.data.company == ''){ wx.showToast({ title: '请填写企业名称', @@ -625,7 +630,11 @@ Page({ params['main_type'] = that.data.main_type; params['cus_id'] = that.data.cus_id; params['name'] = that.data.name; - params['mobile'] = that.data.mobile; + if(that.data.mobile == that.data.org_mobile){ + params['mobile'] = that.data.complete_mobile; + }else{ + params['mobile'] = that.data.mobile; + } params['c_city_id'] = that.data.c_city_id; if(that.data.address != ''){ //params['pro'] = that.data.region; @@ -645,7 +654,11 @@ Page({ params['owner_name'] = that.data.owner_name; } if(that.data.owner_mobile != ''){ - params['owner_mobile'] = that.data.owner_mobile; + if(that.data.owner_mobile == that.data.org_mobile){ + params['owner_mobile'] = that.data.complete_mobile; + }else{ + params['owner_mobile'] = that.data.owner_mobile; + } } if(that.data.owner_cardid != ''){ params['owner_cardid'] = that.data.owner_cardid; @@ -762,7 +775,7 @@ Page({ title: '请输入客户姓名', icon: 'none' }) - }else if (!/^1[3456789]\d{9}$/.test(this.data.mobile)){ + }else if (this.data.mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.mobile)){ wx.showToast({ title: '请输入客户手机号', icon: 'none' @@ -780,7 +793,7 @@ Page({ icon: 'none' }) } - else if(this.data.main_type == 0&&!/^1[3456789]\d{9}$/.test(this.data.owner_mobile)){ + else if(this.data.main_type == 0&&this.data.owner_mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.owner_mobile)){ wx.showToast({ title: '请填写车主手机号', icon: 'none' @@ -792,12 +805,12 @@ Page({ icon: 'none' }) } - else if(this.data.main_type == 0&&this.data.address == ''){ - wx.showToast({ - title: '请填写车主地址', - icon: 'none' - }) - } + // else if(this.data.main_type == 0&&this.data.address == ''){ + // wx.showToast({ + // title: '请填写车主地址', + // icon: 'none' + // }) + // } else if(this.data.main_type == 1&&this.data.company == ''){ wx.showToast({ title: '请填写企业名称', @@ -850,7 +863,11 @@ Page({ params['main_type'] = that.data.main_type; params['cus_id'] = that.data.cus_id; params['name'] = that.data.name; - params['mobile'] = that.data.mobile; + if(that.data.mobile == that.data.org_mobile){ + params['mobile'] = that.data.complete_mobile; + }else{ + params['mobile'] = that.data.mobile; + } params['inten_money'] = that.data.inten_money; params['c_city_id'] = that.data.c_city_id; if(that.data.address != ''){ @@ -862,7 +879,11 @@ Page({ params['owner_name'] = that.data.owner_name; } if(that.data.owner_mobile != ''){ - params['owner_mobile'] = that.data.owner_mobile; + if(that.data.owner_mobile == that.data.org_mobile){ + params['owner_mobile'] = that.data.complete_mobile; + }else{ + params['owner_mobile'] = that.data.owner_mobile; + } } if(that.data.owner_cardid != ''){ params['owner_cardid'] = that.data.owner_cardid; @@ -1211,7 +1232,7 @@ Page({ that.setData({ cardid:res2.data.IdNum, name:res2.data.Name, - customer_address:res2.data.Address, + customer_address:res2.data.Address, customer_cardidpic:resp.data.data.url, }) }) diff --git a/pages/order/register/index.wxml b/pages/order/register/index.wxml index c6b6da1..55431a4 100644 --- a/pages/order/register/index.wxml +++ b/pages/order/register/index.wxml @@ -76,13 +76,13 @@ - + 上牌城市* @@ -401,10 +401,10 @@ {{owner_cardid}} - + 企业名称