From 791f470d8066343cd25831492699e8f7c6be112a Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Sat, 27 Nov 2021 17:05:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E8=B4=A6=E5=8F=B7=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adddistributorinfo/adddistributorinfo.js | 6 +- src/pages/order/orderaddform/orderaddform.js | 2 +- src/pages/plan/list/list.js | 93 ++++++++++--------- .../account/add/adduserinfo/adduserinfo.js | 2 +- 4 files changed, 56 insertions(+), 47 deletions(-) diff --git a/src/pages/distributor/adddistributorinfo/adddistributorinfo.js b/src/pages/distributor/adddistributorinfo/adddistributorinfo.js index 3c35b06f..f4e85505 100644 --- a/src/pages/distributor/adddistributorinfo/adddistributorinfo.js +++ b/src/pages/distributor/adddistributorinfo/adddistributorinfo.js @@ -59,11 +59,11 @@ export default class adduserinfo extends React.Component{ ], contacts_phone:[ { type: "required", message: "请输入联系人手机号"}, - { type: "regExp", message: "手机号格式不对",reg:"^[1][3,5,7,8][0-9]\\d{8}$"} + { type: "regExp", message: "手机号格式不对",reg:"^[1][3,4,5,6,7,8,9][0-9]{9}$"} ], contacts_email:[ { type: "required", message: "请输入联系人邮箱"}, - { type: "regExp", message: "联系人邮箱格式不对",reg:"^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$"} + { type: "regExp", message: "联系人邮箱格式不正确",reg:"^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$"} ], sale: [ { type: "required", message: "请选择销售人员"}, @@ -267,7 +267,7 @@ export default class adduserinfo extends React.Component{ }else{ let contacts_email=[ { type: "required", message: "请输入联系人手机号码"}, - { type: "regExp", message: "手机号格式不对",reg:"^[1][3,5,7,8][0-9]\\d{8}$"} + { type: "regExp", message: "手机号格式不对",reg:"^[1][3,4,5,6,7,8,9][0-9]{9}$"} ] let obj = {} diff --git a/src/pages/order/orderaddform/orderaddform.js b/src/pages/order/orderaddform/orderaddform.js index 67129a45..cdefd3b1 100644 --- a/src/pages/order/orderaddform/orderaddform.js +++ b/src/pages/order/orderaddform/orderaddform.js @@ -121,7 +121,7 @@ export default class adduserinfo extends React.Component{ ], account:[ { type: "required", message: "请输入充值账号"}, - { type: "regExp", message: "格式不对",reg:"^[1][3,5,7,8][0-9]\\d{8}$"} + { type: "regExp", message: "格式不对",reg:"^[1][3,4,5,6,7,8,9][0-9]{9}$"} ], goodsname:[ { type: "required", message: "请输入商品名称"}, diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 0276e2c2..3fb60f18 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -307,30 +307,32 @@ export default class acclist extends React.Component{ if(this.state.email=="") { + Notify.clear(); Notify.error("接收邮箱不能为空") return + }else{ + let reg=/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; + if(!reg.test(this.state.email)){ + Notify.clear(); + Notify.error("接收邮箱格式不正确") + }else{ + let plan_id = row.id + let data ={ + type:"email", + to: this.state.email + } + + + planReceive(plan_id,data).then((res)=>{ + handelResponse(res,(req,msg)=>{ + Notify.success("发送成功") + closeDialog(1) + },(err)=>{ + Notify.error(err) + }) + }) + } } - - - let plan_id = row.id - let data ={ - type:"email", - to: this.state.email - } - - - planReceive(plan_id,data).then((res)=>{ - handelResponse(res,(req,msg)=>{ - Notify.success("发送成功") - closeDialog(1) - },(err)=>{ - Notify.error(err) - }) - }) - - - - }}>发送, onClose() { console.log('outer dialog closed'); @@ -350,32 +352,39 @@ export default class acclist extends React.Component{ children: , footer: , onClose() { console.log('outer dialog closed'); diff --git a/src/pages/system/account/add/adduserinfo/adduserinfo.js b/src/pages/system/account/add/adduserinfo/adduserinfo.js index 1aaf8f03..e7ac1249 100644 --- a/src/pages/system/account/add/adduserinfo/adduserinfo.js +++ b/src/pages/system/account/add/adduserinfo/adduserinfo.js @@ -335,7 +335,7 @@ export default class adduserinfo extends React.Component{ ], phone: [ { type: "required", message: "请输入手机号"}, - { type: "regExp", message: "手机号格式不正确",reg:"^[1][3,5,7,8][0-9]\\d{8}$"}, + { type: "regExp", message: "手机号格式不正确",reg:"^[1][3,4,5,6,7,8,9][0-9]{9}$"}, ], pwd:[ { type: "required", message: "请输入密码"},