Commit 0b4131b7 by 朱继来

Merge branch 'zjl_order_invoice_20181123' into development

parents 244214dc 0e84647c
......@@ -245,6 +245,21 @@ function getSelfStock($goods_id)
}
}
// 调用财务系统接口判断是否能修改发票
function isChangeInvoice($order_sn)
{
$url = Config('website.finance-self-invoice-url');
$data['order_sn'] = $order_sn;
$res = json_decode(curlApi($url, $data, 'POST'), true);
if ($res['err_code'] == 0) {
return true;
} else {
return false;
}
}
Class OrderController extends Controller
{
// 首页
......@@ -1145,7 +1160,6 @@ Class OrderController extends Controller
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$data['id'] = $request->input('order_id','');
$data['operator_id'] = $request->user->userId;
$update_url = Config('website.api_domain').'order/updateOrderInvoice';
......
......@@ -68,4 +68,7 @@ return [
// 获取自营商品库存
'self-stock-url' => 'http://footstone.liexin.net/webapi/goods_details?sku_id=',
// 财务系统接口地址 (自营发票)
'finance-self-invoice-url' => 'http://192.168.1.97/webapi/checkOrderBillStatus',
];
......@@ -221,7 +221,9 @@
<a href="/changeInvoice/{{$order_info['order_id']}}" class="btn btn-success btn-sm changeBtn">更改发票</a>
@endif
@elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'self' && !$extend)
@if(in_array($order_info['status'], [1, 2, 3, 4]) && $order_invoice_info['invoice_status'] < 2 && in_array('self_order_update_invoice', $userPerms))
<?php $isChangeInvoice = App\Http\Controllers\isChangeInvoice($order_info['order_sn']); ?>
<!-- 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')
......
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