瀏覽代碼

添加客户基本信息

dujinyan 7 年之前
父節點
當前提交
cec04c09b5
共有 1 個文件被更改,包括 50 次插入50 次删除
  1. 50 50
      watero-rst-web/src/main/webapp/WEB-INF/views/customer/save_customer_info.ftl

+ 50 - 50
watero-rst-web/src/main/webapp/WEB-INF/views/customer/save_customer_info.ftl

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