mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-30 02:49:03 +08:00
用户端订单列表优化
This commit is contained in:
parent
e9e7a001a9
commit
63b5050cce
@ -50,26 +50,6 @@ class Order
|
||||
],
|
||||
// 表单配置
|
||||
'form' => [
|
||||
[
|
||||
'label' => '订单ID',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'id',
|
||||
'width' => 105,
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'where_type' => '=',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '订单号',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'order_no',
|
||||
'width' => 170,
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'where_type' => '=',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '基础信息',
|
||||
'view_type' => 'module',
|
||||
@ -81,8 +61,8 @@ class Order
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereGoodsInfo',
|
||||
'placeholder' => '请输入商品名称/型号',
|
||||
'where_handle_custom' => 'WhereBaseGoodsInfo',
|
||||
'placeholder' => '请输入订单ID/订单号/商品名称/型号',
|
||||
],
|
||||
],
|
||||
[
|
||||
@ -99,39 +79,10 @@ class Order
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '地址信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/address',
|
||||
'grid_size' => 'sm',
|
||||
'is_detail' => 0,
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereValueAddressInfo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '取货信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/take',
|
||||
'width' => 125,
|
||||
'is_detail' => 0,
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereValueTakeInfo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '订单状态',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/status',
|
||||
'width' => 120,
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'status',
|
||||
@ -146,7 +97,6 @@ class Order
|
||||
'label' => '支付状态',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/pay_status',
|
||||
'width' => 120,
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'pay_status',
|
||||
@ -157,38 +107,6 @@ class Order
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '订单模式',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'order_model',
|
||||
'view_data_key' => 'name',
|
||||
'view_data' => lang('common_site_type_list'),
|
||||
'width' => 120,
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_site_type_list'),
|
||||
'data_key' => 'value',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '来源',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'client_type',
|
||||
'view_data_key' => 'name',
|
||||
'view_data' => lang('common_platform_type'),
|
||||
'width' => 120,
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_platform_type'),
|
||||
'data_key' => 'value',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '单价(元)',
|
||||
'view_type' => 'field',
|
||||
@ -216,6 +134,64 @@ class Order
|
||||
'is_point' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '订单模式',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'order_model',
|
||||
'view_data_key' => 'name',
|
||||
'view_data' => lang('common_site_type_list'),
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_site_type_list'),
|
||||
'data_key' => 'value',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '来源',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'client_type',
|
||||
'view_data_key' => 'name',
|
||||
'view_data' => lang('common_platform_type'),
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_platform_type'),
|
||||
'data_key' => 'value',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '地址信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/address',
|
||||
'grid_size' => 'sm',
|
||||
'is_detail' => 0,
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereValueAddressInfo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '取货信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/take',
|
||||
'width' => 125,
|
||||
'is_detail' => 0,
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereValueTakeInfo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '退款金额(元)',
|
||||
'view_type' => 'field',
|
||||
@ -277,7 +253,6 @@ class Order
|
||||
'label' => '用户备注',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'user_note',
|
||||
'width' => 120,
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'like',
|
||||
@ -468,7 +443,7 @@ class Order
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品信息条件处理
|
||||
* 基础条件处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -477,12 +452,18 @@ class Order
|
||||
* @param [string] $value [条件值]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function WhereGoodsInfo($value, $params = [])
|
||||
public function WhereBaseGoodsInfo($value, $params = [])
|
||||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 订单ID、订单号
|
||||
$ids = Db::name('Order')->where(['id|order_no'=>$value])->column('id');
|
||||
|
||||
// 获取订单详情搜索的订单 id
|
||||
$ids = Db::name('OrderDetail')->where('title|model', 'like', '%'.$value.'%')->column('order_id');
|
||||
if(empty($ids))
|
||||
{
|
||||
$ids = Db::name('OrderDetail')->where('title|model', 'like', '%'.$value.'%')->column('order_id');
|
||||
}
|
||||
|
||||
// 避免空条件造成无效的错觉
|
||||
return empty($ids) ? [0] : $ids;
|
||||
|
@ -45,16 +45,6 @@ class Orderaftersale
|
||||
],
|
||||
// 表单配置
|
||||
'form' => [
|
||||
[
|
||||
'label' => '订单号',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'order_no',
|
||||
'width' => 170,
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'where_type' => '=',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '基础信息',
|
||||
'view_type' => 'module',
|
||||
@ -65,8 +55,8 @@ class Orderaftersale
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereGoodsInfo',
|
||||
'placeholder' => '请输入商品名称/型号',
|
||||
'where_handle_custom' => 'WhereBaseGoodsInfo',
|
||||
'placeholder' => '请输入订单号/商品名称/型号',
|
||||
],
|
||||
],
|
||||
[
|
||||
@ -280,7 +270,7 @@ class Orderaftersale
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品信息条件处理
|
||||
* 基础条件处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -289,12 +279,12 @@ class Orderaftersale
|
||||
* @param [string] $value [条件值]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function WhereGoodsInfo($value, $params = [])
|
||||
public function WhereBaseGoodsInfo($value, $params = [])
|
||||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 获取订单详情搜索的订单售后 id
|
||||
$ids = Db::name('OrderAftersale')->alias('oa')->join(['__ORDER_DETAIL__'=>'od'], 'oa.order_detail_id=od.id')->where('od.title|od.model', 'like', '%'.$value.'%')->column('oa.id');
|
||||
$ids = Db::name('OrderAftersale')->alias('oa')->join(['__ORDER_DETAIL__'=>'od'], 'oa.order_detail_id=od.id')->whereOr('od.title|od.model', 'like', '%'.$value.'%')->whereOr('oa.order_no', '=', $value)->column('oa.id');
|
||||
|
||||
// 避免空条件造成无效的错觉
|
||||
return empty($ids) ? [0] : $ids;
|
||||
|
@ -1,25 +1,21 @@
|
||||
<!-- 地址信息 -->
|
||||
{{if !empty($module_data)}}
|
||||
{{if in_array($module_data['order_model'], [0,2]) and !empty($module_data['address_data'])}}
|
||||
<div>
|
||||
{{if !empty($module_data['address_data']['alias'])}}
|
||||
<span class="am-badge am-badge-secondary am-radius">{{$module_data.address_data.alias}}</span>
|
||||
{{/if}}
|
||||
<span>{{$module_data.address_data.name}}</span>
|
||||
</div>
|
||||
<div>{{$module_data.address_data.tel}}</div>
|
||||
<div class="am-margin-top-xs">
|
||||
<span>{{$module_data.address_data.province_name}}</span>
|
||||
<span>{{$module_data.address_data.city_name}}</span>
|
||||
<span>{{$module_data.address_data.county_name}}</span>
|
||||
<span>{{$module_data.address_data.address}}</span>
|
||||
{{if isset($module_data['address_data']['lng']) and isset($module_data['address_data']['lat']) and $module_data.address_data.lng gt 0 and $module_data.address_data.lat gt 0}}
|
||||
<div class="am-margin-top-xs">
|
||||
<button type="button" class="am-btn am-btn-success am-btn-xs am-radius am-icon-map-marker am-padding-xs submit-map-popup" data-lng="{{$module_data.address_data.lng}}" data-lat="{{$module_data.address_data.lat}}"> 查看位置</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else /}}
|
||||
<span class="cr-ddd">无信息</span>
|
||||
{{/if}}
|
||||
{{if !empty($module_data) and in_array($module_data['order_model'], [0,2]) and !empty($module_data['address_data'])}}
|
||||
<div>
|
||||
{{if !empty($module_data['address_data']['alias'])}}
|
||||
<span class="am-badge am-badge-secondary-plain am-radius">{{$module_data.address_data.alias}}</span>
|
||||
{{/if}}
|
||||
<span>{{$module_data.address_data.name}}</span>
|
||||
<span class="am-margin-left-sm">{{$module_data.address_data.tel}}</span>
|
||||
</div>
|
||||
<div class="am-margin-top-xs">
|
||||
<span>{{$module_data.address_data.province_name}}</span>
|
||||
<span>{{$module_data.address_data.city_name}}</span>
|
||||
<span>{{$module_data.address_data.county_name}}</span>
|
||||
<span>{{$module_data.address_data.address}}</span>
|
||||
{{if isset($module_data['address_data']['lng']) and isset($module_data['address_data']['lat']) and $module_data.address_data.lng gt 0 and $module_data.address_data.lat gt 0}}
|
||||
<div class="am-margin-top-xs">
|
||||
<button type="button" class="am-btn am-btn-success am-btn-xs am-radius am-icon-map-marker am-padding-xs submit-map-popup" data-lng="{{$module_data.address_data.lng}}" data-lat="{{$module_data.address_data.lat}}"> 查看位置</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
@ -1,5 +1,10 @@
|
||||
<!-- 订单商品信息 -->
|
||||
{{if !empty($module_data) and !empty($module_data['items'])}}
|
||||
<p class="am-nbfc am-margin-bottom-sm">
|
||||
<strong class="am-fl am-icon-bookmark-o"> {{$module_data.order_no}}</strong>
|
||||
<strong class="am-fr am-icon-circle-thin"> {{$module_data.id}}</strong>
|
||||
</p>
|
||||
<hr data-am-widget="divider" class="am-divider am-divider-dashed am-margin-top-0" />
|
||||
{{foreach $module_data.items as $item}}
|
||||
<div class="am-nbfc am-padding-vertical-xs">
|
||||
<div class="base am-nbfc">
|
||||
@ -14,10 +19,12 @@
|
||||
{{$item.spec_text}}
|
||||
{{/if}}
|
||||
</span>
|
||||
<span class="am-fr">{{$item.price}}x{{$item.buy_number}}</span>
|
||||
{{if $item['returned_quantity'] gt 0 or $item['refund_price'] gt 0}}
|
||||
<span class="am-text-danger am-fr am-margin-right-lg">已退 {{$item.returned_quantity}} / {{$item.refund_price}}</span>
|
||||
{{/if}}
|
||||
<div class="am-text-right">
|
||||
{{if $item['returned_quantity'] gt 0 or $item['refund_price'] gt 0}}
|
||||
<span class="am-text-danger am-margin-right-lg">已退 {{$item.returned_quantity}} / {{$price_symbol}}{{$item.refund_price}}</span>
|
||||
{{/if}}
|
||||
<span>{{$price_symbol}}{{$item.price}}x{{$item.buy_number}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr data-am-widget="divider" class="am-divider am-divider-dashed am-margin-vertical-0" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!-- 取货信息 -->
|
||||
{{if !empty($module_data) and !empty($module_data['extraction_data'])}}
|
||||
<p>
|
||||
<span>取货码:</span>
|
||||
<span>取货码 :</span>
|
||||
{{if empty($module_data['extraction_data']['code'])}}
|
||||
<span class="am-text-danger">无</span>
|
||||
{{else /}}
|
||||
|
@ -1,5 +1,9 @@
|
||||
<!-- 订单基础信息 -->
|
||||
{{if !empty($module_data) and !empty($module_data['order_data'])}}
|
||||
<p class="am-nbfc am-margin-bottom-sm">
|
||||
<strong class="am-icon-bookmark-o"> {{$module_data.order_no}}</strong>
|
||||
</p>
|
||||
<hr data-am-widget="divider" class="am-divider am-divider-dashed am-margin-top-0" />
|
||||
<div class="am-nbfc">
|
||||
<a href="{{$module_data.order_data.items.goods_url}}" target="_blank">
|
||||
<img src="{{$module_data.order_data.items.images}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
|
||||
@ -19,6 +23,6 @@
|
||||
{{if $module_data.order_data.items.original_price gt 0}}
|
||||
<span class="original-price am-margin-right-xs">{{$price_symbol}}{{$module_data.order_data.items.original_price}}</span>
|
||||
{{/if}}
|
||||
<strong>{{$price_symbol}}{{$module_data.order_data.items.price}} x {{$module_data.order_data.items.buy_number}}</strong>
|
||||
<span>{{$price_symbol}}{{$module_data.order_data.items.price}}x{{$module_data.order_data.items.buy_number}}</span>
|
||||
</div>
|
||||
{{/if}}
|
@ -51,58 +51,38 @@ class Order extends Common
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 参数
|
||||
$params = input();
|
||||
$params['user'] = $this->user;
|
||||
$params['user_type'] = 'user';
|
||||
// 总数
|
||||
$total = OrderService::OrderTotal($this->form_where);
|
||||
|
||||
// 分页
|
||||
$number = 10;
|
||||
|
||||
// 条件
|
||||
$where = OrderService::OrderListWhere($params);
|
||||
|
||||
// 获取总数
|
||||
$total = OrderService::OrderTotal($where);
|
||||
|
||||
// 分页
|
||||
$page_params = array(
|
||||
'number' => $number,
|
||||
'total' => $total,
|
||||
'where' => $params,
|
||||
'page' => isset($params['page']) ? intval($params['page']) : 1,
|
||||
'url' => MyUrl('index/order/index'),
|
||||
);
|
||||
$page_params = [
|
||||
'number' => $this->page_size,
|
||||
'total' => $total,
|
||||
'where' => $this->data_request,
|
||||
'page' => $this->page,
|
||||
'url' => MyUrl('admin/order/index'),
|
||||
];
|
||||
$page = new \base\Page($page_params);
|
||||
$this->assign('page_html', $page->GetPageHtml());
|
||||
|
||||
// 获取列表
|
||||
$data_params = array(
|
||||
'm' => $page->GetPageStarNumber(),
|
||||
'n' => $number,
|
||||
'where' => $where,
|
||||
'is_orderaftersale' => 1,
|
||||
);
|
||||
$data = OrderService::OrderList($data_params);
|
||||
$this->assign('data_list', $data['data']);
|
||||
$data_params = [
|
||||
'm' => $page->GetPageStarNumber(),
|
||||
'n' => $this->page_size,
|
||||
'where' => $this->form_where,
|
||||
'user_type' => 'user',
|
||||
];
|
||||
$ret = OrderService::OrderList($data_params);
|
||||
|
||||
// 支付方式
|
||||
$this->assign('payment_list', PaymentService::PaymentList());
|
||||
|
||||
// 订单状态
|
||||
$this->assign('common_order_user_status', lang('common_order_user_status'));
|
||||
|
||||
// 支付状态
|
||||
$this->assign('common_order_pay_status', lang('common_order_pay_status'));
|
||||
|
||||
// 评价状态
|
||||
$this->assign('common_comments_status_list', lang('common_comments_status_list'));
|
||||
// 加载百度地图api
|
||||
$this->assign('is_load_baidu_map_api', 1);
|
||||
|
||||
// 浏览器名称
|
||||
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('我的订单', 1));
|
||||
|
||||
// 参数
|
||||
$this->assign('params', $params);
|
||||
// 基础参数赋值
|
||||
$this->assign('params', $this->data_request);
|
||||
$this->assign('page_html', $page->GetPageHtml());
|
||||
$this->assign('data_list', $ret['data']);
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
@ -116,41 +96,43 @@ class Order extends Common
|
||||
*/
|
||||
public function Detail()
|
||||
{
|
||||
// 参数
|
||||
$params = input();
|
||||
$params['user'] = $this->user;
|
||||
$params['user_type'] = 'user';
|
||||
|
||||
// 条件
|
||||
$where = OrderService::OrderListWhere($params);
|
||||
|
||||
// 获取列表
|
||||
$data_params = array(
|
||||
'm' => 0,
|
||||
'n' => 1,
|
||||
'where' => $where,
|
||||
);
|
||||
$data = OrderService::OrderList($data_params);
|
||||
if(!empty($data['data'][0]))
|
||||
$data = [];
|
||||
if(!empty($this->data_request['id']))
|
||||
{
|
||||
// 发起支付 - 支付方式
|
||||
// 条件
|
||||
$where = [
|
||||
['is_delete_time', '=', 0],
|
||||
['user_is_delete_time', '=', 0],
|
||||
['id', '=', intval($this->data_request['id'])],
|
||||
['user_id', '=', $this->user['id']],
|
||||
];
|
||||
|
||||
// 获取列表
|
||||
$data_params = [
|
||||
'm' => 0,
|
||||
'n' => 1,
|
||||
'where' => $where,
|
||||
'user_type' => 'user',
|
||||
];
|
||||
$ret = OrderService::OrderList($data_params);
|
||||
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
|
||||
}
|
||||
if(!empty($data))
|
||||
{
|
||||
// 发起支付 - 支付方式
|
||||
$this->assign('buy_payment_list', PaymentService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]));
|
||||
|
||||
// 虚拟销售配置
|
||||
$site_fictitious = ConfigService::SiteFictitiousConfig();
|
||||
$this->assign('site_fictitious', $site_fictitious['data']);
|
||||
|
||||
$this->assign('data', $data['data'][0]);
|
||||
|
||||
// 加载百度地图api
|
||||
$this->assign('is_load_baidu_map_api', 1);
|
||||
|
||||
// 参数
|
||||
$this->assign('params', $params);
|
||||
// 数据赋值
|
||||
$this->assign('data', $data);
|
||||
$this->assign('params', $this->data_request);
|
||||
return $this->fetch();
|
||||
} else {
|
||||
$this->assign('msg', '没有相关数据');
|
||||
return $this->fetch('public/tips_error');
|
||||
}
|
||||
}
|
||||
|
||||
|
446
application/index/form/Order.php
Normal file
446
application/index/form/Order.php
Normal file
@ -0,0 +1,446 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\index\form;
|
||||
|
||||
use think\Db;
|
||||
use app\service\PaymentService;
|
||||
use app\service\ExpressService;
|
||||
|
||||
/**
|
||||
* 订单动态表格
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
*/
|
||||
class Order
|
||||
{
|
||||
// 基础条件
|
||||
public $condition_base = [
|
||||
['is_delete_time', '=', 0],
|
||||
['user_is_delete_time', '=', 0],
|
||||
];
|
||||
|
||||
/**
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-29
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function __construct($params = [])
|
||||
{
|
||||
// 用户信息
|
||||
if(!empty($params['system_user']))
|
||||
{
|
||||
$this->condition_base[] = ['user_id', '=', $params['system_user']['id']];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 入口
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function Run($params = [])
|
||||
{
|
||||
return [
|
||||
// 基础配置
|
||||
'base' => [
|
||||
'key_field' => 'id',
|
||||
'is_search' => 1,
|
||||
'search_url' => MyUrl('index/order/index'),
|
||||
'detail_title' => '基础信息',
|
||||
],
|
||||
// 表单配置
|
||||
'form' => [
|
||||
[
|
||||
'label' => '基础信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/goods',
|
||||
'grid_size' => 'lg',
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereBaseGoodsInfo',
|
||||
'placeholder' => '请输入订单号/商品名称/型号',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '订单状态',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/status',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'status',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_order_user_status'),
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '支付状态',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/pay_status',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'pay_status',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_order_pay_status'),
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '单价(元)',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'price',
|
||||
'search_config' => [
|
||||
'form_type' => 'section',
|
||||
'is_point' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '总价(元)',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'total_price',
|
||||
'search_config' => [
|
||||
'form_type' => 'section',
|
||||
'is_point' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '支付金额(元)',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'pay_price',
|
||||
'search_config' => [
|
||||
'form_type' => 'section',
|
||||
'is_point' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '订单模式',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'order_model',
|
||||
'view_data_key' => 'name',
|
||||
'view_data' => lang('common_site_type_list'),
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_site_type_list'),
|
||||
'data_key' => 'value',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '下单平台',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'client_type',
|
||||
'view_data_key' => 'name',
|
||||
'view_data' => lang('common_platform_type'),
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_platform_type'),
|
||||
'data_key' => 'value',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '地址信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/address',
|
||||
'grid_size' => 'sm',
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereValueAddressInfo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '取货信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/take',
|
||||
'width' => 125,
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereValueTakeInfo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '退款金额(元)',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'refund_price',
|
||||
'search_config' => [
|
||||
'form_type' => 'section',
|
||||
'is_point' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '退货数量',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'returned_quantity',
|
||||
'search_config' => [
|
||||
'form_type' => 'section',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '购买总数',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'buy_number_count',
|
||||
'search_config' => [
|
||||
'form_type' => 'section',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '增加金额(元)',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'increase_price',
|
||||
'search_config' => [
|
||||
'form_type' => 'section',
|
||||
'is_point' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '优惠金额(元)',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'preferential_price',
|
||||
'search_config' => [
|
||||
'form_type' => 'section',
|
||||
'is_point' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '支付方式',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'payment_name',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'payment_id',
|
||||
'where_type' => 'in',
|
||||
'data' => PaymentService::PaymentList(),
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '留言信息',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'user_note',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'like',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '扩展信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'order/module/extension',
|
||||
'grid_size' => 'sm',
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'extension_data',
|
||||
'where_type' => 'like',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '快递公司',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'express_name',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'express_id',
|
||||
'data' => ExpressService::ExpressList(),
|
||||
'where_type' => 'in',
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '快递单号',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'express_number',
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'where_type' => 'like',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '确认时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'confirm_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '支付时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'pay_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '发货时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'delivery_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '完成时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'collect_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '取消时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'cancel_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '关闭时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'close_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '创建时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'add_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '更新时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'upd_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '操作',
|
||||
'view_type' => 'operate',
|
||||
'view_key' => 'order/module/operate',
|
||||
'align' => 'center',
|
||||
'fixed' => 'right',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 取货码条件处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
* @param [string] $value [条件值]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function WhereValueTakeInfo($value, $params = [])
|
||||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 获取订单 id
|
||||
$ids = Db::name('OrderExtractionCode')->where('code', '=', $value)->column('order_id');
|
||||
|
||||
// 避免空条件造成无效的错觉
|
||||
return empty($ids) ? [0] : $ids;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 收件地址条件处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
* @param [string] $value [条件值]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function WhereValueAddressInfo($value, $params = [])
|
||||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 获取订单 id
|
||||
$ids = Db::name('OrderAddress')->where('name|tel|address', 'like', '%'.$value.'%')->column('order_id');
|
||||
|
||||
// 避免空条件造成无效的错觉
|
||||
return empty($ids) ? [0] : $ids;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础条件处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
* @param [string] $value [条件值]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function WhereBaseGoodsInfo($value, $params = [])
|
||||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 订单号
|
||||
$ids = Db::name('Order')->where(['order_no'=>$value])->column('id');
|
||||
|
||||
// 获取订单详情搜索的订单 id
|
||||
if(empty($ids))
|
||||
{
|
||||
$ids = Db::name('OrderDetail')->where('title|model', 'like', '%'.$value.'%')->column('order_id');
|
||||
}
|
||||
|
||||
// 避免空条件造成无效的错觉
|
||||
return empty($ids) ? [0] : $ids;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
?>
|
@ -312,10 +312,19 @@
|
||||
<div class="am-panel am-panel-default business-panel">
|
||||
<div class="am-panel-hd">{{if $data.order_model eq 2}}取货地址{{else /}}收货地址{{/if}}</div>
|
||||
<div class="am-panel-bd">
|
||||
<span>{{$data.address_data.name}}, {{$data.address_data.tel}}, {{$data.address_data.province_name}} {{$data.address_data.city_name}} {{$data.address_data.county_name}} {{$data.address_data.address}}</span>
|
||||
{{if $data.order_model eq 2 and $data.address_data.lng gt 0 and $data.address_data.lat gt 0}}
|
||||
<button type="button" class="am-btn am-btn-success am-radius am-icon-map-marker submit-map-popup" data-lng="{{$data.address_data.lng}}" data-lat="{{$data.address_data.lat}}"> 查看位置</button>
|
||||
{{/if}}
|
||||
<div>
|
||||
{{if !empty($data['address_data']['alias'])}}
|
||||
<span class="am-badge am-badge-secondary-plain am-radius">{{$data.address_data.alias}}</span>
|
||||
{{/if}}
|
||||
<span>{{$data.address_data.name}}</span>
|
||||
<span class="am-margin-left-sm">{{$data.address_data.tel}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{$data.address_data.province_name}} {{$data.address_data.city_name}} {{$data.address_data.county_name}} {{$data.address_data.address}}</span>
|
||||
{{if $data.order_model eq 2 and $data.address_data.lng gt 0 and $data.address_data.lat gt 0}}
|
||||
<button type="button" class="am-btn am-btn-success am-radius am-icon-map-marker submit-map-popup" data-lng="{{$data.address_data.lng}}" data-lat="{{$data.address_data.lat}}"> 查看位置</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
@ -397,7 +406,7 @@
|
||||
<strong class="total-price-content">{{$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>
|
||||
<span class="am-badge am-round am-badge-warning-plain">已退 {{$goods.returned_quantity}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</td>
|
||||
@ -410,13 +419,13 @@
|
||||
<td class="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>
|
||||
<br /><span class="am-badge am-round am-badge-warning-plain">已退 {{$goods.returned_quantity}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="total-price am-hide-sm-only">
|
||||
<strong class="total-price-content">{{$price_symbol}}{{$goods.total_price}}</strong>
|
||||
{{if isset($goods['refund_price']) and $goods['refund_price'] gt 0}}
|
||||
<br /><span class="am-badge am-round am-badge-warning">已退 {{$goods.refund_price}}</span>
|
||||
<br /><span class="am-badge am-round am-badge-warning-plain">已退 {{$goods.refund_price}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -1,279 +1,2 @@
|
||||
{{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 -->
|
||||
<!-- 继承公共的 form -->
|
||||
{{extend name="public/module/user_form" /}}
|
279
application/index/view/default/order/index的副本.html
Executable file
279
application/index/view/default/order/index的副本.html
Executable file
@ -0,0 +1,279 @@
|
||||
{{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 -->
|
21
application/index/view/default/order/module/address.html
Normal file
21
application/index/view/default/order/module/address.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- 地址信息 -->
|
||||
{{if !empty($module_data) and in_array($module_data['order_model'], [0,2]) and !empty($module_data['address_data'])}}
|
||||
<div>
|
||||
{{if !empty($module_data['address_data']['alias'])}}
|
||||
<span class="am-badge am-badge-secondary-plain am-radius">{{$module_data.address_data.alias}}</span>
|
||||
{{/if}}
|
||||
<span>{{$module_data.address_data.name}}</span>
|
||||
<span class="am-margin-left-sm">{{$module_data.address_data.tel}}</span>
|
||||
</div>
|
||||
<div class="am-margin-top-xs">
|
||||
<span>{{$module_data.address_data.province_name}}</span>
|
||||
<span>{{$module_data.address_data.city_name}}</span>
|
||||
<span>{{$module_data.address_data.county_name}}</span>
|
||||
<span>{{$module_data.address_data.address}}</span>
|
||||
{{if isset($module_data['address_data']['lng']) and isset($module_data['address_data']['lat']) and $module_data.address_data.lng gt 0 and $module_data.address_data.lat gt 0}}
|
||||
<div class="am-margin-top-xs">
|
||||
<button type="button" class="am-btn am-btn-success am-btn-xs am-radius am-icon-map-marker am-padding-xs submit-map-popup" data-lng="{{$module_data.address_data.lng}}" data-lat="{{$module_data.address_data.lat}}"> 查看位置</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
@ -0,0 +1,6 @@
|
||||
<!-- 扩展信息 -->
|
||||
{{if !empty($module_data) and !empty($module_data['extension_data'])}}
|
||||
{{foreach $module_data.extension_data as $extk=>$ext}}
|
||||
<p>{{$ext.name}} [{{$ext.tips}}]</p>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
35
application/index/view/default/order/module/goods.html
Normal file
35
application/index/view/default/order/module/goods.html
Normal file
@ -0,0 +1,35 @@
|
||||
<!-- 订单商品信息 -->
|
||||
{{if !empty($module_data) and !empty($module_data['items'])}}
|
||||
<p class="am-icon-bookmark-o am-margin-bottom-sm">
|
||||
<strong>{{$module_data.order_no}}</strong>
|
||||
</p>
|
||||
<hr data-am-widget="divider" class="am-divider am-divider-dashed am-margin-top-0" />
|
||||
{{foreach $module_data.items as $item}}
|
||||
<div class="am-nbfc">
|
||||
<a href="{{$item.goods_url}}" target="_blank">
|
||||
<img src="{{$item.images}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
|
||||
</a>
|
||||
<div class="am-nbfc">
|
||||
<a href="{{$item.goods_url}}" target="_blank" class="am-nowrap-initial">{{$item.title}}</a>
|
||||
{{if !empty($item.spec)}}
|
||||
<ul class="goods-spec am-margin-top-xs">
|
||||
{{foreach $item.spec as $spec}}
|
||||
<li>{{$spec.type}}:{{$spec.value}}</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-text-right">
|
||||
{{if $item['returned_quantity'] gt 0 or $item['refund_price'] gt 0}}
|
||||
<span class="am-text-danger am-margin-right-lg">已退 {{$item.returned_quantity}} / {{$price_symbol}}{{$item.refund_price}}</span>
|
||||
{{/if}}
|
||||
{{if $item.original_price gt 0}}
|
||||
<span class="original-price am-margin-right-xs">{{$price_symbol}}{{$item.original_price}}</span>
|
||||
{{/if}}
|
||||
<strong>{{$price_symbol}}{{$item.price}}x{{$item.buy_number}}</strong>
|
||||
</div>
|
||||
<hr data-am-widget="divider" class="am-divider am-divider-dashed" />
|
||||
{{/foreach}}
|
||||
<div class="am-margin-top-sm">{{$module_data.describe}}</div>
|
||||
{{/if}}
|
37
application/index/view/default/order/module/operate.html
Normal file
37
application/index/view/default/order/module/operate.html
Normal file
@ -0,0 +1,37 @@
|
||||
<!-- 操作栏 -->
|
||||
<!-- 0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭 -->
|
||||
<a href="{{:MyUrl('index/order/detail', ['id'=>$module_data['id']])}}" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block" target="_blank">
|
||||
<i class="am-icon-eye"></i>
|
||||
<span>详情</span>
|
||||
</a>
|
||||
{{if in_array($module_data['status'], [0,1])}}
|
||||
<button type="button" class="am-btn am-btn-warning am-btn-xs am-radius am-btn-block submit-ajax submit-cancel" data-url="{{:MyUrl('index/order/cancel')}}" data-id="{{$module_data.id}}" data-view="reload">
|
||||
<i class="am-icon-paint-brush"></i>
|
||||
<span>取消</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if in_array($module_data['status'], [1])}}
|
||||
<a class="am-btn am-btn-primary am-btn-xs am-radius am-btn-block" href="{{:MyUrl('index/order/detail', ['id'=>$module_data['id'], 'is_pay_auto'=>1])}}" target="_blank">
|
||||
<i class="am-icon-paypal"></i>
|
||||
<span>支付</span>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{if in_array($module_data['status'], [3])}}
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-ajax submit-confirm" data-url="{{:MyUrl('index/order/collect')}}" data-id="{{$module_data.id}}" data-view="reload" data-msg="请仔细确认已收到货物、确认继续吗?">
|
||||
<i class="am-icon-check-circle-o"></i>
|
||||
<span>收货</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if in_array($module_data['status'], [4]) and $module_data['user_is_comments'] eq 0}}
|
||||
<a href="{{:MyUrl('index/order/comments', ['id'=>$module_data['id']])}}" target="_blank" class="am-btn am-btn-primary am-btn-xs am-radius am-btn-block">
|
||||
<i class="am-icon-heart-o"></i>
|
||||
<span>评论</span>
|
||||
</a>
|
||||
{{/if}}
|
||||
|
||||
{{if in_array($module_data['status'], [4,5,6])}}
|
||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('index/order/delete')}}" data-id="{{$module_data.id}}" data-view="reload">
|
||||
<i class="am-icon-trash-o"></i>
|
||||
<span>删除</span>
|
||||
</button>
|
||||
{{/if}}
|
13
application/index/view/default/order/module/pay_status.html
Normal file
13
application/index/view/default/order/module/pay_status.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- 支付状态 -->
|
||||
{{if !empty($module_data)}}
|
||||
{{if $module_data['pay_status'] eq 1}}
|
||||
<p class="am-text-success">{{$module_data.pay_status_name}}</p>
|
||||
{{elseif $module_data['pay_status'] gt 1 /}}
|
||||
<p class="am-text-danger">{{$module_data.pay_status_name}}</p>
|
||||
{{else /}}
|
||||
<p>{{$module_data.pay_status_name}}</p>
|
||||
{{/if}}
|
||||
{{if !empty($module_data['is_under_line_text'])}}
|
||||
<p class="am-text-warning">{{$module_data.is_under_line_text}}</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
7
application/index/view/default/order/module/status.html
Normal file
7
application/index/view/default/order/module/status.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!-- 订单状态 -->
|
||||
{{if !empty($module_data)}}
|
||||
<p>{{$module_data.status_name}}</p>
|
||||
{{if $module_data['user_is_delete_time'] neq 0}}
|
||||
<p class="am-text-warning">用户已删除</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
16
application/index/view/default/order/module/take.html
Normal file
16
application/index/view/default/order/module/take.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!-- 取货信息 -->
|
||||
{{if !empty($module_data) and !empty($module_data['extraction_data'])}}
|
||||
<p>
|
||||
<span>取货码 :</span>
|
||||
{{if empty($module_data['extraction_data']['code'])}}
|
||||
<span class="am-text-danger">无</span>
|
||||
{{else /}}
|
||||
<span class="am-badge am-badge-success am-radius">{{$module_data.extraction_data.code}}</span>
|
||||
{{/if}}
|
||||
</p>
|
||||
{{if !empty($module_data['extraction_data']['images'])}}
|
||||
<p class="am-margin-top-xs">
|
||||
<img class="am-img-thumbnail" src="{{$module_data.extraction_data.images}}" alt="取货码" width="100" height="100" />
|
||||
</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
@ -130,7 +130,7 @@ class BuyService
|
||||
'original_price'=> $goods_base['data']['spec_base']['original_price'],
|
||||
'price' => $goods_base['data']['spec_base']['price'],
|
||||
'stock' => $stock,
|
||||
'spec' => empty($spec) ? '' : json_encode($spec),
|
||||
'spec' => empty($spec) ? '' : json_encode($spec, JSON_UNESCAPED_UNICODE),
|
||||
];
|
||||
|
||||
// 存在则更新
|
||||
@ -1043,7 +1043,7 @@ class BuyService
|
||||
'increase_price' => ($v['order_base']['increase_price'] <= 0.00) ? 0.00 : $v['order_base']['increase_price'],
|
||||
'price' => ($v['order_base']['total_price'] <= 0.00) ? 0.00 : $v['order_base']['total_price'],
|
||||
'total_price' => ($v['order_base']['actual_price'] <= 0.00) ? 0.00 : $v['order_base']['actual_price'],
|
||||
'extension_data' => empty($v['order_base']['extension_data']) ? '' : json_encode($v['order_base']['extension_data']),
|
||||
'extension_data' => empty($v['order_base']['extension_data']) ? '' : json_encode($v['order_base']['extension_data'], JSON_UNESCAPED_UNICODE),
|
||||
'payment_id' => $payment_id,
|
||||
'buy_number_count' => $v['order_base']['buy_count'],
|
||||
'client_type' => $client_type,
|
||||
@ -1232,7 +1232,7 @@ class BuyService
|
||||
'original_price' => $detail['original_price'],
|
||||
'price' => $detail['price'],
|
||||
'total_price' => PriceNumberFormat($detail['stock']*$detail['price']),
|
||||
'spec' => empty($detail['spec']) ? '' : json_encode($detail['spec']),
|
||||
'spec' => empty($detail['spec']) ? '' : json_encode($detail['spec'], JSON_UNESCAPED_UNICODE),
|
||||
'spec_weight' => empty($detail['spec_weight']) ? 0.00 : (float) $detail['spec_weight'],
|
||||
'spec_coding' => empty($detail['spec_coding']) ? '' : $detail['spec_coding'],
|
||||
'spec_barcode' => empty($detail['spec_barcode']) ? '' : $detail['spec_barcode'],
|
||||
|
@ -1345,7 +1345,7 @@ class GoodsService
|
||||
];
|
||||
}
|
||||
$v['goods_id'] = $goods_id;
|
||||
$v['value'] = json_encode($spec);
|
||||
$v['value'] = json_encode($spec, JSON_UNESCAPED_UNICODE);
|
||||
$v['add_time'] = time();
|
||||
}
|
||||
if(Db::name('GoodsSpecType')->insertAll($data['title']) < count($data['title']))
|
||||
|
@ -515,7 +515,7 @@ class WarehouseGoodsService
|
||||
$arr = explode(',', $v);
|
||||
$inventory_spec[] = [
|
||||
'name' => implode(' / ', $arr),
|
||||
'spec' => json_encode(self::GoodsSpecMuster($v, $res['title'])),
|
||||
'spec' => json_encode(self::GoodsSpecMuster($v, $res['title']), JSON_UNESCAPED_UNICODE),
|
||||
'md5_key' => md5(implode('', $arr)),
|
||||
'inventory' => 0,
|
||||
];
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user