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

<?php
use yii\widgets\DetailView;
use backend\modules\shop\models\ars\DeliveryGoods;
?>
<div class="deliveryGoods">
<?php
$deliveryGoods = DeliveryGoods::findAll(['delivery_id' => $model->id]);
if ($deliveryGoods) {
echo '<table class="table table-striped table-bordered detail-view">
<tr>
<th>商品图片</th>
<th>商品ID</th>
<th>商品名称</th>
<th>商品数量</th>
<th>创建时间</th>
</tr>';
foreach ($deliveryGoods as $value) {
echo '<tr>';
echo '<td>' . ($value->orderGoods->goods_img ? "<img src= $value->orderGoods->goods_img />" : '') . '</td>';
echo '<td>' . $value->goods_id . '</td>';
echo '<td>' . $value->goods_name . '</td>';
echo '<td>' . $value->goods_count . '</td>';
echo '<td>' . date('Y-m-d H:i:s', $value->created_at) . '</td>';
echo '</tr>';
}
echo '</table>';
}
?>
</div>