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
5c7ad20f
authored
Mar 15, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整订单列表
parent
eb70972b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
44 deletions
app/Http/Controllers/OrderController.php
resources/views/erpOrder/content.blade.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/OrderController.php
View file @
5c7ad20f
...
...
@@ -86,6 +86,55 @@ function getCoupon($order_id)
return
null
;
}
function
getPayName
(
$order_id
)
{
$payLog
=
DB
::
connection
(
'order'
)
->
table
(
'lie_pay_log'
)
->
where
([
'order_id'
=>
$order_id
])
->
select
(
'pay_name'
)
->
get
();
if
(
!
empty
(
$payLog
))
{
foreach
(
$payLog
as
$v
)
{
$payName
[]
=
$v
->
pay_name
;
}
return
implode
(
','
,
$payName
);
}
return
false
;
}
function
getShipping
(
$order_id
)
{
$shipping
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order_shipping'
)
->
where
([
'order_id'
=>
$order_id
,
'shipping_type'
=>
1
])
->
select
(
'status'
)
->
first
();
if
(
!
empty
(
$shipping
))
{
return
$shipping
->
status
;
}
return
false
;
}
function
getCompanyName
(
$user_id
)
{
$company
=
DB
::
connection
(
'order'
)
->
table
(
'lie_user_company'
)
->
where
([
'user_id'
=>
$user_id
])
->
select
(
'com_name'
)
->
first
();
if
(
!
empty
(
$company
))
{
return
$company
->
com_name
;
}
return
false
;
}
Class
OrderController
extends
Controller
{
// 首页
...
...
@@ -211,7 +260,7 @@ Class OrderController extends Controller
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'map'
]
=
$map
;
// dd(curlApi($url, $data));
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
// 分页
...
...
@@ -222,7 +271,7 @@ Class OrderController extends Controller
$info
[
'condition'
]
=
$map
;
$info
[
'sale_list'
]
=
$sale_list
;
$info
[
'list'
]
=
$response
[
'data'
][
'data'
];
$info
[
'pay_count'
]
=
$response
[
'data'
][
'pay_count'
];
//
$info['pay_count'] = $response['data']['pay_count'];
$info
[
'count'
]
=
$response
[
'data'
][
'count'
];
$info
[
'page'
]
=
$show
;
...
...
@@ -265,7 +314,7 @@ Class OrderController extends Controller
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'map'
]
=
$map
;
// dd(curlApi($url, $data));
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
// 分页
...
...
@@ -276,7 +325,7 @@ Class OrderController extends Controller
$info
[
'condition'
]
=
$map
;
$info
[
'sale_list'
]
=
$sale_list
;
$info
[
'list'
]
=
$response
[
'data'
][
'data'
];
$info
[
'pay_count'
]
=
$response
[
'data'
][
'pay_count'
];
//
$info['pay_count'] = $response['data']['pay_count'];
$info
[
'count'
]
=
$response
[
'data'
][
'count'
];
$info
[
'page'
]
=
$show
;
...
...
resources/views/erpOrder/content.blade.php
View file @
5c7ad20f
...
...
@@ -140,7 +140,7 @@
}
?>
</td>
<td
class=
"show-list"
>
{{$v['pay_name']}}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
...
...
@@ -153,18 +153,9 @@
</td>
<td
class=
"show-list"
class=
"show-list"
>
<?php
if
(
!
empty
(
$v
[
'shipping_type'
]))
{
$pos
=
strpos
(
$v
[
'shipping_type'
],
'1'
);
// 订单物流1
if
(
$pos
!==
false
)
{
$exp
=
explode
(
','
,
$v
[
'shipping_status'
]);
if
(
count
(
$exp
)
==
1
)
{
$status
=
$exp
[
0
];
}
else
{
$status
=
$exp
[
$pos
];
}
$status
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
if
(
$status
)
{
switch
(
$status
)
{
case
1
:
echo
'已配送'
;
break
;
case
2
:
echo
'已签收'
;
break
;
...
...
@@ -173,9 +164,6 @@
}
else
{
echo
''
;
}
}
else
{
echo
''
;
}
?>
</td>
<td
class=
"show-list"
>
...
...
@@ -208,7 +196,9 @@
<td
class=
"table-list-title"
>
订单编号
</td>
<td
class=
"table-list-content"
>
{{$v['order_sn']}}
</td>
<td
class=
"table-list-title"
>
公司名称
</td>
<td
class=
"table-list-content"
>
{{$v['com_name']}}
</td>
<td
class=
"table-list-content"
>
<p
class=
"show-title"
title=
"{{App\Http\Controllers\getCompanyName($v['user_id'])}}"
>
{{App\Http\Controllers\getCompanyName($v['user_id'])}}
</p>
</td>
</tr>
@if ($v['order_pay_type'] == 2)
<tr>
...
...
@@ -263,10 +253,7 @@
</div>
<div
class=
"row-fluid pagination"
>
<span>
共{{$count ? $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}}
共{{$count ? $count : 0}}单
</span>
<?php
echo
$page
;
?>
...
...
resources/views/orderlist/content.blade.php
View file @
5c7ad20f
...
...
@@ -209,7 +209,7 @@
}
?>
</td>
<td
class=
"show-list"
>
{{$v['pay_name']}}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
...
...
@@ -222,18 +222,9 @@
</td>
<td
class=
"show-list"
class=
"show-list"
>
<?php
if
(
!
empty
(
$v
[
'shipping_type'
]))
{
$pos
=
strpos
(
$v
[
'shipping_type'
],
'1'
);
// 订单物流1
if
(
$pos
!==
false
)
{
$exp
=
explode
(
','
,
$v
[
'shipping_status'
]);
if
(
count
(
$exp
)
==
1
)
{
$status
=
$exp
[
0
];
}
else
{
$status
=
$exp
[
$pos
];
}
$status
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
if
(
$status
)
{
switch
(
$status
)
{
case
1
:
echo
'已配送'
;
break
;
case
2
:
echo
'已签收'
;
break
;
...
...
@@ -242,9 +233,6 @@
}
else
{
echo
''
;
}
}
else
{
echo
''
;
}
?>
</td>
<td
class=
"show-list"
>
...
...
@@ -276,7 +264,7 @@
<td
class=
"table-list-content"
>
{{$v['order_sn']}}
</td>
<td
class=
"table-list-title"
>
公司名称
</td>
<td
class=
"table-list-content"
>
<p
class=
"show-title"
title=
"{{
$v['com_name']}}"
>
{{$v['com_name']
}}
</p>
<p
class=
"show-title"
title=
"{{
App\Http\Controllers\getCompanyName($v['user_id'])}}"
>
{{App\Http\Controllers\getCompanyName($v['user_id'])
}}
</p>
</td>
</tr>
@if ($v['order_pay_type'] == 2)
...
...
@@ -332,10 +320,7 @@
</div>
<div
class=
"row-fluid pagination"
>
<span>
共{{$count ? $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}}
共{{$count ? $count : 0}}单
</span>
<?php
echo
$page
;
?>
...
...
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