Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
12a171ab
authored
Nov 23, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
temp
parent
f9da534e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
app/Http/Controllers/OrderController.php
config/website.php
resources/views/detail/content.blade.php
app/Http/Controllers/OrderController.php
View file @
12a171ab
...
...
@@ -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
{
// 首页
...
...
@@ -1156,7 +1171,8 @@ Class OrderController extends Controller
$data
[
'operator_id'
]
=
$request
->
user
->
userId
;
$update_url
=
Config
(
'website.api_domain'
)
.
'order/updateOrderInvoice'
;
echo
'<pre>'
;
print_r
(
curlApi
(
$update_url
,
$data
,
'POST'
));
$update
=
json_decode
(
curlApi
(
$update_url
,
$data
,
'POST'
),
true
);
if
(
$update
[
'err_code'
]
==
0
)
{
...
...
config/website.php
View file @
12a171ab
...
...
@@ -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'
,
];
resources/views/detail/content.blade.php
View file @
12a171ab
...
...
@@ -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')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment