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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
57 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)
...
@@ -86,6 +86,55 @@ function getCoupon($order_id)
return
null
;
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
Class
OrderController
extends
Controller
{
{
// 首页
// 首页
...
@@ -211,7 +260,7 @@ Class OrderController extends Controller
...
@@ -211,7 +260,7 @@ Class OrderController extends Controller
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'map'
]
=
$map
;
$data
[
'map'
]
=
$map
;
// dd(curlApi($url, $data));
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
// 分页
// 分页
...
@@ -222,7 +271,7 @@ Class OrderController extends Controller
...
@@ -222,7 +271,7 @@ Class OrderController extends Controller
$info
[
'condition'
]
=
$map
;
$info
[
'condition'
]
=
$map
;
$info
[
'sale_list'
]
=
$sale_list
;
$info
[
'sale_list'
]
=
$sale_list
;
$info
[
'list'
]
=
$response
[
'data'
][
'data'
];
$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
[
'count'
]
=
$response
[
'data'
][
'count'
];
$info
[
'page'
]
=
$show
;
$info
[
'page'
]
=
$show
;
...
@@ -265,7 +314,7 @@ Class OrderController extends Controller
...
@@ -265,7 +314,7 @@ Class OrderController extends Controller
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'p'
]
=
$request
->
input
(
'p'
,
1
);
// 当前页码
$data
[
'map'
]
=
$map
;
$data
[
'map'
]
=
$map
;
// dd(curlApi($url, $data));
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
// 分页
// 分页
...
@@ -276,7 +325,7 @@ Class OrderController extends Controller
...
@@ -276,7 +325,7 @@ Class OrderController extends Controller
$info
[
'condition'
]
=
$map
;
$info
[
'condition'
]
=
$map
;
$info
[
'sale_list'
]
=
$sale_list
;
$info
[
'sale_list'
]
=
$sale_list
;
$info
[
'list'
]
=
$response
[
'data'
][
'data'
];
$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
[
'count'
]
=
$response
[
'data'
][
'count'
];
$info
[
'page'
]
=
$show
;
$info
[
'page'
]
=
$show
;
...
...
resources/views/erpOrder/content.blade.php
View file @
5c7ad20f
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
}
}
?>
?>
</td>
</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"
>
<td
class=
"show-list"
>
<?php
<?php
...
@@ -153,30 +153,18 @@
...
@@ -153,30 +153,18 @@
</td>
</td>
<td
class=
"show-list"
class=
"show-list"
>
<td
class=
"show-list"
class=
"show-list"
>
<?php
<?php
if
(
!
empty
(
$v
[
'shipping_type'
]))
{
$status
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
$pos
=
strpos
(
$v
[
'shipping_type'
],
'1'
);
// 订单物流1
if
(
$pos
!==
false
)
{
if
(
$status
)
{
$exp
=
explode
(
','
,
$v
[
'shipping_status'
]);
switch
(
$status
)
{
case
1
:
echo
'已配送'
;
break
;
if
(
count
(
$exp
)
==
1
)
{
case
2
:
echo
'已签收'
;
break
;
$status
=
$exp
[
0
];
default
:
echo
'未配送'
;
break
;
}
else
{
}
$status
=
$exp
[
$pos
];
}
switch
(
$status
)
{
case
1
:
echo
'已配送'
;
break
;
case
2
:
echo
'已签收'
;
break
;
default
:
echo
'未配送'
;
break
;
}
}
else
{
echo
''
;
}
}
else
{
}
else
{
echo
''
;
echo
''
;
}
}
?>
?>
</td>
</td>
<td
class=
"show-list"
>
<td
class=
"show-list"
>
@if ($v['order_shipping_type'] == '1')
@if ($v['order_shipping_type'] == '1')
...
@@ -208,7 +196,9 @@
...
@@ -208,7 +196,9 @@
<td
class=
"table-list-title"
>
订单编号
</td>
<td
class=
"table-list-title"
>
订单编号
</td>
<td
class=
"table-list-content"
>
{{$v['order_sn']}}
</td>
<td
class=
"table-list-content"
>
{{$v['order_sn']}}
</td>
<td
class=
"table-list-title"
>
公司名称
</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>
</tr>
@if ($v['order_pay_type'] == 2)
@if ($v['order_pay_type'] == 2)
<tr>
<tr>
...
@@ -263,10 +253,7 @@
...
@@ -263,10 +253,7 @@
</div>
</div>
<div
class=
"row-fluid pagination"
>
<div
class=
"row-fluid pagination"
>
<span>
<span>
共{{$count ? $count : 0}}单,
共{{$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}}
</span>
</span>
<?php
echo
$page
;
?>
<?php
echo
$page
;
?>
...
...
resources/views/orderlist/content.blade.php
View file @
5c7ad20f
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
}
}
?>
?>
</td>
</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"
>
<td
class=
"show-list"
>
<?php
<?php
...
@@ -222,29 +222,17 @@
...
@@ -222,29 +222,17 @@
</td>
</td>
<td
class=
"show-list"
class=
"show-list"
>
<td
class=
"show-list"
class=
"show-list"
>
<?php
<?php
if
(
!
empty
(
$v
[
'shipping_type'
]))
{
$status
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
$pos
=
strpos
(
$v
[
'shipping_type'
],
'1'
);
// 订单物流1
if
(
$pos
!==
false
)
{
if
(
$status
)
{
$exp
=
explode
(
','
,
$v
[
'shipping_status'
]);
switch
(
$status
)
{
case
1
:
echo
'已配送'
;
break
;
if
(
count
(
$exp
)
==
1
)
{
case
2
:
echo
'已签收'
;
break
;
$status
=
$exp
[
0
];
default
:
echo
'未配送'
;
break
;
}
else
{
}
$status
=
$exp
[
$pos
];
}
switch
(
$status
)
{
case
1
:
echo
'已配送'
;
break
;
case
2
:
echo
'已签收'
;
break
;
default
:
echo
'未配送'
;
break
;
}
}
else
{
echo
''
;
}
}
else
{
}
else
{
echo
''
;
echo
''
;
}
}
?>
?>
</td>
</td>
<td
class=
"show-list"
>
<td
class=
"show-list"
>
...
@@ -276,7 +264,7 @@
...
@@ -276,7 +264,7 @@
<td
class=
"table-list-content"
>
{{$v['order_sn']}}
</td>
<td
class=
"table-list-content"
>
{{$v['order_sn']}}
</td>
<td
class=
"table-list-title"
>
公司名称
</td>
<td
class=
"table-list-title"
>
公司名称
</td>
<td
class=
"table-list-content"
>
<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>
</td>
</tr>
</tr>
@if ($v['order_pay_type'] == 2)
@if ($v['order_pay_type'] == 2)
...
@@ -332,10 +320,7 @@
...
@@ -332,10 +320,7 @@
</div>
</div>
<div
class=
"row-fluid pagination"
>
<div
class=
"row-fluid pagination"
>
<span>
<span>
共{{$count ? $count : 0}}单,
共{{$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}}
</span>
</span>
<?php
echo
$page
;
?>
<?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