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
6408c4fc
authored
Jun 18, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
04d38872
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
42 deletions
app/Services/Bom/BomService.php
resources/views/web/BomReport.blade.php
app/Services/Bom/BomService.php
View file @
6408c4fc
...
...
@@ -460,8 +460,11 @@ class BomService {
//自营
$ziying
[
$k
][
"id"
]
=
$item
[
"match_goods_id"
];
$ziying
[
$k
][
"num"
]
=
$item
[
"match_number"
];
$ziying
[
$k
][
"delivery_place"
]
=
$delivery_type
;
$ziying
[
$k
][
"matching_id"
]
=
$item
[
"matching_id"
];
}
else
{
//联营
$lianying
[
$k
][
"matching_id"
]
=
$item
[
'matching_id'
];
$lianying
[
$k
][
"goods_name"
]
=
$item
[
'match_goods_name'
];
$lianying
[
$k
][
"brand_name"
]
=
$item
[
'match_brand_name'
];
$lianying
[
$k
][
"num"
]
=
$item
[
'match_number'
];
...
...
@@ -546,7 +549,6 @@ class BomService {
protected
function
zyOrder
(
$user_id
,
$ziying
,
$extend
,
&
$err_msg
){
//请求 api接口 加入购物车
$addZYShopCart
=
$this
->
createZYOrderToShopCart
(
$user_id
,
$ziying
,
$extend
);
if
(
!
empty
(
$addZYShopCart
)
&&
$addZYShopCart
[
'err_code'
]
==
0
){
//加入购物车成功
//获取自营购物车
$car_ids
=
$this
->
getShopCart
(
$user_id
,
3
);
...
...
@@ -578,7 +580,6 @@ class BomService {
*/
protected
function
createOrder
(
$user_id
,
$car_ids
,
$extend
,
$type
=
2
){
$url
=
Config
(
'website.api_create_order'
);
$data
[
'bom_id'
]
=
$extend
[
"bom_id"
];
$data
[
'uid'
]
=
intval
(
$user_id
)
?
intval
(
$user_id
)
:
0
;
$data
[
"type"
]
=
$type
;
//订单类型:1.联营, 2.自营线上, 3.自营线下, 4.自营其他业务订单
$data
[
"cart_id"
]
=
implode
(
","
,
$car_ids
);
...
...
@@ -602,8 +603,8 @@ class BomService {
//联营
$goodsType
=
[
1
,
2
];
}
$query
=
DB
::
connection
(
"order"
)
->
table
(
"lie_shopping_cart"
)
->
where
([
"user_id"
=>
$user_id
,
"status"
=>
1
])
->
where
(
"bom_id"
,
"!="
,
0
)
->
whereIn
(
"goods_type"
,
$goodsType
)
->
select
(
"cart_id"
)
->
pluck
(
"cart_id"
);
$query
=
DB
::
connection
(
"order"
)
->
table
(
"lie_shopping_cart"
)
->
where
([
"user_id"
=>
$user_id
,
"status"
=>
1
,
"extend_type"
=>
5
])
->
whereIn
(
"goods_type"
,
$goodsType
)
->
select
(
"cart_id"
)
->
pluck
(
"cart_id"
);
return
$query
;
}
...
...
@@ -613,8 +614,7 @@ class BomService {
*/
protected
function
createZYOrderToShopCart
(
$user_id
,
$ziying
,
$extend
){
$url
=
Config
(
'website.addzyorder_url'
);
$data
[
'type'
]
=
2
;
$data
[
'bom_id'
]
=
$extend
[
"bom_id"
];
$data
[
'type'
]
=
2
;
//后台加入购物车
$data
[
'delivery_place'
]
=
$extend
[
'delivery_type'
];
$data
[
"data"
]
=
array_merge
(
$ziying
);
$data
[
'uid'
]
=
intval
(
$user_id
)
?
intval
(
$user_id
)
:
0
;
...
...
resources/views/web/BomReport.blade.php
View file @
6408c4fc
...
...
@@ -111,40 +111,40 @@
<div
class=
"layui-card"
style=
""
>
<h3>
用户数据
</h3>
<hr>
<form
class=
"layui-form layui-box"
id=
"test5"
method=
"post"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
创建日期:
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"begin_time"
value=
""
autocomplete=
"off"
placeholder=
"选择开始时间"
class=
"layui-input"
id=
"begin_time"
readonly
>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"end_time"
value=
""
autocomplete=
"off"
placeholder=
"选择结束时间"
class=
"layui-input"
id=
"end_time"
readonly
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
客服
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"is_kefu"
lay-verify=
""
lay-search
>
<option
value=
"all"
>
全部
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</div>
</div>
<div
class=
"layui-inline"
style=
"text-align: center;"
>
<button
class=
"layui-btn"
data-type=
"search"
>
搜索
</button>
<!-- <button type="button" class="layui-btn layui-btn-normal export">导出</button> -->
</div>
</div>
</form>
</div>
{{--
<div
class=
"layui-card"
style=
""
>
--}}
{{--
<h3>
用户数据
</h3>
--}}
{{--
<hr>
--}}
{{--
<form
class=
"layui-form layui-box"
id=
"test5"
method=
"post"
>
--}}
{{--
<div
class=
"layui-form-item"
>
--}}
{{--
<div
class=
"layui-inline"
>
--}}
{{--
<label
class=
"layui-form-label"
>
创建日期:
</label>
--}}
{{--
<div
class=
"layui-input-inline"
>
--}}
{{--
<input
type=
"text"
name=
"begin_time"
value=
""
autocomplete=
"off"
placeholder=
"选择开始时间"
class=
"layui-input"
id=
"begin_time"
readonly
>
--}}
{{--
</div>
--}}
{{--
<div
class=
"layui-form-mid"
>
-
</div>
--}}
{{--
<div
class=
"layui-input-inline"
>
--}}
{{--
<input
type=
"text"
name=
"end_time"
value=
""
autocomplete=
"off"
placeholder=
"选择结束时间"
class=
"layui-input"
id=
"end_time"
readonly
>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
{{--
<div
class=
"layui-inline"
>
--}}
{{--
<label
class=
"layui-form-label"
>
客服
</label>
--}}
{{--
<div
class=
"layui-input-inline"
>
--}}
{{--
<select
name=
"is_kefu"
lay-verify=
""
lay-search
>
--}}
{{--
<option
value=
"all"
>
全部
</option>
--}}
{{--
<option
value=
"1"
>
是
</option>
--}}
{{--
<option
value=
"0"
>
否
</option>
--}}
{{--
</select>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
{{--
<div
class=
"layui-inline"
style=
"text-align: center;"
>
--}}
{{--
<button
class=
"layui-btn"
data-type=
"search"
>
搜索
</button>
--}}
{{--
<!-- <button type="button" class="layui-btn layui-btn-normal export">导出</button> -->
--}}
{{--
</div>
--}}
{{--
</div>
--}}
{{--
</form>
--}}
{{--
</div>
--}}
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