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
73400018
authored
Sep 07, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加用户标签筛选
parent
864c4622
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
8 deletions
app/Http/Controllers/OrderController.php
public/js/order.js
public/js/self_order.js
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/OrderController.php
View file @
73400018
...
...
@@ -188,13 +188,14 @@ function getSalesName($sale_id)
// 判断用户是否为新用户 -- 第一次下单
function
isNewClient
(
$order_goods_type
,
$user_id
,
$create_time
)
{
$half_year_time
=
intval
(
$create_time
-
round
(
365
/
2
)
*
86400
);
//
$half_year_time = intval($create_time - round(365 / 2) * 86400);
$order
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'order_goods_type'
,
$order_goods_type
)
->
where
(
'user_id'
,
$user_id
)
->
whereBetween
(
'create_time'
,
[
$half_year_time
,
$create_time
-
1
])
->
get
();
//
$order = DB::connection('order')->table('lie_order')->where('order_goods_type', $order_goods_type)->where('user_id', $user_id)->whereBetween('create_time', [$half_year_time, $create_time-1])->get();
$user
=
DB
::
connection
(
'order'
)
->
table
(
'lie_user_main'
)
->
where
(
'user_id'
,
$user_id
)
->
first
();
return
empty
(
$order
)
&&
empty
(
$user
->
client_source
)
?
true
:
false
;
// return empty($order) && empty($user->client_source) ? true : false;
return
$user
->
is_new
==
0
&&
empty
(
$user
->
client_source
)
?
true
:
false
;
}
// 用户来源
...
...
@@ -381,6 +382,7 @@ Class OrderController extends Controller
$map
[
'order_payment_mode'
]
=
$request
->
input
(
'order_payment_mode'
,
''
);
$map
[
'order_invoice_status'
]
=
$request
->
input
(
'order_invoice_status'
,
''
);
$map
[
'is_new'
]
=
$request
->
input
(
'is_new'
,
''
);
}
// 订单查看权限---交易员、客服、测试
...
...
public/js/order.js
View file @
73400018
...
...
@@ -81,6 +81,7 @@
order_source_ptag
=
$
(
'input[name="order_source_ptag"]'
).
val
(),
test_order
=
$
(
'input[name=test_order]'
),
erp_order_id
=
$
(
'#erp_order_id'
).
data
(
'default'
),
is_new
=
$
(
'#is_new'
).
data
(
'default'
),
listUrl
=
'/list'
;
listUrl
+=
'?order_type='
+
order_type
;
...
...
@@ -137,11 +138,15 @@
listUrl
+=
'&erp_order_id='
+
erp_order_id
;
}
if
(
is_new
!==
''
)
{
listUrl
+=
'&is_new='
+
is_new
;
}
if
(
test_order
.
is
(
':checked'
))
{
listUrl
+=
'&test_order='
+
1
;
}
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
erp_order_id
&&
(
is_new
===
''
)
&&
!
test_order
.
is
(
':checked'
))
{
listUrl
=
'/list'
;
}
...
...
@@ -301,7 +306,7 @@
var
val
=
$
(
this
).
data
(
'val'
);
// 当前值
var
def
=
$
(
this
).
parents
(
'.droplist'
).
data
(
'default'
);
// 默认值
if
(
val
!=
def
)
{
if
(
val
!=
=
def
)
{
if
(
$
(
this
).
parents
(
'.droplist'
).
attr
(
'name'
)
==
'order_type'
)
{
$
(
'input[name=order_contain]'
).
val
(
''
);
// 清空
}
...
...
public/js/self_order.js
View file @
73400018
...
...
@@ -19,6 +19,7 @@
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_source_ptag
=
$
(
'input[name="order_source_ptag"]'
).
val
(),
test_order
=
$
(
'input[name=test_order]'
),
is_new
=
$
(
'#is_new'
).
data
(
'default'
),
listUrl
=
'/self_order'
;
listUrl
+=
'?order_type='
+
order_type
;
...
...
@@ -67,11 +68,15 @@
listUrl
+=
'&order_source_ptag='
+
order_source_ptag
;
}
if
(
is_new
!==
''
)
{
listUrl
+=
'&is_new='
+
is_new
;
}
if
(
test_order
.
is
(
':checked'
))
{
listUrl
+=
'&test_order='
+
1
;
}
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_payment_mode
&&
!
order_status
&&
!
order_invoice_status
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_payment_mode
&&
!
order_status
&&
!
order_invoice_status
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
(
is_new
===
''
)
&&
!
test_order
.
is
(
':checked'
))
{
listUrl
=
'/self_order'
;
}
...
...
@@ -136,11 +141,11 @@
var
val
=
$
(
this
).
data
(
'val'
);
// 当前值
var
def
=
$
(
this
).
parents
(
'.droplist'
).
data
(
'default'
);
// 默认值
if
(
val
!=
def
)
{
if
(
val
!=
=
def
)
{
if
(
$
(
this
).
parents
(
'.droplist'
).
attr
(
'name'
)
==
'order_type'
)
{
$
(
'input[name=order_contain]'
).
val
(
''
);
// 清空
}
console
.
log
(
val
)
$
(
this
).
parents
(
'.droplist'
).
data
(
'default'
,
val
);
// 赋值
}
})
...
...
resources/views/orderlist/content.blade.php
View file @
73400018
...
...
@@ -148,6 +148,20 @@
</div>
</dd>
</dl>
<dl>
<dt>
用户标签:
</dt>
<dd>
<div
class=
"droplist"
data-default=
"{{$condition['is_new']}}"
name=
"is_new"
id=
"is_new"
>
<ul
class=
"dropdown-menu"
>
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
"0"
>
用户
</li>
<li
data-val=
"1"
>
新客户
</li>
<li
data-val=
"2"
>
老客户
</li>
</ul>
</div>
</dd>
</dl>
@if (in_array('check_test_order', $userPerms))
<dl>
<dt></dt>
...
...
resources/views/selfOrder/content.blade.php
View file @
73400018
...
...
@@ -112,6 +112,19 @@
<input
type=
"text"
name=
"order_source_ptag"
value=
"{{$condition['order_source_ptag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
<dl>
<dt>
用户标签:
</dt>
<dd>
<div
class=
"droplist"
data-default=
"{{$condition['is_new']}}"
name=
"is_new"
id=
"is_new"
>
<ul
class=
"dropdown-menu"
>
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
"0"
>
用户
</li>
<li
data-val=
"1"
>
新客户
</li>
<li
data-val=
"2"
>
老客户
</li>
</ul>
</div>
</dd>
</dl>
@if (in_array('self_check_test_order', $userPerms))
<dl>
...
...
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