配餐项目前端文件
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.

95 lines
3.7 KiB

2 years ago
<div>
<div class="mb-3">
<nz-space>
<button *nzSpaceItem nz-button nzType="primary" (click)="shopDishForm()">
添加菜品
</button>
<button *nzSpaceItem nz-button (click)="clearThisMeal()">
2 years ago
清空本餐
</button>
</nz-space>
</div>
<nz-table nzTemplateMode [nzBordered]="true" nzSize="small">
<thead>
<tr>
<th colSpan="2"></th>
<th [colSpan]="peopleGroups.length">
2 years ago
重量/克
</th>
</tr>
<tr>
<th nzWidth="200px">
2 years ago
菜品
</th>
<th nzWidth="200px">
2 years ago
食材
</th>
<th *ngFor="let p of peopleGroups">
{{p}}
2 years ago
</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let dish of currentDishs">
<ng-container *ngFor="let food of dish['items'];let first = first;">
<tr>
<td *ngIf="first" [rowSpan]="dish['items'].length ">
<div class="flex justify-between">
<span>
{{dish['dishName']}}
</span>
<button nz-button nzType="text" (click)="onRemoveDish(dish)">
<i nz-icon nzType="delete"></i>
</button>
<!-- nz-dropdown [nzDropdownMenu]="dishOptions" -->
<!-- <nz-dropdown-menu #dishOptions="nzDropdownMenu">
<ul nz-menu nzSelectable class=" w-20">
<li nz-menu-item>编辑</li>
<li nz-menu-item nzDanger>删除</li>
</ul>
</nz-dropdown-menu> -->
</div>
</td>
<td>
2 years ago
<div class="flex justify-between">
<span>
{{food['foodName']}}
</span>
<!-- <button nz-button nzType="text" nz-dropdown [nzDropdownMenu]="foodOptions">
<i nz-icon nzType="more"></i>
</button>
<nz-dropdown-menu #foodOptions="nzDropdownMenu">
<ul nz-menu nzSelectable class="w-100">
<li nz-menu-item>设置价格</li>
<li nz-menu-item nzDanger>删除</li>
</ul>
</nz-dropdown-menu> -->
</div>
</td>
<td *ngFor="let g of food.value | keyvalue">
{{g.value}}
</td>
</tr>
</ng-container>
</ng-container>
2 years ago
</tbody>
</nz-table>
<nz-empty *ngIf="currentDishs.length === 0" class="empty"></nz-empty>
</div>
<ng-template #addDishFooter>
<nz-space>
<button *nzSpaceItem nz-button (click)="cancelForm()" type="button">
取消
</button>
<button *nzSpaceItem nz-button nzType="primary" [nzLoading]="submitLoading" (click)="onSubmit()">
保存
</button>
</nz-space>
</ng-template>