| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- use yii\helpers\Html;
- use yii\widgets\DetailView;
- /* @var $this yii\web\View */
- /* @var $model app\models\Orderreturn */
- $this->title = $model->id;
- $this->params['breadcrumbs'][] = ['label' => 'Orderreturns', 'url' => ['index']];
- $this->params['breadcrumbs'][] = $this->title;
- \yii\web\YiiAsset::register($this);
- ?>
- <div class="orderreturn-view">
- <h1><?= Html::encode($this->title) ?></h1>
- <p>
- <?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
- <?= Html::a('Delete', ['delete', 'id' => $model->id], [
- 'class' => 'btn btn-danger',
- 'data' => [
- 'confirm' => 'Are you sure you want to delete this item?',
- 'method' => 'post',
- ],
- ]) ?>
- </p>
- <?= DetailView::widget([
- 'model' => $model,
- 'attributes' => [
- 'id',
- 'deliveryid',
- 'website',
- 'customer',
- [
- 'attribute' => 'delivery',
- 'footerOptions' => ['class'=>'hide'],
- 'value'=>function($model){// 形参为此行记录对象
- $list=['1' =>'USPS','2'=>'UPS','3'=>'FedEx','4'=>'客人到店退货','5'=>'DHL' ];
- if(isset($list[$model->delivery])){
- return $list[$model->delivery];
- }
- return $model->delivery;
- }
- ],
- 'origin_goodsinfo',
- 'goodsinfo',
- [
- 'attribute' => 'usage',
- 'footerOptions' => ['class'=>'hide'],
- 'value'=>function($model){// 形参为此行记录对象
- $list=['1' => "可用-请加库存",'2'=>'不可用-退回工厂','3'=>'精打理-退回国内','4'=>'精打理-留美仓','5'=>'泡发-发回国内'];
- if(isset($list[$model->usage])){
- return $list[$model->usage];
- }
- return $model->usage;
- }
-
- ],
- 'receiptdate',
- 'num',
- 'mark',
- [
- 'attribute'=>'imgs',
- 'value'=>function($model){
- $str="";
- $imgs=explode(',',$model->imgs);
- if(is_array($imgs)&&!empty($imgs)){
- foreach($imgs as $img){
- $str.=' <img height="100px" width="100px" src =' .$img .'>';
- }
- return $str;
- }
- },
- 'format'=>['html']
-
- ]
- ],
- ]) ?>
- <?php if($is_create): ?>
- <p>
- <?= Html::a('继续创建', ['create'], ['class' => 'btn btn-primary']) ?>
- <?= Html::a('回主页', ['index'], ['class' => 'btn btn-primary']) ?>
- </p>
- <?php endif; ?>
- </div>
|