|
@@ -6,7 +6,7 @@ checkLogin();
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
<head>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
- <title>管理区域</title>
|
|
|
+ <title>客户管理</title>
|
|
|
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
|
|
<script src="js/jquery-1.7.2.min.js"></script>
|
|
|
<script src="js/js.js"></script>
|
|
@@ -79,7 +79,7 @@ checkLogin();
|
|
|
<option value="email" ${(methodCounts.email || 0) >= 3 ? 'disabled' : ''}>邮箱</option>
|
|
|
<option value="linkedin" ${(methodCounts.linkedin || 0) >= 3 ? 'disabled' : ''}>领英</option>
|
|
|
<option value="facebook" ${(methodCounts.facebook || 0) >= 3 ? 'disabled' : ''}>Facebook</option>
|
|
|
- <option value="alibaba" ${(methodCounts.alibaba || 0) >= 3 ? 'disabled' : ''}>阿里巴巴</option>
|
|
|
+ <option value="alibaba" ${(methodCounts.alibaba || 0) >= 3 ? 'disabled' : ''}>阿里巴巴/阿里旺旺</option>
|
|
|
</select>
|
|
|
<input type="text" class="txt1 method-input" style="width:60%;" placeholder="请选择联系方式类型">
|
|
|
<button type="button" class="remove-method-btn">删除</button>
|
|
@@ -196,13 +196,13 @@ checkLogin();
|
|
|
|
|
|
switch(value) {
|
|
|
case "tel":
|
|
|
- placeholder = "电话格式:区号+号码 如:+86 15012345678";
|
|
|
+ placeholder = "电话格式必须为:区号+号码 如:+86 15012345678";
|
|
|
break;
|
|
|
case "wechat":
|
|
|
placeholder = "微信";
|
|
|
break;
|
|
|
case "whatsapp":
|
|
|
- placeholder = "Whatsapp 格式:区号+号码 如:+86 15012345678";
|
|
|
+ placeholder = "Whatsapp 格式必须为:区号+号码 如:+86 15012345678";
|
|
|
break;
|
|
|
case "email":
|
|
|
placeholder = "邮件";
|
|
@@ -214,7 +214,7 @@ checkLogin();
|
|
|
placeholder = "Facebook";
|
|
|
break;
|
|
|
case "alibaba":
|
|
|
- placeholder = "阿里巴巴";
|
|
|
+ placeholder = "阿里巴巴/阿里旺旺";
|
|
|
break;
|
|
|
default:
|
|
|
placeholder = "请选择联系方式类型";
|
|
@@ -238,18 +238,21 @@ checkLogin();
|
|
|
}
|
|
|
|
|
|
if (clientCountry == 0 || !clientCountry) {
|
|
|
- alert("这是哪个国家的客户?");
|
|
|
+ alert("地区/国家不能为空?");
|
|
|
+ $("#cs_country").focus();
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
if (clientFrom == "0") {
|
|
|
alert("请填写客户来源!");
|
|
|
+ $("#cs_from").focus();
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
// Validate that at least one contact has at least one contact method
|
|
|
var hasContactMethod = false;
|
|
|
var allContactsValid = true;
|
|
|
+ var phoneRegex = /^\+\d{1,4}\s\d{5,}$/; // Regex to validate phone format: +[country code] [number]
|
|
|
|
|
|
$('.contact-form').each(function(contactIndex) {
|
|
|
var $form = $(this);
|
|
@@ -272,6 +275,16 @@ checkLogin();
|
|
|
allContactsValid = false;
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ // Validate phone number format for tel and whatsapp
|
|
|
+ if ((methodType === 'tel' || methodType === 'whatsapp') && methodValue) {
|
|
|
+ if (!phoneRegex.test(methodValue)) {
|
|
|
+ alert("电话格式不正确,请使用以下格式:区号+号码,如 +86 15012345678");
|
|
|
+ $(this).find('input.method-input').focus();
|
|
|
+ allContactsValid = false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
// If contact has a name but no methods, or has methods but no name
|
|
@@ -410,7 +423,7 @@ checkLogin();
|
|
|
<td><input type="text" id="cs_company" name="cs_company" value="" class="txt1" /></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th width="8%">地区</th>
|
|
|
+ <th width="8%">地区/国家</th>
|
|
|
<td>
|
|
|
<div class="layui-input-inline">
|
|
|
<div class="layui-form-select ySearchSelect y1">
|