Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
aeee2f67
ShopXO
项目概览
jcy2004x
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
aeee2f67
编写于
7月 25, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用户端订单列表优化
上级
63b5050c
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
33 addition
and
307 deletion
+33
-307
application/index/controller/Order.php
application/index/controller/Order.php
+33
-27
application/index/view/default/order/index的副本.html
application/index/view/default/order/index的副本.html
+0
-280
未找到文件。
application/index/controller/Order.php
浏览文件 @
aeee2f67
...
@@ -146,28 +146,34 @@ class Order extends Common
...
@@ -146,28 +146,34 @@ class Order extends Common
*/
*/
public
function
Comments
()
public
function
Comments
()
{
{
// 参数
$data
=
[];
$params
=
input
();
if
(
!
empty
(
$this
->
data_request
[
'id'
]))
$params
[
'user'
]
=
$this
->
user
;
{
$params
[
'user_type'
]
=
'user'
;
// 条件
// 条件
$where
=
OrderService
::
OrderListWhere
(
$params
);
$where
=
[
[
'is_delete_time'
,
'='
,
0
],
[
'user_is_delete_time'
,
'='
,
0
],
[
'id'
,
'='
,
intval
(
$this
->
data_request
[
'id'
])],
[
'user_id'
,
'='
,
$this
->
user
[
'id'
]],
];
// 获取列表
// 获取列表
$data_params
=
array
(
$data_params
=
[
'm'
=>
0
,
'm'
=>
0
,
'n'
=>
1
,
'n'
=>
1
,
'where'
=>
$where
,
'where'
=>
$where
,
);
'user_type'
=>
'user'
,
$data
=
OrderService
::
OrderList
(
$data_params
);
];
if
(
!
empty
(
$data
[
'data'
][
0
]))
$ret
=
OrderService
::
OrderList
(
$data_params
);
$data
=
(
empty
(
$ret
[
'data'
])
||
empty
(
$ret
[
'data'
][
0
]))
?
[]
:
$ret
[
'data'
][
0
];
}
if
(
!
empty
(
$data
))
{
{
$this
->
assign
(
'referer_url'
,
empty
(
$_SERVER
[
'HTTP_REFERER'
])
?
MyUrl
(
'index/order/index'
)
:
$_SERVER
[
'HTTP_REFERER'
]);
$this
->
assign
(
'referer_url'
,
empty
(
$_SERVER
[
'HTTP_REFERER'
])
?
MyUrl
(
'index/order/index'
)
:
$_SERVER
[
'HTTP_REFERER'
]);
$this
->
assign
(
'data'
,
$data
[
'data'
][
0
]
);
$this
->
assign
(
'data'
,
$data
);
// 编辑器文件存放地址
// 编辑器文件存放地址
$this
->
assign
(
'editor_path_type'
,
'order_comments-'
.
$this
->
user
[
'id'
]
.
'-'
.
$data
[
'
data'
][
0
][
'
id'
]);
$this
->
assign
(
'editor_path_type'
,
'order_comments-'
.
$this
->
user
[
'id'
]
.
'-'
.
$data
[
'id'
]);
return
$this
->
fetch
();
return
$this
->
fetch
();
}
else
{
}
else
{
$this
->
assign
(
'msg'
,
'没有相关数据'
);
$this
->
assign
(
'msg'
,
'没有相关数据'
);
...
@@ -185,9 +191,9 @@ class Order extends Common
...
@@ -185,9 +191,9 @@ class Order extends Common
*/
*/
public
function
CommentsSave
()
public
function
CommentsSave
()
{
{
if
(
input
(
'post.'
)
)
if
(
$this
->
data_post
)
{
{
$params
=
input
(
'post.'
)
;
$params
=
$this
->
data_post
;
$params
[
'user'
]
=
$this
->
user
;
$params
[
'user'
]
=
$this
->
user
;
$params
[
'business_type'
]
=
'order'
;
$params
[
'business_type'
]
=
'order'
;
return
GoodsCommentsService
::
Comments
(
$params
);
return
GoodsCommentsService
::
Comments
(
$params
);
...
@@ -266,9 +272,9 @@ class Order extends Common
...
@@ -266,9 +272,9 @@ class Order extends Common
*/
*/
public
function
Cancel
()
public
function
Cancel
()
{
{
if
(
input
(
'post.'
)
)
if
(
$this
->
data_post
)
{
{
$params
=
input
(
'post.'
)
;
$params
=
$this
->
data_post
;
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
...
@@ -289,9 +295,9 @@ class Order extends Common
...
@@ -289,9 +295,9 @@ class Order extends Common
*/
*/
public
function
Collect
()
public
function
Collect
()
{
{
if
(
input
(
'post.'
)
)
if
(
$this
->
data_post
)
{
{
$params
=
input
(
'post.'
)
;
$params
=
$this
->
data_post
;
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
...
@@ -312,9 +318,9 @@ class Order extends Common
...
@@ -312,9 +318,9 @@ class Order extends Common
*/
*/
public
function
Delete
()
public
function
Delete
()
{
{
if
(
input
(
'post.'
)
)
if
(
$this
->
data_post
)
{
{
$params
=
input
(
'post.'
)
;
$params
=
$this
->
data_post
;
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
...
@@ -336,9 +342,9 @@ class Order extends Common
...
@@ -336,9 +342,9 @@ class Order extends Common
*/
*/
public
function
PayCheck
()
public
function
PayCheck
()
{
{
if
(
input
(
'post.'
)
)
if
(
$this
->
data_post
)
{
{
$params
=
input
(
'post.'
)
;
$params
=
$this
->
data_post
;
$params
[
'user'
]
=
$this
->
user
;
$params
[
'user'
]
=
$this
->
user
;
return
OrderService
::
OrderPayCheck
(
$params
);
return
OrderService
::
OrderPayCheck
(
$params
);
}
else
{
}
else
{
...
...
application/index/view/default/order/index的副本.html
已删除
100755 → 0
浏览文件 @
63b5050c
{{include file="public/header" /}}
<!-- header top nav -->
{{include file="public/header_top_nav" /}}
<!-- search -->
{{include file="public/nav_search" /}}
<!-- header nav -->
{{include file="public/header_nav" /}}
<!-- goods category -->
{{include file="public/goods_category" /}}
<!-- content -->
<div
class=
"am-container user-main"
>
<!-- user menu start -->
{{include file="public/user_menu" /}}
<!-- user menu end -->
<!-- content start -->
<div
class=
"user-content"
>
<div
class=
"user-content-body"
>
<form
class=
"am-form form-validation form-search"
method=
"post"
action=
"{{:MyUrl('index/order/index')}}"
request-type=
"form"
>
<div
class=
"thin"
>
<div
class=
"am-input-group am-input-group-sm am-fl so"
>
<input
type=
"text"
autocomplete=
"off"
name=
"keywords"
class=
"am-radius"
placeholder=
"订单号"
value=
"{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}"
/>
<span
class=
"am-input-group-btn"
>
<button
class=
"am-btn am-btn-default am-radius"
type=
"submit"
data-am-loading=
"{spinner:'circle-o-notch', loadingText:'搜索中...'}"
>
搜索
</button>
</span>
</div>
<label
class=
"am-fl thin_sub more-submit"
>
更多筛选条件
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
<input
type=
"checkbox"
name=
"is_more"
value=
"1"
id=
"is_more"
checked
/>
<i
class=
"am-icon-angle-up"
></i>
{{else /}}
<input
type=
"checkbox"
name=
"is_more"
value=
"1"
id=
"is_more"
/>
<i
class=
"am-icon-angle-down"
></i>
{{/if}}
</label>
</div>
<table
class=
"so-list more-where {{if !isset($params['is_more'])}}none{{/if}}"
>
<tbody>
<tr>
<td
class=
"time"
>
<span>
时间:
</span>
<span>
<input
type=
"text"
autocomplete=
"off"
name=
"time_start"
class=
"am-form-field am-input-sm am-radius Wdate"
placeholder=
"起始时间"
value=
"{{if !empty($params.time_start)}}{{$params.time_start}}{{/if}}"
data-validation-message=
"日期格式有误"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})"
autocomplete=
"off"
/><i
class=
"am-icon-calendar"
></i>
</span>
<em
class=
"text-grey"
>
~
</em>
<span>
<input
type=
"text"
autocomplete=
"off"
name=
"time_end"
class=
"am-form-field am-input-sm am-radius Wdate"
placeholder=
"结束时间"
value=
"{{if !empty($params.time_end)}}{{$params.time_end}}{{/if}}"
pattern=
"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
data-validation-message=
"日期格式有误"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})"
autocomplete=
"off"
/><i
class=
"am-icon-calendar"
></i>
</span>
</td>
<td
class=
"price"
>
<span>
价格:
</span>
<span>
<input
type=
"text"
autocomplete=
"off"
name=
"price_start"
class=
"am-form-field am-input-sm am-radius"
placeholder=
"最小价格"
pattern=
"^([0-9]{1}\d{0,6})(\.\d{1,2})?$"
data-validation-message=
"价格0~9之间的数字"
value=
"{{if !empty($params.price_start)}}{{$params.price_start}}{{/if}}"
/>
</span>
<em
class=
"text-grey"
>
~
</em>
<span>
<input
type=
"text"
autocomplete=
"off"
name=
"price_end"
class=
"am-form-field am-input-sm am-radius"
placeholder=
"最大价格"
pattern=
"^([0-9]{1}\d{0,6})(\.\d{1,2})?$"
data-validation-message=
"价格0~9之间的数字"
value=
"{{if !empty($params.price_end)}}{{$params.price_end}}{{/if}}"
/>
</span>
</td>
</tr>
<tr>
<td>
<span>
支付:
</span>
<select
name=
"payment_id"
class=
"chosen-select"
data-placeholder=
"支付方式..."
>
<option
value=
"-1"
>
支付方式...
</option>
{{if !empty($payment_list)}}
{{foreach $payment_list as $payment}}
<option
value=
"{{$payment.id}}"
{{
if
isset
($
params
['
payment_id
'])
and
$
params
['
payment_id
']
eq
$
payment
['
id
']}}
selected
{{/
if
}}
>
{{$payment.name}}
</option>
{{/foreach}}
{{/if}}
</select>
</td>
<td>
<span>
付款:
</span>
<select
name=
"pay_status"
class=
"chosen-select"
data-placeholder=
"付款状态..."
>
<option
value=
"-1"
>
付款状态...
</option>
{{if !empty($common_order_pay_status)}}
{{foreach $common_order_pay_status as $pay}}
<option
value=
"{{$pay.id}}"
{{
if
isset
($
params
['
pay_status
'])
and
$
params
['
pay_status
']
eq
$
pay
['
id
']}}
selected
{{/
if
}}
>
{{$pay.name}}
</option>
{{/foreach}}
{{/if}}
</select>
</td>
</tr>
<tr>
<td>
<span>
状态:
</span>
<select
name=
"status"
class=
"chosen-select"
data-placeholder=
"订单状态..."
>
<option
value=
"-1"
>
订单状态...
</option>
{{if !empty($common_order_user_status)}}
{{foreach $common_order_user_status as $status}}
<option
value=
"{{$status.id}}"
{{
if
isset
($
params
['
status
'])
and
$
params
['
status
']
eq
$
status
['
id
']}}
selected
{{/
if
}}
>
{{$status.name}}
</option>
{{/foreach}}
{{/if}}
</select>
</td>
<td>
<span>
评论:
</span>
<select
name=
"is_comments"
class=
"chosen-select"
data-placeholder=
"评论状态..."
>
<option
value=
"-1"
>
评论状态...
</option>
{{if !empty($common_comments_status_list)}}
{{foreach $common_comments_status_list as $comments}}
<option
value=
"{{$comments.value}}"
{{
if
isset
($
params
['
is_comments
'])
and
$
params
['
is_comments
']
eq
$
comments
['
value
']}}
selected
{{/
if
}}
>
{{$comments.name}}
</option>
{{/foreach}}
{{/if}}
</select>
</td>
</tr>
<tr>
<td>
<button
type=
"submit"
class=
"am-btn am-btn-primary am-radius am-btn-xs btn-loading-example"
data-am-loading=
"{spinner:'circle-o-notch', loadingText:'搜索中...'}"
>
搜索
</button>
<a
href=
"{{:MyUrl('index/order/index')}}"
class=
"am-btn am-btn-warning am-radius am-btn-sm reset-submit"
>
清除条件
</a>
</td>
</tr>
</tbody>
</table>
</form>
<!-- 订单抬头 -->
<div
class=
"am-alert am-alert-secondary meila-radius"
>
<table
class=
"content-title"
>
<tbody>
<tr>
<th
class=
"row-content"
>
商品
</th>
<th
class=
"row-price am-hide-sm-only"
>
单价
</th>
<th
class=
"row-number am-hide-sm-only"
>
数量
</th>
<th
class=
"row-goods-operate"
>
商品操作
</th>
<th
class=
"row-total-price am-hide-sm-only"
>
合计
</th>
<th
class=
"row-status"
>
状态
</th>
<th
class=
"row-operate"
>
操作
</th>
</tr>
</tbody>
</table>
</div>
<!-- 订单列表 -->
{{if !empty($data_list)}}
{{foreach $data_list as $order}}
<table
id=
"data-list-{{$order.id}}"
class=
"data-list {{if $order['status'] LT 4}}data-ongoing{{/if}}"
>
<tr
class=
"content-hd"
>
<td
colspan=
"7"
>
<span
class=
"am-icon-bookmark-o am-fl"
>
{{$order.order_no}}
</span>
<span
class=
"am-icon-calendar-check-o am-fr"
>
{{$order.add_time}}
</span>
</td>
</tr>
{{foreach $order.items as $keys=>$goods}}
<tr>
<td
class=
"base row-content"
>
<div
class=
"goods-detail"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
class=
"goods-images"
>
<img
src=
"{{$goods.images}}"
alt=
"{{$goods.title}}"
class=
"am-img-thumbnail am-radius"
/>
</a>
<div
class=
"goods-base"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
class=
"goods-title"
>
{{$goods.title}}
</a>
{{if !empty($goods.spec)}}
<ul
class=
"goods-attr"
>
{{foreach $goods.spec as $spec}}
<li>
{{$spec.type}}:{{$spec.value}}
</li>
{{/foreach}}
</ul>
{{/if}}
</div>
</div>
<div
class=
"wap-base am-show-sm-only"
>
{{if $goods['original_price'] gt 0}}
<span
class=
"original-price"
>
{{$price_symbol}}{{$goods.original_price}}
</span>
{{/if}}
<strong
class=
"line-price"
>
{{$price_symbol}}{{$goods.price}}
</strong>
<span
class=
"wap-number"
>
x{{$goods.buy_number}}
</span>
{{if isset($goods['returned_quantity']) and $goods['returned_quantity'] gt 0}}
<span
class=
"am-badge am-round am-badge-warning"
>
已退 {{$goods.returned_quantity}}
</span>
{{/if}}
</div>
</td>
<td
class=
"row-price am-hide-sm-only"
>
{{if $goods['original_price'] gt 0}}
<p
class=
"original-price"
>
{{$price_symbol}}{{$goods.original_price}}
</p>
{{/if}}
<p
class=
"line-price"
>
{{$price_symbol}}{{$goods.price}}
</p>
</td>
<td
class=
"row-number am-hide-sm-only"
>
<span>
x{{$goods.buy_number}}
</span>
{{if isset($goods['returned_quantity']) and $goods['returned_quantity'] gt 0}}
<br
/><span
class=
"am-badge am-round am-badge-warning"
>
已退 {{$goods.returned_quantity}}
</span>
{{/if}}
</td>
<td
class=
"row-number"
>
{{if ($order['is_can_launch_aftersale'] eq 1 or !empty($goods['orderaftersale'])) and !empty($goods['orderaftersale_btn_text'])}}
<a
href=
"{{:MyUrl('index/orderaftersale/detail', ['oid'=>$order['id'], 'did'=>$goods['id']])}}"
target=
"_blank"
>
{{if empty($goods['orderaftersale'])}}
{{$goods.orderaftersale_btn_text}}
{{else /}}
<span
class=
"{{if $goods['orderaftersale']['status'] eq 3}}am-text-success{{else /}}am-text-secondary{{/if}}"
>
{{$goods.orderaftersale_btn_text}}
</span>
{{/if}}
</a>
{{/if}}
</td>
{{if $keys eq 0}}
<td
class=
"row-total-price am-hide-sm-only"
rowspan=
"{{$order.items_count}}"
>
<strong
class=
"total-price-content"
>
{{$price_symbol}}{{$order.total_price}}
</strong>
{{if isset($order['refund_price']) and $order['refund_price'] gt 0}}
<br
/><span
class=
"am-badge am-round am-badge-warning"
>
已退 {{$order.refund_price}}
</span>
{{/if}}
</td>
<td
class=
"row-status"
rowspan=
"{{$order.items_count}}"
>
<span>
{{$order.status_name}}
</span>
{{if !empty($order['is_under_line_text'])}}
<p
class=
"am-text-danger am-margin-bottom-xs"
>
{{$order.is_under_line_text}}
</p>
{{/if}}
<div
class=
"base-operate"
>
<a
class=
"block"
href=
"{{:MyUrl('index/order/detail', ['id'=>$order['id']])}}"
target=
"_blank"
>
订单详情
</a>
</div>
</td>
<td
class=
"row-operate"
rowspan=
"{{$order.items_count}}"
>
<!-- 0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭 -->
{{if in_array($order['status'], [0,1])}}
<button
type=
"button"
class=
"am-btn am-btn-warning am-btn-xs am-radius am-icon-paint-brush am-btn-block submit-ajax submit-cancel"
data-url=
"{{:MyUrl('index/order/cancel')}}"
data-id=
"{{$order.id}}"
data-view=
"reload"
>
取消
</button>
{{/if}}
{{if in_array($order['status'], [1])}}
<a
class=
"am-btn am-btn-primary am-btn-xs am-radius am-icon-paypal am-btn-block"
href=
"{{:MyUrl('index/order/detail', ['id'=>$order['id'], 'is_pay_auto'=>1])}}"
target=
"_blank"
>
支付
</a>
{{/if}}
{{if in_array($order['status'], [3])}}
<button
type=
"button"
class=
"am-btn am-btn-secondary am-btn-xs am-radius am-icon-check-circle-o am-btn-block submit-ajax submit-confirm"
data-url=
"{{:MyUrl('index/order/collect')}}"
data-id=
"{{$order.id}}"
data-view=
"reload"
data-msg=
"请仔细确认已收到货物、确认继续吗?"
>
收货
</button>
{{/if}}
{{if in_array($order['status'], [4]) and $order['user_is_comments'] eq 0}}
<a
href=
"{{:MyUrl('index/order/comments', ['id'=>$order['id']])}}"
target=
"_blank"
class=
"am-btn am-btn-primary am-btn-xs am-radius am-icon-heart-o am-btn-block"
>
评论
</a>
{{/if}}
{{if in_array($order['status'], [4,5,6])}}
<button
type=
"button"
class=
"am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o am-btn-block submit-delete"
data-url=
"{{:MyUrl('index/order/delete')}}"
data-id=
"{{$order.id}}"
data-view=
"reload"
>
删除
</button>
{{/if}}
<!-- 订单列表操作钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div
class=
"plugins-tag"
>
<span>
plugins_view_index_order_list_operate
</span>
</div>
{{/if}}
{{php}}
$hook_name = 'plugins_view_index_order_list_operate';
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$order['id'], 'data'=>$order]);
if(!empty($hook_data)
&&
is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
</td>
{{/if}}
</tr>
{{/foreach}}
</table>
{{/foreach}}
<!-- 分页 -->
{{$page_html|raw}}
{{else /}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关数据
</div>
{{/if}}
</div>
</div>
<!-- content end -->
</div>
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录