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
ad400db2
authored
Apr 02, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整订单列表其他信息展示
parent
3fea8ef7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
87 deletions
app/Http/Controllers/OrderController.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 @
ad400db2
...
@@ -486,6 +486,27 @@ Class OrderController extends Controller
...
@@ -486,6 +486,27 @@ Class OrderController extends Controller
// 订单其他信息
// 订单其他信息
public
function
orderOtherInfoLoading
(
Request
$request
)
public
function
orderOtherInfoLoading
(
Request
$request
)
{
{
$is_manager
=
$request
->
input
(
'is_manager'
,
0
);
if
(
!
$is_manager
)
{
// 非管理账户检查查询时间
$time_start
=
$request
->
input
(
'time_start'
,
''
);
$time_end
=
$request
->
input
(
'time_end'
,
''
);
if
(
$time_start
&&
$time_end
)
{
$diff
=
$time_end
-
$time_start
;
if
(
$diff
>=
60
*
60
*
24
*
365
)
return
[
'err_code'
=>
1
,
'err_msg'
=>
'查询时间不能超过一年'
];
}
else
if
(
$time_end
)
{
return
[
'err_code'
=>
2
,
'err_msg'
=>
'请选择开始时间'
];
}
else
if
(
$time_start
)
{
$diff
=
time
()
-
$time_start
;
if
(
$diff
>=
60
*
60
*
24
*
365
)
return
[
'err_code'
=>
1
,
'err_msg'
=>
'查询时间不能超过一年'
];
}
else
{
return
[
'err_code'
=>
3
,
'err_msg'
=>
'请选择查询时间'
];
}
}
// 判断页面
// 判断页面
$tid
=
$request
->
input
(
'pid'
,
1
);
$tid
=
$request
->
input
(
'pid'
,
1
);
$info
=
$this
->
_search
(
$request
,
$tid
);
$info
=
$this
->
_search
(
$request
,
$tid
);
...
...
public/js/order.js
View file @
ad400db2
...
@@ -329,76 +329,83 @@
...
@@ -329,76 +329,83 @@
location
.
href
=
listUrl
;
location
.
href
=
listUrl
;
})
})
// 指定账号加载信息
// 点击获取订单其他信息
if
(
username
==
'admin@ichunt.com'
)
{
$
(
'.order-other-info'
).
click
(
function
(){
// 订单其他信息
var
page_type
=
$
(
'#page_type'
).
val
();
// 区分页面 1-联营,2-自营,3-ERP
var
page_type
=
$
(
'#page_type'
).
val
();
orderOtherInfo
(
page_type
);
orderOtherInfo
(
page_type
);
})
// 订单其他信息:已付款, 下单用户数, 付款用户数, 金额
// 管理账户直接显示订单其他信息
function
orderOtherInfo
(
pid
)
{
if
(
manager
==
1
)
{
var
order_contain
=
$
(
'input[name=order_contain]'
).
val
(),
var
page_type
=
$
(
'#page_type'
).
val
();
time_start
=
$
(
'input[name="time_start"]'
).
val
(),
orderOtherInfo
(
page_type
,
1
);
time_end
=
$
(
'input[name="time_end"]'
).
val
();
}
// 订单其他信息:已付款, 下单用户数, 付款用户数, 金额
function
orderOtherInfo
(
pid
,
is_manager
=
0
)
{
var
order_contain
=
$
(
'input[name=order_contain]'
).
val
(),
time_start
=
$
(
'input[name="time_start"]'
).
val
(),
time_end
=
$
(
'input[name="time_end"]'
).
val
();
if
(
time_start
){
if
(
time_start
){
time_start
=
Date
.
parse
(
time_start
)
/
1000
;
time_start
=
Date
.
parse
(
time_start
)
/
1000
;
}
}
if
(
time_end
){
if
(
time_end
){
time_end
=
Date
.
parse
(
time_end
)
/
1000
+
(
24
*
60
*
60
-
1
);
time_end
=
Date
.
parse
(
time_end
)
/
1000
+
(
24
*
60
*
60
-
1
);
}
}
var
datax
=
{
var
datax
=
{
order_type
:
$
(
'#order_type'
).
data
(
'default'
),
order_type
:
$
(
'#order_type'
).
data
(
'default'
),
order_contain
:
specialStr
(
order_contain
),
order_contain
:
specialStr
(
order_contain
),
time_start
:
time_start
,
time_start
:
time_start
,
time_end
:
time_end
,
time_end
:
time_end
,
order_pay_type
:
$
(
'#order_pay_type'
).
val
()
?
$
(
'#order_pay_type'
).
val
()
:
''
,
order_pay_type
:
$
(
'#order_pay_type'
).
val
()
?
$
(
'#order_pay_type'
).
val
()
:
''
,
order_status
:
$
(
'#order_status'
).
val
()
?
$
(
'#order_status'
).
val
()
:
''
,
order_status
:
$
(
'#order_status'
).
val
()
?
$
(
'#order_status'
).
val
()
:
''
,
sale_type
:
$
(
'#sale_type'
).
val
()
?
$
(
'#sale_type'
).
val
()
:
''
,
sale_type
:
$
(
'#sale_type'
).
val
()
?
$
(
'#sale_type'
).
val
()
:
''
,
shipping_name
:
$
(
'#shipping_name'
).
val
()
?
$
(
'#shipping_name'
).
val
()
:
''
,
shipping_name
:
$
(
'#shipping_name'
).
val
()
?
$
(
'#shipping_name'
).
val
()
:
''
,
order_send
:
$
(
'#order_send'
).
val
(),
order_send
:
$
(
'#order_send'
).
val
(),
order_source_pf
:
$
(
'#order_source_pf'
).
val
()
?
$
(
'#order_source_pf'
).
val
()
:
''
,
order_source_pf
:
$
(
'#order_source_pf'
).
val
()
?
$
(
'#order_source_pf'
).
val
()
:
''
,
order_invoice_status
:
$
(
'#order_invoice_status'
).
val
()
?
$
(
'#order_invoice_status'
).
val
()
:
''
,
order_invoice_status
:
$
(
'#order_invoice_status'
).
val
()
?
$
(
'#order_invoice_status'
).
val
()
:
''
,
order_source_adtag
:
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_source_adtag
:
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_source_ptag
:
$
(
'input[name="order_source_ptag"]'
).
val
(),
order_source_ptag
:
$
(
'input[name="order_source_ptag"]'
).
val
(),
erp_order_id
:
$
(
'#erp_order_id'
).
val
()
?
$
(
'#erp_order_id'
).
val
()
:
''
,
erp_order_id
:
$
(
'#erp_order_id'
).
val
()
?
$
(
'#erp_order_id'
).
val
()
:
''
,
test_order
:
$
(
'input[name=test_order]'
).
is
(
':checked'
)
?
1
:
0
,
test_order
:
$
(
'input[name=test_order]'
).
is
(
':checked'
)
?
1
:
0
,
is_new
:
$
(
'#is_new'
).
val
()
?
$
(
'#is_new'
).
val
()
:
''
,
is_new
:
$
(
'#is_new'
).
val
()
?
$
(
'#is_new'
).
val
()
:
''
,
order_payment_mode
:
$
(
'#order_payment_mode'
).
val
()
?
$
(
'#order_payment_mode'
).
val
()
:
''
,
order_payment_mode
:
$
(
'#order_payment_mode'
).
val
()
?
$
(
'#order_payment_mode'
).
val
()
:
''
,
is_new_order
:
$
(
'#is_new_order'
).
val
()
?
$
(
'#is_new_order'
).
val
()
:
''
,
is_new_order
:
$
(
'#is_new_order'
).
val
()
?
$
(
'#is_new_order'
).
val
()
:
''
,
business_type
:
$
(
'#business_type'
).
val
()
?
$
(
'#business_type'
).
val
()
:
''
,
business_type
:
$
(
'#business_type'
).
val
()
?
$
(
'#business_type'
).
val
()
:
''
,
pid
:
pid
,
pid
:
pid
,
};
is_manager
:
is_manager
,
};
$
.
ajax
({
type
:
"POST"
,
$
.
ajax
({
url
:
'/ajax/orderOtherInfoLoading'
,
type
:
"POST"
,
data
:
datax
,
url
:
'/ajax/orderOtherInfoLoading'
,
dataType
:
"json"
,
data
:
datax
,
success
:
function
(
resp
){
dataType
:
"json"
,
if
(
resp
.
err_code
!=
0
)
{
success
:
function
(
resp
){
layer
.
msg
(
resp
.
err_msg
);
if
(
resp
.
err_code
!=
0
)
{
return
false
;
layer
.
msg
(
resp
.
err_msg
);
}
return
false
;
var
data
=
resp
.
data
;
}
var
html
=
''
;
var
data
=
resp
.
data
;
var
html
=
''
;
if
(
pid
!=
3
)
{
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="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>'
;
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
)
{
if
(
pid
!=
3
&&
data
.
noreason_count
)
{
html
+=
'<span class="error">共有'
+
data
.
noreason_count
+
'单已取消订单未填写取消原因</span>'
;
html
+=
'<span class="error">共有'
+
data
.
noreason_count
+
'单已取消订单未填写取消原因</span>'
;
}
}
$
(
'.show-other-info'
).
append
(
html
);
$
(
'.show-other-info'
).
append
(
html
);
},
$
(
'.order-other-info'
).
hide
();
}
)
}
,
}
}
)
}
}
// 填写取消原因
// 填写取消原因
...
...
resources/views/erpOrder/content.blade.php
View file @
ad400db2
...
@@ -286,15 +286,16 @@
...
@@ -286,15 +286,16 @@
@endif
@endif
</table>
</table>
</div>
</div>
<div
class=
"row-fluid pagination"
>
@if ($username == 'admin@ichunt.com')
<div
class=
"row-fluid pagination"
>
<span
class=
"show-list-info"
>
<div
class=
"show-list-info"
>
共{{$count ? $count : 0}}单
<span>
共{{$count ? $count : 0}}单
</span>
<span
class=
"show-other-info"
></span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a
class=
"btn btn-xs btn-info order-other-info"
style=
"margin-top: -3px;"
>
查看其它信息
</a>
@endif
</div>
<span
class=
"show-other-info"
></span>
</span>
@endif
<?php
echo
$page
;
?>
<?php
echo
$page
;
?>
</div>
</div>
</div>
</div>
...
@@ -304,7 +305,7 @@
...
@@ -304,7 +305,7 @@
var
order_status
=
"{{$condition['order_status']}}"
;
var
order_status
=
"{{$condition['order_status']}}"
;
var
order_source
=
"{{$condition['order_source_pf']}}"
;
var
order_source
=
"{{$condition['order_source_pf']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
var
username
=
"{{$usernam
e}}"
;
var
manager
=
"{{$rol
e}}"
;
$
(
".order_status"
).
selectpicker
({
$
(
".order_status"
).
selectpicker
({
actionsBox
:
true
,
//在下拉选项添加选中所有和取消选中的按钮
actionsBox
:
true
,
//在下拉选项添加选中所有和取消选中的按钮
...
...
resources/views/orderlist/content.blade.php
View file @
ad400db2
...
@@ -455,14 +455,14 @@
...
@@ -455,14 +455,14 @@
</table>
</table>
</div>
</div>
<div
class=
"row-fluid pagination"
>
<div
class=
"row-fluid pagination"
>
@if ($username == 'admin@ichunt.com')
<div
class=
"show-list-info"
>
<span
class=
"show-list-info"
>
<span
>
共{{$count ? $count : 0}}单
</span
>
共{{$count ? $count : 0}}单
<span
class=
"show-other-info"
></span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<
span
class=
"show-other-info"
></span
>
<
a
class=
"btn btn-xs btn-info order-other-info"
style=
"margin-top: -3px;"
>
查看其它信息
</a
>
</span>
@endif
@endif
</div>
<?php
echo
$page
;
?>
<?php
echo
$page
;
?>
</div>
</div>
...
@@ -480,7 +480,7 @@
...
@@ -480,7 +480,7 @@
var
is_new
=
"{{$condition['is_new']}}"
;
var
is_new
=
"{{$condition['is_new']}}"
;
var
erp_order_id
=
"{{$condition['erp_order_id']}}"
;
var
erp_order_id
=
"{{$condition['erp_order_id']}}"
;
var
is_new_order
=
"{{$condition['is_new_order']}}"
;
var
is_new_order
=
"{{$condition['is_new_order']}}"
;
var
username
=
"{{$usernam
e}}"
;
var
manager
=
"{{$rol
e}}"
;
if
(
test_order
)
{
if
(
test_order
)
{
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
...
...
resources/views/selfOrder/content.blade.php
View file @
ad400db2
...
@@ -348,14 +348,15 @@
...
@@ -348,14 +348,15 @@
@endif
@endif
</table>
</table>
</div>
</div>
<div
class=
"row-fluid pagination"
>
@if ($username == 'admin@ichunt.com')
<span
class=
"show-list-info"
>
共{{$count ? $count : 0}}单
<span
class=
"show-other-info"
></span>
<div
class=
"row-fluid pagination"
>
</span>
<div
class=
"show-list-info"
>
@endif
<span>
共{{$count ? $count : 0}}单
</span>
<span
class=
"show-other-info"
></span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a
class=
"btn btn-xs btn-info order-other-info"
style=
"margin-top: -3px;"
>
查看其它信息
</a>
@endif
</div>
<?php
echo
$page
;
?>
<?php
echo
$page
;
?>
</div>
</div>
...
@@ -373,7 +374,7 @@
...
@@ -373,7 +374,7 @@
var
order_send
=
"{{$condition['order_send']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
var
order_pay_type
=
"{{$condition['order_pay_type']}}"
;
var
order_pay_type
=
"{{$condition['order_pay_type']}}"
;
var
is_new
=
"{{$condition['is_new']}}"
;
var
is_new
=
"{{$condition['is_new']}}"
;
var
username
=
"{{$usernam
e}}"
;
var
manager
=
"{{$rol
e}}"
;
if
(
test_order
)
{
if
(
test_order
)
{
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
...
...
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