添加网站文件
This commit is contained in:
428
application/admin/view/after_sale/detail.html
Normal file
428
application/admin/view/after_sale/detail.html
Normal file
@@ -0,0 +1,428 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.div-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
}
|
||||
.width-160 {
|
||||
width: 200px;
|
||||
}
|
||||
.layui-table th {
|
||||
text-align: center;
|
||||
}
|
||||
.table-margin{
|
||||
margin-left: 50px;
|
||||
margin-right: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.image{
|
||||
height:80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.mt50{
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="layui-card-body" >
|
||||
<!--基本信息-->
|
||||
<div class="layui-form" lay-filter="layuiadmin-form-after-sale" id="layuiadmin-form-after-sale" >
|
||||
<input type="hidden" class="after_sale_id" name="after_sale_id" value="{$detail.id}">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>售后信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">售后单号:</label>
|
||||
<div class="width-160">{$detail.sn}</div>
|
||||
<label class="layui-form-label ">申请时间:</label>
|
||||
<div class="width-160">{$detail.create_time}</div>
|
||||
<label class="layui-form-label ">退款方式:</label>
|
||||
<div class="width-160 refund_type_text">{$detail.refund_type_text}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">退款金额:</label>
|
||||
<div class="width-160 refund_price_text">¥{$detail.refund_price}</div>
|
||||
<label class="layui-form-label ">退款原因:</label>
|
||||
<div class="width-160 ">{$detail.refund_reason}</div>
|
||||
<label class="layui-form-label ">退款说明:</label>
|
||||
<div class="width-160">{$detail.refund_remark}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">申请状态:</label>
|
||||
<div class="width-160">{$detail.status_text}</div>
|
||||
<label class="layui-form-label ">售后说明:</label>
|
||||
<div class="width-160">{$detail.admin_remark}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>订单信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">订单编号:</label>
|
||||
<div class="width-160">{$detail.order.order_sn}</div>
|
||||
<label class="layui-form-label ">订单金额:</label>
|
||||
<div class="width-160">¥{$detail.order.order_amount}</div>
|
||||
<label class="layui-form-label ">付款方式:</label>
|
||||
<div class="width-160 pay_way_text">{$detail.order.pay_way}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">配送方式:</label>
|
||||
<div class="width-160">物流配送</div>
|
||||
<label class="layui-form-label ">订单状态:</label>
|
||||
<div class="width-160">{$detail.order.order_status}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>会员信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">会员编号:</label>
|
||||
<div class="width-160">{$detail.user.sn}</div>
|
||||
<label class="layui-form-label ">会员昵称:</label>
|
||||
<div class="width-160">{$detail.user.nickname}</div>
|
||||
<label class="layui-form-label ">手机号码:</label>
|
||||
<div class="width-160">{$detail.user.mobile}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">性别:</label>
|
||||
<div class="width-160">{$detail.user.sex}</div>
|
||||
<label class="layui-form-label ">注册时间:</label>
|
||||
<div class="width-160">{$detail.user.create_time}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>退款商品</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item table-margin">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="250">
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商品信息</th>
|
||||
<th>价格(元)</th>
|
||||
<th>数量</th>
|
||||
<th>小计(元)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $detail.order_goods as $k => $goods}
|
||||
<tr>
|
||||
<td>
|
||||
<div style="text-align: left">
|
||||
<div class="layui-col-md3">
|
||||
<img src="{$goods.image}" class="image-show image" >
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<p style="margin-top: 10px">{$goods.goods_name}</p>
|
||||
<br>
|
||||
<p>{$goods.spec_value}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>¥{$goods.goods_price}</td>
|
||||
<td>{$goods.goods_num}</td>
|
||||
<td>{$goods.total_price}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
<td style="text-align: left;">
|
||||
<div>退款金额:<span style="color: red">¥{$detail.refund_price}</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{if condition = "$detail.status egt 3 && $detail.invoice_no neq null && $detail.refund_type eq 1"}
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>收货信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">快递公司:</label>
|
||||
<div class="width-160">{$detail.express_name}</div>
|
||||
<label class="layui-form-label ">快递单号:</label>
|
||||
<div class="width-160">{$detail.invoice_no}</div>
|
||||
<label class="layui-form-label ">快递说明:</label>
|
||||
<div class="width-160">{$detail.express_remark}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">退货地址:</label>
|
||||
<div class="width-160 refund_address_text">{$detail.shop_address}</div>
|
||||
<label class="layui-form-label ">入库方式:</label>
|
||||
<div class="width-160"></div>
|
||||
<label class="layui-form-label ">收货时间:</label>
|
||||
<div class="width-160">{$detail.confirm_take_time}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>售后操作</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex ">
|
||||
<div class="layui-input-block ">
|
||||
|
||||
{eq name="$detail.status" value="0"}
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="agree">商家同意</button>
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-danger width_160 " id="refuse">商家拒绝</button>
|
||||
{/eq}
|
||||
|
||||
|
||||
{eq name="$detail.status" value="3"}
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="take_goods">商家收货</button>
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-danger width_160 " id="refuse_goods">拒绝收货</button>
|
||||
{/eq}
|
||||
|
||||
{eq name="$detail.status" value="5"}
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="confirm">确认退款</button>
|
||||
{/eq}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>售后日志</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<div class="layui-input-block ">
|
||||
<ul class="layui-timeline">
|
||||
{volist name="$detail.logs" id="vo"}
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h3 class="layui-timeline-title">{$vo.content}({$vo.create_time})</h3>
|
||||
<!--日志备注-->
|
||||
{notempty name="$vo.log_remark"}
|
||||
<h4>{$vo.log_remark}</h4>
|
||||
{/notempty}
|
||||
<!--日志图片-->
|
||||
{notempty name="$vo.log_img"}
|
||||
<img src="{$vo.log_img}" alt="" width="80" height="80" class="image-show">
|
||||
{/notempty}
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'element', 'jquery', 'like'], function () {
|
||||
var $ = layui.$;
|
||||
var like = layui.like;
|
||||
|
||||
//主图放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,400);
|
||||
});
|
||||
|
||||
var id = $('.after_sale_id').val();
|
||||
var pay_way = $('.pay_way_text').text();
|
||||
var refund_type = $('.refund_type_text').text();
|
||||
var refund_price = $('.refund_price_text').text();
|
||||
var refund_address = $('.refund_address_text').text();
|
||||
|
||||
//商家同意
|
||||
$('#agree').click(function () {
|
||||
layer.confirm(
|
||||
"提示:该笔订单通过" + pay_way + "付款,商家同意后,退款将自动原路退回会员账户。"+"<br/>"+
|
||||
"退款方式:"+ refund_type + "<br/>"+
|
||||
"退款金额:"+ "<span style='color: red'>"+refund_price+"</span>", {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("after_sale/agree")}'
|
||||
, data: {'id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//商家拒绝
|
||||
$('#refuse').click(function () {
|
||||
layer.confirm(
|
||||
"提示:请与会员协商后确认拒绝申请,会员可再次发起退款。"+"<br/>"+
|
||||
"退款方式:"+ refund_type + "<br/>"+
|
||||
"退款金额:"+ "<span style='color: red'>"+refund_price+"</span>"+ "<br/>"+
|
||||
"拒绝原因:"+"<textarea id='remark' name='remark' class='layui-textarea' type='text' style='height:100px'></textarea>", {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
var remark = $('#remark').val();
|
||||
if (remark == null || remark == undefined || remark == ''){
|
||||
layer.msg('请填写拒绝原因!');
|
||||
return false;
|
||||
}
|
||||
like.ajax({
|
||||
url: '{:url("after_sale/refuse")}'
|
||||
, data: {'id': id,'remark':remark}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//商家收货
|
||||
$('#take_goods').click(function () {
|
||||
layer.confirm(
|
||||
"提示:该笔订单通过" + pay_way + "付款,商家同意后,退款将自动原路退回会员账户。"+"<br/>"+
|
||||
"退款方式:"+ refund_type + "<br/>"+
|
||||
"退款金额:"+ "<span style='color: red'>"+refund_price+"</span>"+ "<br/>"+
|
||||
"退货地址:"+ refund_address, {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("after_sale/take")}'
|
||||
, data: {'id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
//商家拒绝收货
|
||||
$('#refuse_goods').click(function () {
|
||||
layer.confirm(
|
||||
"提示:请与会员协商后确认拒绝申请,会员可再次发起退款。"+"<br/>"+
|
||||
"退款方式:"+ refund_type + "<br/>"+
|
||||
"退款金额:"+ "<span style='color: red'>"+refund_price+"</span>"+ "<br/>"+
|
||||
"拒绝原因:"+"<textarea id='remark' name='remark' class='layui-textarea' type='text' style='height:100px'></textarea>", {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
var remark = $('#remark').val();
|
||||
if (remark == null || remark == undefined || remark == ''){
|
||||
layer.msg('请填写拒绝原因!');
|
||||
return false;
|
||||
}
|
||||
like.ajax({
|
||||
url: '{:url("after_sale/refuseGoods")}'
|
||||
, data: {'id': id,'remark':remark}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
//确认退款
|
||||
$('#confirm').click(function () {
|
||||
layer.confirm(
|
||||
"提示:该笔订单通过" + pay_way + "付款,商家确认退款后,退款将自动原路退回会员账户。"+"<br/>"+
|
||||
"退款方式:"+ refund_type + "<br/>"+
|
||||
"退款金额:"+ "<span style='color: red'>"+refund_price+"</span>", {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("after_sale/confirm")}'
|
||||
, data: {'id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
302
application/admin/view/after_sale/lists.html
Normal file
302
application/admin/view/after_sale/lists.html
Normal file
@@ -0,0 +1,302 @@
|
||||
{layout name="layout1" /}
|
||||
<style>
|
||||
.layui-table-cell {
|
||||
height:auto;
|
||||
}
|
||||
.goods-content>div:not(:last-of-type) {
|
||||
border-bottom:1px solid #DCDCDC;
|
||||
}
|
||||
.goods-info::after{
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
.goods_name_hide{
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<p>*会员提交的售后退款订单列表。</p>
|
||||
<p>*订单状态处于待收货,已完成(在售后退款时效内)时,会员可提交售后退款。</p>
|
||||
<p>*退货退款售后申请店铺需要确认收货后才能退款。</p>
|
||||
<p>*店铺同意退款后处于等待退款状态,由平台会自动进行原路退款操作。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab layui-tab-card" lay-filter="tab-all">
|
||||
|
||||
<ul class="layui-tab-title">
|
||||
<li data-type='' class="layui-this">全部</li>
|
||||
{foreach $status as $item => $val}
|
||||
<li data-type="{$item}">{$val}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-row">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">售后搜索:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="search_key" id="search_key">
|
||||
<option value="sn">售后单号</option>
|
||||
<option value="order_sn">订单编号</option>
|
||||
<option value="goods_name">商品名称</option>
|
||||
<option value="user_sn">会员编号</option>
|
||||
<option value="nickname">会员昵称</option>
|
||||
<option value="user_mobile">手机号码</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<input type="text" name="keyword" id="keyword" placeholder="请输入搜索内容"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-inline status">
|
||||
<label class="layui-form-label">申请状态:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="status" id="status">
|
||||
<option value="">全部</option>
|
||||
{foreach $status as $item => $val}
|
||||
<option value="{$item}">{$val}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">申请时间:</label>
|
||||
<div class="layui-input-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="start_time" class="layui-input" id="start_time"
|
||||
placeholder="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline" style="margin-right: 5px;width: 20px;">
|
||||
<label class="layui-form-mid">至</label>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="end_time" class="layui-input" id="end_time"
|
||||
placeholder="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
|
||||
lay-filter="after-sale-search">查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
|
||||
lay-filter="after-sale-clear-search">清空查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card-body">
|
||||
<table id="after-sale-lists" lay-filter="after-sale-lists"></table>
|
||||
|
||||
<script type="text/html" id="after-sale-operation">
|
||||
<div style="text-align: left;margin-left: 10px">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-sm" lay-event="detail">售后详情</a>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="image">
|
||||
<img src="{{d.image}}" style="height:80px;width: 80px" class="image-show">
|
||||
</script>
|
||||
|
||||
<!--订单信息-->
|
||||
<script type="text/html" id="order">
|
||||
<div style="text-align: left">
|
||||
<p>订单编号:{{d.order.order_sn}}</p>
|
||||
<p>订单金额:{{d.order.total_amount}}</p>
|
||||
<p>付款方式:{{d.order.pay_way}}</p>
|
||||
<p>订单状态:{{d.order.order_status}}</p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!--会员信息-->
|
||||
<script type="text/html" id="user">
|
||||
<img src="{{d.user.avatar}}" style="height:80px;width: 80px" class="image-show">
|
||||
<div class="layui-input-inline" style="text-align: left">
|
||||
<p>会员编号:{{d.user.sn}}</p>
|
||||
<p>昵称:{{d.user.nickname}}</p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!--商品信息-->
|
||||
<script type="text/html" id="goods">
|
||||
<div class="goods-content">
|
||||
{{# layui.each(d.order_goods, function(index, item){ }}
|
||||
<div style="text-align: left;" class="goods-info">
|
||||
<img src="{{ item.base_image }}" style="height:80px;width: 80px" class="image-show layui-col-md4">
|
||||
<div class="layui-input-inline layui-col-md8">
|
||||
<span class="layui-col-md7 goods_name_hide">{{ item.goods_name }}</span>
|
||||
<span class="layui-col-md5">¥{{ item.goods_price }}</span>
|
||||
<br>
|
||||
<span class="layui-col-md7 goods_name_hide">{{ item.spec_value }}</span>
|
||||
<span class="layui-col-md5">{{ item.goods_num }}件</span>
|
||||
</div>
|
||||
</div>
|
||||
{{# }); }}
|
||||
</div>
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'table', 'like', 'laydate'], function () {
|
||||
var $ = layui.$
|
||||
, form = layui.form
|
||||
, table = layui.table
|
||||
, like = layui.like
|
||||
, element = layui.element
|
||||
, laydate = layui.laydate;
|
||||
|
||||
//图片放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(after-sale-search)', function (data) {
|
||||
var field = data.field;
|
||||
//执行重载
|
||||
table.reload('after-sale-lists', {
|
||||
where: field,
|
||||
page: {
|
||||
curr: 1
|
||||
},
|
||||
});
|
||||
});
|
||||
//清空查询
|
||||
form.on('submit(after-sale-clear-search)', function () {
|
||||
$('#keyword').val('');
|
||||
$('#status').val('');
|
||||
$('#pay_way').val('');
|
||||
$('#order_source').val('');
|
||||
$('#start_time').val('');
|
||||
$('#end_time').val('');
|
||||
form.render('select');
|
||||
//刷新列表
|
||||
table.reload('after-sale-lists', {
|
||||
where: [],
|
||||
page: {
|
||||
curr: 1
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
|
||||
//获取列表
|
||||
getList('');
|
||||
//切换列表
|
||||
element.on('tab(tab-all)', function (data) {
|
||||
$('#keyword').val('');
|
||||
$('#status').val('');
|
||||
$('#start_time').val('');
|
||||
$('#end_time').val('');
|
||||
form.render('select');
|
||||
var type = $(this).attr('data-type');
|
||||
getList(type);
|
||||
if (type !== ''){
|
||||
$('.status').hide();
|
||||
}else {
|
||||
$('.status').show();
|
||||
}
|
||||
});
|
||||
|
||||
function getList(type) {
|
||||
table.render({
|
||||
elem: '#after-sale-lists'
|
||||
, url: '{:url("after_sale/lists")}?type=' + type
|
||||
, cols: [[
|
||||
{field:'id',title: 'id',width:60,align: 'center'}
|
||||
, {field: 'sn', title: '售后单号', align: 'center',width:160}
|
||||
, {field: 'order', title: '订单信息', align: 'center',templet:'#order',width:230}
|
||||
, {field: 'user', title: '退款人', templet:'#user',width:310}
|
||||
, {field: 'order_goods', title: '退款商品', align: 'center',templet:'#goods',width:260}
|
||||
, {field: 'refund_type', title: '退款方式', align: 'center',width:100}
|
||||
, {field: 'refund_price', title: '退款金额', align: 'center',width:100}
|
||||
, {field: 'status', title: '售后状态', align: 'center',width:100}
|
||||
, {field: 'create_time', title: '申请时间', align: 'center',width:90}
|
||||
, {fixed: 'right', title: '操作', width: 100, align: 'center', toolbar: '#after-sale-operation'}
|
||||
]]
|
||||
, page: true
|
||||
, text: {none: '暂无数据!'}
|
||||
, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code": res.code,
|
||||
"msg": res.msg,
|
||||
"count": res.data.count, //解析数据长度
|
||||
"data": res.data.lists, //解析数据列表
|
||||
};
|
||||
}
|
||||
,done: function(res, curr, count){
|
||||
// 解决操作栏因为内容过多换行问题
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//监听工具条
|
||||
table.on('tool(after-sale-lists)', function (obj) {
|
||||
var id = obj.data.id;
|
||||
if(obj.event === 'detail'){
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '售后详情'
|
||||
,content: '{:url("after_sale/detail")}?id='+id
|
||||
,area: ['90%', '90%']
|
||||
,btn: ['返回']
|
||||
,yes: function(index, layero){
|
||||
layer.close(index);
|
||||
table.reload('after-sale-lists'); //数据刷新
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user