Browse Source

修改

main
kkerwin 1 year ago
parent
commit
27597c464f
  1. 1
      projects/admin/src/app/pages/ingredients/ingredient-list/ingredient-list.component.html
  2. 2
      projects/admin/src/app/pages/ingredients/ingredient-release/ingredient-release.component.html
  3. 4
      projects/admin/src/app/pages/standard/standard-list/standard-list.component.html
  4. 2
      projects/admin/src/app/pages/standard/standard-list/standard-list.component.ts
  5. 2
      projects/admin/src/app/pages/standard/standard-setting/standard-setting.component.html
  6. 4
      projects/cdk/src/ingredient/confirm-ingredient/confirm-ingredient.component.html
  7. 2
      projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.ts
  8. 4
      projects/cdk/src/services/api.service.ts
  9. 1
      projects/client/src/app/pages/ingredients/ingredient-list/ingredient-list.component.ts
  10. 2
      projects/client/src/app/pages/ingredients/ingredient-release/ingredient-release.component.html

1
projects/admin/src/app/pages/ingredients/ingredient-list/ingredient-list.component.html

@ -50,7 +50,6 @@
<ng-container *ngSwitchCase="'vender'"> <ng-container *ngSwitchCase="'vender'">
{{ tableOrg[data] ? tableOrg[data].name : '-'}} {{ tableOrg[data] ? tableOrg[data].name : '-'}}
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'meals'"> <ng-container *ngSwitchCase="'meals'">
<nz-tag *ngFor="let item of data">{{item}}</nz-tag> <nz-tag *ngFor="let item of data">{{item}}</nz-tag>
</ng-container> </ng-container>

2
projects/admin/src/app/pages/ingredients/ingredient-release/ingredient-release.component.html

@ -53,7 +53,7 @@
<nz-tag *ngFor="let item of data">{{item}}</nz-tag> <nz-tag *ngFor="let item of data">{{item}}</nz-tag>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'day'"> <ng-container *ngSwitchCase="'day'">
{{data}} {{data}}
</ng-container> </ng-container>
<ng-container *ngSwitchDefault> <ng-container *ngSwitchDefault>

4
projects/admin/src/app/pages/standard/standard-list/standard-list.component.html

@ -24,7 +24,7 @@
</ng-template> </ng-template>
<ng-template #renderColumnsTpl let-data let-key="key" let-row="row"> <ng-template #renderColumnsTpl let-data let-key="key" let-row="row">
<ng-container [ngSwitch]="key"> <ng-container [ngSwitch]="key">
<ng-container *ngSwitchCase="'time'"> <ng-container *ngSwitchCase="'modify'">
{{ data|date:'yyyy-MM-dd HH:mm:ss'}} {{ data|date:'yyyy-MM-dd HH:mm:ss'}}
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'vendors'"> <ng-container *ngSwitchCase="'vendors'">
@ -34,9 +34,7 @@
{{ data.length }}个人群 {{ data.length }}个人群
</ng-container> </ng-container>
<ng-container *ngSwitchDefault> <ng-container *ngSwitchDefault>
{{data}} {{data}}
</ng-container> </ng-container>
</ng-container> </ng-container>
</ng-template> </ng-template>

2
projects/admin/src/app/pages/standard/standard-list/standard-list.component.ts

@ -38,7 +38,7 @@ export class StandardListComponent {
{ key: "name", title: "营养标准名称" }, { key: "name", title: "营养标准名称" },
{ key: "people", title: "人群细分" }, { key: "people", title: "人群细分" },
{ key: "vendors", title: "适用单位" }, { key: "vendors", title: "适用单位" },
{ key: "time", title: "更新时间" }, { key: "modify", title: "更新时间" },
]); ]);
this.tableList = this.tableList.setOptions([ this.tableList = this.tableList.setOptions([

2
projects/admin/src/app/pages/standard/standard-setting/standard-setting.component.html

@ -436,7 +436,7 @@
<button *nzSpaceItem nz-button nzType="primary" (click)="onSubmit()"> <button *nzSpaceItem nz-button nzType="primary" (click)="onSubmit()">
确定 确定
</button> </button>
<button *nzSpaceItem nz-button> <button *nzSpaceItem nz-button routerLink="/standard/list">
取消 取消
</button> </button>
</nz-space> </nz-space>

4
projects/cdk/src/ingredient/confirm-ingredient/confirm-ingredient.component.html

@ -13,7 +13,9 @@
</nz-form-label> </nz-form-label>
<nz-form-control nzSpan="12"> <nz-form-control nzSpan="12">
<nz-space> <nz-space>
<ng-container *ngFor="let m of data.meals">{{m}}</ng-container> <ng-container *ngFor="let m of data.meals">
<nz-tag [nzColor]="'gold'">{{m}}</nz-tag>
</ng-container>
</nz-space> </nz-space>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>

2
projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.ts

@ -146,7 +146,7 @@ export class IngredientFormBasicComponent implements OnChanges {
} }
onStandardChange(v: any) { onStandardChange(v: any) {
const currentStandard = this.searchedStandard.find((f) => f.value === v); const currentStandard = this.standardOfOption.find((f) => f.value === v);
if (currentStandard) { if (currentStandard) {
this.currentPeoples = Object.entries(currentStandard["ingredient"] ?? {}).map(([k, v]) => { this.currentPeoples = Object.entries(currentStandard["ingredient"] ?? {}).map(([k, v]) => {
return { return {

4
projects/cdk/src/services/api.service.ts

@ -492,11 +492,11 @@ export class ApiService {
} }
release(id: string | number, startTime: Date, amount: number) { release(id: string | number, startTime: Date, amount: number) {
const endTime = addDays(startTime, amount); // const endTime = addDays(startTime, amount);
const params = Utils.objectToFormData({ const params = Utils.objectToFormData({
id, id,
startTime: format(startTime, "yyyy-MM-dd"), startTime: format(startTime, "yyyy-MM-dd"),
endTime: format(endTime, "yyyy-MM-dd"), // endTime: format(endTime, "yyyy-MM-dd"),
}); });
return this.http.put<ResponseType>(`/api/menu/release`, params); return this.http.put<ResponseType>(`/api/menu/release`, params);
} }

1
projects/client/src/app/pages/ingredients/ingredient-list/ingredient-list.component.ts

@ -184,6 +184,7 @@ export class IngredientListComponent {
this.msg.error("请选择发布日期"); this.msg.error("请选择发布日期");
return false; return false;
} }
console.log(id, day);
const res = await lastValueFrom(this.api.release(id, this.startTime, day)); const res = await lastValueFrom(this.api.release(id, this.startTime, day));
this.msg.success(res.desc); this.msg.success(res.desc);
this.tableList.run(); this.tableList.run();

2
projects/client/src/app/pages/ingredients/ingredient-release/ingredient-release.component.html

@ -49,7 +49,7 @@
<nz-tag *ngFor="let item of data">{{item}}</nz-tag> <nz-tag *ngFor="let item of data">{{item}}</nz-tag>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'day'"> <ng-container *ngSwitchCase="'day'">
{{data}} {{data}}
</ng-container> </ng-container>
<ng-container *ngSwitchDefault> <ng-container *ngSwitchDefault>

Loading…
Cancel
Save