Commit fbdede3f by 朱继来

调整后台发票

parent 4e21243e
...@@ -739,6 +739,60 @@ ...@@ -739,6 +739,60 @@
} }
$('form').on('submit', function(){ $('form').on('submit', function(){
// 判断信息是否填写
var inv_type = $('#inv_type').val();
var tax_title = $('input[name=tax_title]').val();
var tax_no = $('input[name=tax_no]').val();
var bank_name = $('input[name=bank_name]').val();
var bank_account = $('input[name=bank_account]').val();
var company_phone = $('input[name=company_phone]').val();
var company_address = $('textarea[name=company_address]').val();
if (inv_type == 2 && !tax_title) { // 普票 个人
layer.msg('请填写发票抬头');
return false;
}
if (inv_type == 4 && !tax_title) { // 增值税普票
layer.msg('请填写发票抬头');
return false;
}
if (inv_type == 4 && !tax_no) {
layer.msg('请填写税务登记号');
return false;
}
if (inv_type == 3 && !tax_title) { // 增值税专票
layer.msg('请填写发票抬头');
return false;
}
if (inv_type == 3 && !tax_no) {
layer.msg('请填写税务登记号');
return false;
}
if (inv_type == 3 && !bank_name) {
layer.msg('请填写开户银行');
return false;
}
if (inv_type == 3 && !bank_account) {
layer.msg('请填写银行卡号');
return false;
}
if (inv_type == 3 && !company_phone) {
layer.msg('请填写公司电话');
return false;
}
if (inv_type == 3 && !company_address) {
layer.msg('请填写公司注册地址');
return false;
}
$(this).ajaxSubmit({ $(this).ajaxSubmit({
data: {order_id: order_id}, data: {order_id: order_id},
dataType:'json', dataType:'json',
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
<td width="40%"> <td width="40%">
<select name="inv_type" id="inv_type" style="width:164px;"> <select name="inv_type" id="inv_type" style="width:164px;">
<option value="1">不开发票</option> <option value="1">不开发票</option>
<option value="2">普通发票</option>
<option value="3">增值税专用发票</option> <option value="3">增值税专用发票</option>
<option value="4">增值税普通发票</option> <option value="4">增值税普通发票</option>
<option value="2">普通发票(个人)</option>
</select> </select>
</td> </td>
<td width="10%">开票状态</td> <td width="10%">开票状态</td>
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
<tr class="caption"> <tr class="caption">
<th colspan="8" style="text-align: center; background: #f9f9f9;"> 发票信息 <th colspan="8" style="text-align: center; background: #f9f9f9;"> 发票信息
<?php <?php
//<!-- 发票状态小于2(已发货)且更改权限存在 且未同步ERP 显示按钮 --> //<!-- 发票状态小于2(已发货)且更改权限存在 且未同步ERP 且主管未审核通过 显示按钮 -->
if (empty($tags)) { if (empty($tags)) {
if(in_array($order_info['status'], [1, 2, 3, 4]) && $order_invoice_info['invoice_status'] < 2 && in_array('update_invoice', $userPerms) && empty($order_temp_info['erp_sn'])) { if(in_array($order_info['status'], [1, 2, 3, 4]) && $order_invoice_info['invoice_status'] < 2 && in_array('update_invoice', $userPerms) && empty($order_temp_info['erp_sn']) && $order_temp_info['is_manager_audit'] != 3) {
echo '<a href="/changeInvoice/'.$order_info['order_id'].'" class="btn btn-success btn-sm changeBtn">更改发票</a>'; echo '<a href="/changeInvoice/'.$order_info['order_id'].'" class="btn btn-success btn-sm changeBtn">更改发票</a>';
} }
} elseif ($order_info['status'] != -1 && isset($tags) && $tags == 'self' && isset($extend) && !$extend) { } elseif ($order_info['status'] != -1 && isset($tags) && $tags == 'self' && isset($extend) && !$extend) {
......
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