Browse Source

修改售后模块视图列表显示字段

antshop
linyaostalker 5 years ago
parent
commit
f966fc9d77
  1. 21
      backend/modules/shop/views/after-sale/index.php
  2. 69
      backend/modules/shop/views/after-sale/view.php

21
backend/modules/shop/views/after-sale/index.php

@ -13,16 +13,19 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="row">
<div class="col-12">
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filter' => $this->render("_search", ['model' => $searchModel]),
'batch' => [
[
"label" => "删除",
"url" => "after-sale/deletes"
],
'dataProvider' => $dataProvider,
'filter' => $this->render("_search", ['model' => $searchModel]),
'batch' => [
[
"label" => "删除",
"url" => "after-sale/deletes"
],
'columns' => $columns
]);
],
'columns' => $columns,
'batchTemplate' => '',
'export' => '',
'create' => ''
]);
?>
</div>
</div>

69
backend/modules/shop/views/after-sale/view.php

@ -2,6 +2,7 @@
use yii\helpers\Html;
use yii\widgets\DetailView;
use backend\modules\shop\models\ars\AfterSale;
/* @var $this yii\web\View */
/* @var $model backend\modules\shop\models\ars\AfterSale */
@ -14,7 +15,39 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="after-sale-view">
<p>
<?= Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
<?= Html::a('返回列表', ['index'], ['class' => 'btn btn-default']) ?>
<?php
if ($model->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',
],
]
);
}
?>
</p>
<?= 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];
}
],
],
]) ?>

Loading…
Cancel
Save