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
9febdead
authored
Aug 27, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_create_order_20180813' into development
parents
221f37ac
03a2741f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
16 deletions
app/Http/Controllers/AddOrderController.php
public/js/add_order.js
resources/views/addOffline/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
9febdead
...
...
@@ -552,9 +552,9 @@ Class AddOrderController extends Controller
}
if
(
!
empty
(
$update
))
{
return
[
'errcode'
=>
0
,
'errmsg'
=>
'
审核
成功'
];
return
[
'errcode'
=>
0
,
'errmsg'
=>
'
操作
成功'
];
}
else
{
return
[
'errcode'
=>
-
1
,
'errmsg'
=>
'
审核
失败'
];
return
[
'errcode'
=>
-
1
,
'errmsg'
=>
'
操作
失败'
];
}
}
}
...
...
public/js/add_order.js
View file @
9febdead
...
...
@@ -11,12 +11,12 @@
this
.
bind
(
2
,
1
);
},
offline
:
function
()
{
// 自营线下订单
this
.
bind
(
2
,
0
);
this
.
lists
(
user_
id
,
2
,
0
);
offline
:
function
(
internal_uid
)
{
// 自营线下订单
this
.
bind
(
2
,
0
,
internal_uid
);
this
.
lists
(
internal_u
id
,
2
,
0
);
},
bind
:
function
(
goods_type
,
is_online
)
{
//goods_type:1-联营,2-自营 is_online:是否线上订单
bind
:
function
(
goods_type
,
is_online
,
internal_uid
=
''
)
{
//goods_type:1-联营,2-自营 is_online:是否线上订单
var
loading
=
this
;
// 获取用户信息
...
...
@@ -280,9 +280,15 @@
var
goods_min_num
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-num'
).
text
();
var
goods_id
=
$
(
this
).
siblings
(
'.goods_id'
).
val
();
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
var
user_id
=
0
;
if
(
is_online
)
{
// 线上订单
var
user_id
=
$
(
'.user_id'
).
val
();
user_id
=
$
(
'.user_id'
).
val
();
if
(
!
user_id
)
{
layer
.
msg
(
'请先选择用户'
);
return
false
;
}
if
(
goods_type
==
1
)
{
// 联营需要选择交货地
delivery_place
=
$
(
'input[name=delivery_place]:checked'
).
val
();
...
...
@@ -294,10 +300,7 @@
}
}
if
(
!
user_id
)
{
layer
.
msg
(
'请先选择用户'
);
return
false
;
}
user_id
=
internal_uid
?
internal_uid
:
user_id
;
var
datax
=
{
uid
:
user_id
,
...
...
@@ -325,11 +328,14 @@
var
self
=
$
(
this
);
var
num
=
self
.
val
();
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
user_id
=
0
;
if
(
is_online
)
{
var
user_id
=
$
(
'.user_id'
).
val
();
user_id
=
$
(
'.user_id'
).
val
();
}
user_id
=
internal_uid
?
internal_uid
:
user_id
;
$
.
ajax
({
type
:
"POST"
,
url
:
'/ajax/changeNum'
,
...
...
@@ -353,11 +359,14 @@
$
(
'.shop-table'
).
delegate
(
'.remove-goods'
,
'click'
,
function
()
{
var
self
=
$
(
this
);
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
user_id
=
0
;
if
(
is_online
)
{
var
user_id
=
$
(
'.user_id'
).
val
();
user_id
=
$
(
'.user_id'
).
val
();
}
user_id
=
internal_uid
?
internal_uid
:
user_id
;
layer
.
open
({
title
:
'删除提示'
,
content
:
'确定删除该商品吗?'
,
...
...
@@ -412,11 +421,14 @@
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
var
type
=
$
(
this
).
data
(
'type'
);
var
cart_ids
=
[];
var
user_id
=
0
;
if
(
is_online
)
{
var
user_id
=
$
(
'.user_id'
).
val
();
user_id
=
$
(
'.user_id'
).
val
();
}
user_id
=
internal_uid
?
internal_uid
:
user_id
;
$
(
'.shop-table tbody tr'
).
each
(
function
()
{
var
cid
=
$
(
this
).
data
(
'cid'
);
cart_ids
.
push
(
cid
);
...
...
resources/views/addOffline/content.blade.php
View file @
9febdead
...
...
@@ -216,9 +216,9 @@
</div>
<script>
var
user_
id
=
"{{$internal_uid}}"
;
var
internal_u
id
=
"{{$internal_uid}}"
;
var
sale_id
=
"{{$sale_id}}"
;
var
URL_api
=
"{{Config('website.api_domain')}}"
;
$
.
lie
.
add_order
.
offline
();
$
.
lie
.
add_order
.
offline
(
internal_uid
);
</script>
\ No newline at end of file
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