|
@@ -733,27 +733,27 @@
|
|
//var reg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
|
|
//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})$/
|
|
var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
|
|
if(!reg.test(contactPhone)){
|
|
if(!reg.test(contactPhone)){
|
|
- layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
|
|
|
|
|
|
+ layer.msg("请填写正确的手机号码!", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(contactType == "" || contactType == null ){
|
|
if(contactType == "" || contactType == null ){
|
|
- layer.msg("职位/身份不能为空");
|
|
|
|
|
|
+ layer.msg("职位/身份不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(contactType) > 20){
|
|
}else if(getByteLen(contactType) > 20){
|
|
- layer.msg("职位/身份长度超限");
|
|
|
|
|
|
+ layer.msg("职位/身份长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(contactEmail == "" || contactEmail == null ){
|
|
if(contactEmail == "" || contactEmail == null ){
|
|
- layer.msg("联系邮箱不能为空");
|
|
|
|
|
|
+ layer.msg("联系邮箱不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else{
|
|
}else{
|
|
var reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
|
|
var reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
|
|
if(!reg.test(contactEmail)){
|
|
if(!reg.test(contactEmail)){
|
|
- layer.msg("请填写正确的邮箱!", {icon: 5, time: 3000});
|
|
|
|
|
|
+ layer.msg("请填写正确的邮箱!", {icon: 2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(contactEmail) > 30){
|
|
}else if(getByteLen(contactEmail) > 30){
|
|
- layer.msg("邮箱长度超限");
|
|
|
|
|
|
+ layer.msg("邮箱长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -823,7 +823,7 @@
|
|
writeSupplyPrice = toDecimal2(writeSupplyPrice);
|
|
writeSupplyPrice = toDecimal2(writeSupplyPrice);
|
|
supplyPrice = writeSupplyPrice;
|
|
supplyPrice = writeSupplyPrice;
|
|
}else if(getByteLen(writeSupplyPrice) > 9){
|
|
}else if(getByteLen(writeSupplyPrice) > 9){
|
|
- layer.msg("产品价格长度超限");
|
|
|
|
|
|
+ layer.msg("产品价格长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
var accountPeriod = document.getElementById("accountPeriod").value;
|
|
var accountPeriod = document.getElementById("accountPeriod").value;
|
|
@@ -835,29 +835,29 @@
|
|
accountPeriod = "两个月";
|
|
accountPeriod = "两个月";
|
|
}
|
|
}
|
|
if(channelCategory == "" || channelCategory == null ){
|
|
if(channelCategory == "" || channelCategory == null ){
|
|
- layer.msg("渠道类别不能为空");
|
|
|
|
|
|
+ layer.msg("渠道类别不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(channelType == "" || channelType == null ){
|
|
if(channelType == "" || channelType == null ){
|
|
- layer.msg("渠道类型不能为空");
|
|
|
|
|
|
+ layer.msg("渠道类型不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(channelName == "" || channelName == null ){
|
|
if(channelName == "" || channelName == null ){
|
|
- layer.msg("渠道平台/名称不能为空");
|
|
|
|
|
|
+ layer.msg("渠道平台/名称不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(channelName) > 30){
|
|
}else if(getByteLen(channelName) > 30){
|
|
- layer.msg("渠道平台/名称长度超限");
|
|
|
|
|
|
+ layer.msg("渠道平台/名称长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(promotingProducts == "" || promotingProducts == null ){
|
|
if(promotingProducts == "" || promotingProducts == null ){
|
|
- layer.msg("销售产品不能为空");
|
|
|
|
|
|
+ layer.msg("销售产品不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(supplyPrice == "" || supplyPrice == null ){
|
|
if(supplyPrice == "" || supplyPrice == null ){
|
|
- layer.msg("供货价格不能为空");
|
|
|
|
|
|
+ layer.msg("供货价格不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(supplyPrice) > 9){
|
|
}else if(getByteLen(supplyPrice) > 9){
|
|
- layer.msg("供货价格长度超限");
|
|
|
|
|
|
+ layer.msg("供货价格长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
var promotingProductsHtml = '<input type="hidden" value="'+promotingProducts+'">';
|
|
var promotingProductsHtml = '<input type="hidden" value="'+promotingProducts+'">';
|
|
@@ -905,30 +905,30 @@
|
|
customerBasicInfo.customerRemarks = $("[name='customerRemarks']").val();
|
|
customerBasicInfo.customerRemarks = $("[name='customerRemarks']").val();
|
|
customerBasicInfo.customerStatus = "2";
|
|
customerBasicInfo.customerStatus = "2";
|
|
if(customerBasicInfo.customerName == "" || customerBasicInfo.customerName == null ){
|
|
if(customerBasicInfo.customerName == "" || customerBasicInfo.customerName == null ){
|
|
- layer.msg("客户名称不能为空");
|
|
|
|
|
|
+ layer.msg("客户名称不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(customerBasicInfo.customerName) > 20){
|
|
}else if(getByteLen(customerBasicInfo.customerName) > 20){
|
|
- layer.msg("客户名称长度超限");
|
|
|
|
|
|
+ layer.msg("客户名称长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(getByteLen(customerBasicInfo.customerIndustry) > 20){
|
|
if(getByteLen(customerBasicInfo.customerIndustry) > 20){
|
|
- layer.msg("客户行业长度超限");
|
|
|
|
|
|
+ layer.msg("客户行业长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(customerBasicInfo.customerProvinceCode == "" || customerBasicInfo.customerProvinceCode == null ){
|
|
if(customerBasicInfo.customerProvinceCode == "" || customerBasicInfo.customerProvinceCode == null ){
|
|
- layer.msg("客户省份不能为空");
|
|
|
|
|
|
+ layer.msg("客户省份不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(customerBasicInfo.customerCityCode == "" || customerBasicInfo.customerCityCode == null ){
|
|
if(customerBasicInfo.customerCityCode == "" || customerBasicInfo.customerCityCode == null ){
|
|
- layer.msg("客户城市不能为空");
|
|
|
|
|
|
+ layer.msg("客户城市不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(getByteLen(customerBasicInfo.customerAddress) > 100){
|
|
if(getByteLen(customerBasicInfo.customerAddress) > 100){
|
|
- layer.msg("客户详细地址长度超限");
|
|
|
|
|
|
+ layer.msg("客户详细地址长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(getByteLen(customerBasicInfo.customerRemarks) > 100){
|
|
if(getByteLen(customerBasicInfo.customerRemarks) > 100){
|
|
- layer.msg("备注信息长度超限");
|
|
|
|
|
|
+ layer.msg("备注信息长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//对接联系人信息
|
|
//对接联系人信息
|
|
@@ -955,7 +955,7 @@
|
|
dockedContactInfoList.push(dockedContactInfo);
|
|
dockedContactInfoList.push(dockedContactInfo);
|
|
})
|
|
})
|
|
if(dockedContactInfoList.length<1){
|
|
if(dockedContactInfoList.length<1){
|
|
- layer.msg("对接联系人信息不能为空");
|
|
|
|
|
|
+ layer.msg("对接联系人信息不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//var dockedContactInfoListJson = $("#dockedContactInfoJson").val(JSON.stringify(dockedContactInfoList));
|
|
//var dockedContactInfoListJson = $("#dockedContactInfoJson").val(JSON.stringify(dockedContactInfoList));
|
|
@@ -1008,7 +1008,7 @@
|
|
|
|
|
|
});
|
|
});
|
|
if(channelSaleInfoList.length<2){
|
|
if(channelSaleInfoList.length<2){
|
|
- layer.msg("客户销售渠道信息不能为空");
|
|
|
|
|
|
+ layer.msg("客户销售渠道信息不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//var channelSaleInfoListJson = $("#channelSaleInfoJson").val(JSON.stringify(channelSaleInfoList));
|
|
//var channelSaleInfoListJson = $("#channelSaleInfoJson").val(JSON.stringify(channelSaleInfoList));
|
|
@@ -1022,24 +1022,24 @@
|
|
/*billingInfo.receivablesName = $("[name='receivablesName']").val();*/
|
|
/*billingInfo.receivablesName = $("[name='receivablesName']").val();*/
|
|
billingInfo.receivablesPhone = $("[name='receivablesPhone']").val();
|
|
billingInfo.receivablesPhone = $("[name='receivablesPhone']").val();
|
|
if(billingInfo.accountOpeningBranch == "" || billingInfo.accountOpeningBranch == null ){
|
|
if(billingInfo.accountOpeningBranch == "" || billingInfo.accountOpeningBranch == null ){
|
|
- layer.msg("开户支行不能为空");
|
|
|
|
|
|
+ layer.msg("开户支行不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(billingInfo.accountOpeningBranch) > 50){
|
|
}else if(getByteLen(billingInfo.accountOpeningBranch) > 50){
|
|
- layer.msg("开户支行长度超限");
|
|
|
|
|
|
+ layer.msg("开户支行长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(billingInfo.accountName == "" || billingInfo.accountName == null ){
|
|
if(billingInfo.accountName == "" || billingInfo.accountName == null ){
|
|
- layer.msg("账号名称不能为空");
|
|
|
|
|
|
+ layer.msg("账号名称不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(billingInfo.accountName) > 30){
|
|
}else if(getByteLen(billingInfo.accountName) > 30){
|
|
- layer.msg("账号名称长度超限");
|
|
|
|
|
|
+ layer.msg("账号名称长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(billingInfo.accountNum == "" || billingInfo.accountNum == null ){
|
|
if(billingInfo.accountNum == "" || billingInfo.accountNum == null ){
|
|
- layer.msg("账号不能为空");
|
|
|
|
|
|
+ layer.msg("账号不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(billingInfo.accountNum) > 20){
|
|
}else if(getByteLen(billingInfo.accountNum) > 20){
|
|
- layer.msg("账号长度超限");
|
|
|
|
|
|
+ layer.msg("账号长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
/*if(billingInfo.receivablesName == "" || billingInfo.receivablesName == null ){
|
|
/*if(billingInfo.receivablesName == "" || billingInfo.receivablesName == null ){
|
|
@@ -1047,12 +1047,12 @@
|
|
return;
|
|
return;
|
|
}*/
|
|
}*/
|
|
if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
|
|
if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
|
|
- layer.msg("收款人手机不能为空");
|
|
|
|
|
|
+ layer.msg("收款人手机不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else{
|
|
}else{
|
|
var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
|
|
var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
|
|
if(!reg.test(billingInfo.receivablesPhone)){
|
|
if(!reg.test(billingInfo.receivablesPhone)){
|
|
- layer.msg("请填写正确的收款人手机号!", {icon: 5, time: 3000});
|
|
|
|
|
|
+ layer.msg("请填写正确的收款人手机号!", {icon: 2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1071,63 +1071,63 @@
|
|
ticketOpeningInfo.enterpriseAddress = $("[name='enterpriseAddress']").val();
|
|
ticketOpeningInfo.enterpriseAddress = $("[name='enterpriseAddress']").val();
|
|
if(ticketOpeningInfo.ticketType == "1" ){
|
|
if(ticketOpeningInfo.ticketType == "1" ){
|
|
if(ticketOpeningInfo.accountOpeningBranch == "" || ticketOpeningInfo.accountOpeningBranch == null ){
|
|
if(ticketOpeningInfo.accountOpeningBranch == "" || ticketOpeningInfo.accountOpeningBranch == null ){
|
|
- layer.msg("开户支行不能为空");
|
|
|
|
|
|
+ layer.msg("开户支行不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(ticketOpeningInfo.accountOpeningBranch) > 50){
|
|
}else if(getByteLen(ticketOpeningInfo.accountOpeningBranch) > 50){
|
|
- layer.msg("开户支行长度超限");
|
|
|
|
|
|
+ layer.msg("开户支行长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(ticketOpeningInfo.ticketOpeningAccount == "" || ticketOpeningInfo.ticketOpeningAccount == null ){
|
|
if(ticketOpeningInfo.ticketOpeningAccount == "" || ticketOpeningInfo.ticketOpeningAccount == null ){
|
|
- layer.msg("开票账户不能为空");
|
|
|
|
|
|
+ layer.msg("开票账户不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(ticketOpeningInfo.ticketOpeningAccount) > 30){
|
|
}else if(getByteLen(ticketOpeningInfo.ticketOpeningAccount) > 30){
|
|
- layer.msg("开票账户长度超限");
|
|
|
|
|
|
+ layer.msg("开票账户长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
- layer.msg("企业名称不能为空");
|
|
|
|
|
|
+ layer.msg("企业名称不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(ticketOpeningInfo.enterpriseName) > 30){
|
|
}else if(getByteLen(ticketOpeningInfo.enterpriseName) > 30){
|
|
- layer.msg("企业名称长度超限");
|
|
|
|
|
|
+ layer.msg("企业名称长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
- layer.msg("纳税人识别号不能为空");
|
|
|
|
|
|
+ layer.msg("纳税人识别号不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(ticketOpeningInfo.taxpayerIdentificationNum) > 30){
|
|
}else if(getByteLen(ticketOpeningInfo.taxpayerIdentificationNum) > 30){
|
|
- layer.msg("纳税人识别号长度超限");
|
|
|
|
|
|
+ layer.msg("纳税人识别号长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
|
|
if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
|
|
- layer.msg("开票电话不能为空");
|
|
|
|
|
|
+ layer.msg("开票电话不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else{
|
|
}else{
|
|
var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
|
|
var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
|
|
if(!reg.test(ticketOpeningInfo.ticketOpeningPhone)){
|
|
if(!reg.test(ticketOpeningInfo.ticketOpeningPhone)){
|
|
- layer.msg("请填写正确的开票电话!", {icon: 5, time: 3000});
|
|
|
|
|
|
+ layer.msg("请填写正确的开票电话!", {icon: 2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(ticketOpeningInfo.enterpriseAddress == "" || ticketOpeningInfo.enterpriseAddress == null ){
|
|
if(ticketOpeningInfo.enterpriseAddress == "" || ticketOpeningInfo.enterpriseAddress == null ){
|
|
- layer.msg("企业地址不能为空");
|
|
|
|
|
|
+ layer.msg("企业地址不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(ticketOpeningInfo.enterpriseAddress) > 30){
|
|
}else if(getByteLen(ticketOpeningInfo.enterpriseAddress) > 30){
|
|
- layer.msg("企业地址长度超限");
|
|
|
|
|
|
+ layer.msg("企业地址长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
- layer.msg("企业名称不能为空");
|
|
|
|
|
|
+ layer.msg("企业名称不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(ticketOpeningInfo.enterpriseName) > 30){
|
|
}else if(getByteLen(ticketOpeningInfo.enterpriseName) > 30){
|
|
- layer.msg("企业名称长度超限");
|
|
|
|
|
|
+ layer.msg("企业名称长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
- layer.msg("纳税人识别号不能为空");
|
|
|
|
|
|
+ layer.msg("纳税人识别号不能为空", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}else if(getByteLen(ticketOpeningInfo.taxpayerIdentificationNum) > 30){
|
|
}else if(getByteLen(ticketOpeningInfo.taxpayerIdentificationNum) > 30){
|
|
- layer.msg("纳税人识别号长度超限");
|
|
|
|
|
|
+ layer.msg("纳税人识别号长度超限", {icon:2, time: 3000});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1163,16 +1163,16 @@
|
|
if (data.returnCode == 200) {
|
|
if (data.returnCode == 200) {
|
|
saveStates = "保存成功";
|
|
saveStates = "保存成功";
|
|
//layer.msg(saveStates);
|
|
//layer.msg(saveStates);
|
|
- layer.msg(saveStates,{icon: 1,time:1000});
|
|
|
|
|
|
+ layer.msg(saveStates,{icon: 5,time:1000});
|
|
window.location.href= "${path}/admin/customerBasic/listCustomerBasic";
|
|
window.location.href= "${path}/admin/customerBasic/listCustomerBasic";
|
|
}else{
|
|
}else{
|
|
saveStates = "保存失败";
|
|
saveStates = "保存失败";
|
|
- layer.msg(saveStates,{icon: 5,time:1000});
|
|
|
|
|
|
+ layer.msg(saveStates,{icon: 2,time:1000});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
saveStates = "保存失败";
|
|
saveStates = "保存失败";
|
|
- layer.msg(saveStates,{icon: 5,time:1000});
|
|
|
|
|
|
+ layer.msg(saveStates,{icon: 2,time:1000});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|