|
@@ -242,7 +242,7 @@
|
|
|
<div class="row cl" style="margin-bottom: 10px;">
|
|
|
<label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
|
|
|
<div class="formControls col-2 col-sm-2">
|
|
|
- <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="">
|
|
|
+ <input type="text" class="input-text trim_input" placeholder="开户支行" id="billAccountOpeningBranch" name="billAccountOpeningBranch" value="">
|
|
|
</div>
|
|
|
<label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账户名称:</label>
|
|
|
<div class="formControls col-2 col-sm-2 skin-minimal">
|
|
@@ -284,7 +284,7 @@
|
|
|
</div>
|
|
|
<label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
|
|
|
<div class="formControls col-2 col-sm-2 skin-minimal">
|
|
|
- <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="accountOpeningBranch" name="accountOpeningBranch" value="">
|
|
|
+ <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="ticketAccountOpeningBranch" name="ticketAccountOpeningBranch" value="">
|
|
|
</div>
|
|
|
<label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票账户:</label>
|
|
|
<div class="formControls col-2 col-sm-2 skin-minimal">
|
|
@@ -333,7 +333,7 @@
|
|
|
<!-- Unnamed (矩形) -->
|
|
|
<div class="class="row cl"">
|
|
|
<!-- Unnamed () style="visibility: visible;"-->
|
|
|
- <div id="u30" class="my-btn-search" style="cursor:pointer; float: center;height: 35px;margin-right: 30px;margin-bottom: 10px;">
|
|
|
+ <div class="my-btn-search" style="cursor:pointer; float: center;height: 35px;margin-right: 30px;margin-bottom: 10px;">
|
|
|
<p><span onclick="addCustomerBasicInfo()">添加客户信息</span></p>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -576,12 +576,27 @@
|
|
|
function toAddDockedContactInfo() {
|
|
|
//var dockedContactInfoList = new Array();
|
|
|
//document.getElementById("contactListId").innerHTML = "";
|
|
|
- $("#contactTbodyId").hide();
|
|
|
//$("#contactListId").innerHTML = "";
|
|
|
var contactName = document.getElementById("contactName").value;
|
|
|
var contactPhone = document.getElementById("contactPhone").value;
|
|
|
var contactType = document.getElementById("contactType").value;
|
|
|
var contactEmail = document.getElementById("contactEmail").value;
|
|
|
+ if(contactName == "" || contactName == null ){
|
|
|
+ alert("联系人姓名不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(contactPhone == "" || contactPhone == null ){
|
|
|
+ alert("电话不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(contactType == "" || contactType == null ){
|
|
|
+ alert("职位/身份不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(contactEmail == "" || contactEmail == null ){
|
|
|
+ alert("联系邮箱不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
//var operation = "删除";
|
|
|
var operation = "<a href='javascript:;' onclick='deleteContact(this)'>删除</a>";
|
|
|
//"<a href='javascript:;' onclick='del(this)'>删除</a>";
|
|
@@ -598,14 +613,11 @@
|
|
|
cell = row.insertCell();
|
|
|
cell.innerHTML=operation;
|
|
|
}
|
|
|
+ $("#contactTbodyId").hide();
|
|
|
return false;
|
|
|
}
|
|
|
/*保存客户销售信息到列表*/
|
|
|
function toAddChannelSaleInfo() {
|
|
|
- //var channelSaleInfoList = new Array();
|
|
|
- //document.getElementById("channelSaleListId").innerHTML = "";
|
|
|
- $("#channelTbodyId").hide();
|
|
|
- //$("#channelSaleListId").innerHTML = "";
|
|
|
var channelCategory = document.getElementById("channelCategory").value;
|
|
|
if(channelCategory == "1"){
|
|
|
channelCategory = "电商";
|
|
@@ -621,6 +633,26 @@
|
|
|
var promotingProducts = document.getElementById("promotingProducts").value;
|
|
|
var supplyPrice = document.getElementById("supplyPrice").value;
|
|
|
var accountPeriod = document.getElementById("accountPeriod").value;
|
|
|
+ if(channelCategory == "" || channelCategory == null ){
|
|
|
+ alert("渠道类别不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(channelType == "" || channelType == null ){
|
|
|
+ alert("渠道类型不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(channelName == "" || channelName == null ){
|
|
|
+ alert("渠道平台/名称不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(promotingProducts == "" || promotingProducts == null ){
|
|
|
+ alert("销售产品不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(supplyPrice == "" || supplyPrice == null ){
|
|
|
+ alert("供货价格不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
//var operation = "删除";
|
|
|
var operation = "<a href='javascript:;' onclick='deleteChannelSale(this)' name='deleteChannelSale'>删除</a>";
|
|
|
row = document.getElementById("saleTable").insertRow();
|
|
@@ -640,6 +672,7 @@
|
|
|
cell = row.insertCell();
|
|
|
cell.innerHTML=operation;
|
|
|
}
|
|
|
+ $("#channelTbodyId").hide();
|
|
|
return false;
|
|
|
}
|
|
|
/*添加客户信息*/
|
|
@@ -656,6 +689,25 @@
|
|
|
customerBasicInfo.customerAddress = $("[name='customerAddress']").val();
|
|
|
customerBasicInfo.customerRemarks = $("[name='customerRemarks']").val();
|
|
|
customerBasicInfo.customerStatus = "2";
|
|
|
+ if(customerBasicInfo.customerName == "" || customerBasicInfo.customerName == null ){
|
|
|
+ alert("客户名称不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(customerBasicInfo.customerIndustry == "" || customerBasicInfo.customerIndustry == null ){
|
|
|
+ alert("客户行业不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(customerBasicInfo.customerProvinceCode == "" || customerBasicInfo.customerProvinceCode == null ){
|
|
|
+ alert("客户省份不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(customerBasicInfo.customerCityCode == "" || customerBasicInfo.customerCityCode == null ){
|
|
|
+ alert("客户城市不能为空");
|
|
|
+ return;
|
|
|
+ }/*if(customerBasicInfo.customerAddress == "" || customerBasicInfo.customerAddress == null ){
|
|
|
+ alert("客户地址不能为空");
|
|
|
+ return;
|
|
|
+ }*/
|
|
|
//对接联系人信息
|
|
|
var dockedContactInfoList = new Array();
|
|
|
$("#contactListId").find("tr").each(function (){
|
|
@@ -666,6 +718,10 @@
|
|
|
dockedContactInfo.contactEmail = $("[name='contactEmail']").val();
|
|
|
dockedContactInfoList.push(dockedContactInfo);
|
|
|
})
|
|
|
+ if(dockedContactInfoList.length<2){
|
|
|
+ alert("对接联系人信息不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
//var dockedContactInfoListJson = $("#dockedContactInfoJson").val(JSON.stringify(dockedContactInfoList));
|
|
|
//客户销售渠道信息
|
|
|
var channelSaleInfoList = new Array();
|
|
@@ -688,23 +744,80 @@
|
|
|
channelSaleInfo.accountPeriod = $("[name='accountPeriod']").val();
|
|
|
channelSaleInfoList.push(channelSaleInfo);
|
|
|
})
|
|
|
+ if(channelSaleInfoList.length<2){
|
|
|
+ alert("客户销售渠道信息不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
//var channelSaleInfoListJson = $("#channelSaleInfoJson").val(JSON.stringify(channelSaleInfoList));
|
|
|
//付款/退款信息
|
|
|
var billingInfo = {};
|
|
|
- billingInfo.accountOpeningBranch = $("[name='accountOpeningBranch']").val();
|
|
|
+ billingInfo.accountOpeningBranch = $("[name='billAccountOpeningBranch']").val();
|
|
|
billingInfo.accountName = $("[name='accountName']").val();
|
|
|
billingInfo.accountNum = $("[name='accountNum']").val();
|
|
|
billingInfo.receivablesName = $("[name='receivablesName']").val();
|
|
|
billingInfo.receivablesPhone = $("[name='receivablesPhone']").val();
|
|
|
+ if(billingInfo.billAccountOpeningBranch == "" || billingInfo.billAccountOpeningBranch == null ){
|
|
|
+ alert("开户支行不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(billingInfo.accountName == "" || billingInfo.accountName == null ){
|
|
|
+ alert("账号名称不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(billingInfo.accountNum == "" || billingInfo.accountNum == null ){
|
|
|
+ alert("账号不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(billingInfo.receivablesName == "" || billingInfo.receivablesName == null ){
|
|
|
+ alert("收款人姓名不能为空");
|
|
|
+ return;
|
|
|
+ }if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
|
|
|
+ alert("收款人手机不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
//开票信息
|
|
|
var ticketOpeningInfo = {};
|
|
|
ticketOpeningInfo.ticketType = $("[name='ticketType']").val();
|
|
|
- ticketOpeningInfo.accountOpeningBranch = $("[name='accountOpeningBranch']").val();
|
|
|
+ ticketOpeningInfo.accountOpeningBranch = $("[name='ticketAccountOpeningBranch']").val();
|
|
|
ticketOpeningInfo.ticketOpeningAccount = $("[name='ticketOpeningAccount']").val();
|
|
|
ticketOpeningInfo.enterpriseName = $("[name='enterpriseName']").val();
|
|
|
ticketOpeningInfo.taxpayerIdentificationNum = $("[name='taxpayerIdentificationNum']").val();
|
|
|
ticketOpeningInfo.ticketOpeningPhone = $("[name='ticketOpeningPhone']").val();
|
|
|
ticketOpeningInfo.enterpriseAddress = $("[name='enterpriseAddress']").val();
|
|
|
+ if(ticketOpeningInfo.ticketType == "1" ){
|
|
|
+ if(ticketOpeningInfo.ticketAccountOpeningBranch == "" || ticketOpeningInfo.ticketAccountOpeningBranch == null ){
|
|
|
+ alert("开户支行不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.ticketOpeningAccount == "" || ticketOpeningInfo.ticketOpeningAccount == null ){
|
|
|
+ alert("开票账户不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
|
+ alert("企业名称不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
|
+ alert("纳税人识别号不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
|
|
|
+ alert("开票电话不能为空");
|
|
|
+ return;
|
|
|
+ }if(ticketOpeningInfo.enterpriseAddress == "" || ticketOpeningInfo.enterpriseAddress == null ){
|
|
|
+ alert("企业地址不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
|
+ alert("企业名称不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
|
+ alert("纳税人识别号不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
//发送保存请求
|
|
|
/*alert("request ...Start...");
|
|
|
customerBasicInfoSaveForm.customerBasicInfo = customerBasicInfo;
|