From f966fc9d7762d07c863a2727ab1e920f98c6bc18 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Tue, 10 Dec 2019 15:11:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=94=AE=E5=90=8E=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=A7=86=E5=9B=BE=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/shop/views/after-sale/index.php | 21 +++--- .../modules/shop/views/after-sale/view.php | 69 ++++++++++++++++--- 2 files changed, 73 insertions(+), 17 deletions(-) diff --git a/backend/modules/shop/views/after-sale/index.php b/backend/modules/shop/views/after-sale/index.php index 4da215c..2916aed 100644 --- a/backend/modules/shop/views/after-sale/index.php +++ b/backend/modules/shop/views/after-sale/index.php @@ -13,16 +13,19 @@ $this->params['breadcrumbs'][] = $this->title;
- = Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?> + = Html::a('返回列表', ['index'], ['class' => 'btn btn-default']) ?> + status == AfterSale::STATUS_UNTREATED) { + echo Html::a('同意', + [ + 'handle', + 'status' => AfterSale::STATUS_ACCEPT, + 'id' => $model->id + ], + [ + 'class' => 'btn btn-default', + 'data' => [ + 'confirm' => '同意用户的退货申请?', + 'method' => 'post', + ] + ] + ); + echo Html::a('拒绝', + [ + 'handle', + 'status' => AfterSale::STATUS_REJECT, + 'id' => $model->id + ], + [ + 'class' => 'btn btn-default', + 'data' => [ + 'confirm' => '拒绝用户的退货申请?', + 'method' => 'post', + ], + ] + ); + } + ?>
= DetailView::widget([ @@ -24,21 +57,41 @@ $this->params['breadcrumbs'][] = $this->title; 'wx_refund_id', 'after_sale_sn', 'user_id', - 'order_goods_id', + [ + 'attribute' => 'order_goods_id', + 'value' => function ($model) { + return $model->goods->goods_name; + } + ], 'amount', 'count', - 'apply_at', - 'dealt_at', - 'finish_at', + 'apply_at:datetime', + 'dealt_at:datetime', + 'finish_at:datetime', 'operator_id', - 'refund_type', + [ + 'attribute' => 'refund_type', + 'value' => function ($model) { + return AfterSale::$refundType[$model->refund_type]; + } + ], 'description:ntext', 'image:ntext', - 'status', + [ + 'attribute' => 'status', + 'value' => function ($model) { + return AfterSale::$status[$model->status]; + } + ], 'reason', 'remarks:ntext', 'take_shipping_sn', - 'refund_mode', + [ + 'attribute' => 'refund_mode', + 'value' => function ($model) { + return AfterSale::$refundMode[$model->refund_mode]; + } + ], ], ]) ?>