Commit 9a1c7220 by 朱继来

调整下单判断

parent f45eae8f
......@@ -8,7 +8,13 @@ layui.config({
// 选择发票类型
form.on('radio(invoice_type)', function(data) {
if (!(data.value)) return false;
if (!(data.value)) {
$('.tax_id').val('');
$('.invoice-section-2').hide();
$('.invoice-section-3').hide();
$('.invoice-section-4').hide();
return false;
}
checkBindUser();
})
......@@ -101,8 +107,8 @@ layui.config({
$('.invoice-section-2').hide();
$('.invoice-section-4').hide();
} else if (invoice_type == 4) { // 增值税普票
$('.tax_title').text(data.tax_title);
$('.tax_no').text(data.tax_no);
$('.tax_title_1').text(data.tax_title);
$('.tax_no_1').text(data.tax_no);
$('.tax_id').val(data.tax_id);
$('.invoice-section-4').show();
......@@ -562,6 +568,58 @@ layui.config({
return false;
}
if (inv_type == 3) { // 专票
var tax_title = $('.tax_title').text();
var tax_no = $('.tax_no').text();
var com_bank = $('.com_bank').text();
var com_bank_num = $('.com_bank_num').text();
var com_tel = $('.com_tel').text();
var com_addr = $('.com_addr').text();
if (!tax_title) {
layer.msg('发票信息不完善:无发票抬头');
return false;
}
if (!tax_no) {
layer.msg('发票信息不完善:无税务登记号');
return false;
}
if (!com_bank) {
layer.msg('发票信息不完善:无开户银行');
return false;
}
if (!com_bank_num) {
layer.msg('发票信息不完善:无银行卡号');
return false;
}
if (!com_tel) {
layer.msg('发票信息不完善:无公司电话');
return false;
}
if (!com_addr) {
layer.msg('发票信息不完善:无注册地址');
return false;
}
} else if (inv_type == 4) {
var tax_title = $('.tax_title_1').text();
var tax_no = $('.tax_no_1').text();
if (!tax_title) {
layer.msg('发票信息不完善:无发票抬头');
return false;
}
if (!tax_no) {
layer.msg('发票信息不完善:无税务登记号');
return false;
}
}
if (!zy_delivery_type) {
layer.msg('请选择发货方式');
return false;
......
<style>
.address-section{ border: 1px solid #ccc; }
.address-select, .address-section{ display: none; }
</style>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
......@@ -64,9 +69,6 @@
</div>
</div>
<style>
.address-select, .address-section{ display: none; }
</style>
<div class="layui-row address-select">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
......
......@@ -3,8 +3,6 @@
.addOrder .layui-form-item{ margin-bottom: 0px; }
.addOrder label{ width: 110px; }
.addOrder span{ line-height: 37px; }
.invoice-section, .address-section{ border: 1px solid #ccc; }
.invoice-section-2, .invoice-section-3, .invoice-section-4{ display: none; }
</style>
<input type="hidden" name="user_id" class="user_id" value="">
......
<style type="text/css">
.invoice-section-2, .invoice-section-3, .invoice-section-4{ display: none; border: 1px solid #ccc; }
</style>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
......@@ -51,104 +55,102 @@
</div>
<!-- 与开票方式联动展示 -->
<div class="invoice-section">
<!-- 个人 -->
<div class="invoice-section-2" style="margin-top: 10px;">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">选择个人发票:</label>
<!-- 个人 -->
<div class="invoice-section-2" style="margin-top: 10px;">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item" style="margin-top: 5px;">
<label class="layui-form-label">选择个人发票:</label>
<div class="layui-input-inline layui-form" lay-filter="user-tax">
<select name="user_tax_id" id="user_tax_id" lay-filter="user_tax_id">
</select>
</div>
</div>
</div>
</div>
<div class="layui-input-inline layui-form" lay-filter="user-tax">
<select name="user_tax_id" id="user_tax_id" lay-filter="user_tax_id">
</select>
</div>
</div>
</div>
</div>
</div>
<!-- 增值税专用发票展示信息 -->
<div class="invoice-section-3">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票抬头:</label>
<span class="tax_title"></span>
</div>
<!-- 增值税专用发票展示信息 -->
<div class="invoice-section-3">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票抬头:</label>
<span class="tax_title"></span>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">开户银行:</label>
<span class="com_bank"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">开户银行:</label>
<span class="com_bank"></span>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">收票人:</label>
<span class="consignee"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">收票人:</label>
<span class="consignee"></span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">税务登记号:</label>
<span class="tax_no"></span>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">税务登记号:</label>
<span class="tax_no"></span>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">银行卡号:</label>
<span class="com_bank_num"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">银行卡号:</label>
<span class="com_bank_num"></span>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票联系电话:</label>
<span class="consignee_phone"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票联系电话:</label>
<span class="consignee_phone"></span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">公司电话:</label>
<span class="com_tel"></span>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">公司电话:</label>
<span class="com_tel"></span>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">公司注册地址:</label>
<span class="com_addr"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">公司注册地址:</label>
<span class="com_addr"></span>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">收票地址:</label>
<span class="consignee_address"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">收票地址:</label>
<span class="consignee_address"></span>
</div>
</div>
</div>
</div>
<!-- 增值税普通发票展示信息 -->
<div class="invoice-section-4">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票抬头:</label>
<span class="tax_title"></span>
</div>
<!-- 增值税普通发票展示信息 -->
<div class="invoice-section-4">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票抬头:</label>
<span class="tax_title_1"></span>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">税务登记号:</label>
<span class="tax_no"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">税务登记号:</label>
<span class="tax_no_1"></span>
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment