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
d2332ce1
authored
Dec 27, 2018
by
PRY5YKGJ82EZEPX\Administrator
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'hcy_pcb_20181221-r' into development
parents
ddbb1b94
e54ff51f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
11 deletions
app/Http/Controllers/ApiController.php
app/Model/Pcb/PcbServerModel.php
public/js/PcbPurchaseList.js
resources/views/Pcb/PcbPurchaseList.blade.php
app/Http/Controllers/ApiController.php
View file @
d2332ce1
...
...
@@ -80,6 +80,6 @@ class ApiController extends Controller
}
//pcb后台点击采购确认
private
function
ApiConfirmOrder
(
$request
){
echo
(
new
PcbServerModel
())
->
confirmOrder
(
$request
->
user
->
userId
,
$request
->
input
(
"purchase_id"
));
echo
(
new
PcbServerModel
())
->
confirmOrder
(
$request
->
user
->
userId
,
$request
->
input
(
"purchase_id"
)
,
$request
->
input
(
"status"
)
);
}
}
app/Model/Pcb/PcbServerModel.php
View file @
d2332ce1
...
...
@@ -29,10 +29,12 @@ class PcbServerModel
*
* @param int $admin_id 管理员id
* @param int $order_id 订单id
* @param int $status 状态
*/
public
function
confirmOrder
(
$admin_id
,
$purchase_id
){
public
function
confirmOrder
(
$admin_id
,
$purchase_id
,
$status
){
$param
=
[
'purchase_id'
=>
$purchase_id
,
'status'
=>
$status
,
];
$res
=
curlApi
(
$this
->
PcbUrl
.
'/pcb/adminapi/confirmOrder'
,
$param
,
'POST'
);
$json
=
json_decode
(
$res
);
...
...
public/js/PcbPurchaseList.js
View file @
d2332ce1
...
...
@@ -119,26 +119,32 @@ layui.use(['table','form','element','layer', 'laydate'], function() {
,
isInitValue
:
false
});
})
//确定发货
function
SurePurchase
(
purchase_id
)
{
alert_confirm
(
"采购已完成,请确认是否通过审核?"
,
function
()
{
//采购确认
function
confirmOrder
(
purchase_id
)
{
layer
.
confirm
(
'采购已完成,请确认是否通过审核?'
,
{
btn
:
[
'通过'
,
'不通过'
]
//按钮
},
function
(){
confirmOrder2
(
purchase_id
,
1
);
//通过
},
function
(){
confirmOrder2
(
purchase_id
,
-
1
);
//不通过
});
}
function
confirmOrder2
(
purchase_id
,
status
)
{
$
.
ajax
({
url
:
'/api/ApiConfirmOrder'
,
type
:
'post'
,
data
:{
"purchase_id"
:
purchase_id
},
data
:{
"purchase_id"
:
purchase_id
,
'status'
:
status
},
async
:
false
,
dataType
:
'json'
,
timeout
:
10000
,
success
:
function
(
res
)
{
if
(
res
.
err_code
==
0
){
alert_succ
(
res
.
errmsg
,
function
()
{
window
.
location
.
href
=
'/web/Abnormal'
;
window
.
location
.
reload
()
})
}
else
{
alert_err
(
res
.
errmsg
)
}
}
})
})
}
\ No newline at end of file
resources/views/Pcb/PcbPurchaseList.blade.php
View file @
d2332ce1
...
...
@@ -89,7 +89,7 @@
<script
type=
"text/html"
id=
"cahe"
>
<
a
href
=
"/web/PcbPurchaseDetail?purchase_id=@{{ d.purchase_id }}&order_id=@{{ d.order_id }}"
class
=
"btn btn-xs btn-outline btn-success"
><
strong
>
详情
<
/strong></
a
>
@{{
#
if
(
d
.
status
==
3
){
}}
<
button
class
=
"btn btn-xs btn-outline btn-danger"
lay
-
submit
=
""
order_id
=
"@{{ d.purchase_id }}"
order_sn
=
"@{{ d.purchase_sn }}"
onclick
=
"
SurePurchase
(@{{ d.purchase_id }})"
>
采购确认
<
/button
>
<
button
class
=
"btn btn-xs btn-outline btn-danger"
lay
-
submit
=
""
order_id
=
"@{{ d.purchase_id }}"
order_sn
=
"@{{ d.purchase_sn }}"
onclick
=
"
confirmOrder
(@{{ d.purchase_id }})"
>
采购确认
<
/button
>
@{{
#
}
}}
</script>
...
...
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