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
c1acc1af
authored
Jul 17, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
保留已离职人员
parent
a19b8bf5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
33 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/PermController.php
public/js/order.js
resources/views/erpOrder/content.blade.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/OrderController.php
View file @
c1acc1af
...
...
@@ -174,6 +174,16 @@ function getOperatorName($uid, $type)
return
$name
;
}
// 获取交易员名称
function
getSalesName
(
$sale_id
)
{
if
(
!
$sale_id
)
return
false
;
$user
=
DB
::
table
(
'user_info'
)
->
where
(
'userId'
,
$sale_id
)
->
select
(
'name'
)
->
first
();
return
isset
(
$user
->
name
)
?
$user
->
name
:
''
;
}
Class
OrderController
extends
Controller
{
// 首页
...
...
@@ -985,14 +995,28 @@ Class OrderController extends Controller
$sale_list
=
$perm
->
getRoleUsers
(
$request
,
'交易员'
);
$kefu
=
$perm
->
getRoleUsers
(
$request
,
'客服'
);
$info
[
'manager'
]
=
$
manager
;
$info
[
'test'
]
=
$t
est
;
$info
[
'sale_list'
]
=
$
sale_list
;
$info
[
'kefu'
]
=
$
kefu
;
$info
[
'manager'
]
=
$
this
->
filterLeave
(
$manager
)
;
$info
[
'test'
]
=
$t
his
->
filterLeave
(
$test
)
;
$info
[
'sale_list'
]
=
$
this
->
filterLeave
(
$sale_list
)
;
$info
[
'kefu'
]
=
$
this
->
filterLeave
(
$kefu
)
;
return
view
(
'detail'
,
$info
);
}
// 去掉已离职人员
public
function
filterLeave
(
&
$data
)
{
if
(
!
empty
(
$data
))
{
foreach
(
$data
as
$k
=>
$v
)
{
if
(
$v
->
status
==
4
)
{
unset
(
$data
[
$k
]);
}
}
}
return
$data
;
}
// 人工审单后再次调价 --- 20180404
public
function
adjustPrice
(
Request
$request
,
$id
)
{
...
...
app/Http/Controllers/PermController.php
View file @
c1acc1af
...
...
@@ -90,12 +90,12 @@
if
(
$userId
)
{
foreach
(
$userId
as
$id
)
{
$userInfo
=
DB
::
table
(
'user_info'
)
->
where
(
'userId'
,
$id
)
->
first
();
$userInfo
=
DB
::
table
(
'user_info'
)
->
where
(
'userId'
,
$id
)
->
select
(
'userId'
,
'name'
,
'status'
)
->
first
();
// 判断用户是否已离职 4为离职状态
if
(
$userInfo
->
status
!=
4
)
{
//
if ($userInfo->status != 4) {
$roleUsers
[]
=
$userInfo
;
}
// }
continue
;
}
...
...
public/js/order.js
View file @
c1acc1af
...
...
@@ -75,7 +75,7 @@
order_pay_type
=
$
(
'#order_pay_type'
).
data
(
'default'
),
order_status
=
$
(
'#order_status'
).
val
(),
shipping_name
=
$
(
'#shipping_name'
).
data
(
'default'
),
order_send
=
$
(
'#order_send'
).
data
(
'default'
),
order_send
=
$
(
'#order_send'
).
val
(
),
order_source_pf
=
$
(
'#order_source_pf'
).
data
(
'default'
),
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_source_ptag
=
$
(
'input[name="order_source_ptag"]'
).
val
(),
...
...
@@ -158,7 +158,7 @@
order_pay_type
=
$
(
'#order_pay_type'
).
data
(
'default'
),
order_status
=
$
(
'#order_status'
).
val
(),
shipping_name
=
$
(
'#shipping_name'
).
data
(
'default'
),
order_send
=
$
(
'#order_send'
).
data
(
'default'
),
order_send
=
$
(
'#order_send'
).
val
(
),
order_source_pf
=
$
(
'#order_source_pf'
).
data
(
'default'
),
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_source_ptag
=
$
(
'input[name="order_source_ptag"]'
).
val
(),
...
...
@@ -296,7 +296,7 @@
time_start
=
$
(
'input[name="time_start"]'
).
val
(),
time_end
=
$
(
'input[name="time_end"]'
).
val
(),
order_status
=
$
(
'#order_status'
).
data
(
'default'
),
order_send
=
$
(
'#order_send'
).
data
(
'default'
),
order_send
=
$
(
'#order_send'
).
val
(
),
order_source
=
$
(
'#order_source'
).
data
(
'default'
),
listUrl
=
'/erp_order'
;
...
...
resources/views/erpOrder/content.blade.php
View file @
c1acc1af
...
...
@@ -62,17 +62,26 @@
</div>
</dd>
</dl>
<style>
.order_send
.btn
{
padding
:
4px
12px
;}
</style>
<dl>
<dt>
推送业务员:
</dt>
<dd
style=
"width: 115px;"
>
<div
class=
"droplist"
data-default=
"{{$condition['order_send']}}"
id=
"order_send"
name=
"order_send"
>
<select
id=
"order_send"
name=
"order_send"
class=
"form-control order_send selectpicker"
title=
"全部"
data-live-search=
"true"
data-live-search-placeholder=
"搜索"
>
@foreach ($sale_list as $v)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endforeach
</select>
<!-- <div class="droplist" data-default="{{$condition['order_send']}}" id="order_send" name="order_send" >
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
@foreach ($sale_list as $v)
<li data-val="{{$v->userId}}">{{$v->name}}</li>
@endforeach
</ul>
</div>
</div>
-->
</dd>
</dl>
</td>
...
...
@@ -289,5 +298,8 @@
</div>
<script>
var
order_send
=
"{{$condition['order_send']}}"
;
$
(
'#order_send'
).
selectpicker
(
'val'
,
order_send
);
$
.
lie
.
order
.
index
();
</script>
\ No newline at end of file
resources/views/orderlist/content.blade.php
View file @
c1acc1af
...
...
@@ -35,11 +35,12 @@
<style>
.bs-select-all
{
float
:
left
;
width
:
42%
!important
;}
.bs-deselect-all
{
float
:
right
;
width
:
50%
!important
;}
.order_status
.btn
,
.order_send
.btn
{
padding
:
4px
12px
;}
</style>
<dl>
<dt>
订单状态:
</dt>
<dd>
<select
id=
"order_status"
name=
"order_status"
class=
"form-control selectpicker"
title=
"全部"
multiple
>
<select
id=
"order_status"
name=
"order_status"
class=
"form-control
order_status
selectpicker"
title=
"全部"
multiple
>
<option
class=
"order_status"
value=
"-1"
>
已取消
</option>
<option
class=
"order_status"
value=
"1"
>
待审核
</option>
<option
class=
"order_status"
value=
"2"
>
待付款
</option>
...
...
@@ -79,14 +80,11 @@
<dl>
<dt>
推送业务员:
</dt>
<dd
style=
"width: 115px;"
>
<div
class=
"droplist"
data-default=
"{{$condition['order_send']}}"
id=
"order_send"
name=
"order_send"
>
<ul
class=
"dropdown-menu"
>
<li
data-val=
""
class=
"active"
>
全部
</li>
@foreach ($sale_list as $v)
<li
data-val=
"{{$v->userId}}"
>
{{$v->name}}
</li>
@endforeach
</ul>
</div>
<select
id=
"order_send"
name=
"order_send"
class=
"form-control order_send selectpicker"
title=
"全部"
data-live-search=
"true"
data-live-search-placeholder=
"搜索"
>
@foreach ($sale_list as $v)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endforeach
</select>
</dd>
</dl>
<!-- <dl>
...
...
@@ -226,15 +224,8 @@
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
foreach
(
$sale_list
as
$val
)
{
if
(
$val
->
userId
==
$v
[
'sale_id'
])
{
echo
$val
->
name
;
}
}
?>
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getSalesName
(
$v
[
'sale_id'
]));
?>
</td>
<td
class=
"show-list"
class=
"show-list"
>
<?php
$shipping
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
...
...
@@ -465,13 +456,14 @@
<script>
var
test_order
=
"{{$condition['test_order']}}"
;
var
order_status
=
"{{$condition['order_status']}}"
;
var
order_status
=
"{{$condition['order_status']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
if
(
test_order
)
{
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
}
$
(
".
selectpicker
"
).
selectpicker
({
$
(
".
order_status
"
).
selectpicker
({
actionsBox
:
true
,
//在下拉选项添加选中所有和取消选中的按钮
countSelectedText
:
"已选中{0}项"
,
selectedTextFormat
:
"count > 5"
,
...
...
@@ -479,7 +471,8 @@
deselectAllText
:
'取消全选'
,
})
$
(
'.selectpicker'
).
selectpicker
(
'val'
,
order_status
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_status'
).
selectpicker
(
'val'
,
order_status
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#order_send'
).
selectpicker
(
'val'
,
order_send
);
$
.
lie
.
order
.
index
();
...
...
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