Commit cd3cc24f by 朱继来

Merge branch 'zjl_pay_refund_20190123' into development

parents 19a6281d 080a8e48
...@@ -103,11 +103,27 @@ class RefundController extends Controller ...@@ -103,11 +103,27 @@ class RefundController extends Controller
return $data; return $data;
} }
// 联营退款列表
public function jointRefundList(Request $request)
{
$info = $this->refundList($request, 1);
return view('refundlist', $info);
}
// 自营退款列表
public function selfRefundList(Request $request)
{
$info = $this->refundList($request, 2);
return view('refundlist', $info);
}
// 退款申请列表 // 退款申请列表
public function refundList(Request $request) public function refundList(Request $request, $type)
{ {
$info = $this->getPageInfo($request); $info = $this->getPageInfo($request);
$info['title'] = '退款申请列表'; $info['title'] = $type == 1 ? '联营退款申请列表' : '自营退款申请列表';
$map['order_sn'] = $request->input('order_sn', ''); $map['order_sn'] = $request->input('order_sn', '');
$map['sku_name'] = $request->input('sku_name', ''); $map['sku_name'] = $request->input('sku_name', '');
...@@ -115,7 +131,7 @@ class RefundController extends Controller ...@@ -115,7 +131,7 @@ class RefundController extends Controller
$map['apply_status'] = $request->input('apply_status', ''); $map['apply_status'] = $request->input('apply_status', '');
$map['time_start'] = $request->input('time_start', ''); $map['time_start'] = $request->input('time_start', '');
$map['time_end'] = $request->input('time_end', ''); $map['time_end'] = $request->input('time_end', '');
$map['order_goods_type'] = 1; // 联营退货 $map['order_goods_type'] = $type; // 类型
//获取订单列表 //获取订单列表
$url = Config('website.api_domain').'refund/getRefundOrderList'; $url = Config('website.api_domain').'refund/getRefundOrderList';
...@@ -138,28 +154,43 @@ class RefundController extends Controller ...@@ -138,28 +154,43 @@ class RefundController extends Controller
$info['count'] = $response['data']['count']; $info['count'] = $response['data']['count'];
$info['page'] = $show; $info['page'] = $show;
return view('refundlist', $info); return $info;
} }
// 退款导出 // 联营退款导出
public function refundExport(Request $request) public function refundExport(Request $request)
{ {
$refundModel = new RefundModel(); $refundModel = new OrderRefundModel();
return $refundModel->jointExport($request);
}
$refundModel->export($request); // 自营退款导出
public function refundSelfExport(Request $request)
{
$refundModel = new OrderRefundModel();
return $refundModel->selfExport($request);
} }
// 退货详情 // 退货详情
public function refundDetails(Request $request, $id) public function refundDetails(Request $request, $id)
{ {
$info = $this->getPageInfo($request); $info = $this->getPageInfo($request);
$info['title'] = '订单退货详情';
$info['paths'] = [["title" => '联营订单', "href" => '#'], ["title" => '退款申请列表', "href" => '/refund_order'], ["title" => '订单退货详情', "href" => '#']];
$OrderRefundModel = new OrderRefundModel(); $OrderRefundModel = new OrderRefundModel();
$info['refund'] = $OrderRefundModel->find($id); $info['refund'] = $OrderRefundModel->find($id);
$info['refundItems'] = $OrderRefundModel->find($id)->hasManyRefundItems; $info['refundItems'] = $OrderRefundModel->find($id)->hasManyRefundItems;
if ($info['refund']['order_goods_type'] == 1) {
$title = '联营订单';
$refund_url = '/refund_order';
} else {
$title = '自营订单';
$refund_url = '/refund_self_order';
}
$info['title'] = '订单退货详情';
$info['paths'] = [["title" => $title, "href" => '#'], ["title" => '退款申请列表', "href" => $refund_url], ["title" => '订单退货详情', "href" => '#']];
return view('refundDetails', $info); return view('refundDetails', $info);
} }
...@@ -167,12 +198,12 @@ class RefundController extends Controller ...@@ -167,12 +198,12 @@ class RefundController extends Controller
public function walletRefund(Request $request, $id) public function walletRefund(Request $request, $id)
{ {
// 获取退款单 // 获取退款单
$refund = DB::connection('order')->table('lie_order_refund')->where('refund_id', $id)->first(); // $refund = DB::connection('order')->table('lie_order_refund')->where('refund_id', $id)->first();
if (!$refund) echo '未获取到退款单'; if (!$id) echo '未获取到退款单';
$data['order_id'] = $refund->order_id; $data['refund_id'] = $id;
$data['refund_amount'] = number_format($refund->pay_amount - $refund->price_fall, 2, '.', ''); // $data['refund_amount'] = number_format($refund->pay_amount - $refund->price_fall, 2); // 最終退款金額
$data['pay_code'] = 'unionpay'; $data['pay_code'] = 'unionpay';
$url = Config('website.api_domain').'refund/recharge'; $url = Config('website.api_domain').'refund/recharge';
...@@ -187,4 +218,16 @@ class RefundController extends Controller ...@@ -187,4 +218,16 @@ class RefundController extends Controller
echo $temp; echo $temp;
} }
// 自营取消退款申请
public function cancelSelfRefund(Request $request)
{
$refund_id = $request->input('refund_id');
$update = DB::connection('order')->table('lie_order_refund')->where('refund_id', $refund_id)->update(['status' => -1]);
if (!$update) return ['errcode' => 1, 'errmsg' => '取消申请失败'];
return ['errcode' => 0, 'errmsg' => '取消申请成功'];
}
} }
...@@ -108,10 +108,14 @@ Route::group(['middleware' => 'web'], function () { ...@@ -108,10 +108,14 @@ Route::group(['middleware' => 'web'], function () {
Route::match(['get', 'post'], '/refund/{id}', 'OrderController@refund'); Route::match(['get', 'post'], '/refund/{id}', 'OrderController@refund');
Route::get('/refund_order', 'RefundController@refundList'); Route::get('/refund_order', 'RefundController@jointRefundList');
Route::get('/refund_export', 'RefundController@refundExport'); Route::get('/refund_export', 'RefundController@refundExport');
Route::get('/refund_details/{id}', 'RefundController@refundDetails'); Route::get('/refund_details/{id}', 'RefundController@refundDetails');
Route::match(['get', 'post'], '/wallet_refund/{id}', 'RefundController@walletRefund'); Route::match(['get', 'post'], '/wallet_refund/{id}', 'RefundController@walletRefund');
Route::get('/refund_self_order', 'RefundController@selfRefundList');
Route::post('/ajax/cancelSelfRefund', 'RefundController@cancelSelfRefund');
Route::get('/refund_self_export', 'RefundController@refundSelfExport');
}); });
// 不需要登陆态 // 不需要登陆态
......
...@@ -20,8 +20,8 @@ class OrderRefundModel extends Model ...@@ -20,8 +20,8 @@ class OrderRefundModel extends Model
return $this->hasMany('App\Model\OrderRefundItemsModel', 'refund_id', 'refund_id'); return $this->hasMany('App\Model\OrderRefundItemsModel', 'refund_id', 'refund_id');
} }
// 订单导出 // 联营订单导出
public function export($request, $type=1) // type: 1-联营,2-自营 public function jointExport($request)
{ {
set_time_limit(0); set_time_limit(0);
ini_set('memory_limit', '512M'); ini_set('memory_limit', '512M');
...@@ -36,8 +36,8 @@ class OrderRefundModel extends Model ...@@ -36,8 +36,8 @@ class OrderRefundModel extends Model
$map['apply_status'] = $request->input('apply_status', ''); $map['apply_status'] = $request->input('apply_status', '');
$list = $this->from('lie_order_refund_items as it') $list = $this->from('lie_order_refund_items as it')
->leftJoin('lie_order_refund as r', function($join) use ($type) { ->leftJoin('lie_order_refund as r', function($join) {
$join->on('it.refund_id', '=', 'r.refund_id')->where('r.refund_type', '=', 2)->where('r.order_goods_type', '=', $type); $join->on('it.refund_id', '=', 'r.refund_id')->where('r.refund_type', '=', 2)->where('r.order_goods_type', '=', 1);
}) })
->leftJoin('lie_user_main as u', 'r.create_uid', '=', 'u.user_id') ->leftJoin('lie_user_main as u', 'r.create_uid', '=', 'u.user_id')
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
...@@ -83,7 +83,7 @@ class OrderRefundModel extends Model ...@@ -83,7 +83,7 @@ class OrderRefundModel extends Model
array_unshift($cellData, $headerCell); array_unshift($cellData, $headerCell);
$fileName = $type == 1 ? '联营退货订单导出'.date('_YmdHis') : '自营退货订单导出'.date('_YmdHis'); $fileName = '联营退货订单导出'.date('_YmdHis');
Excel::create($fileName, function($excel) use ($cellData){ Excel::create($fileName, function($excel) use ($cellData){
$excel->sheet('退货订单导出', function($sheet) use ($cellData){ $excel->sheet('退货订单导出', function($sheet) use ($cellData){
...@@ -153,4 +153,116 @@ class OrderRefundModel extends Model ...@@ -153,4 +153,116 @@ class OrderRefundModel extends Model
return $tmp; return $tmp;
} }
// 获取自营商品型号
public function getGoodsName($goods_id)
{
$goods_info = json_decode(Redis::hget('Self_SelfGoods', $goods_id), true);
return $goods_info['goods_name'];
}
// 自营订单导出
public function selfExport($request)
{
set_time_limit(0);
ini_set('memory_limit', '512M');
$map = array();
// 页面参数
$map['order_sn'] = $request->input('order_sn', '');
$map['sku_name'] = $request->input('sku_name', '');
$map['time_start'] = $request->input('time_start', '');
$map['time_end'] = $request->input('time_end', '');
$map['apply_status'] = $request->input('apply_status', '');
$list = $this->from('lie_order_refund as r')
->leftJoin('lie_user_main as u', 'r.create_uid', '=', 'u.user_id')
->where('r.refund_type', '=', 1)
->where('r.order_goods_type', '=', 2)
->where(function ($query) use ($map) {
// 订单编号
if (!empty($map['order_sn'])) {
$query->where('r.order_sn', '=', $map['order_sn']);
}
})
->where(function ($query) use ($map) {
// 创建时间
if (!empty($map['time_start']) && !empty($map['time_end'])) {
$query->whereBetween('r.create_time', [$map['time_start'], $map['time_end']]);
} else if (!empty($map['time_start'])) {
$query->where('r.create_time', '>', $map['time_start']);
} else if (!empty($map['time_end'])) {
$query->where('r.create_time', '<', $map['time_end']);
}
})
->where(function ($query) use ($map) {
// 订单状态
if (!empty($map['apply_status'])) {
$query->whereIn('r.status', explode(',', $map['apply_status']));
}
})
->select('r.order_id', 'r.order_sn', 'r.order_goods_type', 'r.currency', 'r.pay_amount', 'r.price_fall', 'r.create_uid', 'r.status', 'r.refund_reason', 'r.create_time', 'r.refund_time', 'u.mobile', 'u.email')
->orderBy('r.create_time', 'DESC')
->get()
->toArray();
if (!empty($list)) {
// 订单数据处理
$cellData = $this->selfExportList($list);
// 标题
$headerCell = ['订单ID', '订单编号', '会员账号', '退货原因', '后台操作人', '创建时间', '退货处理状态', '退货处理时间'];
array_unshift($cellData, $headerCell);
$fileName = '自营退货订单导出'.date('_YmdHis');
Excel::create($fileName, function($excel) use ($cellData){
$excel->sheet('退货订单导出', function($sheet) use ($cellData){
$sheet->rows($cellData);
});
})->export('xls');
} else {
return redirect('/prompt')->with(['message'=>"数据为空无法导出!",'url'=>$_SERVER['HTTP_REFERER'], 'jumpTime'=>3,'status'=>false]);
}
}
/**
* 导出数据处理
* @param [type] $order [查询出的订单数据]
* @return [type] [description]
*/
public function selfExportList($order)
{
// 订单类型
$apply_status = array(
'-1' => '已拒绝',
'1' => '待处理',
'10' => '已处理',
);
$tmp = array();
for ($i = 0; $i < count($order); $i++) {
// 推送人
if ($order[$i]['create_uid']) {
$sales = DB::table('user_info')->where(['userId' => $order[$i]['create_uid']])->select('name')->first();
}
$tmp[$i]['order_id'] = $order[$i]['order_id'];
$tmp[$i]['order_sn'] = "\t".$order[$i]['order_sn']."\t";
$tmp[$i]['user_account'] = $order[$i]['mobile'] ? $order[$i]['mobile'] : $order[$i]['email'];
$tmp[$i]['refund_reason'] = $order[$i]['refund_reason'];
$tmp[$i]['sale_name'] = isset($sales) ? $sales->name : ''; // 推送业务员
$tmp[$i]['create_time'] = date('Y-m-d H:i:s', $order[$i]['create_time']);
$tmp[$i]['status'] = $apply_status[$order[$i]['status']];
$tmp[$i]['refund_time'] = $order[$i]['refund_time'] ? date('Y-m-d H:i:s', $order[$i]['refund_time']) : '';
unset($sales);
}
return $tmp;
}
} }
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Redis;
use Request;
use Excel;
use DB;
class OrderRefundModel extends Model
{
protected $connection = 'order';
protected $table = 'lie_order_refund';
protected $primaryKey = 'refund_id';
public $timestamps = false;
// 获取联系人信息
public function hasManyRefundItems()
{
return $this->hasMany('App\Model\RefundItemsModel', 'refund_id', 'refund_id');
}
// 订单导出
public function export($request, $type=1) // type: 1-联营,2-自营
{
set_time_limit(0);
ini_set('memory_limit', '512M');
$map = array();
// 页面参数
$map['order_sn'] = $request->input('order_sn', '');
$map['sku_name'] = $request->input('sku_name', '');
$map['time_start'] = $request->input('time_start', '');
$map['time_end'] = $request->input('time_end', '');
$map['apply_status'] = $request->input('apply_status', '');
$list = $this->from('lie_order_refund_items as it')
->leftJoin('lie_order_refund as r', function($join) use ($type) {
$join->on('it.refund_id', '=', 'r.refund_id')->where('r.refund_type', '=', 2)->where('r.order_goods_type', '=', $type);
})
->leftJoin('lie_user_main as u', 'r.create_uid', '=', 'u.user_id')
->where(function ($query) use ($map) {
// 订单编号
if (!empty($map['order_sn'])) {
$query->where('r.order_sn', '=', $map['order_sn']);
}
})
->where(function ($query) use ($map) {
// sku名称
if (!empty($map['sku_name'])) {
$query->where('it.sku_name', '=', $map['sku_name']);
}
})
->where(function ($query) use ($map) {
// 创建时间
if (!empty($map['time_start']) && !empty($map['time_end'])) {
$query->whereBetween('r.create_time', [$map['time_start'], $map['time_end']]);
} else if (!empty($map['time_start'])) {
$query->where('r.create_time', '>', $map['time_start']);
} else if (!empty($map['time_end'])) {
$query->where('r.create_time', '<', $map['time_end']);
}
})
->where(function ($query) use ($map) {
// 订单状态
if (!empty($map['apply_status'])) {
$query->whereIn('r.status', explode(',', $map['apply_status']));
}
})
->select('it.refund_rec_id', 'it.refund_id', 'it.rec_id', 'it.goods_id', 'it.goods_name', 'it.brand_id', 'it.brand_name', 'it.supplier_id', 'it.supplier_name', 'it.sku_name', 'it.goods_price', 'it.single_pre_price', 'it.refund_num', 'r.order_id', 'r.order_sn', 'r.order_goods_type', 'r.currency', 'r.pay_amount', 'r.price_fall', 'r.create_uid', 'r.status', 'r.refund_reason', 'r.create_time', 'r.refund_time', 'u.mobile', 'u.email')
->groupBy('it.refund_rec_id')
->orderBy('r.create_time', 'DESC')
->get()
->toArray();
if (!empty($list)) {
// 订单数据处理
$cellData = $this->exportList($list);
// 标题
$headerCell = ['订单ID', '订单编号', '会员账号', '商品型号', '制造商', '供应商', '币种', '退货数量', '原始单价', '均摊后单价', '小计', '退货总额', '手动差价', '实际退货总额', '退货原因', '后台操作人', '创建时间', '退货处理状态', '退货处理时间'];
array_unshift($cellData, $headerCell);
$fileName = $type == 1 ? '联营退货订单导出'.date('_YmdHis') : '自营退货订单导出'.date('_YmdHis');
Excel::create($fileName, function($excel) use ($cellData){
$excel->sheet('退货订单导出', function($sheet) use ($cellData){
$sheet->rows($cellData);
});
})->export('xls');
} else {
return redirect('/prompt')->with(['message'=>"数据为空无法导出!",'url'=>$_SERVER['HTTP_REFERER'], 'jumpTime'=>3,'status'=>false]);
}
}
/**
* 导出数据处理
* @param [type] $order [查询出的订单数据]
* @return [type] [description]
*/
public function exportList($order)
{
// 订单类型
$apply_status = array(
'-1' => '已拒绝',
'1' => '待处理',
'10' => '已处理',
);
$tmp = array();
for ($i = 0; $i < count($order); $i++) {
// 推送人
if ($order[$i]['create_uid']) {
$sales = DB::table('user_info')->where(['userId' => $order[$i]['create_uid']])->select('name')->first();
}
$tmp[$i]['order_id'] = $order[$i]['order_id'];
$tmp[$i]['order_sn'] = "\t".$order[$i]['order_sn']."\t";
$tmp[$i]['user_account'] = $order[$i]['mobile'] ? $order[$i]['mobile'] : $order[$i]['email'];
// 自营商品名称换成商品型号
$tmp[$i]['goods_name'] = $order[$i]['order_goods_type'] == 1 ? $order[$i]['goods_name'] : $this->getGoodsName($order[$i]['goods_id']);
$tmp[$i]['brand_name'] = $order[$i]['brand_name'];
$tmp[$i]['supplier_name'] = $order[$i]['supplier_name'];
$tmp[$i]['currency'] = $order[$i]['currency'] == 1 ? 'RMB' : 'USD';
$tmp[$i]['refund_num'] = $order[$i]['refund_num'];
$tmp[$i]['goods_price'] = $order[$i]['goods_price'];
$tmp[$i]['single_pre_price'] = $order[$i]['single_pre_price'];
$tmp[$i]['goods_amount'] = $order[$i]['refund_num'] * $order[$i]['single_pre_price'];
if ($i > 0 && $tmp[$i]['order_id'] == $tmp[$i-1]['order_id']) {
$tmp[$i]['pay_amount'] = $order[$i]['pay_amount'];
$tmp[$i]['price_fall'] = $order[$i]['price_fall'];
$tmp[$i]['final_amount'] = $order[$i]['pay_amount'] - $order[$i]['price_fall'];
} else {
$tmp[$i]['pay_amount'] = '';
$tmp[$i]['price_fall'] = '';
$tmp[$i]['final_amount'] = '';
}
$tmp[$i]['refund_reason'] = $order[$i]['refund_reason'];
$tmp[$i]['sale_name'] = isset($sales) ? $sales->name : ''; // 推送业务员
$tmp[$i]['create_time'] = date('Y-m-d H:i:s', $order[$i]['create_time']);
$tmp[$i]['status'] = $apply_status[$order[$i]['status']];
$tmp[$i]['refund_time'] = $order[$i]['refund_time'] ? date('Y-m-d H:i:s', $order[$i]['refund_time']) : '';
unset($sales);
}
return $tmp;
}
}
\ No newline at end of file
...@@ -65,10 +65,10 @@ ...@@ -65,10 +65,10 @@
apply_status = $('#apply_status').val() ? $('#apply_status').val() : '', apply_status = $('#apply_status').val() ? $('#apply_status').val() : '',
order_payment_mode = $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '', order_payment_mode = $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '',
time_start = $('input[name="time_start"]').val(), time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(); time_end = $('input[name="time_end"]').val(),
order_goods_type = $('input[name="order_goods_type"]').val();
if (url == '/refund_export' || url == '/refund_self_export') {
if (url == '/refund_export') {
if (!order_sn && !sku_name && !apply_status && !order_payment_mode && !time_start && !time_end) { if (!order_sn && !sku_name && !apply_status && !order_payment_mode && !time_start && !time_end) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
} }
if (!order_sn && !sku_name && !apply_status && !order_payment_mode && !time_start && !time_end) { if (!order_sn && !sku_name && !apply_status && !order_payment_mode && !time_start && !time_end) {
listUrl = '/refund_order'; listUrl = url;
} }
location.href = listUrl; location.href = listUrl;
...@@ -112,12 +112,24 @@ ...@@ -112,12 +112,24 @@
// 搜索 // 搜索
$('.search_refund_order').click(function(){ $('.search_refund_order').click(function(){
var order_goods_type = $('input[name="order_goods_type"]').val();
if (order_goods_type == 1) {
refundCommon('/refund_order'); refundCommon('/refund_order');
} else {
refundCommon('/refund_self_order');
}
}) })
// 导出订单 // 导出订单
$('.refund_order_export').click(function() { $('.refund_order_export').click(function() {
var order_goods_type = $('input[name="order_goods_type"]').val();
if (order_goods_type == 1) {
refundCommon('/refund_export'); refundCommon('/refund_export');
} else {
refundCommon('/refund_self_export');
}
}) })
// // 钱包退款 // // 钱包退款
...@@ -144,6 +156,40 @@ ...@@ -144,6 +156,40 @@
// } // }
// }) // })
// }) // })
// 自营退款列表取消申请
$('.cancel-refund').click(function() {
var rid = $(this).data('rid');
layer.open({
title : '取消申请',
content: '确定取消退款申请吗?',
btn: ['确定', '取消'],
btn1: function () {
$.ajax({
url : 'ajax/cancelSelfRefund',
type: 'post',
data: {refund_id: rid},
dataType: 'json',
success: function (resp) {
if (resp.errcode == 0) {
location.reload();
return false;
}
layer.msg(resp.errmsg);
},
error: function (err) {
console.log(err)
}
})
},
btn2:function(index){
layer.close(index);
}
})
})
} }
} }
}); });
......
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
<th>退款金额</th> <th>退款金额</th>
<td>{{$currencySign.$refund->pay_amount}}</td> <td>{{$currencySign.$refund->pay_amount}}</td>
</tr> </tr>
@if ($refund->order_goods_type == 1)
<tr> <tr>
<th>手动差价</th> <th>手动差价</th>
<td>{{$currencySign.$refund->price_fall}}</td> <td>{{$currencySign.$refund->price_fall}}</td>
...@@ -49,10 +51,14 @@ ...@@ -49,10 +51,14 @@
<th>最终退款总额</th> <th>最终退款总额</th>
<td>{{$currencySign.($refund->pay_amount - $refund->price_fall)}}</td> <td>{{$currencySign.($refund->pay_amount - $refund->price_fall)}}</td>
</tr> </tr>
@endif
<tr> <tr>
<th>退款原因</th> <th>退款原因</th>
<td>{{$refund->refund_reason}}</td> <td>{{$refund->refund_reason}}</td>
</tr> </tr>
@if ($refund->order_goods_type == 1)
<tr> <tr>
<th>退款型号</th> <th>退款型号</th>
<td> <td>
...@@ -81,6 +87,7 @@ ...@@ -81,6 +87,7 @@
@endif @endif
</td> </td>
</tr> </tr>
@endif
</table> </table>
</div> </div>
</div> </div>
......
...@@ -15,12 +15,14 @@ ...@@ -15,12 +15,14 @@
</dd> </dd>
</dl> </dl>
@if ($condition['order_goods_type'] == 1)
<dl> <dl>
<dt>SKU名称:</dt> <dt>SKU名称:</dt>
<dd> <dd>
<input type="text" id="sku_name" name="sku_name" value="{{$condition['sku_name']}}" placeholder="请输入SKU名称"> <input type="text" id="sku_name" name="sku_name" value="{{$condition['sku_name']}}" placeholder="请输入SKU名称">
</dd> </dd>
</dl> </dl>
@endif
<dl> <dl>
<dt>支付方式:</dt> <dt>支付方式:</dt>
...@@ -61,6 +63,7 @@ ...@@ -61,6 +63,7 @@
</table> </table>
<div class="text-center"> <div class="text-center">
<input type="hidden" name="order_goods_type" value="{{$condition['order_goods_type']}}">
<div class="search-btn"> <div class="search-btn">
<button class="nbtn search_refund_order">搜索</button> <button class="nbtn search_refund_order">搜索</button>
<button class="nbtn refund_order_export" style="margin-left: 20px; background: #23c6c8 !important;">导出</button> <button class="nbtn refund_order_export" style="margin-left: 20px; background: #23c6c8 !important;">导出</button>
...@@ -78,8 +81,12 @@ ...@@ -78,8 +81,12 @@
<th class="pl30">会员账号</th> <th class="pl30">会员账号</th>
<th class="pl30">订单编号</th> <th class="pl30">订单编号</th>
<th class="pl30">退款金额</th> <th class="pl30">退款金额</th>
<!-- 联营退款时显示 -->
@if ($condition['order_goods_type'] == 1)
<th class="pl30">手动差额</th> <th class="pl30">手动差额</th>
<th class="pl30">最终退款总额</th> <th class="pl30">最终退款总额</th>
@endif
<th class="pl30">申请状态</th> <th class="pl30">申请状态</th>
<th class="pl30">支付方式</th> <th class="pl30">支付方式</th>
<th class="pl30">处理时间</th> <th class="pl30">处理时间</th>
...@@ -89,7 +96,7 @@ ...@@ -89,7 +96,7 @@
@if (empty($list)) @if (empty($list))
<tr> <tr>
<td class="text-center" colspan="9">没有查询到相关记录~</td> <td class="text-center" colspan="8">没有查询到相关记录~</td>
</tr> </tr>
@else @else
<tbody> <tbody>
...@@ -102,8 +109,12 @@ ...@@ -102,8 +109,12 @@
$currencySign = $v['currency'] == 1 ? '¥' : '$'; $currencySign = $v['currency'] == 1 ? '¥' : '$';
?> ?>
<td class="show-list">{{$currencySign.$v['pay_amount']}}</td> <td class="show-list">{{$currencySign.$v['pay_amount']}}</td>
@if ($condition['order_goods_type'] == 1)
<td class="show-list">{{$currencySign.$v['price_fall']}}</td> <td class="show-list">{{$currencySign.$v['price_fall']}}</td>
<td class="show-list">{{$currencySign.number_format($v['pay_amount'] - $v['price_fall'], 2)}}</td> <td class="show-list">{{$currencySign.number_format($v['pay_amount'] - $v['price_fall'], 2)}}</td>
@endif
<td class="show-list"> <td class="show-list">
<?php <?php
switch ($v['status']) { switch ($v['status']) {
...@@ -123,6 +134,10 @@ ...@@ -123,6 +134,10 @@
<!-- 退款申请已处理且为钱包支付 --> <!-- 退款申请已处理且为钱包支付 -->
@if ($v['status'] == 1 && strpos($pay_name, '钱包支付') !== false) @if ($v['status'] == 1 && strpos($pay_name, '钱包支付') !== false)
@if ($condition['order_goods_type'] == 2)
<a class="btn btn-danger cancel-refund" data-rid="{{$v['refund_id']}}">取消申请</a>
@endif
<!-- <a class="btn btn-info wallet-refund" data-oid="{{$v['order_id']}}" data-amount="{{number_format($v['pay_amount'] - $v['price_fall'], 2)}}" target="_blank">钱包退款</a> --> <!-- <a class="btn btn-info wallet-refund" data-oid="{{$v['order_id']}}" data-amount="{{number_format($v['pay_amount'] - $v['price_fall'], 2)}}" target="_blank">钱包退款</a> -->
<a class="btn btn-info" href="/wallet_refund/{{$v['refund_id']}}" target="_blank">钱包退款</a> <a class="btn btn-info" href="/wallet_refund/{{$v['refund_id']}}" target="_blank">钱包退款</a>
@endif @endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment