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
b38f375a
authored
Jun 24, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
temp2
parent
370faca8
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 @
b38f375a
...
...
@@ -590,6 +590,7 @@ Class AddOrderController extends Controller
if
(
$request
->
isMethod
(
'post'
))
{
$is_online
=
$request
->
input
(
'is_online'
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
,
0
);
$data
[
'shipping_type'
]
=
$request
->
input
(
'shipping_type'
,
1
);
$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
);
...
...
public/js/add_order.js
View file @
b38f375a
...
...
@@ -119,9 +119,29 @@
if
(
shipping_type
==
2
)
{
$
(
'.select-addr'
).
hide
();
$
(
'.address-content'
).
hide
();
$
(
'.address_id'
).
val
(
1
);
}
else
{
$
(
'.select-addr'
).
show
();
}
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
);
// 确认订单信息
})
// 选择收货地址
...
...
@@ -708,6 +728,7 @@
// $('.submit-order').on('click', function() {
$
(
'.submit-order'
).
off
().
on
(
'click'
,
function
()
{
var
self
=
$
(
this
);
var
shipping_type
=
$
(
'#shipping_type'
).
val
();
// 配送方式
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
var
type
=
self
.
data
(
'type'
);
// 1-联营线上,2-自营线上,3-自营线下,4-自营其他业务
var
cart_ids
=
[];
...
...
@@ -739,6 +760,7 @@
var
datax
=
{
uid
:
user_id
,
sale_id
:
sale_id
,
shipping_type
:
shipping_type
,
address_id
:
address_id
,
type
:
type
,
cart_ids
:
cart_ids
,
...
...
@@ -1131,6 +1153,7 @@
var
self
=
this
;
var
business_type
=
$
(
'#business_type'
);
// 自营其他业务
var
zy_delivery_type
=
$
(
'.zy_delivery_type'
).
val
();
// 发货方式
var
shipping_type
=
$
(
'#shipping_type'
).
val
();
// 配送方式
if
(
business_type
.
length
>
0
)
{
business_type
=
business_type
.
val
();
...
...
@@ -1141,7 +1164,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
,
zy_delivery_type
:
zy_delivery_type
},
data
:
{
uid
:
user_id
,
shipping_type
:
shipping_type
,
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
){
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