订单售后列表优化

This commit is contained in:
devil 2020-06-08 17:31:16 +08:00
parent 42a00f24f9
commit 4975d1e68f
13 changed files with 646 additions and 505 deletions

View File

@ -52,47 +52,35 @@ class Orderaftersale extends Common
*/
public function Index()
{
// 参数
$params = input();
$params['user_type'] = 'admin';
// 分页
$number = MyC('admin_page_number', 10, true);
// 条件
$where = OrderAftersaleService::OrderAftersaleListWhere($params);
// 获取总数
$total = OrderAftersaleService::OrderAftersaleTotal($where);
// 总数
$total = OrderAftersaleService::OrderAftersaleTotal($this->form_where);
// 分页
$page_params = array(
'number' => $number,
'number' => $this->page_size,
'total' => $total,
'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/orderaftersale/index'),
);
$page = new \base\Page($page_params);
$this->assign('page_html', $page->GetPageHtml());
// 获取列表
$data_params = array(
// 获取数据列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $number,
'where' => $where,
'n' => $this->page_size,
'is_public' => 0,
);
$data = OrderAftersaleService::OrderAftersaleList($data_params);
$this->assign('data_list', $data['data']);
];
$ret = OrderAftersaleService::OrderAftersaleList($data_params);
// 静态数据
$this->assign('common_order_aftersale_type_list', lang('common_order_aftersale_type_list'));
$this->assign('common_order_aftersale_status_list', lang('common_order_aftersale_status_list'));
$this->assign('common_order_aftersale_refundment_list', lang('common_order_aftersale_refundment_list'));
// 参数
$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();
}
@ -105,12 +93,12 @@ class Orderaftersale extends Common
*/
public function Detail()
{
// 参数
$params = input();
$params['user_type'] = 'admin';
if(!empty($this->data_request['id']))
{
// 条件
$where = OrderAftersaleService::OrderAftersaleListWhere($params);
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = array(
@ -122,9 +110,7 @@ class Orderaftersale extends Common
$ret = OrderAftersaleService::OrderAftersaleList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
$this->assign('data', $data);
// 参数
$this->assign('params', $params);
}
return $this->fetch();
}

View File

@ -44,7 +44,6 @@ class Order
// 基础配置
'base' => [
'key_field' => 'id',
'status_field' => 'is_shelves',
'is_search' => 1,
'search_url' => MyUrl('admin/order/index'),
],

View File

@ -0,0 +1,301 @@
<?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\admin\form;
use think\Db;
/**
* 订单售后动态表格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-08
* @desc description
*/
class Orderaftersale
{
// 基础条件
public $condition_base = [];
/**
* 入口
* @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('admin/orderaftersale/index'),
],
// 表单配置
'form' => [
[
'label' => '订单号',
'view_type' => 'field',
'view_key' => 'order_no',
'width' => 170,
'search_config' => [
'form_type' => 'input',
'where_type' => '=',
],
],
[
'label' => '基础信息',
'view_type' => 'module',
'view_key' => 'orderaftersale/module/info',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'id',
'where_type' => 'like',
'where_type_custom' => 'in',
'where_handle_custom' => 'WhereValueBaseInfo',
'placeholder' => '请输入商品名称/型号',
],
],
[
'label' => '用户信息',
'view_type' => 'module',
'view_key' => 'orderaftersale/module/user',
'grid_size' => 'sm',
'search_config' => [
'form_type' => 'input',
'form_name' => 'user_id',
'where_type' => 'like',
'where_type_custom' => 'in',
'where_handle_custom' => 'WhereValueUserInfo',
'placeholder' => '请输入用户名/昵称/手机/邮箱',
],
],
[
'label' => '状态',
'view_type' => 'field',
'view_key' => 'status_text',
'width' => 120,
'search_config' => [
'form_type' => 'select',
'form_name' => 'status',
'where_type' => 'in',
'data' => lang('common_order_aftersale_status_list'),
'data_key' => 'value',
'data_name' => 'name',
'is_multiple' => 1,
],
],
[
'label' => '申请类型',
'view_type' => 'field',
'view_key' => 'type_text',
'width' => 120,
'search_config' => [
'form_type' => 'select',
'form_name' => 'type',
'where_type' => 'in',
'data' => lang('common_order_aftersale_type_list'),
'data_key' => 'value',
'data_name' => 'name',
'is_multiple' => 1,
],
],
[
'label' => '原因',
'view_type' => 'field',
'view_key' => 'reason',
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => '退款金额(元)',
'view_type' => 'field',
'view_key' => 'price',
'search_config' => [
'form_type' => 'section',
'is_point' => 1,
],
],
[
'label' => '退货数量',
'view_type' => 'field',
'view_key' => 'number',
'search_config' => [
'form_type' => 'section',
],
],
[
'label' => '退款说明',
'view_type' => 'field',
'view_key' => 'msg',
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => '退款类型',
'view_type' => 'field',
'view_key' => 'refundment_text',
'width' => 120,
'search_config' => [
'form_type' => 'select',
'form_name' => 'refundment',
'where_type' => 'in',
'data' => lang('common_order_aftersale_refundment_list'),
'data_key' => 'value',
'data_name' => 'name',
'is_multiple' => 1,
],
],
[
'label' => '凭证',
'view_type' => 'module',
'view_key' => 'orderaftersale/module/voucher',
'width' => 140,
],
[
'label' => '快递公司',
'view_type' => 'field',
'view_key' => 'express_name',
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => '快递单号',
'view_type' => 'field',
'view_key' => 'express_number',
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => '申请时间',
'view_type' => 'field',
'view_key' => 'apply_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'apply_time',
],
],
[
'label' => '确认时间',
'view_type' => 'field',
'view_key' => 'confirm_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'confirm_time',
],
],
[
'label' => '退货时间',
'view_type' => 'field',
'view_key' => 'delivery_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'delivery_time',
],
],
[
'label' => '审核时间',
'view_type' => 'field',
'view_key' => 'audit_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'audit_time',
],
],
[
'label' => '创建时间',
'view_type' => 'field',
'view_key' => 'add_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'add_time',
],
],
[
'label' => '更新时间',
'view_type' => 'field',
'view_key' => 'upd_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'upd_time',
],
],
[
'label' => '操作',
'view_type' => 'operate',
'view_key' => 'orderaftersale/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 WhereValueUserInfo($value, $params = [])
{
if(!empty($value))
{
// 获取用户 id
$ids = Db::name('User')->where('username|nickname|mobile|email', 'like', '%'.$value.'%')->column('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 WhereValueBaseInfo($value, $params = [])
{
if(!empty($value))
{
// 获取订单详情搜索的订单售后 id
$ids = Db::name('OrderAftersale')->alias('oa')->join(['__ORDER_DETAIL__'=>'od'], 'oa.order_detail_id=od.id')->where('title|model', 'like', '%'.$value.'%')->column('oa.id');
// 避免空条件造成无效的错觉
return empty($ids) ? [0] : $ids;
}
return $value;
}
}
?>

View File

@ -1,2 +1,110 @@
<!-- 继承公共的 form -->
{{extend name="public/module/form" /}}
<!-- 扩展 -->
{{block name="form_extend"}}
<!-- 取货弹窗 -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="order-take-modal">
<div class="am-modal-dialog">
<div class="am-modal-hd">
<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
</div>
<div class="am-modal-bd">
<form class="am-form form-validation-take take-form" method="post" action="{{:MyUrl('admin/order/delivery')}}" request-type="ajax-reload">
<div class="am-form-group am-form-group-refreshing am-margin-bottom-0">
<label>取货码</label>
<input type="text" autocomplete="off" name="extraction_code" placeholder="取货码" minlength="4" maxlength="4" data-validation-message="请填写4位数取货码" class="am-radius" required />
</div>
<div class="am-form-group am-form-group-refreshing">
<input type="hidden" name="id" value="0" />
<input type="hidden" name="user_id" value="0" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
</div>
</form>
</div>
</div>
</div>
<!-- 发货弹窗 -->
<div class="am-popup" id="order-delivery-popup">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">发货操作</h4>
<span data-am-modal-close class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<form class="am-form form-validation-delivery delivery-form" method="post" action="{{:MyUrl('admin/order/delivery')}}" request-type="ajax-reload">
<div class="business-item">
{{if !empty($express_list)}}
<ul class="express-list" data-type="express">
{{foreach $express_list as $express}}
{{if $express.is_enable eq 1}}
<li class="express-items-{{$express.id}}" data-value="{{$express.id}}">
{{if !empty($express.icon)}}
<img src="{{$express.icon}}" />
{{/if}}
<span>{{$express.name}}</span>
<i class="icon-active"></i>
</li>
{{/if}}
{{/foreach}}
</ul>
{{/if}}
{{if empty($express_list)}}
<div class="table-no"><i class="am-icon-warning"></i> 没有快递方式</div>
{{/if}}
</div>
<div class="am-margin-top-sm">
<label>快递单号</label>
<input type="text" autocomplete="off" name="express_number" placeholder="快递单号" minlength="1" data-validation-message="请填写快递单号" class="am-radius" required />
</div>
<div class="am-margin-top-lg">
<input type="hidden" name="id" value="0" />
<input type="hidden" name="express_id" value="0" />
<input type="hidden" name="user_id" value="0" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
</div>
</form>
</div>
</div>
</div>
<!-- 支付弹窗 -->
<div class="am-popup" id="order-pay-popup">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">支付操作</h4>
<span data-am-modal-close class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<form class="am-form form-validation-pay pay-form" action="{{:MyUrl('admin/order/pay')}}" method="POST" request-type="ajax-reload">
<div class="business-item">
{{if !empty($buy_payment_list)}}
<ul class="payment-list" data-type="payment">
{{foreach $buy_payment_list as $payment}}
<li class="payment-items-{{$payment.id}}" data-value="{{$payment.id}}">
{{if !empty($payment.logo)}}
<img src="{{$payment.logo}}" />
{{/if}}
<span>{{$payment.name}}</span>
<i class="icon-active"></i>
</li>
{{/foreach}}
</ul>
{{/if}}
{{if empty($buy_payment_list)}}
<div class="table-no"><i class="am-icon-warning"></i> 没有支付方式</div>
{{/if}}
</div>
<div class="am-margin-top-sm">
<input type="hidden" name="id" value="0" />
<input type="hidden" name="payment_id" value="0" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
</div>
</form>
</div>
</div>
</div>
{{/block}}

View File

@ -1,17 +1,18 @@
{{include file="public/header" /}}
<!-- 继承公共的 detail -->
{{extend name="public/module/detail" /}}
<!-- content start -->
<div class="am-padding-sm">
<!-- 详情内容 -->
{{if !empty($data)}}
{{block name="detail_data"}}
<dl class="dl-content">
<dt>商品信息</dt>
<dd>
<div class="goods-detail">
<div class="am-nbfc">
<a href="{{$data.order_data.items.goods_url}}" target="_blank">
<img src="{{$data.order_data.items.images}}" class="am-img-thumbnail am-radius" />
<img src="{{$data.order_data.items.images}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
</a>
<div class="goods-base">
<a href="{{$data.order_data.items.goods_url}}" target="_blank" class="am-nowrap-initial am-text-truncate-2 goods-title">{{$data.order_data.items.title}}</a>
<div class="am-nbfc">
<a href="{{$data.order_data.items.goods_url}}" target="_blank" class="am-nowrap-initial">{{$data.order_data.items.title}}</a>
{{if !empty($data.order_data.items.spec)}}
<ul class="goods-spec am-margin-top-xs">
{{foreach $data.order_data.items.spec as $spec}}
@ -21,16 +22,18 @@
{{/if}}
</div>
</div>
<div class="am-text-right">
{{if $data.order_data.items.original_price gt 0}}
<p class="original-price">{{$price_symbol}}{{$data.order_data.items.original_price}}</p>
<span class="original-price am-margin-right-xs">{{$price_symbol}}{{$data.order_data.items.original_price}}</span>
{{/if}}
<p class="line-price">{{$price_symbol}}{{$data.order_data.items.price}} x {{$data.order_data.items.buy_number}}</p>
<strong>{{$price_symbol}}{{$data.order_data.items.price}} x {{$data.order_data.items.buy_number}}</strong>
</div>
</dd>
<dt>用户信息</dt>
<dd class="user-info">
{{if !empty($data['user'])}}
<img src="{{$data.user.avatar}}" alt="{{$data.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left" />
<img src="{{$data.user.avatar}}" alt="{{$data.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0 am-fl" width="35" height="35" />
<ul class="user-base">
<li>名称:{{if empty($data['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.username}}{{/if}}</li>
<li>昵称:{{if empty($data['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.nickname}}{{/if}}</li>
@ -97,18 +100,11 @@
<dt>取消时间</dt>
<dd>{{$data.cancel_time_time}}</dd>
<dt>添加时间</dt>
<dt>创建时间</dt>
<dd>{{$data.add_time_time}}</dd>
<dt>更新时间</dt>
<dd>{{$data.upd_time_time}}</dd>
</dl>
{{else /}}
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
{{/block}}
{{/if}}
</div>
<!-- content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->

View File

@ -1,295 +1,8 @@
{{include file="public/header" /}}
<!-- right content start -->
<div class="content-right">
<div class="content">
<!-- form start -->
<form class="am-form form-validation form-search" method="post" action="{{:MyUrl('admin/orderaftersale/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>
<span>类型:</span>
<select name="type" class="chosen-select" data-placeholder="类型...">
<option value="-1">类型...</option>
{{if !empty($common_order_aftersale_type_list)}}
{{foreach $common_order_aftersale_type_list as $v}}
<option value="{{$v.value}}" {{if isset($params['type']) and $params['type'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</td>
<td>
<span>状态:</span>
<select name="status" class="chosen-select" data-placeholder="状态...">
<option value="-1">状态...</option>
{{if !empty($common_order_aftersale_status_list)}}
{{foreach $common_order_aftersale_status_list as $v}}
<option value="{{$v.value}}" {{if isset($params['status']) and $params['status'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</td>
</tr>
<tr>
<td>
<span>退款:</span>
<select name="refundment" class="chosen-select" data-placeholder="退款...">
<option value="-1">退款...</option>
{{if !empty($common_order_aftersale_refundment_list)}}
{{foreach $common_order_aftersale_refundment_list as $v}}
<option value="{{$v.value}}" {{if isset($params['refundment']) and $params['refundment'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</td>
<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('admin/orderaftersale/index')}}" class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</a>
</td>
</tr>
</tbody>
</table>
</form>
<!-- form end -->
<!-- top operation start -->
<div class="am-g am-margin-top-sm">
<!-- 顶部操作钩子 -->
{{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_admin_order_aftersale_top_operate</span>
</div>
{{/if}}
{{php}}
$hook_name = 'plugins_view_admin_order_aftersale_top_operate';
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true]);
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}}
</div>
<!-- top operation end -->
<!-- list start -->
<div class="am-scrollable-horizontal am-table-scrollable-horizontal am-margin-top-sm">
<table class="am-table am-table-striped am-table-hover am-table-bordered am-text-nowrap am-table-td-fixed-last goods-list">
<thead>
<tr>
<th class="am-grid-lg">商品信息</th>
<th class="am-grid-sm">用户信息</th>
<th class="am-grid-sm">申请信息</th>
<th class="am-grid-sm">凭证</th>
<th>状态</th>
<th class="am-grid-sm">快递信息</th>
<th class="am-text-center">操作</th>
</tr>
</thead>
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr id="data-list-{{$v.id}}">
<td class="am-text-middle">
<div class="am-padding-bottom-xs">
<strong>{{$v.order_data.order_no}}</strong>
<span class="am-badge am-badge-primary am-radius" title="订单模式">{{$v.order_data.order_model_name}}</span>
<span class="am-badge am-badge-secondary am-radius" title="客户端类型">{{$v.order_data.client_type_name}}</span>
</div>
<hr data-am-widget="divider" class="am-divider am-divider-dashed am-margin-vertical-0" />
<div class="goods-detail am-padding-vertical-xs">
<a href="{{$v.order_data.items.goods_url}}" target="_blank">
<img src="{{$v.order_data.items.images}}" class="am-img-thumbnail am-radius" />
</a>
<div class="goods-base">
<a href="{{$v.order_data.items.goods_url}}" target="_blank" class="am-nowrap-initial am-text-truncate-2 goods-title">{{$v.order_data.items.title}}</a>
{{if !empty($v.order_data.items.spec)}}
<ul class="goods-spec am-margin-top-xs">
{{foreach $v.order_data.items.spec as $spec}}
<li>{{$spec.type}}{{$spec.value}}</li>
{{/foreach}}
</ul>
{{/if}}
</div>
</div>
<div class="goods-price">
{{if $v.order_data.items.original_price gt 0}}
<span class="original-price am-margin-right-xs">{{$price_symbol}}{{$v.order_data.items.original_price}}</span>
{{/if}}
<strong>{{$price_symbol}}{{$v.order_data.items.price}} x {{$v.order_data.items.buy_number}}</strong>
</div>
</td>
<td class="am-text-middle user-info">
{{if !empty($v['user'])}}
<img src="{{$v.user.avatar}}" alt="{{$v.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left" />
<ul class="user-base">
<li>名称:{{if empty($v['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.username}}{{/if}}</li>
<li>昵称:{{if empty($v['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.nickname}}{{/if}}</li>
<li>手机:{{if empty($v['user']['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.mobile}}{{/if}}</li>
<li>邮箱:{{if empty($v['user']['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.email}}{{/if}}</li>
</ul>
{{else /}}
用户信息异常
{{/if}}
</td>
<td class="am-text-middle">
类型:{{$v.type_text}}<br />
原因:{{$v.reason}}<br />
数量:{{$v.number}}<br />
金额:<strong class="am-text-danger">{{$price_symbol}}{{$v.price}}</strong><br />
说明:{{$v.msg}}<br />
时间:{{$v.apply_time_time}}
</td>
<td class="am-text-middle">
{{if !empty($v['images'])}}
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{&quot;directionNav&quot;:false, slideshow:false}' >
<ul class="am-slides">
{{foreach $v.images as $img}}
<li>
<a href="{{$img}}" target="_blank">
<img src="{{$img}}" />
</a>
</li>
{{/foreach}}
</ul>
</div>
{{/if}}
</td>
<td class="am-text-middle">
<p>{{$v.status_text}}</p>
{{if $v['status'] eq 3 and !empty($v['refundment_text'])}}
<span class="am-badge am-badge-success am-radius am-margin-top-xs">{{$v.refundment_text}}</span>
{{/if}}
{{if $v['status'] eq 4 and !empty($v['refuse_reason'])}}
<span class="am-text-danger">{{$v.refuse_reason}}</span>
{{/if}}
</td>
<td class="am-text-middle">
{{if $v['type'] eq 1 and in_array($v['status'], [2,3])}}
快递:{{$v.express_name}}<br />
单号:{{$v.express_number}}<br />
时间:{{$v.delivery_time_time}}
{{/if}}
</td>
<td class="am-operate-grid">
<div class="am-scrollable-vertical">
<button class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('admin/orderaftersale/detail', ['id'=>$v['id']])}}">
<i class="am-icon-eye"></i>
<span>详情</span>
</button>
{{if $v['status'] eq 0 and $v['type'] eq 1}}
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-ajax" data-url="{{:MyUrl('admin/orderaftersale/confirm')}}" data-id="{{$v.id}}" data-view="reload">
<i class="am-icon-check"></i>
<span>确认</span>
</button>
{{/if}}
{{if $v['status'] eq 2}}
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-audit" data-json='{{:str_replace("'", '', json_encode($v))}}'>
<i class="am-icon-gavel"></i>
<span>审核</span>
</button>
{{/if}}
{{if in_array($v['status'], [0,2])}}
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-refuse" data-json='{{:str_replace("'", '', json_encode($v))}}'>
<i class="am-icon-warning"></i>
<span>拒绝</span>
</button>
{{/if}}
{{if in_array($v['status'], [1,2])}}
<button type="button" class="am-btn am-btn-warning am-btn-xs am-radius am-btn-block submit-ajax submit-cancel" data-url="{{:MyUrl('admin/orderaftersale/cancel')}}" data-id="{{$v.id}}" data-view="reload">
<i class="am-icon-paint-brush"></i>
<span>取消</span>
</button>
{{/if}}
{{if in_array($v['status'], [4,5])}}
<button class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/orderaftersale/delete')}}" data-id="{{$v.id}}">
<i class="am-icon-trash-o"></i>
<span>删除</span>
</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_admin_orderaftersale_list_operate</span>
</div>
{{/if}}
{{php}}
$hook_name = 'plugins_view_admin_orderaftersale_list_operate';
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true, 'id'=>$v['id'], 'data'=>$v]);
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}}
</div>
</td>
</tr>
{{/foreach}}
{{/if}}
</tbody>
</table>
{{if empty($data_list)}}
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
{{/if}}
</div>
<!-- list end -->
<!-- bottom operation start -->
<div class="am-g am-margin-top-sm">
<!-- 底部操作钩子 -->
{{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_admin_order_aftersale_bottom_operate</span>
</div>
{{/if}}
{{php}}
$hook_name = 'plugins_view_admin_order_aftersale_bottom_operate';
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true]);
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}}
</div>
<!-- bottom operation end -->
<!-- 继承公共的 form -->
{{extend name="public/module/form" /}}
<!-- 扩展 -->
{{block name="form_extend"}}
<!-- 审核弹窗 -->
<div class="am-popup" id="order-audit-popup">
<div class="am-popup-inner">
@ -301,7 +14,7 @@
<dl class="dl-content">
<dt>用户信息</dt>
<dd class="user-info">
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left" />
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0 am-fl" width="35" height="35" />
<ul class="user-base">
<li class="username">名称:<span>...</span></li>
<li class="nickname">昵称:<span>...</span></li>
@ -353,7 +66,7 @@
<dl class="dl-content">
<dt>用户信息</dt>
<dd class="user-info">
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left" />
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0 am-fl" width="35" height="35" />
<ul class="user-base">
<li class="username">名称:<span>...</span></li>
<li class="nickname">昵称:<span>...</span></li>
@ -387,16 +100,4 @@
</div>
</div>
</div>
<!-- page start -->
{{if !empty($data_list)}}
{{$page_html|raw}}
{{/if}}
<!-- page end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
{{/block}}

View File

@ -0,0 +1,24 @@
<!-- 订单基础信息 -->
{{if !empty($module_data) and !empty($module_data['order_data'])}}
<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" />
</a>
<div class="am-nbfc">
<a href="{{$module_data.order_data.items.goods_url}}" target="_blank" class="am-nowrap-initial">{{$module_data.order_data.items.title}}</a>
{{if !empty($module_data.order_data.items.spec)}}
<ul class="goods-spec am-margin-top-xs">
{{foreach $module_data.order_data.items.spec as $spec}}
<li>{{$spec.type}}{{$spec.value}}</li>
{{/foreach}}
</ul>
{{/if}}
</div>
</div>
<div class="am-text-right">
{{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>
</div>
{{/if}}

View File

@ -0,0 +1,35 @@
<!-- 操作栏 -->
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('admin/orderaftersale/detail', ['id'=>$module_data['id']])}}">
<i class="am-icon-eye"></i>
<span>详情</span>
</button>
{{if $module_data['status'] eq 0 and $module_data['type'] eq 1}}
<button type="button" type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-ajax" data-url="{{:MyUrl('admin/orderaftersale/confirm')}}" data-id="{{$module_data.id}}" data-view="reload">
<i class="am-icon-check"></i>
<span>确认</span>
</button>
{{/if}}
{{if $module_data['status'] eq 2}}
<button type="button" type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-audit" data-json='{{:str_replace("'", '', json_encode($module_data))}}'>
<i class="am-icon-gavel"></i>
<span>审核</span>
</button>
{{/if}}
{{if in_array($module_data['status'], [0,2])}}
<button type="button" type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-refuse" data-json='{{:str_replace("'", '', json_encode($module_data))}}'>
<i class="am-icon-warning"></i>
<span>拒绝</span>
</button>
{{/if}}
{{if in_array($module_data['status'], [1,2])}}
<button type="button" type="button" class="am-btn am-btn-warning am-btn-xs am-radius am-btn-block submit-ajax submit-cancel" data-url="{{:MyUrl('admin/orderaftersale/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'], [4,5])}}
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/orderaftersale/delete')}}" data-id="{{$module_data.id}}">
<i class="am-icon-trash-o"></i>
<span>删除</span>
</button>
{{/if}}

View File

@ -0,0 +1,14 @@
<!-- 用户信息 -->
{{if !empty($module_data)}}
{{if !empty($module_data['user'])}}
<img src="{{$module_data.user.avatar}}" alt="{{$module_data.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0" width="35" height="35" />
<ul class="user-base">
<li>名称:{{if empty($module_data['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$module_data.user.username}}{{/if}}</li>
<li>昵称:{{if empty($module_data['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$module_data.user.nickname}}{{/if}}</li>
<li>手机:{{if empty($module_data['user']['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$module_data.user.mobile}}{{/if}}</li>
<li>邮箱:{{if empty($module_data['user']['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$module_data.user.email}}{{/if}}</li>
</ul>
{{else /}}
用户信息异常
{{/if}}
{{/if}}

View File

@ -0,0 +1,14 @@
<!-- 凭证 -->
{{if !empty($module_data) and !empty($module_data['images'])}}
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{&quot;directionNav&quot;:false, slideshow:false}' >
<ul class="am-slides">
{{foreach $module_data.images as $img}}
<li>
<a href="{{$img}}" target="_blank">
<img src="{{$img}}" />
</a>
</li>
{{/foreach}}
</ul>
</div>
{{/if}}

View File

@ -415,7 +415,7 @@ class OrderAftersaleService
$v['status_text'] = array_key_exists($v['status'], $status_list) ? $status_list[$v['status']]['name'] : '';
// 退款方式
$v['refundment_text'] = array_key_exists($v['refundment'], $refundment_list) ? $refundment_list[$v['refundment']]['name'] : '';
$v['refundment_text'] = ($v['status'] == 3 && array_key_exists($v['refundment'], $refundment_list)) ? $refundment_list[$v['refundment']]['name'] : '';
// 图片
if(!empty($v['images']))

View File

@ -17,15 +17,6 @@
.business-item ul li:nth-child(2n) { margin-right: 0; }
}
/**
* 用户信息
*/
.user-info img {
max-width: 35px;
max-height: 35px;
margin: 0 5px 2px 0;
}
/**
* 虚拟销售-密钥信息
*/

View File

@ -1,41 +1,13 @@
/**
* 商品列表
*/
.goods-detail img { width: 60px; height: 60px; position: absolute; left: 0; }
.goods-detail { position: relative; min-height: 65px; overflow: hidden; }
.goods-title { max-height: 36px; height: auto; }
.goods-base {float: left; top: 0; margin-left: 65px; }
.goods-spec li { color: #888; line-height: 16px; }
.original-price { color: #9c9c9c; text-decoration: line-through; }
/**
* 用户信息
*/
.user-info img {
max-width: 35px;
max-height: 35px;
margin: 0 5px 2px 0;
}
/**
* 列表
*/
@media only screen and (min-width:640px) {
table.am-table tr .row-goods { width: 25%; }
table.am-table tr .row-user-info { width: 15%; }
table.am-table tr .row-apply { width: 25%; }
table.am-table tr .row-more { width: 80px; }
table.am-table tr .row-operation { width: 85px; }
}
@media only screen and (max-width:640px) {
table.am-table tr .row-apply { width: 50%; }
table.am-table tr .row-operation, table.am-table tr .row-more { width: 75px; }
}
table.am-table .am-slider {
width: 100px;
max-height: 108px;
overflow: hidden;
box-shadow: none;
-webkit-box-shadow: none;
}