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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 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
...
@@ -590,6 +590,7 @@ Class AddOrderController extends Controller
if
(
$request
->
isMethod
(
'post'
))
{
if
(
$request
->
isMethod
(
'post'
))
{
$is_online
=
$request
->
input
(
'is_online'
);
$is_online
=
$request
->
input
(
'is_online'
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
,
0
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
,
0
);
$data
[
'shipping_type'
]
=
$request
->
input
(
'shipping_type'
,
1
);
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
,
0
);
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
,
0
);
$data
[
'cart_id'
]
=
$request
->
input
(
'cart_ids'
,
''
);
$data
[
'cart_id'
]
=
$request
->
input
(
'cart_ids'
,
''
);
$data
[
'user_coupon_id'
]
=
$request
->
input
(
'user_coupon_id'
,
0
);
$data
[
'user_coupon_id'
]
=
$request
->
input
(
'user_coupon_id'
,
0
);
...
...
public/js/add_order.js
View file @
b38f375a
...
@@ -119,9 +119,29 @@
...
@@ -119,9 +119,29 @@
if
(
shipping_type
==
2
)
{
if
(
shipping_type
==
2
)
{
$
(
'.select-addr'
).
hide
();
$
(
'.select-addr'
).
hide
();
$
(
'.address-content'
).
hide
();
$
(
'.address_id'
).
val
(
1
);
}
else
{
}
else
{
$
(
'.select-addr'
).
show
();
$
(
'.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
);
// 确认订单信息
})
})
// 选择收货地址
// 选择收货地址
...
@@ -707,12 +727,13 @@
...
@@ -707,12 +727,13 @@
// 提交订单
// 提交订单
// $('.submit-order').on('click', function() {
// $('.submit-order').on('click', function() {
$
(
'.submit-order'
).
off
().
on
(
'click'
,
function
()
{
$
(
'.submit-order'
).
off
().
on
(
'click'
,
function
()
{
var
self
=
$
(
this
);
var
self
=
$
(
this
);
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
var
shipping_type
=
$
(
'#shipping_type'
).
val
();
// 配送方式
var
type
=
self
.
data
(
'type'
);
// 1-联营线上,2-自营线上,3-自营线下,4-自营其他业务
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
var
cart_ids
=
[];
var
type
=
self
.
data
(
'type'
);
// 1-联营线上,2-自营线上,3-自营线下,4-自营其他业务
var
user_id
=
0
;
var
cart_ids
=
[];
var
remark
=
$
(
'#remark'
).
val
();
// 订单备注
var
user_id
=
0
;
var
remark
=
$
(
'#remark'
).
val
();
// 订单备注
if
(
internal_uid
)
{
if
(
internal_uid
)
{
user_id
=
internal_uid
;
user_id
=
internal_uid
;
...
@@ -739,6 +760,7 @@
...
@@ -739,6 +760,7 @@
var
datax
=
{
var
datax
=
{
uid
:
user_id
,
uid
:
user_id
,
sale_id
:
sale_id
,
sale_id
:
sale_id
,
shipping_type
:
shipping_type
,
address_id
:
address_id
,
address_id
:
address_id
,
type
:
type
,
type
:
type
,
cart_ids
:
cart_ids
,
cart_ids
:
cart_ids
,
...
@@ -1131,6 +1153,7 @@
...
@@ -1131,6 +1153,7 @@
var
self
=
this
;
var
self
=
this
;
var
business_type
=
$
(
'#business_type'
);
// 自营其他业务
var
business_type
=
$
(
'#business_type'
);
// 自营其他业务
var
zy_delivery_type
=
$
(
'.zy_delivery_type'
).
val
();
// 发货方式
var
zy_delivery_type
=
$
(
'.zy_delivery_type'
).
val
();
// 发货方式
var
shipping_type
=
$
(
'#shipping_type'
).
val
();
// 配送方式
if
(
business_type
.
length
>
0
)
{
if
(
business_type
.
length
>
0
)
{
business_type
=
business_type
.
val
();
business_type
=
business_type
.
val
();
...
@@ -1141,7 +1164,7 @@
...
@@ -1141,7 +1164,7 @@
$
.
ajax
({
$
.
ajax
({
type
:
'post'
,
type
:
'post'
,
url
:
'/ajax/confirm'
,
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"
,
dataType
:
"json"
,
success
:
function
(
resp
){
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
)
{
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