fastadmin实现购物订单商品列表展示的方法
商品列表页代码:<style>
.nui-goodsbox {
display: flex;
align-items: center;
}
.nui-goods-image {
width: 50px;
height: 50px;
display: block;
}
.nui-goodsinfo {
margin-left: 10px;
}
</style>
<form id="goods-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Ordersn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-ordersn" data-rule="required" class="form-control" type="text" value="{$row.ordersn|htmlentities}" readonly="true">
<span class="help-block">订单号不可更改</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('商品清单')}:</label>
<div class="col-xs-12 col-sm-8">
<table class="table">
<thead>
<tr>
<th scope="col">序号</th>
<th scope="col">商品信息</th>
<th scope="col">购买数量</th>
<th scope="col">总金额</th>
<th scope="col">优惠金额</th>
<th scope="col">应付款</th>
</tr>
</thead>
<tbody>
{volist name="list" key="index" id="vo"}
<tr>
<td scope="row">
{$index}
</td>
<td scope="row">
<div class="nui-goodsbox">
<img src="{:cdnurl($vo.image)}" class="nui-goods-image" alt="" />
<div class="nui-goodsinfo">
<p>{$vo.title}</p>
<p>¥{$vo.saleprice}</p>
</div>
</div>
</td>
<td scope="row">
{$vo.total}
</td>
<td scope="row">
¥{$vo.totalprice}
</td>
<td scope="row">
¥{$vo.discount}
</td>
<td scope="row">
¥{$vo.payfee}
</td>
</tr>
{/volist}
</tbody>
</table>
<span class="help-block">这里调用了录单时设定好客户每天的取奶袋数,如果有变动可直接更改,不取奶的星期请设置为0</span>
</div>
</div>
</form>
页:
[1]