mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-30 10:59:47 +08:00
订单售后
This commit is contained in:
parent
fcc745a3a3
commit
7f847e73b8
@ -10,6 +10,8 @@
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\service\CacheService;
|
||||
|
||||
/**
|
||||
* 缓存管理
|
||||
* @author Devil
|
||||
@ -48,7 +50,7 @@ class Cache extends Common
|
||||
public function Index()
|
||||
{
|
||||
// 缓存类型
|
||||
$this->assign('cache_type_list', lang('cache_type_list'));
|
||||
$this->assign('cache_type_list', CacheService::AdminCacheTypeList());
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
|
@ -79,34 +79,6 @@ return array(
|
||||
2 => array('value' => 2, 'name' => 'PATHINFO模式+短地址'),
|
||||
),
|
||||
|
||||
// 缓存类型列表
|
||||
'cache_type_list' => array(
|
||||
array(
|
||||
'is_enable' => 1,
|
||||
'name' => '站点缓存',
|
||||
'url' => MyUrl('admin/cache/statusupdate'),
|
||||
'desc' => '数据转换后或前台不能正常访问时,可以使用此功能更新所有缓存'
|
||||
),
|
||||
array(
|
||||
'is_enable' => 1,
|
||||
'name' => '模板缓存',
|
||||
'url' => MyUrl('admin/cache/templateupdate'),
|
||||
'desc' => '当页面显示不正常,可尝试使用此功能修复'
|
||||
),
|
||||
array(
|
||||
'is_enable' => 0,
|
||||
'name' => '模块缓存',
|
||||
'url' => MyUrl('admin/cache/moduleupdate'),
|
||||
'desc' => '更新页面布局与模块后未生效,可尝试使用此功能修复'
|
||||
),
|
||||
array(
|
||||
'is_enable' => 1,
|
||||
'name' => '日志清除',
|
||||
'url' => MyUrl('admin/cache/logdelete'),
|
||||
'desc' => '清除站点日志'
|
||||
),
|
||||
),
|
||||
|
||||
// 用户excel导出标题列表
|
||||
'excel_user_title_list' => [
|
||||
'username' => [
|
||||
|
@ -226,7 +226,21 @@ class Order extends Common
|
||||
$data = OrderService::OrderList($data_params);
|
||||
if(!empty($data['data'][0]))
|
||||
{
|
||||
$this->assign('data', $data['data'][0]);
|
||||
// 商品处理
|
||||
$goods = [];
|
||||
if(!empty($data['data'][0]['items']))
|
||||
{
|
||||
foreach($data['data'][0]['items'] as $v)
|
||||
{
|
||||
if(isset($params['gid']) && $params['gid'] == $v['goods_id'])
|
||||
{
|
||||
$goods = $v;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->assign('goods', $goods);
|
||||
$this->assign('order', $data['data'][0]);
|
||||
|
||||
// 仅退款原因
|
||||
$return_only_money_reason = MyC('home_order_aftersale_return_only_money_reason');
|
||||
@ -236,6 +250,7 @@ class Order extends Common
|
||||
$return_money_goods_reason = MyC('home_order_aftersale_return_money_goods_reason');
|
||||
$this->assign('return_money_goods_reason_list', empty($return_money_goods_reason) ? [] : explode("\n", $return_money_goods_reason));
|
||||
|
||||
$this->assign('params', $params);
|
||||
return $this->fetch();
|
||||
} else {
|
||||
$this->assign('msg', '没有相关数据');
|
||||
|
@ -24,104 +24,113 @@
|
||||
<div class="user-content-body">
|
||||
{{if true }}
|
||||
<!-- 商品列表 -->
|
||||
{{if !empty($data.items)}}
|
||||
<table class="am-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商品信息</th>
|
||||
<th class="am-hide-sm-only">单价</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{foreach $data.items as $goods}}
|
||||
<tr id="data-list-{{$goods.id}}">
|
||||
<td class="base">
|
||||
<div class="goods-detail">
|
||||
<a href="{{$goods.goods_url}}" target="_blank">
|
||||
<img src="{{$goods.images}}">
|
||||
</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}}
|
||||
{{if !empty($goods)}}
|
||||
<div class="am-panel am-panel-default order-base-panel">
|
||||
<div class="am-panel-bd">
|
||||
<table class="am-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="row-base">商品信息</th>
|
||||
<th class="row-price">单价</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="goods-detail">
|
||||
<a href="{{$goods.goods_url}}" target="_blank">
|
||||
<img src="{{$goods.images}}">
|
||||
</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>
|
||||
<div class="wap-base am-show-sm-only">
|
||||
</td>
|
||||
<td>
|
||||
{{if $goods['original_price'] gt 0}}
|
||||
<span class="original-price">¥{{$goods.original_price}}</span>
|
||||
<p class="original-price">¥{{$goods.original_price}}</p>
|
||||
{{/if}}
|
||||
<strong class="total-price-content">¥{{$goods.price}}</strong>
|
||||
<span class="wap-number">x{{$goods.buy_number}}</span>
|
||||
<p class="line-price">¥{{$goods.price}} x {{$goods.buy_number}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="am-alert am-alert-secondary">
|
||||
{{if !empty($order.price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">商品总价:</div>
|
||||
<div class="items-detail am-fl">¥{{$order.price}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($order.increase_price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">增加金额:</div>
|
||||
<div class="items-detail am-fl">+¥{{$order.increase_price}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($order.preferential_price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">优惠金额:</div>
|
||||
<div class="items-detail am-fl">-¥{{$order.preferential_price}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($order.total_price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">订单总价:</div>
|
||||
<div class="items-detail am-fl line-price">¥{{$order.total_price}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($order.pay_price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">支付金额:</div>
|
||||
<div class="items-detail am-fl">
|
||||
<strong class="total-price-content">¥{{$order.pay_price}}</strong>
|
||||
</div>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
{{if $goods['original_price'] gt 0}}
|
||||
<p class="original-price">¥{{$goods.original_price}}</p>
|
||||
{{/if}}
|
||||
<p class="line-price">¥{{$goods.price}} x {{$goods.buy_number}}</p>
|
||||
</td>
|
||||
<td class="operations">
|
||||
<!-- <a href="{{:MyUrl('index/order/aftersale', ['order_id'=>$data['id'], 'goods_id'=>$goods['goods_id']])}}" target="_blank" class="am-btn am-btn-default am-btn-xs am-radius am-icon-puzzle-piece am-btn-block"> 申请售后</a> -->
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-puzzle-piece am-btn-block" data-order-id="{{$data.id}}" data-goods-id="{{$goods.goods_id}}" data-number="{{$goods.buy_number}}" data-price="{{$data.pay_price}}"> 申请售后</button>
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{if !empty($data['extension_data'])}}
|
||||
<div class="am-alert am-alert-warning">
|
||||
{{foreach $data.extension_data as $ertk=>$ext}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">{{$ext.name}}:</div>
|
||||
<div class="items-detail am-fl">{{$ext.tips}}</div>
|
||||
</div>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="am-alert am-alert-secondary">
|
||||
{{if !empty($data.price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">商品总价:</div>
|
||||
<div class="items-detail am-fl">¥{{$data.price}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($data.increase_price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">增加金额:</div>
|
||||
<div class="items-detail am-fl">+¥{{$data.increase_price}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($data.preferential_price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">优惠金额:</div>
|
||||
<div class="items-detail am-fl">-¥{{$data.preferential_price}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($data.total_price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">订单总价:</div>
|
||||
<div class="items-detail am-fl line-price">¥{{$data.total_price}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($data.pay_price)}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">支付金额:</div>
|
||||
<div class="items-detail am-fl">
|
||||
<strong class="total-price-content">¥{{$data.pay_price}}</strong>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{include file="order/aftersale_popup" /}}
|
||||
<!-- 类型 -->
|
||||
<div class="am-cf aftersale-type">
|
||||
<div class="am-fl items-align" data-type="0">
|
||||
<div class="items-middle">
|
||||
<div class="am-fl icon">
|
||||
<i class="am-icon-random"></i>
|
||||
</div>
|
||||
<p class="name">仅退款</p>
|
||||
<p class="desc">未收到货(未签收),协商同意前提下</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-fr items-align" data-type="1">
|
||||
<div class="items-middle">
|
||||
<div class="am-fl icon">
|
||||
<i class="am-icon-retweet"></i>
|
||||
</div>
|
||||
<p class="name">退货退款</p>
|
||||
<p class="desc">已收到货,需要退换已收到的货物</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 步骤 -->
|
||||
{{include file="order/aftersale_step" /}}
|
||||
|
||||
<!-- 表单 -->
|
||||
<div class="am-panel am-panel-default aftersale-form-panel none">
|
||||
<div class="am-panel-bd">
|
||||
{{include file="order/aftersale_form" /}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{else /}}
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 你已进行过评论</div>
|
||||
|
40
application/index/view/default/order/aftersale_form.html
Normal file
40
application/index/view/default/order/aftersale_form.html
Normal file
@ -0,0 +1,40 @@
|
||||
<form class="am-form form-validation view-save" action="{{:PluginsHomeUrl('answers', 'index', 'answer')}}" method="POST" request-type="ajax-reload">
|
||||
<div class="am-form-group">
|
||||
<label>退款原因<span class="am-form-group-label-tips-must">必选</span></label>
|
||||
<select name="reason" class="chosen-select" data-placeholder="退款原因..." data-validation-message="请选择退款原因" data-only-json='{{:json_encode($return_only_money_reason_list)}}' data-goods-json='{{:json_encode($return_money_goods_reason_list)}}' required>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group form-number">
|
||||
<label>商品件数<span class="am-form-group-label-tips-must">必填</span></label>
|
||||
<div class="am-input-group am-input-group-sm number-container">
|
||||
<span class="am-input-group-label" data-type="0">-</span>
|
||||
<input type="number" name="number" class="am-form-field" value="1" min="1" max="{{$goods.buy_number}}" data-validation-message="请填写有效的商品件数,最小1,最大{{$goods.buy_number}}" required />
|
||||
<span class="am-input-group-label" data-type="1">+</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>退款金额<span class="am-form-group-label-tips-must">必填</span></label>
|
||||
<input type="number" name="price" value="{{$order.pay_price}}" step="0.01" min="0.01" max="{{$order.pay_price}}" class="am-radius" placeholder="退款金额" data-validation-message="请输入有效的退款金额,最低0.01元,最高{{$order.pay_price}}元" required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>退款说明<span class="am-form-group-label-tips-must">必填</span></label>
|
||||
<textarea class="am-radius" name="msg" rows="5" minlength="5" maxlength="200" placeholder="退款说明 5~200 个字符之间" data-validation-message="退款说明格式 5~200 个字符之间" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>上传凭证<span class="am-form-group-label-tips">最多上传3张图片</span></label>
|
||||
<ul class="plug-file-upload-view goods-images-view" data-form-name="images[]" data-max-number="3" data-dialog-type="images">
|
||||
</ul>
|
||||
<div class="plug-file-upload-submit" data-view-tag="ul.goods-images-view">+上传图片</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group am-form-group-refreshing">
|
||||
<input type="hidden" name="order_id" value="{{$params.id}}" />
|
||||
<input type="hidden" name="goods_id" value="{{$params.gid}}" />
|
||||
<input type="hidden" name="type" value="" />
|
||||
<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>
|
@ -1,108 +0,0 @@
|
||||
<div class="am-popup" id="aftersale-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">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<form class="am-form form-validation view-save" action="{{:PluginsHomeUrl('answers', 'index', 'answer')}}" method="POST" request-type="ajax-reload">
|
||||
<div class="am-cf aftersale-type">
|
||||
<div class="am-fl am-vertical-align" data-type="0">
|
||||
<div class="am-vertical-align-middle">
|
||||
<div class="am-fl icon">
|
||||
<i class="am-icon-random"></i>
|
||||
</div>
|
||||
<p class="name">仅退款</p>
|
||||
<p class="desc">未收到货(包含未签收),或卖家协商同意前提下</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-fr am-vertical-align" data-type="1">
|
||||
<div class="am-vertical-align-middle">
|
||||
<div class="am-fl icon">
|
||||
<i class="am-icon-retweet"></i>
|
||||
</div>
|
||||
<p class="name">退货退款</p>
|
||||
<p class="desc">已收到货,需要退换已收到的货物</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="aftersale-step am-cf am-text-center">
|
||||
<li class="selected">
|
||||
<span class="number">1</span>
|
||||
<span class="text">用户申请退款</span>
|
||||
<i class="am-icon-caret-right"></i>
|
||||
<i class="am-icon-angle-right"></i>
|
||||
</li>
|
||||
<li class="selected selected-end">
|
||||
<span class="number">2</span>
|
||||
<span class="text">管理员处理退款申请</span>
|
||||
<i class="am-icon-caret-right"></i>
|
||||
<i class="am-icon-angle-right"></i>
|
||||
</li>
|
||||
<li>
|
||||
<span class="number">3</span>
|
||||
<span class="text">退款完毕</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="am-form-group form-only-money">
|
||||
<label>退款原因<span class="am-form-group-label-tips-must">必选</span></label>
|
||||
<select name="return_only_money_reason" class="chosen-select" data-placeholder="退款原因..." data-validation-message="请选择退款原因" required>
|
||||
<option value="">退款原因...</option>
|
||||
{{if !empty($return_only_money_reason_list)}}
|
||||
{{foreach $return_only_money_reason_list as $reason}}
|
||||
<option value="{{$reason}}">{{$reason}}</option>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group form-money-goods">
|
||||
<label>退款原因<span class="am-form-group-label-tips-must">必选</span></label>
|
||||
<select name="return_money_goods_reason" class="chosen-select" data-placeholder="退款原因..." data-validation-message="请选择退款原因" required>
|
||||
<option value="">退款原因...</option>
|
||||
{{if !empty($return_money_goods_reason_list)}}
|
||||
{{foreach $return_money_goods_reason_list as $reason}}
|
||||
<option value="{{$reason}}">{{$reason}}</option>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>商品件数<span class="am-form-group-label-tips-must">必填</span></label>
|
||||
<div class="am-input-group am-input-group-sm">
|
||||
<span class="am-input-group-label">-</span>
|
||||
<input type="text" name="number" class="am-form-field" value="1" min="1" max="3" data-validation-message="请填写有效的商品件数" required />
|
||||
<span class="am-input-group-label">+</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>退款金额<span class="am-form-group-label-tips-must">必填</span></label>
|
||||
<input type="number" name="price" step="0.01" max="3" class="am-radius" placeholder="退款金额" data-validation-message="请输入有效的退款金额" required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>退款说明<span class="am-form-group-label-tips-must">必填</span></label>
|
||||
<textarea class="am-radius" name="msg" rows="5" minlength="5" maxlength="200" placeholder="退款说明 5~200 个字符之间" data-validation-message="退款说明格式 5~200 个字符之间" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>上传凭证<span class="am-form-group-label-tips">最多上传3张图片</span></label>
|
||||
<ul class="plug-file-upload-view goods-images-view" data-form-name="images[]" data-max-number="3" data-dialog-type="images">
|
||||
</ul>
|
||||
<div class="plug-file-upload-submit" data-view-tag="ul.goods-images-view">+上传图片</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group am-form-group-refreshing">
|
||||
<input type="hidden" name="order_id" value="" />
|
||||
<input type="hidden" name="goods_id" value="" />
|
||||
<input type="hidden" name="type" value="" />
|
||||
<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>
|
43
application/index/view/default/order/aftersale_step.html
Normal file
43
application/index/view/default/order/aftersale_step.html
Normal file
@ -0,0 +1,43 @@
|
||||
<ul class="aftersale-step am-cf am-text-center return-only-money-step none">
|
||||
<li class="am-text-truncate selected">
|
||||
<span class="number">1</span>
|
||||
<span class="text">用户申请仅退款</span>
|
||||
<i class="am-icon-caret-right"></i>
|
||||
<i class="am-icon-angle-right"></i>
|
||||
</li>
|
||||
<li class="am-text-truncate selected selected-end">
|
||||
<span class="number">2</span>
|
||||
<span class="text">管理员处理退款申请</span>
|
||||
<i class="am-icon-caret-right"></i>
|
||||
<i class="am-icon-angle-right"></i>
|
||||
</li>
|
||||
<li class="am-text-truncate">
|
||||
<span class="number">3</span>
|
||||
<span class="text">退款完毕</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="aftersale-step am-cf am-text-center return-money-goods-step none">
|
||||
<li class="am-text-truncate selected">
|
||||
<span class="number">1</span>
|
||||
<span class="text">用户申请退货退款</span>
|
||||
<i class="am-icon-caret-right"></i>
|
||||
<i class="am-icon-angle-right"></i>
|
||||
</li>
|
||||
<li class="am-text-truncate selected">
|
||||
<span class="number">2</span>
|
||||
<span class="text">管理员处理退货申请</span>
|
||||
<i class="am-icon-caret-right"></i>
|
||||
<i class="am-icon-angle-right"></i>
|
||||
</li>
|
||||
<li class="am-text-truncate selected selected-end">
|
||||
<span class="number">3</span>
|
||||
<span class="text">用户退货</span>
|
||||
<i class="am-icon-caret-right"></i>
|
||||
<i class="am-icon-angle-right"></i>
|
||||
</li>
|
||||
<li class="am-text-truncate">
|
||||
<span class="number">4</span>
|
||||
<span class="text">退款完毕</span>
|
||||
</li>
|
||||
</ul>
|
@ -130,6 +130,7 @@
|
||||
<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>
|
||||
@ -142,17 +143,17 @@
|
||||
{{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="6">
|
||||
<span class="am-icon-calendar-check-o"> {{$order.add_time}}</span>
|
||||
<span class="am-icon-bookmark-o"> {{$order.order_no}}</span>
|
||||
<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">
|
||||
<img src="{{$goods.images}}">
|
||||
<a href="{{$goods.goods_url}}" target="_blank" class="goods-images">
|
||||
<img src="{{$goods.images}}" alt="{{$goods.title}}" />
|
||||
</a>
|
||||
<div class="goods-base">
|
||||
<a href="{{$goods.goods_url}}" target="_blank" class="goods-title">{{$goods.title}}</a>
|
||||
@ -182,6 +183,11 @@
|
||||
<td class="row-number am-hide-sm-only">
|
||||
x{{$goods.buy_number}}
|
||||
</td>
|
||||
<td class="row-number">
|
||||
{{if in_array($order['status'], [2,3,4])}}
|
||||
<a href="{{:MyUrl('index/order/aftersale', ['id'=>$order['id'], 'gid'=>$goods['goods_id']])}}" target="_blank">申请售后</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">¥{{$order.total_price}}</strong>
|
||||
@ -207,10 +213,6 @@
|
||||
<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'], [2,3,4])}}
|
||||
<a href="{{:MyUrl('index/order/aftersale', ['id'=>$order['id']])}}" target="_blank" class="am-btn am-btn-default am-btn-xs am-radius am-icon-puzzle-piece 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}}
|
||||
|
@ -88,6 +88,7 @@
|
||||
Powered by <a href="http://shopxo.net/" title="ShopXO电商系统" target="_blank">
|
||||
<span class="b">Shop</span><span class="o">XO</span>
|
||||
</a> {{$Think.APPLICATION_VERSION}}
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://www.miitbeian.gov.cn/" target="_blank">{{:MyC('home_site_icp')}}</a>
|
||||
</p>
|
||||
|
62
application/service/CacheService.php
Normal file
62
application/service/CacheService.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?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\service;
|
||||
|
||||
/**
|
||||
* 缓存服务层
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class CacheService
|
||||
{
|
||||
/**
|
||||
* 后台缓存管理-缓存类型
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-05-22
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function AdminCacheTypeList($params = [])
|
||||
{
|
||||
// 缓存类型列表
|
||||
return [
|
||||
[
|
||||
'is_enable' => 1,
|
||||
'name' => '站点缓存',
|
||||
'url' => MyUrl('admin/cache/statusupdate'),
|
||||
'desc' => '数据转换后或前台不能正常访问时,可以使用此功能更新所有缓存'
|
||||
],
|
||||
[
|
||||
'is_enable' => 1,
|
||||
'name' => '模板缓存',
|
||||
'url' => MyUrl('admin/cache/templateupdate'),
|
||||
'desc' => '当页面显示不正常,可尝试使用此功能修复'
|
||||
],
|
||||
[
|
||||
'is_enable' => 0,
|
||||
'name' => '模块缓存',
|
||||
'url' => MyUrl('admin/cache/moduleupdate'),
|
||||
'desc' => '更新页面布局与模块后未生效,可尝试使用此功能修复'
|
||||
],
|
||||
[
|
||||
'is_enable' => 1,
|
||||
'name' => '日志清除',
|
||||
'url' => MyUrl('admin/cache/logdelete'),
|
||||
'desc' => '清除站点日志'
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
?>
|
File diff suppressed because one or more lines are too long
@ -1298,7 +1298,8 @@ $(function()
|
||||
$('.chosen-select').chosen({
|
||||
inherit_select_classes: true,
|
||||
enable_split_word_search: true,
|
||||
search_contains: true
|
||||
search_contains: true,
|
||||
no_results_text: '没有匹配到结果'
|
||||
});
|
||||
}
|
||||
// 多选插件 空内容失去焦点验证bug兼容处理
|
||||
|
@ -18975,7 +18975,7 @@ UE.plugins['video'] = function (){
|
||||
html.push('</tr>')
|
||||
}
|
||||
//禁止指定table-width
|
||||
return '<table><tbody>' + html.join('') + '</tbody></table>'
|
||||
return '<table class="am-table am-table-bordered"><tbody>' + html.join('') + '</tbody></table>'
|
||||
}
|
||||
|
||||
if (!opt) {
|
||||
|
@ -32,6 +32,8 @@ button { outline: none; }
|
||||
.am-input-group-sm > .am-input-group-btn > .am-btn {
|
||||
height: 28px;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.am-input-group-sm > .am-input-group-label {
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
|
@ -11,40 +11,38 @@
|
||||
.goods-attr li { color: #888; line-height: 16px; }
|
||||
.original-price, .line-price { font-family: Verdana,Tahoma,arial; }
|
||||
.original-price { color: #9c9c9c; text-decoration: line-through; }
|
||||
.line-price { color: #3c3c3c; }
|
||||
.line-price, strong.total-price-content { font-weight: 700; }
|
||||
strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
.line-price { color: #3c3c3c; font-weight: 700; }
|
||||
.am-table { margin-bottom: 10px; }
|
||||
.am-table > tbody > tr > td { border-top: 1px solid #F5F5F5; }
|
||||
.am-table > thead > tr > th { border-bottom: 1px solid #f7f7f7; }
|
||||
|
||||
@media only screen and (min-width:640px) {
|
||||
.cart-content table tr .base { width: 40%; }
|
||||
.cart-content table tr .price { width: 20%; }
|
||||
.cart-content table tr .number { width: 20%; }
|
||||
.cart-content table tr .total-price { width: 20%; }
|
||||
.cart-content { margin-top: 20px; }
|
||||
.user-content-body table tr .row-base { width: 60%; }
|
||||
.user-content-body table tr .row-price { width: 40%; }
|
||||
}
|
||||
@media only screen and (max-width:640px) {
|
||||
.goods-detail img { width: 60px; height: 60px; }
|
||||
.goods-base { margin-left: 65px; }
|
||||
.goods-detail { min-height: 60px; }
|
||||
.user-content-body table tr .row-base { width: 60%; }
|
||||
.user-content-body table tr .row-price { width: 40%; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
.user-content-body table.am-table .operations {
|
||||
width: 100px;
|
||||
.user-content-body .order-base-panel {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.user-content-body .order-base-panel .am-panel-bd {
|
||||
padding-top: 5px;
|
||||
}
|
||||
.user-content-body .order-base-panel .am-alert-secondary {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹窗
|
||||
* 类型
|
||||
*/
|
||||
.user-content-body .aftersale-type {
|
||||
padding: 5px;
|
||||
}
|
||||
.user-content-body .aftersale-type .am-vertical-align {
|
||||
.user-content-body .aftersale-type .items-align {
|
||||
width: 49%;
|
||||
border: 1px solid #eee;
|
||||
padding: 10px;
|
||||
@ -55,40 +53,64 @@ strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
-o-transition: border-color .2s ease-in;
|
||||
transition: border-color .2s ease-in;
|
||||
}
|
||||
.user-content-body .aftersale-type .am-vertical-align.selected, .user-content-body .aftersale-type .am-vertical-align:hover {
|
||||
.user-content-body .aftersale-type .items-align.selected, .user-content-body .aftersale-type .items-align:hover {
|
||||
border: 1px solid #d2364c;
|
||||
box-shadow: 0px 0 0px 1px #d2364c;
|
||||
}
|
||||
.user-content-body .aftersale-type .am-vertical-align .icon {
|
||||
height: 75px;
|
||||
margin-right: 10px;
|
||||
.user-content-body .aftersale-type .items-middle {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.user-content-body .aftersale-type .am-vertical-align .icon i {
|
||||
font-size: 46px;
|
||||
.user-content-body .aftersale-type .items-align .icon {
|
||||
height: 70px;
|
||||
line-height: 70px;
|
||||
}
|
||||
.user-content-body .aftersale-type .items-align .icon i {
|
||||
font-size: 38px;
|
||||
color: #d2354c;
|
||||
}
|
||||
.user-content-body .aftersale-type .am-vertical-align .name {
|
||||
.user-content-body .aftersale-type .items-align p {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
}
|
||||
.user-content-body .aftersale-type .items-align .name {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
top: 12px;
|
||||
}
|
||||
.user-content-body .aftersale-type .am-vertical-align .desc {
|
||||
.user-content-body .aftersale-type .items-align .desc {
|
||||
color: #888;
|
||||
margin-top: 5px;
|
||||
top: 37px;
|
||||
}
|
||||
@media only screen and (max-width:460px) {
|
||||
.user-content-body .aftersale-type .items-align .icon i {
|
||||
font-size: 30px;
|
||||
}
|
||||
.user-content-body .aftersale-type .items-align p {
|
||||
left: 38px;
|
||||
}
|
||||
.user-content-body .aftersale-type .items-align .name {
|
||||
top: 0px;
|
||||
}
|
||||
.user-content-body .aftersale-type .items-align .desc {
|
||||
top: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 步骤
|
||||
*/
|
||||
.aftersale-step {
|
||||
margin: 10px 5px;
|
||||
margin: 10px 0px;
|
||||
overflow: hidden;
|
||||
height: 29px;
|
||||
}
|
||||
.aftersale-step li {
|
||||
float: left;
|
||||
width: 33.33%;
|
||||
padding: 5px 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #ccc;
|
||||
background: #e1e1e1;
|
||||
}
|
||||
.aftersale-step li .number {
|
||||
padding: 2px 6px;
|
||||
@ -98,7 +120,7 @@ strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
color: #b4b4b4;
|
||||
}
|
||||
.aftersale-step li .text {
|
||||
color: #fff;
|
||||
color: #666;
|
||||
margin-left: 2px;
|
||||
}
|
||||
.aftersale-step li i.am-icon-angle-right {
|
||||
@ -111,10 +133,13 @@ strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
color: #fff;
|
||||
}
|
||||
.aftersale-step li.selected {
|
||||
background: #d2354c;
|
||||
background: #4CAF50;
|
||||
}
|
||||
.aftersale-step li.selected .number {
|
||||
color: #d2354c;
|
||||
color: #4CAF50;
|
||||
}
|
||||
.aftersale-step li.selected .text {
|
||||
color: #fff;
|
||||
}
|
||||
.aftersale-step li.selected i.am-icon-caret-right {
|
||||
position: absolute;
|
||||
@ -122,8 +147,23 @@ strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
right: 5px;
|
||||
z-index: 1;
|
||||
font-size: 56px;
|
||||
color: #d2354c;
|
||||
color: #4CAF50;
|
||||
}
|
||||
.aftersale-step li.selected-end i.am-icon-angle-right {
|
||||
background: #ccc;
|
||||
background: #e1e1e1;
|
||||
}
|
||||
|
||||
.return-only-money-step li {
|
||||
width: 33.33%;
|
||||
}
|
||||
.return-money-goods-step li {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 表单
|
||||
*/
|
||||
form.form-validation .number-container .am-input-group-label {
|
||||
cursor: pointer;
|
||||
}
|
@ -19,18 +19,20 @@ table.data-list td { padding:10px; vertical-align: top; }
|
||||
.wap-base, .base-operate { padding-top: 3px; }
|
||||
.base-operate { margin-top: 3px; }
|
||||
.content-hd td span { color: #666; }
|
||||
.content-hd td span:not(:last-child) { margin-right: 20px; }
|
||||
@media only screen and (min-width: 641px){
|
||||
.row-content { width:35%; }
|
||||
@media only screen and (min-width: 641px) {
|
||||
.row-content { width:25%; }
|
||||
.row-price { width:15%; }
|
||||
.row-number { width:10%; }
|
||||
.row-goods-operate { width: 10%; }
|
||||
.row-total-price { width:20%; }
|
||||
.row-status { width:10%; }
|
||||
.row-operate { width:10%; }
|
||||
}
|
||||
@media only screen and (max-width: 641px){
|
||||
.row-content { width:55%; }
|
||||
.row-status { width:25%; }
|
||||
@media only screen and (max-width: 641px) {
|
||||
table.data-list td { padding: 5px; }
|
||||
.row-content { width:40%; }
|
||||
.row-goods-operate { width: 20%; }
|
||||
.row-status { width:20%; }
|
||||
.row-operate { width:20%; }
|
||||
}
|
||||
|
||||
@ -58,7 +60,7 @@ table.data-ongoing .base-operate { border-top: 1px dashed #fff1f5; }
|
||||
*/
|
||||
.goods-detail { position: relative; min-height: 80px; }
|
||||
.goods-detail img { width: 80px; height: 80px; position: absolute; left: 0; border: 1px solid #eee; }
|
||||
.goods-title { display: block; max-height: 36px; overflow: hidden; text-overflow: ellipsis; }
|
||||
.goods-title { display: -webkit-box; max-height: 36px; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
||||
.goods-title:hover { text-decoration: underline; }
|
||||
.goods-base { float: left; top: 0; margin-left: 85px; }
|
||||
.goods-attr { margin-top: 5px; }
|
||||
@ -67,11 +69,11 @@ table.data-ongoing .base-operate { border-top: 1px dashed #fff1f5; }
|
||||
.original-price { color: #9c9c9c; text-decoration: line-through; }
|
||||
.line-price { color: #3c3c3c; }
|
||||
.line-price, strong.total-price-content { font-weight: 700; }
|
||||
strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
strong.total-price-content { color: #d2364c; font-size: 14px; }
|
||||
@media only screen and (max-width:640px) {
|
||||
.goods-detail { min-height: 40px; }
|
||||
.goods-detail img { width: 40px; height: 40px; }
|
||||
.goods-base { margin-left: 45px; }
|
||||
.goods-detail .goods-images { display: none; }
|
||||
.goods-base { margin-left: 0px; }
|
||||
table.data-list td.row-status { border-left: 1px solid #eee; }
|
||||
table.data-ongoing td.row-status { border-left: 1px solid #fff1f5; }
|
||||
}
|
@ -1,55 +1,77 @@
|
||||
$(function()
|
||||
{
|
||||
var $popup = $('#aftersale-popup');
|
||||
|
||||
// 弹窗事件
|
||||
$('.user-content-body table.am-table .operations button').on('click', function()
|
||||
{
|
||||
var order_id = $(this).data('order-id') || 0;
|
||||
var goods_id = $(this).data('goods-id') || 0;
|
||||
var number = $(this).data('number') || 0;
|
||||
var price = $(this).data('price') || 0;
|
||||
if(order_id == 0 || goods_id == 0 || number == 0)
|
||||
{
|
||||
Prompt('参数配置有误');
|
||||
return false;
|
||||
}
|
||||
$popup.find('.am-form-group').addClass('none');
|
||||
$popup.find('input[name="order_id"]').val(order_id);
|
||||
$popup.find('input[name="goods_id"]').val(goods_id);
|
||||
$popup.find('input[name="number"]').val(number);
|
||||
$popup.find('input[name="number"]').attr('max', number);
|
||||
$popup.find('input[name="price"]').val(price);
|
||||
$('.aftersale-type .am-vertical-align').removeClass('selected');
|
||||
$popup.modal('open');
|
||||
});
|
||||
// 表单面板
|
||||
var $form_panel = $('.aftersale-form-panel');
|
||||
|
||||
// 类型切换
|
||||
$('.aftersale-type .am-vertical-align').on('click', function()
|
||||
$('.aftersale-type .items-align').on('click', function()
|
||||
{
|
||||
$('.aftersale-type .am-vertical-align').removeClass('selected');
|
||||
$('.aftersale-type .items-align').removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
|
||||
// 表单处理
|
||||
var type = $(this).data('type');
|
||||
if(type != undefined)
|
||||
{
|
||||
$popup.find('.am-form-group').removeClass('none');
|
||||
$popup.find('input[name="type"]').val(type);
|
||||
$form_panel.removeClass('none');
|
||||
$form_panel.find('input[name="type"]').val(type);
|
||||
}
|
||||
|
||||
var json = [];
|
||||
switch(type)
|
||||
{
|
||||
// 仅退款
|
||||
case 0 :
|
||||
$popup.find('.form-only-money').removeClass('none');
|
||||
$popup.find('.form-money-goods').addClass('none');
|
||||
json = $form_panel.find('select[name="reason"]').data('only-json') || null;
|
||||
$form_panel.find('.form-number').addClass('none');
|
||||
$('.return-only-money-step').removeClass('none');
|
||||
$('.return-money-goods-step').addClass('none');
|
||||
break;
|
||||
|
||||
// 退款退货
|
||||
case 1 :
|
||||
$popup.find('.form-only-money').addClass('none');
|
||||
$popup.find('.form-money-goods').removeClass('none');
|
||||
json = $form_panel.find('select[name="reason"]').data('goods-json') || null;
|
||||
$form_panel.find('.form-number').removeClass('none');
|
||||
$('.return-only-money-step').addClass('none');
|
||||
$('.return-money-goods-step').removeClass('none');
|
||||
break;
|
||||
}
|
||||
|
||||
// 退款原因
|
||||
if(json.length > 0)
|
||||
{
|
||||
var html = '';
|
||||
for(var i in json)
|
||||
{
|
||||
html += '<option value="'+json[i]+'">'+json[i]+'</option>';
|
||||
}
|
||||
$form_panel.find('select[name="reason"]').html(html);
|
||||
} else {
|
||||
$form_panel.find('select[name="reason"]').html('');
|
||||
Prompt('退款原因数据为空');
|
||||
}
|
||||
$form_panel.find('.chosen-select').val('').trigger('chosen:updated');
|
||||
});
|
||||
|
||||
// 数量加减
|
||||
$('.number-container .am-input-group-label').on('click', function()
|
||||
{
|
||||
var number = $('.number-container input').val();
|
||||
var max = $('.number-container input').attr('max') || 1;
|
||||
if(($(this).data('type') || 0) == 0)
|
||||
{
|
||||
number--;
|
||||
} else {
|
||||
number++;
|
||||
}
|
||||
if(number <= 0)
|
||||
{
|
||||
number = 1;
|
||||
}
|
||||
if(number > max)
|
||||
{
|
||||
number = max;
|
||||
}
|
||||
$('.number-container input').val(number);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user