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
7e50ce9b
authored
Jan 04, 2019
by
PRY5YKGJ82EZEPX\Administrator
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'hcy_pcb_20181221-r' into development
parents
8845a473
98a5b7ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
3 deletions
app/Http/Controllers/ApiController.php
app/Model/Pcb/PcbServerModel.php
public/js/PcbOrderList.js
resources/views/Pcb/PcbOrderList.blade.php
app/Http/Controllers/ApiController.php
View file @
7e50ce9b
...
...
@@ -82,4 +82,8 @@ class ApiController extends Controller
private
function
ApiConfirmOrder
(
$request
){
echo
(
new
PcbServerModel
())
->
confirmOrder
(
$request
->
user
->
userId
,
$request
->
input
(
"purchase_id"
),
$request
->
input
(
"status"
));
}
//pcb后台点击采购确认
private
function
ApiOfflinePay
(
$request
){
echo
(
new
PcbServerModel
())
->
offlinePay
(
$request
->
user
->
userId
,
$request
->
input
(
"order_id"
),
$request
->
input
(
"pay_money"
));
}
}
app/Model/Pcb/PcbServerModel.php
View file @
7e50ce9b
...
...
@@ -43,4 +43,21 @@ class PcbServerModel
}
return
$res
;
}
/*
*
* @param int $order_id 订单id
* @param int $status 状态
*/
public
function
offlinePay
(
$admin_id
,
$order_id
,
$pay_money
){
$param
=
[
'order_id'
=>
$order_id
,
'pay_money'
=>
$pay_money
,
];
$res
=
curlApi
(
$this
->
PcbUrl
.
'/pcb/adminapi/offline_payment'
,
$param
,
'POST'
);
$json
=
json_decode
(
$res
,
true
);
if
(
$json
[
'err_code'
]
==
0
){
PcbActionLogModel
::
log
(
1
,
'offline_payment'
,
"线下支付"
,
$order_id
,
$admin_id
);
}
return
$res
;
}
}
\ No newline at end of file
public/js/PcbOrderList.js
View file @
7e50ce9b
...
...
@@ -101,7 +101,18 @@ layui.use(['table','form','element','layer', 'laydate'], function() {
content
:
$
(
"#sendPurchase"
)
});
}))
//线下支付
form
.
on
(
'submit(OfflinePay)'
,(
function
(
data
)
{
$
(
"#offline_order_id"
).
val
(
$
(
this
).
attr
(
"order_id"
))
$
(
"#offline_order_sn"
).
val
(
$
(
this
).
attr
(
"order_sn"
))
layer
.
open
({
type
:
1
,
title
:
"线下支付"
,
skin
:
'layui-layer-rim'
,
//加上边框
area
:
[
'420px'
,
'260px'
],
//宽高
content
:
$
(
"#OfflinePay"
)
});
}))
//关闭订单
form
.
on
(
'submit(ClosePurchase)'
,(
function
()
{
var
picking_id
=
$
(
this
).
attr
(
'picking_id'
)
...
...
@@ -185,3 +196,30 @@ function AddPurchase(order_id) {
})
return
false
;
}
//线下支付
function
OfflinePay
()
{
layer
.
msg
(
'加载中'
,
{
icon
:
16
,
shade
:
0.01
});
$
.
ajax
({
url
:
'/api/ApiOfflinePay'
,
type
:
'post'
,
data
:{
"order_id"
:
$
(
"#offline_order_id"
).
val
(),
"pay_money"
:
$
(
"#pay_money"
).
val
()},
async
:
false
,
dataType
:
'json'
,
timeout
:
10000
,
success
:
function
(
res
)
{
if
(
res
.
err_code
==
0
){
alert_succ
(
res
.
err_msg
,
function
()
{
window
.
location
.
href
=
'/web/PcbOrderList'
;
})
}
else
{
alert_err
(
res
.
err_msg
)
}
},
done
:
function
()
{
layer
.
closeAll
();
}
})
}
\ No newline at end of file
resources/views/Pcb/PcbOrderList.blade.php
View file @
7e50ce9b
...
...
@@ -128,6 +128,8 @@
<button
class=
"btn btn-xs btn-outline btn-danger"
lay-submit=
""
order_id=
"
<?=
$v
[
'order_id'
]
?>
"
order_sn=
"
<?=
$v
[
'order_sn'
]
?>
"
onclick=
"AddPurchase(
<?=
$v
[
'order_id'
]
?>
)"
>
发起采购
</button>
<?php
}
if
(
$v
[
'status'
]
==
14
&&
$v
[
'shipping_time'
]
==
0
)
{
?>
<button
class=
"btn btn-xs btn-outline btn-danger"
lay-submit=
""
order_id=
"
<?=
$v
[
'order_id'
]
?>
"
order_sn=
"
<?=
$v
[
'order_sn'
]
?>
"
lay-filter=
"SendPurchase"
>
发货
</button>
<?php
}
if
(
$v
[
'status'
]
==
10
)
{
//待支付 ?>
<
button
class
="
btn
btn
-
xs
btn
-
outline
btn
-
danger
" lay-submit="" order_id="
<?=
$v
[
'order_id'
]
?>
" order_sn="
<?=
$v
[
'order_sn'
]
?>
" lay-filter="OfflinePay">线下支付
</button>
<?php
}
?>
</div>
</td>
...
...
@@ -171,7 +173,7 @@
<?php
echo
$page
;
?>
</div>
<!--弹出层-->
<!--弹出层
填写快递单号
-->
<div
id=
"sendPurchase"
style=
"display: none"
>
<br/><br/>
配送快递:
<select
type=
'text'
style=
'width: 200px;height: 30px;'
id=
"shipping_id"
>
...
...
@@ -181,6 +183,14 @@
</select><br/><br/>
快递单号:
<input
type=
'text'
id=
"shipping_no"
style=
'width: 200px;height: 30px;'
><br/><br/>
<input
type=
'hidden'
id=
'sure_order_id'
>
<input
type=
'hidden'
id=
'sure_order_sn'
>
<button
class=
'layui-btn'
onclick=
'SendStock()'
style=
"margin-left: 130px;"
>
确定发货
</button>
<button
class=
'layui-btn'
onclick=
'SendStock()'
style=
"margin-left: 130px;"
>
确定
</button>
</div>
<!--弹出层线下支付-->
<div
id=
"OfflinePay"
style=
"display: none"
>
<br/><br/>
付款金额:
<input
type=
'text'
id=
"pay_money"
style=
'width: 200px;height: 30px;'
><br/><br/>
<input
type=
'hidden'
id=
'offline_order_id'
>
<input
type=
'hidden'
id=
'offline_order_sn'
>
<button
class=
'layui-btn'
onclick=
'OfflinePay()'
style=
"margin-left: 130px;"
>
确定
</button>
</div>
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