|
@@ -911,83 +911,87 @@
|
|
|
//var channelSaleInfoListJson = $("#channelSaleInfoJson").val(JSON.stringify(channelSaleInfoList));
|
|
|
//付款/退款信息
|
|
|
var billingInfo = {};
|
|
|
- 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.accountOpeningBranch == "" || billingInfo.accountOpeningBranch == null ){
|
|
|
- layer.msg("开户支行不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
- if(billingInfo.accountName == "" || billingInfo.accountName == null ){
|
|
|
- layer.msg("账号名称不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
- if(billingInfo.accountNum == "" || billingInfo.accountNum == null ){
|
|
|
- layer.msg("账号不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
- if(billingInfo.receivablesName == "" || billingInfo.receivablesName == null ){
|
|
|
- layer.msg("收款人姓名不能为空");
|
|
|
- return;
|
|
|
- }if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
|
|
|
- layer.msg("收款人手机不能为空");
|
|
|
- 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});
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- //开票信息
|
|
|
- var ticketOpeningInfo = {};
|
|
|
- ticketOpeningInfo.ticketType = $("[name='ticketType']").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.accountOpeningBranch == "" || ticketOpeningInfo.accountOpeningBranch == null ){
|
|
|
+ if(customerBasicInfo.cooperativeState != "1"){
|
|
|
+ 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.accountOpeningBranch == "" || billingInfo.accountOpeningBranch == null ){
|
|
|
layer.msg("开户支行不能为空");
|
|
|
return;
|
|
|
}
|
|
|
- if(ticketOpeningInfo.ticketOpeningAccount == "" || ticketOpeningInfo.ticketOpeningAccount == null ){
|
|
|
- layer.msg("开票账户不能为空");
|
|
|
+ if(billingInfo.accountName == "" || billingInfo.accountName == null ){
|
|
|
+ layer.msg("账号名称不能为空");
|
|
|
return;
|
|
|
}
|
|
|
- if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
|
- layer.msg("企业名称不能为空");
|
|
|
+ if(billingInfo.accountNum == "" || billingInfo.accountNum == null ){
|
|
|
+ layer.msg("账号不能为空");
|
|
|
return;
|
|
|
}
|
|
|
- if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
|
- layer.msg("纳税人识别号不能为空");
|
|
|
+ if(billingInfo.receivablesName == "" || billingInfo.receivablesName == null ){
|
|
|
+ layer.msg("收款人姓名不能为空");
|
|
|
return;
|
|
|
- }
|
|
|
- if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
|
|
|
- layer.msg("开票电话不能为空");
|
|
|
+ }if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
|
|
|
+ layer.msg("收款人手机不能为空");
|
|
|
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)){
|
|
|
+ if(!reg.test(billingInfo.receivablesPhone)){
|
|
|
layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
|
|
|
return;
|
|
|
}
|
|
|
- }if(ticketOpeningInfo.enterpriseAddress == "" || ticketOpeningInfo.enterpriseAddress == null ){
|
|
|
- layer.msg("企业地址不能为空");
|
|
|
- return;
|
|
|
}
|
|
|
- }else{
|
|
|
- if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
|
- layer.msg("企业名称不能为空");
|
|
|
- return;
|
|
|
- }
|
|
|
- if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
|
- layer.msg("纳税人识别号不能为空");
|
|
|
- return;
|
|
|
+ }
|
|
|
+ //开票信息
|
|
|
+ var ticketOpeningInfo = {};
|
|
|
+ if(customerBasicInfo.cooperativeState != "1"){
|
|
|
+ ticketOpeningInfo.ticketType = $("[name='ticketType']").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.accountOpeningBranch == "" || ticketOpeningInfo.accountOpeningBranch == null ){
|
|
|
+ layer.msg("开户支行不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.ticketOpeningAccount == "" || ticketOpeningInfo.ticketOpeningAccount == null ){
|
|
|
+ layer.msg("开票账户不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
|
+ layer.msg("企业名称不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
|
+ layer.msg("纳税人识别号不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
|
|
|
+ layer.msg("开票电话不能为空");
|
|
|
+ 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 ){
|
|
|
+ layer.msg("企业地址不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
|
|
|
+ layer.msg("企业名称不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
|
|
|
+ layer.msg("纳税人识别号不能为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//发送保存请求
|
|
@@ -997,8 +1001,6 @@
|
|
|
customerBasicInfoSaveForm.channelSaleInfoList = channelSaleInfoList;
|
|
|
customerBasicInfoSaveForm.billingInfo = billingInfo;
|
|
|
customerBasicInfoSaveForm.ticketOpeningInfo = ticketOpeningInfo;*/
|
|
|
-
|
|
|
- var isOpenTicket = $("input[name='isOpenTicket']:checked").val();
|
|
|
var saveStates = "";
|
|
|
var customerInfoJson = JSON.stringify(customerBasicInfo);
|
|
|
var billingInfoJson = JSON.stringify(billingInfo);
|