|
@@ -303,7 +303,6 @@ const PatentPayment = Form.create()(React.createClass({
|
|
});
|
|
});
|
|
theorgCodeUrl = picArr.join(",");
|
|
theorgCodeUrl = picArr.join(",");
|
|
};
|
|
};
|
|
- console.log(typeof theorgCodeUrl)
|
|
|
|
if (!this.state.patentNo) {
|
|
if (!this.state.patentNo) {
|
|
message.warning('专利号不能为空')
|
|
message.warning('专利号不能为空')
|
|
return
|
|
return
|
|
@@ -316,9 +315,19 @@ const PatentPayment = Form.create()(React.createClass({
|
|
message.warning('专利类型不能为空');
|
|
message.warning('专利类型不能为空');
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ let mobile = /^1[0-9]{10}$/ , phone = /^([0-9]{3,4}-)?[0-9]{7,8}$/ , phone1 = /^\d{3,4}-\d{3,4}-\d{3,4}$/;
|
|
|
|
+ if(this.state.contactPhone && !(mobile.test(this.state.contactPhone) || phone.test(this.state.contactPhone) || phone1.test(this.state.contactPhone))){
|
|
|
|
+ message.warning('电话格式不正确');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let emailReg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
|
|
if(this.state.email === ''){
|
|
if(this.state.email === ''){
|
|
- message.warning('电子邮箱不能为空');
|
|
|
|
- return
|
|
|
|
|
|
+ message.warning('电子邮箱不能为空');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!emailReg.test(this.state.email)){
|
|
|
|
+ message.warning('电子邮箱格式不正确');
|
|
|
|
+ return
|
|
}
|
|
}
|
|
$.ajax({
|
|
$.ajax({
|
|
method: "POST",
|
|
method: "POST",
|
|
@@ -393,6 +402,20 @@ const PatentPayment = Form.create()(React.createClass({
|
|
message.warning('专利类型不能为空');
|
|
message.warning('专利类型不能为空');
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ let mobile = /^1[0-9]{10}$/ , phone = /^([0-9]{3,4}-)?[0-9]{7,8}$/ , phone1 = /^\d{3,4}-\d{3,4}-\d{3,4}$/;
|
|
|
|
+ if(this.state.contactPhone && !(mobile.test(this.state.contactPhone) || phone.test(this.state.contactPhone) || phone1.test(this.state.contactPhone))){
|
|
|
|
+ message.warning('电话格式不正确');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let emailReg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
|
|
|
|
+ if(this.state.email === ''){
|
|
|
|
+ message.warning('电子邮箱不能为空');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!emailReg.test(this.state.email)){
|
|
|
|
+ message.warning('电子邮箱格式不正确');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
$.ajax({
|
|
$.ajax({
|
|
method: "POST",
|
|
method: "POST",
|
|
dataType: "json",
|
|
dataType: "json",
|
|
@@ -856,7 +879,7 @@ const PatentPayment = Form.create()(React.createClass({
|
|
</div> : <div/>}
|
|
</div> : <div/>}
|
|
</Modal> : <div/>}
|
|
</Modal> : <div/>}
|
|
|
|
|
|
- <Modal
|
|
|
|
|
|
+ {this.state.visible ?<Modal
|
|
maskClosable={false}
|
|
maskClosable={false}
|
|
visible={this.state.visible}
|
|
visible={this.state.visible}
|
|
onOk={this.visitOk}
|
|
onOk={this.visitOk}
|
|
@@ -1069,7 +1092,7 @@ const PatentPayment = Form.create()(React.createClass({
|
|
保存
|
|
保存
|
|
</Button>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
- </Modal>
|
|
|
|
|
|
+ </Modal> : <div/>}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|