|
|
@ -1,28 +1,32 @@ |
|
|
|
<app-page> |
|
|
|
<ng-template #pageExtraTpl> |
|
|
|
<nz-space> |
|
|
|
<a *nzSpaceItem nz-button nzType="primary" target="_blank" |
|
|
|
[routerLink]="['/','ingredient','item','form','create']"> |
|
|
|
<a |
|
|
|
*nzSpaceItem |
|
|
|
nz-button |
|
|
|
nzType="primary" |
|
|
|
target="_blank" |
|
|
|
[routerLink]="['/', 'ingredient', 'item', 'form', 'create']" |
|
|
|
> |
|
|
|
<i nz-icon nzType="plus"></i> |
|
|
|
创建食谱 |
|
|
|
</a> |
|
|
|
</nz-space> |
|
|
|
</ng-template> |
|
|
|
<div class="h-full overflow-hidden bg-white rounded-lg"> |
|
|
|
|
|
|
|
<nz-card [nzBordered]="false" nzTitle="食谱库"> |
|
|
|
<table-list [props]="tableList" |
|
|
|
<table-list |
|
|
|
[props]="tableList" |
|
|
|
[search]="searchTpl" |
|
|
|
[action]="pageExtraTpl" |
|
|
|
[formGroup]="queryForm" |
|
|
|
[renderColumns]="renderColumnsTpl" |
|
|
|
optionWidth="300px"> |
|
|
|
|
|
|
|
optionWidth="300px" |
|
|
|
> |
|
|
|
<ng-template #actionTpl> |
|
|
|
<button nz-button>批量删除</button> |
|
|
|
</ng-template> |
|
|
|
<ng-template #searchTpl> |
|
|
|
|
|
|
|
<!-- <nz-form-item class="w-40"> |
|
|
|
<nz-form-control> |
|
|
|
<nz-select nzPlaceHolder="状态" formControlName="status" [nzAllowClear]="true"> |
|
|
@ -41,37 +45,33 @@ |
|
|
|
<ng-template #renderColumnsTpl let-data let-key="key" let-row="row"> |
|
|
|
<ng-container [ngSwitch]="key"> |
|
|
|
<ng-container *ngSwitchCase="'modify'"> |
|
|
|
{{data | date:'yyyy-MM-dd HH:mm:ss'}} |
|
|
|
{{ data | date : 'yyyy-MM-dd HH:mm:ss' }} |
|
|
|
</ng-container> |
|
|
|
<ng-container *ngSwitchCase="'vender'"> |
|
|
|
{{ tableOrg[data] ? tableOrg[data].name : '-'}} |
|
|
|
{{ tableOrg[data] ? tableOrg[data].name : '-' }} |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container *ngSwitchCase="'meals'"> |
|
|
|
<nz-tag *ngFor="let item of data">{{item}}</nz-tag> |
|
|
|
</ng-container> |
|
|
|
<ng-container *ngSwitchCase="'day'"> |
|
|
|
周{{data}} |
|
|
|
<nz-tag *ngFor="let item of data">{{ item }}</nz-tag> |
|
|
|
</ng-container> |
|
|
|
<ng-container *ngSwitchCase="'day'"> 周{{ data }} </ng-container> |
|
|
|
<ng-container *ngSwitchCase="'status'"> |
|
|
|
{{statusTextMap[data]}} |
|
|
|
{{ statusTextMap[data] }} |
|
|
|
</ng-container> |
|
|
|
<ng-container *ngSwitchCase="'month'"> |
|
|
|
<div class="flex flex-wrap"> |
|
|
|
<ng-container *ngIf="data.length === 12"> |
|
|
|
<nz-tag> |
|
|
|
全年 |
|
|
|
</nz-tag> |
|
|
|
<nz-tag> 全年 </nz-tag> |
|
|
|
</ng-container> |
|
|
|
<ng-container *ngIf="data.length !== 12"> |
|
|
|
<nz-tag *ngFor="let item of data" class="mb-1"> |
|
|
|
{{item}} |
|
|
|
{{ item }} |
|
|
|
</nz-tag> |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
<ng-container *ngSwitchDefault> |
|
|
|
{{data}} |
|
|
|
{{ data }} |
|
|
|
</ng-container> |
|
|
|
</ng-container> |
|
|
|
</ng-template> |
|
|
@ -80,28 +80,30 @@ |
|
|
|
</div> |
|
|
|
</app-page> |
|
|
|
|
|
|
|
|
|
|
|
<ng-template #releaseStartTimeTpl> |
|
|
|
<div nz-form> |
|
|
|
<nz-alert nzType="warning" |
|
|
|
nzMessage="注意" |
|
|
|
[nzDescription]="warnTpl"> |
|
|
|
<nz-alert nzType="warning" nzMessage="注意" [nzDescription]="warnTpl"> |
|
|
|
<ng-template #warnTpl> |
|
|
|
<div> |
|
|
|
1、请在发布前确认配餐内容是否正确,发布即视为已完成食谱审核; |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
2、已发布的食谱无法修改,如需调整,需取消发布后进行编辑 |
|
|
|
</div> |
|
|
|
<div>1、请在发布前确认配餐内容是否正确,发布即视为已完成食谱审核;</div> |
|
|
|
<div>2、已发布的食谱无法修改,如需调整,需取消发布后进行编辑</div> |
|
|
|
</ng-template> |
|
|
|
</nz-alert> |
|
|
|
<nz-form-item class="mt-4"> |
|
|
|
<nz-form-label nzSpan="6" [nzRequired]="true"> |
|
|
|
发布日期 |
|
|
|
</nz-form-label> |
|
|
|
<nz-form-label nzSpan="6" [nzRequired]="true"> 发布日期 </nz-form-label> |
|
|
|
<nz-form-control nzSpan="12"> |
|
|
|
<nz-date-picker class="w-full" nzPlaceHolder="请选择发布日期" [(ngModel)]="startTime"></nz-date-picker> |
|
|
|
</nz-form-control> |
|
|
|
</nz-form-item> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template #copyTpl> |
|
|
|
<form nz-form [formGroup]="copyForm" nzLayout="vertical"> |
|
|
|
<nz-form-item class="mt-4"> |
|
|
|
<nz-form-label [nzRequired]="true">名称</nz-form-label> |
|
|
|
<nz-form-control> |
|
|
|
<input nz-input placeholder="请输入名称" formControlName="name" /> |
|
|
|
</nz-form-control> |
|
|
|
</nz-form-item> |
|
|
|
</form> |
|
|
|
</ng-template> |
|
|
|