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
Hide 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
...
@@ -552,9 +552,9 @@ Class AddOrderController extends Controller
}
}
if
(
!
empty
(
$update
))
{
if
(
!
empty
(
$update
))
{
return
[
'errcode'
=>
0
,
'errmsg'
=>
'
审核
成功'
];
return
[
'errcode'
=>
0
,
'errmsg'
=>
'
操作
成功'
];
}
else
{
}
else
{
return
[
'errcode'
=>
-
1
,
'errmsg'
=>
'
审核
失败'
];
return
[
'errcode'
=>
-
1
,
'errmsg'
=>
'
操作
失败'
];
}
}
}
}
}
}
...
...
public/js/add_order.js
View file @
9febdead
...
@@ -11,12 +11,12 @@
...
@@ -11,12 +11,12 @@
this
.
bind
(
2
,
1
);
this
.
bind
(
2
,
1
);
},
},
offline
:
function
()
{
// 自营线下订单
offline
:
function
(
internal_uid
)
{
// 自营线下订单
this
.
bind
(
2
,
0
);
this
.
bind
(
2
,
0
,
internal_uid
);
this
.
lists
(
user_
id
,
2
,
0
);
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
;
var
loading
=
this
;
// 获取用户信息
// 获取用户信息
...
@@ -280,9 +280,15 @@
...
@@ -280,9 +280,15 @@
var
goods_min_num
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-num'
).
text
();
var
goods_min_num
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-num'
).
text
();
var
goods_id
=
$
(
this
).
siblings
(
'.goods_id'
).
val
();
var
goods_id
=
$
(
this
).
siblings
(
'.goods_id'
).
val
();
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
var
user_id
=
0
;
if
(
is_online
)
{
// 线上订单
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
)
{
// 联营需要选择交货地
if
(
goods_type
==
1
)
{
// 联营需要选择交货地
delivery_place
=
$
(
'input[name=delivery_place]:checked'
).
val
();
delivery_place
=
$
(
'input[name=delivery_place]:checked'
).
val
();
...
@@ -294,10 +300,7 @@
...
@@ -294,10 +300,7 @@
}
}
}
}
if
(
!
user_id
)
{
user_id
=
internal_uid
?
internal_uid
:
user_id
;
layer
.
msg
(
'请先选择用户'
);
return
false
;
}
var
datax
=
{
var
datax
=
{
uid
:
user_id
,
uid
:
user_id
,
...
@@ -325,11 +328,14 @@
...
@@ -325,11 +328,14 @@
var
self
=
$
(
this
);
var
self
=
$
(
this
);
var
num
=
self
.
val
();
var
num
=
self
.
val
();
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
user_id
=
0
;
if
(
is_online
)
{
if
(
is_online
)
{
var
user_id
=
$
(
'.user_id'
).
val
();
user_id
=
$
(
'.user_id'
).
val
();
}
}
user_id
=
internal_uid
?
internal_uid
:
user_id
;
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
'/ajax/changeNum'
,
url
:
'/ajax/changeNum'
,
...
@@ -353,11 +359,14 @@
...
@@ -353,11 +359,14 @@
$
(
'.shop-table'
).
delegate
(
'.remove-goods'
,
'click'
,
function
()
{
$
(
'.shop-table'
).
delegate
(
'.remove-goods'
,
'click'
,
function
()
{
var
self
=
$
(
this
);
var
self
=
$
(
this
);
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
user_id
=
0
;
if
(
is_online
)
{
if
(
is_online
)
{
var
user_id
=
$
(
'.user_id'
).
val
();
user_id
=
$
(
'.user_id'
).
val
();
}
}
user_id
=
internal_uid
?
internal_uid
:
user_id
;
layer
.
open
({
layer
.
open
({
title
:
'删除提示'
,
title
:
'删除提示'
,
content
:
'确定删除该商品吗?'
,
content
:
'确定删除该商品吗?'
,
...
@@ -412,11 +421,14 @@
...
@@ -412,11 +421,14 @@
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
var
type
=
$
(
this
).
data
(
'type'
);
var
type
=
$
(
this
).
data
(
'type'
);
var
cart_ids
=
[];
var
cart_ids
=
[];
var
user_id
=
0
;
if
(
is_online
)
{
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
()
{
$
(
'.shop-table tbody tr'
).
each
(
function
()
{
var
cid
=
$
(
this
).
data
(
'cid'
);
var
cid
=
$
(
this
).
data
(
'cid'
);
cart_ids
.
push
(
cid
);
cart_ids
.
push
(
cid
);
...
...
resources/views/addOffline/content.blade.php
View file @
9febdead
...
@@ -216,9 +216,9 @@
...
@@ -216,9 +216,9 @@
</div>
</div>
<script>
<script>
var
user_
id
=
"{{$internal_uid}}"
;
var
internal_u
id
=
"{{$internal_uid}}"
;
var
sale_id
=
"{{$sale_id}}"
;
var
sale_id
=
"{{$sale_id}}"
;
var
URL_api
=
"{{Config('website.api_domain')}}"
;
var
URL_api
=
"{{Config('website.api_domain')}}"
;
$
.
lie
.
add_order
.
offline
();
$
.
lie
.
add_order
.
offline
(
internal_uid
);
</script>
</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