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
19f41868
authored
Feb 19, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
temp2
parent
d38893df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
56 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/OrderCountController.php
public/js/order.js
resources/views/erpOrder/content.blade.php
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/OrderController.php
View file @
19f41868
...
...
@@ -381,8 +381,8 @@ Class OrderController extends Controller
return
view
(
'orderlist'
,
$info
);
}
//
获取页面及订单信息 tid为订单类型:1.联营 2. 自营
public
function
getOrderInfo
(
$request
,
$tid
)
//
订单搜索参数
public
function
_search
(
Request
$request
,
$tid
)
{
$info
=
$this
->
getPageInfo
(
$request
);
...
...
@@ -406,7 +406,6 @@ Class OrderController extends Controller
$map
[
'order_source_adtag'
]
=
$request
->
input
(
'order_source_adtag'
,
''
);
$map
[
'order_source_ptag'
]
=
$request
->
input
(
'order_source_ptag'
,
''
);
$map
[
'erp_order_id'
]
=
$request
->
input
(
'erp_order_id'
,
''
);
$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'
,
''
);
...
...
@@ -416,7 +415,7 @@ Class OrderController extends Controller
// 订单查看权限---交易员、客服、测试
if
(
in_array
(
$info
[
'role'
],
[
3
,
4
]))
{
// 筛选自己的订单
$
data
[
'sale_id'
]
=
$request
->
user
->
userId
;
$
map
[
'sale_id'
]
=
$request
->
user
->
userId
;
}
// 自营客服权限
...
...
@@ -444,15 +443,25 @@ Class OrderController extends Controller
$map
[
'order_type_filter'
]
=
[
2
,
3
];
// 2-ERP, 3-JD
}
$info
[
'size'
]
=
$size
;
$info
[
'map'
]
=
$map
;
return
$info
;
}
// 获取页面及订单信息 tid为订单类型:1.联营, 2. 自营, 3. ERP
public
function
getOrderInfo
(
$request
,
$tid
=
1
)
{
$info
=
$this
->
_search
(
$request
,
$tid
);
// 获取所有的业务员 (包括经理、交易员、客服、测试)
$perm
=
new
PermController
;
if
(
$tid
==
1
||
$tid
==
3
)
{
$manager
=
$perm
->
getRoleUsers
(
$request
,
'经理'
);
$test
=
$perm
->
getRoleUsers
(
$request
,
'测试'
);
$sales
=
$perm
->
getRoleUsers
(
$request
,
'交易员'
);
$kefu
=
$perm
->
getRoleUsers
(
$request
,
'客服'
);
$manager
=
$perm
->
getRoleUsers
(
$request
,
'经理'
);
$test
=
$perm
->
getRoleUsers
(
$request
,
'测试'
);
$sales
=
$perm
->
getRoleUsers
(
$request
,
'交易员'
);
$kefu
=
$perm
->
getRoleUsers
(
$request
,
'客服'
);
$sale_list
=
array_merge
(
$manager
,
$sales
,
$test
,
$kefu
);
}
else
{
$sale_list
=
$perm
->
getRoleUsers
(
$request
,
'客服'
);
...
...
@@ -461,20 +470,20 @@ Class OrderController extends Controller
//获取订单列表
$url
=
Config
(
'website.api_domain'
)
.
'order/getAllOrder'
;
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'size'
]
=
$
size
;
// 当前页条数
$data
[
'map'
]
=
$map
;
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'size'
]
=
$
info
[
'size'
]
;
// 当前页条数
$data
[
'map'
]
=
$info
[
'map'
]
;
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
// 分页
$page
=
new
Page
(
$response
[
'data'
][
'count'
],
$
size
);
$page
=
new
Page
(
$response
[
'data'
][
'count'
],
$
info
[
'size'
]
);
$page
->
setConfig
(
'theme'
,
'%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%'
);
$show
=
$page
->
show
();
$info
[
'condition'
]
=
$
map
;
$info
[
'condition'
]
=
$
info
[
'map'
]
;
$info
[
'sale_list'
]
=
$sale_list
;
$info
[
'list'
]
=
$response
[
'data'
][
'data'
];
$info
[
'pay_count'
]
=
$response
[
'data'
][
'pay_count'
];
...
...
@@ -491,37 +500,19 @@ Class OrderController extends Controller
// 订单其他信息
public
function
orderOtherInfoLoading
(
Request
$request
)
{
// 页面参数
$map
[
'order_type'
]
=
$request
->
input
(
'order_type'
,
''
);
$map
[
'order_contain'
]
=
$request
->
input
(
'order_contain'
,
''
);
$map
[
'time_start'
]
=
$request
->
input
(
'time_start'
,
''
);
$map
[
'time_end'
]
=
$request
->
input
(
'time_end'
,
''
);
$map
[
'order_status'
]
=
$request
->
input
(
'order_status'
,
''
);
$map
[
'sale_type'
]
=
$request
->
input
(
'sale_type'
,
''
);
$map
[
'shipping_name'
]
=
$request
->
input
(
'shipping_name'
,
''
);
$map
[
'order_send'
]
=
$request
->
input
(
'order_send'
,
''
);
$map
[
'test_order'
]
=
$request
->
input
(
'test_order'
,
''
);
$map
[
'order_pay_type'
]
=
$request
->
input
(
'order_pay_type'
,
''
);
$map
[
'order_type_a'
]
=
$request
->
input
(
'order_type_a'
,
''
);
$map
[
'order_source'
]
=
$request
->
input
(
'order_source'
,
''
);
$map
[
'order_source_pf'
]
=
$request
->
input
(
'order_source_pf'
,
''
);
$map
[
'order_source_adtag'
]
=
$request
->
input
(
'order_source_adtag'
,
''
);
$map
[
'order_source_ptag'
]
=
$request
->
input
(
'order_source_ptag'
,
''
);
$map
[
'erp_order_id'
]
=
$request
->
input
(
'erp_order_id'
,
''
);
$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'
,
''
);
$map
[
'is_new_order'
]
=
$request
->
input
(
'is_new_order'
,
''
);
// 判断页面
$tid
=
$request
->
input
(
'pid'
,
1
);
$info
=
$this
->
_search
(
$request
,
$tid
);
$url
=
Config
(
'website.api_domain'
)
.
'order/getOrderOtherInfo'
;
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'map'
]
=
$map
;
echo
'<pre>'
;
print_r
(
curlApi
(
$url
,
$data
));
die
;
$data
[
'map'
]
=
$info
[
'map'
];
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
return
$response
;
}
// erp订单
...
...
app/Http/Controllers/OrderCountController.php
View file @
19f41868
...
...
@@ -100,7 +100,7 @@ Class OrderCountController extends Controller
}
// 调用API
$url
=
Config
(
'website.api_domain'
)
.
'order/get
AllOrder
'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/get
OrderAmount
'
;
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
...
...
public/js/order.js
View file @
19f41868
...
...
@@ -324,14 +324,15 @@
})
// 订单其他信息
this
.
orderOtherInfo
();
var
page_type
=
$
(
'#page_type'
).
val
();
this
.
orderOtherInfo
(
page_type
);
// 填写取消原因
this
.
cancelorder
();
},
// 订单其他信息:已付款, 下单用户数, 付款用户数, 金额
orderOtherInfo
:
function
()
{
orderOtherInfo
:
function
(
pid
)
{
var
datax
=
{
order_type
:
$
(
'#order_type'
).
data
(
'default'
),
order_contain
:
$
(
'input[name=order_contain]'
).
val
(),
...
...
@@ -351,18 +352,33 @@
is_new
:
$
(
'#is_new'
).
val
()
?
$
(
'#is_new'
).
val
()
:
''
,
order_payment_mode
:
$
(
'#order_payment_mode'
).
val
()
?
$
(
'#order_payment_mode'
).
val
()
:
''
,
is_new_order
:
$
(
'#is_new_order'
).
val
()
?
$
(
'#is_new_order'
).
val
()
:
''
,
pid
:
pid
,
};
console
.
log
(
datax
)
$
.
ajax
({
type
:
"POST"
,
url
:
'/ajax/orderOtherInfoLoading'
,
data
:
datax
,
dataType
:
"json"
,
success
:
function
(
resp
){
if
(
resp
.
errcode
!=
0
)
{
layer
.
msg
(
resp
.
errmsg
);
if
(
resp
.
err
_
code
!=
0
)
{
layer
.
msg
(
resp
.
err
_
msg
);
return
false
;
}
var
data
=
resp
.
data
;
var
html
=
''
;
if
(
pid
!=
3
)
{
html
+=
'<span class="paid_order_count">'
+
data
.
paid_order_count
+
'单已付款(包含预付款),</span><span class="user_count">下单用户数为'
+
data
.
user_count
+
'人,</span><span class="paid_user_count">付款用户数为'
+
data
.
paid_user_count
+
'人,</span>'
;
}
html
+=
'<span class="rmb_count">应付金额 ¥'
+
data
.
pay_count
.
rmb_count
+
',</span><span class="usd_count">$'
+
data
.
pay_count
.
usd_count
+
',</span><span class="rmb_pay">实收金额 ¥'
+
data
.
pay_count
.
rmb_pay
+
',</span><span class="usd_pay">$'
+
data
.
pay_count
.
usd_pay
+
',</span>'
;
if
(
pid
!=
3
&&
data
.
noreason_count
)
{
html
+=
'<span class="error">共有'
+
data
.
noreason_count
+
'单已取消订单未填写取消原因</span>'
;
}
$
(
'.show-other-info'
).
append
(
html
);
},
})
},
...
...
resources/views/erpOrder/content.blade.php
View file @
19f41868
...
...
@@ -5,7 +5,8 @@
<!-- <ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">ERP订单</a></li>
</ul> -->
<input
type=
"hidden"
name=
"page_type"
id=
"page_type"
value=
"3"
>
<div
class=
"tabs-box"
>
<div
class=
"row-fluid search-box"
>
<div
class=
"span12"
>
...
...
@@ -289,9 +290,10 @@
@if ($username != 'vpadmin@ichunt.com')
<span
class=
"show-list-info"
>
共{{$count ? $count : 0}}单,
应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}},
<!--
应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}},
实收金额 ¥{{$pay_count['rmb_pay'] ? $pay_count['rmb_pay'] : 0}},
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}}
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}} -->
<span
class=
"show-other-info"
></span>
</span>
@endif
...
...
resources/views/orderlist/content.blade.php
View file @
19f41868
...
...
@@ -5,7 +5,8 @@
<!-- <ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">平台订单</a></li>
</ul> -->
<input
type=
"hidden"
name=
"page_type"
id=
"page_type"
value=
"1"
>
<div
class=
"tabs-box"
>
<div
class=
"row-fluid search-box"
>
<div
class=
"span12"
>
...
...
@@ -458,7 +459,7 @@
@if ($username != 'vpadmin@ichunt.com')
<span
class=
"show-list-info"
>
共{{$count ? $count : 0}}单,
{{$paid_order_count}}单已付款(包含预付款),
<!--
{{$paid_order_count}}单已付款(包含预付款),
下单用户数为{{$user_count}}人,
付款用户数为{{$paid_user_count}}人,
应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}},
...
...
@@ -466,9 +467,10 @@
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}},
@if ($noreason_count)
<span class="error">共有{{$noreason_count}}单已取消订单未填写取消原因</span>
@endif
@endif -->
<span
class=
"show-other-info"
></span>
</span>
<span
class=
"show-other-info"
></span>
@endif
<?php
echo
$page
;
?>
...
...
resources/views/selfOrder/content.blade.php
View file @
19f41868
...
...
@@ -5,7 +5,8 @@
<!-- <ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">自营订单</a></li>
</ul> -->
<input
type=
"hidden"
name=
"page_type"
id=
"page_type"
value=
"2"
>
<div
class=
"tabs-box"
>
<div
class=
"row-fluid search-box"
>
<div
class=
"span12"
>
...
...
@@ -338,12 +339,13 @@
@if ($username != 'vpadmin@ichunt.com')
<span
class=
"show-list-info"
>
共{{$count ? $count : 0}}单,
{{$paid_order_count}}单已付款(包含预付款),
<!--
{{$paid_order_count}}单已付款(包含预付款),
下单用户数为{{$user_count}}人,
付款用户数为{{$paid_user_count}}人,
应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}},
实收金额 ¥{{$pay_count['rmb_pay'] ? $pay_count['rmb_pay'] : 0}},
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}}
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}} -->
<span
class=
"show-other-info"
></span>
</span>
@endif
...
...
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