我已经阅读了一些关于这个话题的线索,我认为我很接近,但我可能需要一点帮助。我试图显示采购订单的行项目如果line items数组中的row发明了=0,我想将所有关于它的信息显示为一行但是,如果发明了>0,则我希望在“header”行和其他列中显示itemId、昵称和说明,作为与跟踪行类似的普通行这是我当前的代码,最后在每个“矩阵”行上方重复“标题”行。
<table id="lineItemsTable"
class="table table-bordered table-hover table-list scTable">
<thead>
<tr>
<th>@Labels.itemId</th>
<th>@Labels.nickname</th>
<th>@Labels.description</th>
<th>@Labels.ordered</th>
<th>@Labels.cost</th>
<th>@Labels.extension</th>
<th>@Labels.price</th>
<th>@Labels.margin</th>
<th>@Labels.receiveLocation</th>
<th>@Labels.received</th>
<th>@Labels.remaining</th>
<th>@Labels.vendorPartNo</th>
<th>@Labels.upc</th>
</tr>
</thead>
<tbody>
<tr ng-repeat-start="result in crud.model.lineItems track by $index"
ng-click="crud.selectedIndex=$index;"
ng-class="{selected: $index === crud.selectedIndex}">
<td>{{result.itemId}}</td>
<td>{{result.item}}</td>
<td>{{result.itemDescrip}}</td>
</tr>
<tr ng-repeat-end ng-if="result.inventId!==0">
<td></td><td></td><td>{{result.inventoryDescrip}}</td>
</tr>
</tbody>
</table>
我附加了一个屏幕截图,显示了我希望使用一系列行项目实现的目标: