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.

31 lines
1.1 KiB

  1. <?php
  2. use yii\widgets\DetailView;
  3. use backend\modules\shop\models\ars\DeliveryGoods;
  4. ?>
  5. <div class="deliveryGoods">
  6. <?php
  7. $deliveryGoods = DeliveryGoods::findAll(['delivery_id' => $model->id]);
  8. if ($deliveryGoods) {
  9. echo '<table class="table table-striped table-bordered detail-view">
  10. <tr>
  11. <th>商品图片</th>
  12. <th>商品ID</th>
  13. <th>商品名称</th>
  14. <th>商品数量</th>
  15. <th>创建时间</th>
  16. </tr>';
  17. foreach ($deliveryGoods as $value) {
  18. echo '<tr>';
  19. echo '<td>' . ($value->orderGoods->goods_img ? "<img src= $value->orderGoods->goods_img />" : '') . '</td>';
  20. echo '<td>' . $value->goods_id . '</td>';
  21. echo '<td>' . $value->goods_name . '</td>';
  22. echo '<td>' . $value->goods_count . '</td>';
  23. echo '<td>' . date('Y-m-d H:i:s', $value->created_at) . '</td>';
  24. echo '</tr>';
  25. }
  26. echo '</table>';
  27. }
  28. ?>
  29. </div>