You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.3 KiB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. use backend\modules\shop\models\ars\Order;
  5. /* @var $this yii\web\View */
  6. /* @var $model backend\models\ars\Order */
  7. $this->title = $model->id;
  8. $this->params['breadcrumbs'][] = ['label' => 'Orders', 'url' => ['index']];
  9. $this->params['breadcrumbs'][] = $this->title;
  10. \yii\web\YiiAsset::register($this);
  11. ?>
  12. <div class="order-view">
  13. <p>
  14. <?= Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
  15. </p>
  16. <?= DetailView::widget([
  17. 'model' => $model,
  18. 'attributes' => [
  19. 'id',
  20. 'user_id',
  21. 'order_sn',
  22. 'invoice_id',
  23. [
  24. 'attribute' => 'status',
  25. 'value' => function ($model) {
  26. return Order::dropDown('status', $model->status);
  27. }
  28. ],
  29. [
  30. 'attribute' => 'type',
  31. 'value' => function ($model) {
  32. return Order::dropDown('type', $model->type);
  33. }
  34. ],
  35. 'goods_count',
  36. 'goods_amount',
  37. 'shipping_amount',
  38. [
  39. 'attribute' => 'shipping_type',
  40. 'width' => '7%',
  41. 'value' => function ($model) {
  42. return Order::dropDown('shipping_type', $model->shipping_type);
  43. }
  44. ],
  45. 'consignee',
  46. 'phone',
  47. 'province',
  48. 'city',
  49. 'area',
  50. 'taking_site',
  51. 'pay_type',
  52. [
  53. 'attribute' => 'pay_at',
  54. 'value' => function ($model) {
  55. return date('Y-m-d H:i:s', $model->pay_at);
  56. }
  57. ],
  58. 'payment_sn',
  59. 'payment_amount',
  60. 'receivables',
  61. 'remarks',
  62. 'discount_amount',
  63. 'discount_description:ntext',
  64. [
  65. 'attribute' => 'created_at',
  66. 'value' => function ($model) {
  67. return date('Y-m-d H:i:s', $model->updated_at);
  68. }
  69. ],
  70. [
  71. 'attribute' => 'updated_at',
  72. 'value' => function ($model) {
  73. return date('Y-m-d H:i:s', $model->created_at);
  74. }
  75. ],
  76. ],
  77. ]) ?>
  78. </div>