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
2a37fd93
authored
Dec 20, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_iteration_20181127' into development
parents
1221eba1
6c5c6b47
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
46 deletions
app/Model/OrderModel.php
public/js/order.js
resources/views/selfOrder.blade.php
resources/views/selfOrder/content.blade.php
resources/views/selfOrder/css.blade.php
resources/views/selfOrder/js.blade.php
app/Model/OrderModel.php
View file @
2a37fd93
...
...
@@ -248,11 +248,15 @@ class OrderModel extends Model
$cellData
=
$this
->
exportList
(
$list
);
// 标题
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'是否为新订单'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
$sale_name
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'订单类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
];
if
(
$map
[
'order_goods_type'
]
==
1
)
{
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'是否为新订单'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
$sale_name
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'订单类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
];
}
else
{
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
$sale_name
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'订单类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
];
}
array_unshift
(
$cellData
,
$headerCell
);
$fileName
=
'
订单导出'
.
date
(
'_YmdHis'
);
$fileName
=
$map
[
'order_goods_type'
]
==
1
?
'联营订单导出'
.
date
(
'_YmdHis'
)
:
'自营
订单导出'
.
date
(
'_YmdHis'
);
Excel
::
create
(
$fileName
,
function
(
$excel
)
use
(
$cellData
){
$excel
->
sheet
(
'订单导出'
,
function
(
$sheet
)
use
(
$cellData
){
...
...
@@ -332,7 +336,11 @@ class OrderModel extends Model
$tmp
[
$i
][
'order_sn'
]
=
"
\t
"
.
$order
[
$i
][
'order_sn'
]
.
"
\t
"
;
$tmp
[
$i
][
'user_account'
]
=
$order
[
$i
][
'mobile'
]
?
$order
[
$i
][
'mobile'
]
:
$order
[
$i
][
'email'
];
// $tmp[$i]['is_new'] = $order[$i]['is_new'] == 1 ? '是' : '否'; // 是否为新用户
$tmp
[
$i
][
'is_new_order'
]
=
$order
[
$i
][
'is_new_order'
]
==
1
?
'是'
:
'否'
;
// 是否为新订单
if
(
$order
[
$i
][
'order_goods_type'
]
==
1
)
{
$tmp
[
$i
][
'is_new_order'
]
=
$order
[
$i
][
'is_new_order'
]
==
1
?
'是'
:
'否'
;
// 是否为新订单
}
$tmp
[
$i
][
'consignee'
]
=
isset
(
$order
[
$i
][
'consignee'
])
?
$order
[
$i
][
'consignee'
]
:
''
;
$tmp
[
$i
][
'create_time_date'
]
=
date
(
'Y-m-d'
,
$order
[
$i
][
'create_time'
]);
$tmp
[
$i
][
'create_time_sec'
]
=
date
(
'H:i:s'
,
$order
[
$i
][
'create_time'
]);
...
...
public/js/order.js
View file @
2a37fd93
...
...
@@ -67,7 +67,7 @@
}
// 搜索、导出条件
function
orderListCommon
(
url
)
{
function
orderListCommon
(
url
,
type
)
{
// type-订单类型
var
order_type
=
$
(
'#order_type'
).
data
(
'default'
),
order_contain
=
$
(
'input[name=order_contain]'
).
val
(),
time_start
=
$
(
'input[name="time_start"]'
).
val
(),
...
...
@@ -75,9 +75,11 @@
// order_type_a = $('#order_type_a').data('default'),
order_pay_type
=
$
(
'#order_pay_type'
).
val
()
?
$
(
'#order_pay_type'
).
val
()
:
''
,
order_status
=
$
(
'#order_status'
).
val
()
?
$
(
'#order_status'
).
val
()
:
''
,
sale_type
=
$
(
'#sale_type'
).
val
()
?
$
(
'#sale_type'
).
val
()
:
''
,
shipping_name
=
$
(
'#shipping_name'
).
val
()
?
$
(
'#shipping_name'
).
val
()
:
''
,
order_send
=
$
(
'#order_send'
).
val
(),
order_source_pf
=
$
(
'#order_source_pf'
).
val
()
?
$
(
'#order_source_pf'
).
val
()
:
''
,
order_invoice_status
=
$
(
'#order_invoice_status'
).
val
()
?
$
(
'#order_invoice_status'
).
val
()
:
''
,
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_source_ptag
=
$
(
'input[name="order_source_ptag"]'
).
val
(),
erp_order_id
=
$
(
'#erp_order_id'
).
val
()
?
$
(
'#erp_order_id'
).
val
()
:
''
,
...
...
@@ -87,15 +89,29 @@
is_new_order
=
$
(
'#is_new_order'
).
val
()
?
$
(
'#is_new_order'
).
val
()
:
''
;
if
(
url
==
'/export'
)
{
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
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
is_new
&&
!
is_new_order
&&
!
order_payment_mode
&&
!
test_order
.
is
(
':checked'
))
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
if
(
type
==
1
)
{
// 联营
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
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
is_new
&&
!
is_new_order
&&
!
order_payment_mode
&&
!
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
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
is_new
&&
!
is_new_order
&&
!
order_payment_mode
)
{
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
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
is_new
&&
!
is_new_order
&&
!
order_payment_mode
)
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
else
{
// 自营
if
(
test_order
.
length
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
&&
!
test_order
.
is
(
':checked'
))
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
else
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
)
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
}
}
...
...
@@ -132,6 +148,10 @@
listUrl
+=
'&order_status='
+
order_status
;
}
if
(
sale_type
)
{
listUrl
+=
'&sale_type='
+
sale_type
;
}
if
(
shipping_name
)
{
listUrl
+=
'&shipping_name='
+
shipping_name
;
}
...
...
@@ -144,6 +164,10 @@
listUrl
+=
'&order_source_pf='
+
order_source_pf
;
}
if
(
order_invoice_status
)
{
listUrl
+=
'&order_invoice_status='
+
order_invoice_status
;
}
if
(
order_source_adtag
)
{
listUrl
+=
'&order_source_adtag='
+
order_source_adtag
;
}
...
...
@@ -172,24 +196,31 @@
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
&&
!
order_source_ptag
&&
!
erp_order_id
&&
(
is_new
===
''
)
&&
!
is_new_order
&&
!
order_payment_mode
&&
!
test_order
.
is
(
':checked'
))
{
listUrl
=
'/list'
;
}
if
(
url
==
'/export'
)
{
listUrl
+=
'&order_goods_type='
+
1
;
listUrl
+=
'&order_goods_type='
+
type
;
}
location
.
href
=
listUrl
;
}
// 联营搜索
$
(
'.searchOrder'
).
click
(
function
(){
orderListCommon
(
'/list'
);
orderListCommon
(
'/list'
,
1
);
})
// 导出订单
//
联营
导出订单
$
(
'.exportExcel'
).
click
(
function
()
{
orderListCommon
(
'/export'
);
orderListCommon
(
'/export'
,
1
);
})
// 自营搜索
$
(
'.search_self_order'
).
click
(
function
(){
orderListCommon
(
'/self_order'
,
2
);
})
// 自营导出订单
$
(
'.self_export'
).
click
(
function
()
{
orderListCommon
(
'/export'
,
2
);
})
// 选择查看测试订单
...
...
resources/views/selfOrder.blade.php
View file @
2a37fd93
...
...
@@ -7,8 +7,8 @@
<title>
订单管理后台 | 订单列表
</title>
<script>
document
.
domain
=
"{{ Config::get('website.domain') }}"
;
</script>
@include('
selfOrder
.css')
@include('
selfOrder
.js')
@include('
orderlist
.css')
@include('
orderlist
.js')
</head>
<body
class=
""
>
...
...
resources/views/selfOrder/content.blade.php
View file @
2a37fd93
...
...
@@ -390,6 +390,5 @@
$
(
'.order_pay_type'
).
selectpicker
(
'val'
,
order_pay_type
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.is_new'
).
selectpicker
(
'val'
,
is_new
.
split
(
','
)).
trigger
(
"change"
);
$
.
lie
.
self
.
index
();
$
.
lie
.
order
.
cancelorder
();
$
.
lie
.
order
.
index
();
</script>
\ No newline at end of file
resources/views/selfOrder/css.blade.php
deleted
100644 → 0
View file @
1221eba1
<link
href=
"/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"/css/bootstrap-select.min.css"
rel=
"stylesheet"
>
<link
href=
"/font-awesome/css/font-awesome.css"
rel=
"stylesheet"
>
<link
href=
"/css/style.css"
rel=
"stylesheet"
>
<link
href=
"/layer/skin/layer.css"
rel=
"stylesheet"
>
<link
href=
"/css/order.css"
rel=
"stylesheet"
>
<link
href=
"/css/detail.css"
rel=
"stylesheet"
>
\ No newline at end of file
resources/views/selfOrder/js.blade.php
deleted
100644 → 0
View file @
1221eba1
<script
src=
"/js/jquery-2.2.1.js"
></script>
<script
src=
"/js/jquery.form.js"
></script>
<script
src=
"/js/bootstrap.min.js"
></script>
<script
src=
"/js/bootstrap-select.min.js"
></script>
<script
src=
"/layer/layer.js"
></script>
<script
src=
"/js/plugins/slimscroll/jquery.slimscroll.min.js"
></script>
<script
src=
"/js/plugins/metisMenu/jquery.metisMenu.js"
></script>
<script
src=
"/js/inspinia.min.js"
></script>
<script
src=
"/js/common.js"
></script>
<script
src=
"/js/order.js"
></script>
<script
src=
"/js/self_order.js"
></script>
<script
src=
"/js/orderamount.js"
></script>
<script
src=
"/js/plugins/DatePicker/WdatePicker.js"
></script>
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