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
be131c32
authored
Sep 16, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整拼单发货
parent
66957556
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletions
app/Http/Controllers/AddOrderController.php
public/js/add_order.js
app/Http/Controllers/AddOrderController.php
View file @
be131c32
...
...
@@ -470,6 +470,8 @@ Class AddOrderController extends Controller
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
,
0
);
$data
[
'cart_id'
]
=
$request
->
input
(
'cart_ids'
,
''
);
$data
[
'user_coupon_id'
]
=
$request
->
input
(
'user_coupon_id'
,
0
);
$data
[
'send_type'
]
=
$request
->
input
(
'zy_delivery_type'
,
1
);
// 发货方式
if
(
$is_online
==
0
)
{
$data
[
'type'
]
=
3
;
// 自营线下
}
else
if
(
$is_online
==
2
)
{
...
...
public/js/add_order.js
View file @
be131c32
...
...
@@ -892,6 +892,27 @@
layer
.
msg
(
'请先添加商品'
);
}
})
// 发货方式
$
(
'.zy_delivery_type'
).
change
(
function
()
{
var
coupon_id
=
$
(
'#user_coupon'
).
val
();
var
address_id
=
$
(
'.address_id'
).
val
();
var
user_id
=
$
(
'.user_id'
).
val
();
var
cart_ids
=
[];
$
(
'.shop-table tbody'
).
find
(
'tr'
).
each
(
function
()
{
var
cid
=
$
(
this
).
data
(
'cid'
);
cart_ids
.
push
(
cid
);
})
if
(
coupon_id
)
{
$
(
'.user_coupon_id'
).
val
(
coupon_id
);
}
else
{
$
(
'.user_coupon_id'
).
val
(
''
);
}
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
})
},
// 购物车商品列表
...
...
@@ -1054,6 +1075,7 @@
confirm
:
function
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
=
1
)
{
var
self
=
this
;
var
business_type
=
$
(
'#business_type'
);
// 自营其他业务
var
zy_delivery_type
=
$
(
'.zy_delivery_type'
).
val
();
// 发货方式
if
(
business_type
.
length
>
0
)
{
business_type
=
business_type
.
val
();
...
...
@@ -1064,7 +1086,7 @@
$
.
ajax
({
type
:
'post'
,
url
:
'/ajax/confirm'
,
data
:
{
uid
:
user_id
,
address_id
:
address_id
,
cart_ids
:
cart_ids
,
user_coupon_id
:
user_coupon_id
,
goods_type
:
goods_type
,
is_online
:
is_online
,
business_type
:
business_type
},
data
:
{
uid
:
user_id
,
address_id
:
address_id
,
cart_ids
:
cart_ids
,
user_coupon_id
:
user_coupon_id
,
goods_type
:
goods_type
,
is_online
:
is_online
,
business_type
:
business_type
,
zy_delivery_type
:
zy_delivery_type
},
dataType
:
"json"
,
success
:
function
(
resp
){
console
.
log
(
resp
);
if
(
resp
.
errcode
==
0
)
{
...
...
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