Commit 48887e9e by 朱继来

调整更新订单发票

parent 0e84647c
...@@ -686,10 +686,28 @@ ...@@ -686,10 +686,28 @@
$('#inv_type').click(function(){ $('#inv_type').click(function(){
var val = $(this).val(); var val = $(this).val();
if (val == 2) { if (val == 1) { // 不开票
$('.tax_title_section').hide();
$('.add_tax').hide();
$('input[name=tax_title]').val('');
$('input[name=tax_no]').val('');
$('input[name=bank_name]').val('');
$('input[name=bank_account]').val('');
$('input[name=company_phone]').val('');
$('textarea[name=company_address]').val('');
} else if (val == 2) { // 普票
$('.tax_title_section').show();
$('.add_tax').hide(); $('.add_tax').hide();
$('.invoice_title').attr('colspan', 3); $('.invoice_title').attr('colspan', 3);
} else{
$('input[name=tax_no]').val('');
$('input[name=bank_name]').val('');
$('input[name=bank_account]').val('');
$('input[name=company_phone]').val('');
$('textarea[name=company_address]').val('');
} else { // 增票
$('.tax_title_section').show();
$('.add_tax').show(); $('.add_tax').show();
$('.invoice_title').attr('colspan', 0); $('.invoice_title').attr('colspan', 0);
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</td> </td>
</tr> </tr>
<tr> <tr class="tax_title_section">
<td>发票抬头</td> <td>发票抬头</td>
<td class="invoice_title"> <td class="invoice_title">
<input type="text" name="tax_title" value="{{$detail['tax_title']}}"> <input type="text" name="tax_title" value="{{$detail['tax_title']}}">
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</td> </td>
<td>公司注册地址</td> <td>公司注册地址</td>
<td> <td>
<textarea name="company_address" id="company_address" cols="50" rows="2" placeholder="请填写详细地址">{{$detail['company_address']}}</textarea> <textarea name="company_address" id="company_address" class="form-control" placeholder="请填写详细地址">{{$detail['company_address']}}</textarea>
</td> </td>
</tr> </tr>
...@@ -97,5 +97,19 @@ ...@@ -97,5 +97,19 @@
$.lie.order.details(); $.lie.order.details();
var inv_type = '{{$detail['inv_type']}}'; var inv_type = '{{$detail['inv_type']}}';
if (inv_type == 1) {
$('.tax_title_section').hide();
$('.add_tax').hide();
} else if (inv_type == 2) {
$('.tax_title_section').show();
$('.add_tax').hide();
$('.invoice_title').attr('colspan', 3);
} else{
$('.tax_title_section').show();
$('.add_tax').show();
$('.invoice_title').attr('colspan', 0);
}
$('#inv_type').val(inv_type); $('#inv_type').val(inv_type);
</script> </script>
\ No newline at end of file
...@@ -221,11 +221,21 @@ ...@@ -221,11 +221,21 @@
<a href="/changeInvoice/{{$order_info['order_id']}}" class="btn btn-success btn-sm changeBtn">更改发票</a> <a href="/changeInvoice/{{$order_info['order_id']}}" class="btn btn-success btn-sm changeBtn">更改发票</a>
@endif @endif
@elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'self' && !$extend) @elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'self' && !$extend)
<?php $isChangeInvoice = App\Http\Controllers\isChangeInvoice($order_info['order_sn']); ?> <?php
if ($order_info['status'] > 3) { // 已付款请求财务接口判断是否能修改发票
$isChangeInvoice = App\Http\Controllers\isChangeInvoice($order_info['order_sn']);
if ($isChangeInvoice) {
echo '<a href="/changeInvoice/'.$order_info['order_id'].'?tags='.$_REQUEST['tags'].'" class="btn btn-success btn-sm changeBtn">更改发票</a>';
}
} else {
if ($order_invoice_info['invoice_status'] < 2 && in_array('self_order_update_invoice', $userPerms)) {
echo '<a href="/changeInvoice/'.$order_info['order_id'].'?tags='.$_REQUEST['tags'].'" class="btn btn-success btn-sm changeBtn">更改发票</a>';
}
}
?>
<!-- in_array($order_info['status'], [1, 2, 3, 4]) && $order_invoice_info['invoice_status'] < 2 && in_array('self_order_update_invoice', $userPerms) --> <!-- in_array($order_info['status'], [1, 2, 3, 4]) && $order_invoice_info['invoice_status'] < 2 && in_array('self_order_update_invoice', $userPerms) -->
@if ($isChangeInvoice) }
<a href="/changeInvoice/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}" class="btn btn-success btn-sm changeBtn">更改发票</a>
@endif
@elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'erp') @elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'erp')
<a href="/changeInvoice/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}" class="btn btn-success btn-sm changeBtn">更改发票</a> <a href="/changeInvoice/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}" class="btn btn-success btn-sm changeBtn">更改发票</a>
@endif @endif
......
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