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
0b4131b7
authored
Nov 23, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_order_invoice_20181123' into development
parents
244214dc
0e84647c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 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 @
0b4131b7
...
...
@@ -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'
;
...
...
config/website.php
View file @
0b4131b7
...
...
@@ -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 @
0b4131b7
...
...
@@ -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