|
@@ -187,10 +187,6 @@
|
|
|
<div class="formControls col-2 col-sm-2" style="width:120px;padding:0px 0px;margin-right: 15px;">
|
|
|
<span class="select-box">
|
|
|
<select name="channelCategory" id="channelCategory" class="select">
|
|
|
- <option value="1">电商</option>
|
|
|
- <option value="2">特殊渠道</option>
|
|
|
- <option value="3">线下</option>
|
|
|
- <option value="4">海外</option>
|
|
|
</select>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -490,7 +486,7 @@
|
|
|
initCity('${customerBasicInfo.customerProvinceCode!''}');
|
|
|
|
|
|
/*初始化渠道类别(大类)*/
|
|
|
- /*initChannelCategory();*/
|
|
|
+ initChannelCategory();
|
|
|
|
|
|
/*初始化销售产品(大类)*/
|
|
|
initPromotingProducts();
|
|
@@ -624,10 +620,6 @@
|
|
|
/*根据渠道类别初始化渠道类型*/
|
|
|
function initChannelType(channelCategory){
|
|
|
var channelTypeListInfo = null;
|
|
|
- /* if(channelCategory == null || channelCategory == ""){
|
|
|
- var html = '<option value="">请选择渠道类别</option>';
|
|
|
- $("[name='channelCategory']").html(html);
|
|
|
- }else{*/
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
data: {
|
|
@@ -650,7 +642,6 @@
|
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
}
|
|
|
});
|
|
|
- //}
|
|
|
}
|
|
|
|
|
|
/*初始化销售产品*/
|
|
@@ -739,6 +730,13 @@
|
|
|
if(contactPhone == "" || contactPhone == null ){
|
|
|
layer.msg("电话不能为空");
|
|
|
return;
|
|
|
+ }else{
|
|
|
+ //var reg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
|
|
|
+ var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
|
|
|
+ if(!reg.test(contactPhone)){
|
|
|
+ layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
if(contactType == "" || contactType == null ){
|
|
|
layer.msg("职位/身份不能为空");
|
|
@@ -747,6 +745,12 @@
|
|
|
if(contactEmail == "" || contactEmail == null ){
|
|
|
layer.msg("联系邮箱不能为空");
|
|
|
return;
|
|
|
+ }else{
|
|
|
+ var reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
|
|
|
+ if(!reg.test(contactEmail)){
|
|
|
+ layer.msg("请填写正确的邮箱!", {icon: 5, time: 3000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
//var operation = "删除";
|
|
|
var operation = "<a href='javascript:;' onclick='deleteContact(this)'>删除</a>";
|
|
@@ -870,10 +874,6 @@
|
|
|
layer.msg("客户名称不能为空");
|
|
|
return;
|
|
|
}
|
|
|
- if(customerBasicInfo.customerIndustry == "" || customerBasicInfo.customerIndustry == null ){
|
|
|
- layer.msg("客户行业不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
if(customerBasicInfo.customerProvinceCode == "" || customerBasicInfo.customerProvinceCode == null ){
|
|
|
layer.msg("客户省份不能为空");
|
|
|
return;
|
|
@@ -991,6 +991,12 @@
|
|
|
}if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
|
|
|
layer.msg("收款人手机不能为空");
|
|
|
return;
|
|
|
+ }else{
|
|
|
+ var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
|
|
|
+ if(!reg.test(phone)){
|
|
|
+ layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
//开票信息
|
|
|
var ticketOpeningInfo = {};
|
|
@@ -1022,6 +1028,12 @@
|
|
|
if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
|
|
|
layer.msg("开票电话不能为空");
|
|
|
return;
|
|
|
+ }else{
|
|
|
+ var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
|
|
|
+ if(!reg.test(ticketOpeningInfo.ticketOpeningPhone)){
|
|
|
+ layer.msg("请填写正确的电话号码!", {icon: 5, time: 3000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
}if(ticketOpeningInfo.enterpriseAddress == "" || ticketOpeningInfo.enterpriseAddress == null ){
|
|
|
layer.msg("企业地址不能为空");
|
|
|
return;
|