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
4122ed9d
authored
Apr 04, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/zhujilai/Order
into zjl_order_msg_20180402
parents
43640a5b
39661fc2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
69 additions
and
37 deletions
app/Http/Controllers/OrderController.php
app/Http/Function.php
app/Http/routes.php
public/js/order.js
resources/views/detail/changeOrder.blade.php
resources/views/detail/content.blade.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/OrderController.php
View file @
4122ed9d
This diff is collapsed.
Click to expand it.
app/Http/Function.php
View file @
4122ed9d
...
...
@@ -2,6 +2,7 @@
/** 公用函数 */
//导出数据
//导出数据
function
exportExcel
(
$expTitle
,
$expCellName
,
$expTableData
)
{
$xlsTitle
=
iconv
(
'utf-8'
,
'gb2312'
,
$expTitle
);
//文件名称
...
...
@@ -13,6 +14,13 @@
$objPHPExcel
=
new
PHPExcel
();
include_once
(
__DIR__
.
"/../../vendor/PHPExcel/PHPExcel/IOFactory.php"
);
set_time_limit
(
0
);
//不对php(主要是写数据)执行时间做限制
ini_set
(
"memory_limit"
,
"1024M"
);
//设置内存(防爆内存)
$cacheMethod
=
\PHPExcel_CachedObjectStorageFactory
::
cache_in_memory_serialized
;
//设置缓存策略(减少内存占用)
//判断缓存策略是否可用
if
(
!
\PHPExcel_Settings
::
setCacheStorageMethod
(
$cacheMethod
))
{
die
(
$cacheMethod
.
" 缓存方法不可用"
.
EOL
);
}
$cellName
=
array
(
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
,
'AA'
,
'AB'
,
'AC'
,
'AD'
,
'AE'
,
'AF'
,
'AG'
,
'AH'
,
'AI'
,
'AJ'
,
'AK'
,
'AL'
,
'AM'
,
'AN'
,
'AO'
,
'AP'
,
'AQ'
,
'AR'
,
'AS'
,
'AT'
,
'AU'
,
'AV'
,
'AW'
,
'AX'
,
'AY'
,
'AZ'
);
//显示导出名称和导出时间
...
...
@@ -29,9 +37,11 @@
}
header
(
'pragma:public'
);
header
(
'Content-type:application/vnd.ms-excel;charset=utf-8;name="'
.
$xlsTitle
.
'.xls"'
);
header
(
"Content-Disposition:attachment;filename=
$fileName
.xls"
);
//attachment新窗口打印inline本窗口打印
$objWriter
=
PHPExcel_IOFactory
::
createWriter
(
$objPHPExcel
,
'Excel5'
);
header
(
'Content-type:application/vnd.ms-excel;charset=utf-8;name="'
.
$xlsTitle
.
'.csv"'
);
header
(
"Content-Disposition:attachment;filename=
$fileName
.csv"
);
//attachment新窗口打印inline本窗口打印
//输出bom
print
(
chr
(
0xEF
)
.
chr
(
0xBB
)
.
chr
(
0xBF
));
$objWriter
=
PHPExcel_IOFactory
::
createWriter
(
$objPHPExcel
,
'CSV'
);
$objWriter
->
save
(
'php://output'
);
exit
;
}
...
...
app/Http/routes.php
View file @
4122ed9d
...
...
@@ -44,6 +44,7 @@ Route::group(['middleware' => 'web'], function () {
Route
::
match
([
'get'
,
'post'
],
'/applyAdjust/{id}'
,
'OrderController@applyAdjust'
);
Route
::
match
([
'get'
,
'post'
],
'/send/{id}'
,
'OrderController@send'
);
Route
::
post
(
'/ajaxCheck'
,
'OrderController@ajaxCheck'
);
Route
::
match
([
'get'
,
'post'
],
'/adjustPrice/{id}'
,
'OrderController@adjustPrice'
);
Route
::
match
([
'get'
,
'post'
],
'/cancelPay/{id}'
,
'OrderController@cancelPay'
);
Route
::
match
([
'get'
,
'post'
],
'/checkPay/{id}'
,
'OrderController@checkPay'
);
Route
::
match
([
'get'
,
'post'
],
'/invShipping/{id}'
,
'OrderController@invShipping'
);
...
...
public/js/order.js
View file @
4122ed9d
...
...
@@ -27,6 +27,7 @@
order_source_pf
=
$
(
'#order_source_pf'
).
data
(
'default'
),
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
test_order
=
$
(
'input[name=test_order]'
),
order_erp_syn
=
$
(
'#order_erp_syn'
).
data
(
'default'
),
listUrl
=
'/list'
;
listUrl
+=
'?order_type='
+
order_type
;
...
...
@@ -75,11 +76,15 @@
listUrl
+=
'&order_source_adtag='
+
order_source_adtag
;
}
if
(
order_erp_syn
)
{
listUrl
+=
'&order_erp_syn='
+
order_erp_syn
;
}
if
(
test_order
.
is
(
':checked'
))
{
listUrl
+=
'&test_order='
+
1
;
}
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_erp_syn
&&
!
test_order
.
is
(
':checked'
))
{
listUrl
=
'/list'
;
}
...
...
@@ -99,15 +104,16 @@
order_send
=
$
(
'#order_send'
).
data
(
'default'
),
order_source_pf
=
$
(
'#order_source_pf'
).
data
(
'default'
),
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_erp_syn
=
$
(
'#order_erp_syn'
).
data
(
'default'
),
test_order
=
$
(
'input[name=test_order]'
);
if
(
test_order
.
length
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_erp_syn
&&
!
test_order
.
is
(
':checked'
))
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
else
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_erp_syn
)
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
...
...
@@ -127,7 +133,7 @@
test_order
=
''
;
}
location
.
href
=
'/export?order_type='
+
order_type
+
'&order_contain='
+
order_contain
+
'&time_start='
+
time_start
+
'&time_end='
+
time_end
+
'&order_pay_type='
+
order_pay_type
+
'&order_status='
+
order_status
+
'&shipping_name='
+
shipping_name
+
'&order_send='
+
order_send
+
'&order_source_pf='
+
order_source_pf
+
'&order_source_adtag='
+
order_source_adtag
+
'&test_order='
+
test_order
;
location
.
href
=
'/export?order_type='
+
order_type
+
'&order_contain='
+
order_contain
+
'&time_start='
+
time_start
+
'&time_end='
+
time_end
+
'&order_pay_type='
+
order_pay_type
+
'&order_status='
+
order_status
+
'&shipping_name='
+
shipping_name
+
'&order_send='
+
order_send
+
'&order_source_pf='
+
order_source_pf
+
'&order_source_adtag='
+
order_source_adtag
+
'&
order_erp_syn='
+
order_erp_syn
+
'&
test_order='
+
test_order
;
})
// 选择查看测试订单
...
...
resources/views/detail/changeOrder.blade.php
View file @
4122ed9d
...
...
@@ -176,6 +176,10 @@
@if ($order_info['status'] == 2)
<p>
交易状态:
审核通过,请联系客户及时付款!
</p>
@if ($order_info['adjust_count']
<
2
)
<
a
class=
"btn btn-default"
href=
"{{URL('adjustPrice', ['order_id'=>$order_info['order_id']])}}"
>
再次调价
</a><span
class=
"warn-tip"
>
每笔订单仅有一次“再次调价”机会
</span>
@endif
@endif
@if ($order_info['status'] == -1)
...
...
resources/views/detail/content.blade.php
View file @
4122ed9d
...
...
@@ -409,11 +409,6 @@
@include('detail.invShipping')
@endif
<if
condition=
"ACTION_NAME eq 'cancel'"
>
<!--取消订单-->
<include
file=
"cancel"
/>
</if>
@if ($action_name == 'cancelPay')
<!--取消订单 (支付前)-->
@include('detail.cancelPay')
...
...
@@ -428,16 +423,6 @@
<!--审核-->
@include('detail.check')
@endif
<if
condition=
"ACTION_NAME eq 'account'"
>
<!--账期设置-->
<include
file=
"account"
/>
</if>
<if
condition=
"ACTION_NAME eq 'recovery'"
>
<!--账期设置-->
<include
file=
"recovery"
/>
</if>
<!-- 查看ERP订单详情时去掉操作按钮 -->
@if (!isset($_REQUEST['tags']))
...
...
@@ -449,9 +434,9 @@
@if (($role == 1 || $role ==2)
&&
$order_info['status'] == 1
&&
in_array('check_order', $userPerms))
<a
class=
"btn btn-success"
href=
"{{URL('change', ['order_id'=>$order_info['order_id']])}}"
class=
"btn btn-default"
>
人工审单
</a>
@endif
<!-- <a href="{:U('account', 'order_id='.$order_info['order_id'])}" class="btn btn-default">账期设置</a> -->
@if (($role == 1 || $role ==2)
&&
in_array($order_info['status'], array(1, 2))
&&
in_array('check_order
', $userPerms))
<!-- <a href="{{URL('
check', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">审单
</a> -->
@if (($role == 1 || $role ==2)
&&
$order_info['status'] == 2
&&
in_array('adjust_price
', $userPerms))
<!-- <a href="{{URL('
adjustPrice', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">调价
</a> -->
@endif
@if ($order_info['status'] == 2
&&
in_array('cancel_order', $userPerms))
...
...
resources/views/orderlist/content.blade.php
View file @
4122ed9d
...
...
@@ -129,6 +129,19 @@
<input
type=
"text"
name=
"order_source_adtag"
value=
"{{$condition['order_source_adtag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
<dl>
<dt>
同步状态:
</dt>
<dd>
<div
class=
"droplist"
data-default=
"{{$condition['order_erp_syn']}}"
id=
"order_erp_syn"
name=
"order_erp_syn"
>
<ul
class=
"dropdown-menu"
>
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
"1"
>
已同步
</li>
<li
data-val=
"-1"
>
不同步
</li>
<li
data-val=
"-2"
>
同步失败
</li>
</ul>
</div>
</dd>
</dl>
@if (in_array('check_test_order', $userPerms))
<dl>
<dt></dt>
...
...
@@ -163,7 +176,7 @@
<th
class=
"pl30"
>
支付方式
</th>
<th
class=
"pl30"
>
推送业务员
</th>
<th
class=
"pl30"
>
发货状态
</th>
<th
class=
"pl30"
>
配送方式
</th>
<th
class=
"pl30"
>
同步状态
</th>
<th
class=
"pl30"
>
下单时间
</th>
<th
class=
"pl30"
>
操作
</th>
</tr>
...
...
@@ -236,13 +249,16 @@
?>
</td>
<td
class=
"show-list"
>
@if ($v['order_shipping_type'] == '1')
快递配送
@else
自提
@endif
<?php
switch
(
$v
[
'erp_syn'
])
{
case
-
2
:
echo
'同步失败'
;
break
;
case
-
1
:
echo
'不同步'
;
break
;
case
1
:
echo
'已同步'
;
break
;
default
:
echo
'未配送'
;
break
;
}
?>
</td>
<td
class=
"show-list"
>
{{date('Y-m-d', $v['create_time'])}}
</td>
<td
class=
"show-list"
>
{{
$username != 'vpadmin@ichunt.com' ? date('Y-m-d h:i:s', $v['create_time']) :
date('Y-m-d', $v['create_time'])}}
</td>
<td>
<div
class=
"btn-group btn-group-xs"
>
<a
class=
"btn btn-primary"
href=
"{{URL('details', ['order_id'=>$v['order_id']])}}"
>
详情
</a>
...
...
@@ -280,14 +296,14 @@
<?php
if
(
$v
[
'order_pay_time'
]
!=
0
)
{
if
(
$username
!=
'vpadmin@ichunt.com'
)
{
echo
date
(
'Y-m-d'
,
$v
[
'order_pay_time'
]);
echo
date
(
'Y-m-d
h:i:s
'
,
$v
[
'order_pay_time'
]);
}
else
{
echo
date
(
'Y-m-d'
,
$v
[
'order_pay_time'
]);
}
}
else
{
if
(
$v
[
'advance_pay_time'
]
!=
0
)
{
if
(
$username
!=
'vpadmin@ichunt.com'
)
{
echo
date
(
'Y-m-d'
,
$v
[
'advance_pay_time'
]);
echo
date
(
'Y-m-d
h:i:s
'
,
$v
[
'advance_pay_time'
]);
}
else
{
echo
date
(
'Y-m-d'
,
$v
[
'advance_pay_time'
]);
}
...
...
@@ -316,13 +332,23 @@
</td>
</tr>
<tr>
<td
class=
"table-list-title"
>
Adtag或其它
</td>
<td
class=
"table-list-title"
>
配送方式
</td>
<td
class=
"table-list-content"
>
<p
class=
"show-title"
title=
"{{$v['order_source']}}"
>
{{$v['order_source']}}
</p>
</td>
@if ($v['order_shipping_type'] == '1')
快递配送
@else
自提
@endif
</td>
<td
class=
"table-list-title"
>
优惠金额
</td>
<td
class=
"table-list-content"
>
<?php
echo
App\Http\Controllers\getCoupon
(
$v
[
'order_id'
]);
?>
</td>
</tr>
<tr>
<td
class=
"table-list-title"
>
Adtag或其它
</td>
<td
class=
"table-list-content"
colspan=
"3"
>
<p
class=
"show-title"
title=
"{{$v['order_source']}}"
>
{{$v['order_source']}}
</p>
</td>
</tr>
</table>
</td>
</tr>
...
...
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