作者 lihan
1 个管道 的构建 通过 耗费 0 秒

退货&退款

... ... @@ -282,6 +282,44 @@ class CenterController extends HomeBaseController
}
}
//退款
public function refundPay()
{
$request = request();
$oid = $request->param('oid');
if ($request->isAjax()) {
$data = [
'id' => $request->param('oid'),
'cause' => $request->param('cause'),
'company' => $request->param('company'),
'com_order' => $request->param('com_order'),
'step' => 8
];
if(Db::name('zj_order')->update($data)) {
$this->success('请等待审核', url('user/Center/orderList'), true);
}else {
$this->success('提交失败', '', false);
}
} else {
$order = Db::name('zj_order')->field('order_num,cause')->where(['id' => $oid])->find();
$list = Db::name('zj_order_goods')->alias('o')
->field('g.name,g.intro,g.price,g.thumb,o.num')
->join('zj_goods g', 'g.id=o.gid')
->where(['o.oid' => $oid])
->select();
foreach ($list as $k => $v) {
$v['thumb'] = cmf_get_image_url($v['thumb']);
$list[$k] = $v;
}
return $this->fetch('refund_pay', [
'order_sn' => $order['order_num'],
'cause' => $order['cause'],
'list' => $list,
'oid' => $oid
]);
}
}
//物流跟踪
public function tracking()
{
... ...
... ... @@ -121,10 +121,10 @@
<p class="cancelorder refund_detail" data-url="{:url('user/Center/refundDetail',['oid'=>$vo['id']])}">退货详情</p>
</if>
<if condition="$vo['step'] eq '7'">
<p class="cancelorder refund_detail" data-url="{:url('user/Center/refundPay',['oid'=>$vo['id']])}">申请退款</p>
<p class="cancelorder refund_pay" data-url="{:url('user/Center/refundPay',['oid'=>$vo['id']])}">申请退款</p>
</if>
<if condition="$vo['step'] eq '8'">
<p class="cancelorder refund_detail" data-url="{:url('user/Center/refundPayDetail',['oid'=>$vo['id']])}">退款详情</p>
<p class="cancelorder refund_pay_detail" data-url="{:url('user/Center/refundPayDetail',['oid'=>$vo['id']])}">退款详情</p>
</if>
<if condition="$vo['step'] eq '9'">
<p class="cancelorder">已退款</p>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://at.alicdn.com/t/font_834805_0ml90wdq5hzm.css">
<link rel="stylesheet" href="__INDEX__/css/base.css">
<link rel="stylesheet" href="__INDEX__/css/application.css">
<link rel="stylesheet" href="__INDEX__/css/swiper.min.css">
<script type="text/javascript" src="__INDEX__/js/base.js"></script>
<title>退款申请</title>
<style>
.sub{
width:6.86rem;
height:0.88rem;
position:fixed;
bottom:0.54rem;
left:0;
right:0;
margin: 0 auto;
background: #FE0A01;
box-shadow:0px 15px 30px 0px rgba(254,10,1,0.24);
border-radius:0.44rem;
font-size:0.32rem ;
color:#fff;
text-align: center;
line-height: 0.88rem;
}
</style>
</head>
<body>
<div class="container">
<div class="item_order_list">
<div class="order_head">
<div class="order_num">
<p class="order_list_num">订单号:</p>
<p class="item_num">{$order_sn}</p>
</div>
<p class="order_type">待审核</p>
</div>
<volist name="list" id="vo">
<div class="order_content">
<div class="order_content_item">
<p class="content_item_img">
<img src="{$vo.thumb}" alt="">
</p>
<div class="content_text">
<p class="good_name">{$vo.name}</p>
<div class="good_test">
<p class="item_tast">{$vo.intro}</p>
<p class="tast_num">x{$vo.num}</p>
</div>
<p class="item_price">
<span class="item_money">{$vo.price}</span>
</p>
</div>
</div>
</div>
</volist>
</div>
<!--退款原因-->
<div class="reason">
<p class="reason_title">退款原因</p>
<div class="goodreason">
物品损坏无法食用
物品损坏无法食用
物品损坏无法食用
物品损坏无法食用
物品损坏无法食用
</div>
</div>
<!--客服电话-->
<p class="phone">
退款客服电话:400-46821594
</p>
<div class="express">
<span>快递方:</span>
<input type="text" placeholder="申通快递" style="width:5rem;border:none;outline:none;background: #F7F8FA">
</div>
<div class="express_num">
<span>快递单号:</span>
<input type="text" placeholder="208093215648216" style="width:4.5rem;border:none;outline:none;background: #F7F8FA">
</div>
<div class="sub">提交</div>
</div>
<script type="text/javascript" src="__INDEX__/js/jquery.min.js"></script>
</body>
</html>
... ...