|
@@ -172,10 +172,10 @@
|
|
<div class="formControls col-2 col-sm-2" style="width:120px; padding:0px 0px;margin-right: 15px;">
|
|
<div class="formControls col-2 col-sm-2" style="width:120px; padding:0px 0px;margin-right: 15px;">
|
|
<span class="select-box">
|
|
<span class="select-box">
|
|
<select name="channelCategory" id="channelCategory" class="select">
|
|
<select name="channelCategory" id="channelCategory" class="select">
|
|
- <option value="1">电商</option>
|
|
|
|
|
|
+ <#--<option value="1">电商</option>
|
|
<option value="2">特殊渠道</option>
|
|
<option value="2">特殊渠道</option>
|
|
<option value="3">线下</option>
|
|
<option value="3">线下</option>
|
|
- <option value="4">海外</option>
|
|
|
|
|
|
+ <option value="4">海外</option>-->
|
|
</select>
|
|
</select>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@@ -283,22 +283,21 @@
|
|
<label class="form-label col-9 skin-minimal">
|
|
<label class="form-label col-9 skin-minimal">
|
|
<span class="tit-2">开票信息</span><span class="c-red"> *</span>是否开票
|
|
<span class="tit-2">开票信息</span><span class="c-red"> *</span>是否开票
|
|
<div class="radio-box">
|
|
<div class="radio-box">
|
|
- <input type="radio" id="isOpenTicket-1" name="isOpenTicket" value="1" checked="checked" >
|
|
|
|
|
|
+ <input type="radio" id="isOpenTicket-1" class="isShowOpenTicket" name="isOpenTicket" value="0" checked="checked" >
|
|
<label for="isOpenTicket-1">开票</label>
|
|
<label for="isOpenTicket-1">开票</label>
|
|
</div>
|
|
</div>
|
|
<div class="radio-box">
|
|
<div class="radio-box">
|
|
- <input type="radio" id="isOpenTicket-2" name="isOpenTicket" value="1" >
|
|
|
|
|
|
+ <input type="radio" id="isOpenTicket-2" class="isShowOpenTicket" name="isOpenTicket" value="1" >
|
|
<label for="isOpenTicket-2">不开票</label>
|
|
<label for="isOpenTicket-2">不开票</label>
|
|
</div>
|
|
</div>
|
|
|
|
+ <#--<div class="radio-box"><input type="radio" name="isOpenTicket" value="1" checked="checked">开票</div>
|
|
|
|
+ <div class="radio-box"><input type="radio" name="isOpenTicket" value="2">不开票</div>-->
|
|
</label>
|
|
</label>
|
|
- <#--<div class="radio-box"><input type="radio" name="isOpenTicket" value="1" checked="checked">开票</div>-->
|
|
|
|
- <#--<div class="radio-box"><input type="radio" name="isOpenTicket" value="2">不开票</div>-->
|
|
|
|
-
|
|
|
|
<div class="formControls col-3">
|
|
<div class="formControls col-3">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="row cl" style="margin-bottom: 10px;">
|
|
|
|
|
|
+ <div class="row cl" style="margin-bottom: 10px;" id="isShowOpenTicket">
|
|
<label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>发票类型:</label>
|
|
<label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>发票类型:</label>
|
|
<div class="formControls col-2 col-sm-2">
|
|
<div class="formControls col-2 col-sm-2">
|
|
<span class="select-box">
|
|
<span class="select-box">
|
|
@@ -317,7 +316,7 @@
|
|
<input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="">
|
|
<input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="row cl" style="margin-bottom: 10px;">
|
|
|
|
|
|
+ <div class="row cl" style="margin-bottom: 10px;" id="isShowEnterprise">
|
|
<label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业名称:</label>
|
|
<label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业名称:</label>
|
|
<div class="formControls col-2 col-sm-2 skin-minimal">
|
|
<div class="formControls col-2 col-sm-2 skin-minimal">
|
|
<input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="">
|
|
<input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="">
|
|
@@ -331,9 +330,9 @@
|
|
<input type="text" class="input-text trim_input" placeholder="开票电话" id="ticketOpeningPhone" name="ticketOpeningPhone" value="">
|
|
<input type="text" class="input-text trim_input" placeholder="开票电话" id="ticketOpeningPhone" name="ticketOpeningPhone" value="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="row cl" style="margin-bottom: 10px;">
|
|
|
|
|
|
+ <div class="row cl" style="margin-bottom: 10px;" id="isShowAddress">
|
|
<label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业地址:</label>
|
|
<label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业地址:</label>
|
|
- <div class="formControls col-2 col-sm-2 skin-minimal">
|
|
|
|
|
|
+ <div class="formControls col-2 col-sm-2 skin-minimal" style="width: 1105px;">
|
|
<input type="text" class="input-text trim_input" placeholder="企业地址" id="enterpriseAddress" name="enterpriseAddress" value="">
|
|
<input type="text" class="input-text trim_input" placeholder="企业地址" id="enterpriseAddress" name="enterpriseAddress" value="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -365,26 +364,29 @@
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
+<script>
|
|
|
|
+ $('.skin-minimal input').iCheck({
|
|
|
|
+ checkboxClass: 'icheckbox-blue',
|
|
|
|
+ radioClass: 'iradio-blue',
|
|
|
|
+ increaseArea: '20%'
|
|
|
|
+ });
|
|
|
|
+</script>
|
|
|
|
|
|
<#--业务js-->
|
|
<#--业务js-->
|
|
<#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
|
|
<#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
|
|
<script>
|
|
<script>
|
|
$("#writeSupplyPrice").hide();//隐藏手动输入产品价格框
|
|
$("#writeSupplyPrice").hide();//隐藏手动输入产品价格框
|
|
|
|
+
|
|
/*初始化页面参数*/
|
|
/*初始化页面参数*/
|
|
$(function () {
|
|
$(function () {
|
|
/* 初始化单选框样式 */
|
|
/* 初始化单选框样式 */
|
|
//initCheck();
|
|
//initCheck();
|
|
- $('.skin-minimal input').iCheck({
|
|
|
|
- checkboxClass: 'icheckbox-blue',
|
|
|
|
- radioClass: 'iradio-blue',
|
|
|
|
- increaseArea: '20%'
|
|
|
|
- });
|
|
|
|
|
|
|
|
/*初始化省份(大类)*/
|
|
/*初始化省份(大类)*/
|
|
initProvince();
|
|
initProvince();
|
|
|
|
|
|
/*初始化渠道类别(大类)*/
|
|
/*初始化渠道类别(大类)*/
|
|
- /*initChannelCategory();*/
|
|
|
|
|
|
+ initChannelCategory();
|
|
|
|
|
|
/*初始化销售产品(大类)*/
|
|
/*初始化销售产品(大类)*/
|
|
initPromotingProducts();
|
|
initPromotingProducts();
|
|
@@ -408,6 +410,12 @@
|
|
$("[name='supplyPrice']").change(function (){
|
|
$("[name='supplyPrice']").change(function (){
|
|
changeSupplyPrice($(this).val());
|
|
changeSupplyPrice($(this).val());
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ /*监听来源入口选择事件*/
|
|
|
|
+ $('.isShowOpenTicket').on('ifChecked', function(event){
|
|
|
|
+ var isOpenTicket = $("input[name='isOpenTicket']:checked").val();
|
|
|
|
+ isShowOpenTicket(isOpenTicket);
|
|
|
|
+ });
|
|
})
|
|
})
|
|
|
|
|
|
/*业务逻辑js控制 start*/
|
|
/*业务逻辑js控制 start*/
|
|
@@ -418,6 +426,18 @@
|
|
$(".dalog-ask").hide();
|
|
$(".dalog-ask").hide();
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ function isShowOpenTicket(isOpenTicket) {
|
|
|
|
+ if(isOpenTicket == "1"){
|
|
|
|
+ $("#isShowOpenTicket").hide();
|
|
|
|
+ $("#isShowEnterprise").hide();
|
|
|
|
+ $("#isShowAddress").hide();
|
|
|
|
+ }else{
|
|
|
|
+ $("#isShowOpenTicket").show();
|
|
|
|
+ $("#isShowEnterprise").show();
|
|
|
|
+ $("#isShowAddress").show();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/*初始化省份*/
|
|
/*初始化省份*/
|
|
function initProvince() {
|
|
function initProvince() {
|
|
//默认查询参数为空
|
|
//默认查询参数为空
|
|
@@ -485,6 +505,7 @@
|
|
/*初始化渠道类别*/
|
|
/*初始化渠道类别*/
|
|
function initChannelCategory() {
|
|
function initChannelCategory() {
|
|
//默认查询参数为空
|
|
//默认查询参数为空
|
|
|
|
+ var id;
|
|
var channelCategoryListInfo = null;
|
|
var channelCategoryListInfo = null;
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "POST",
|
|
type: "POST",
|
|
@@ -494,8 +515,7 @@
|
|
url: "${path}/admin/customerBasic/query_channelCategoryList",
|
|
url: "${path}/admin/customerBasic/query_channelCategoryList",
|
|
async: true,
|
|
async: true,
|
|
success: function(data){
|
|
success: function(data){
|
|
- var html = '<option value="">请选择渠道类别</option>';
|
|
|
|
- var id;
|
|
|
|
|
|
+ var html = '';
|
|
if (data.returnCode == 200) {
|
|
if (data.returnCode == 200) {
|
|
for(var i=0;i<data.returnMsg.channelCategoryList.length;i++){
|
|
for(var i=0;i<data.returnMsg.channelCategoryList.length;i++){
|
|
channelCategoryListInfo = data.returnMsg.channelCategoryList[i];
|
|
channelCategoryListInfo = data.returnMsg.channelCategoryList[i];
|
|
@@ -512,6 +532,7 @@
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ initChannelType(id);
|
|
}
|
|
}
|
|
|
|
|
|
/*根据渠道类别初始化渠道类型*/
|
|
/*根据渠道类别初始化渠道类型*/
|
|
@@ -529,7 +550,8 @@
|
|
url: "${path}/admin/customerBasic/query_channelTypeList",
|
|
url: "${path}/admin/customerBasic/query_channelTypeList",
|
|
async: true,
|
|
async: true,
|
|
success: function(data){
|
|
success: function(data){
|
|
- var html = '<option value="">请选择渠道类型</option>';
|
|
|
|
|
|
+ //var html = '<option value="">请选择渠道类型</option>';
|
|
|
|
+ var html = '';
|
|
if (data.returnCode == 200) {
|
|
if (data.returnCode == 200) {
|
|
for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
|
|
for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
|
|
channelTypeListInfo = data.returnMsg.channelTypeList[i];
|
|
channelTypeListInfo = data.returnMsg.channelTypeList[i];
|
|
@@ -634,6 +656,13 @@
|
|
//alert("电话不能为空");
|
|
//alert("电话不能为空");
|
|
layer.msg("电话不能为空",{icon:2,time:1000});
|
|
layer.msg("电话不能为空",{icon:2,time:1000});
|
|
return;
|
|
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 ){
|
|
if(contactType == "" || contactType == null ){
|
|
layer.msg("职位/身份不能为空");
|
|
layer.msg("职位/身份不能为空");
|
|
@@ -642,6 +671,12 @@
|
|
if(contactEmail == "" || contactEmail == null ){
|
|
if(contactEmail == "" || contactEmail == null ){
|
|
layer.msg("联系邮箱不能为空");
|
|
layer.msg("联系邮箱不能为空");
|
|
return;
|
|
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 = "删除";
|
|
var operation = "<a href='javascript:;' onclick='deleteContact(this)'>删除</a>";
|
|
var operation = "<a href='javascript:;' onclick='deleteContact(this)'>删除</a>";
|
|
@@ -765,10 +800,6 @@
|
|
layer.msg("客户名称不能为空");
|
|
layer.msg("客户名称不能为空");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(customerBasicInfo.customerIndustry == "" || customerBasicInfo.customerIndustry == null ){
|
|
|
|
- layer.msg("客户行业不能为空");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
if(customerBasicInfo.customerProvinceCode == "" || customerBasicInfo.customerProvinceCode == null ){
|
|
if(customerBasicInfo.customerProvinceCode == "" || customerBasicInfo.customerProvinceCode == null ){
|
|
layer.msg("客户省份不能为空");
|
|
layer.msg("客户省份不能为空");
|
|
return;
|
|
return;
|
|
@@ -886,6 +917,12 @@
|
|
}if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
|
|
}if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
|
|
layer.msg("收款人手机不能为空");
|
|
layer.msg("收款人手机不能为空");
|
|
return;
|
|
return;
|
|
|
|
+ }else{
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//开票信息
|
|
//开票信息
|
|
var ticketOpeningInfo = {};
|
|
var ticketOpeningInfo = {};
|
|
@@ -916,6 +953,12 @@
|
|
if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
|
|
if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
|
|
layer.msg("开票电话不能为空");
|
|
layer.msg("开票电话不能为空");
|
|
return;
|
|
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 ){
|
|
}if(ticketOpeningInfo.enterpriseAddress == "" || ticketOpeningInfo.enterpriseAddress == null ){
|
|
layer.msg("企业地址不能为空");
|
|
layer.msg("企业地址不能为空");
|
|
return;
|
|
return;
|
|
@@ -1026,6 +1069,8 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/*业务逻辑js控制 end*/
|
|
/*业务逻辑js控制 end*/
|
|
|
|
+
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</body>
|