diff --git a/README.md b/README.md
index c391e60..a31d4b3 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,5 @@
# CateringWebApp
-This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.4.
-
-## Development server
-
-Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
-
-## Code scaffolding
-
-Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
-
-## Build
-
-Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
-
-## Running unit tests
-
-Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
-
-## Running end-to-end tests
-
-Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
-
-## Further help
-
-To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
------
@@ -65,4 +40,14 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C
1. 食谱审核 列表需要 提交审核时间、提交人 字段
2. 食谱列表 需要 返回一个字段 标识当前食谱 是否是 管理系统添加的还是业务系统添加的
-3. 食谱保存 菜品 报500,同样的数据 昨天都可以
\ No newline at end of file
+3. 食谱保存 菜品 报500,同样的数据 昨天都可以
+
+-------
+
+# 09/29
+
+1. 业务端大屏
+2. 权限
+3. 详情&编辑食谱 -> 显示类型优化 & 分析
+4. 菜品分类
+5. 食材批量删除
\ No newline at end of file
diff --git a/projects/admin/src/app/components/ingredient-status-list/ingredient-status-list.component.ts b/projects/admin/src/app/components/ingredient-status-list/ingredient-status-list.component.ts
index fdedd23..2943ca3 100644
--- a/projects/admin/src/app/components/ingredient-status-list/ingredient-status-list.component.ts
+++ b/projects/admin/src/app/components/ingredient-status-list/ingredient-status-list.component.ts
@@ -68,19 +68,19 @@ export class IngredientStatusListComponent {
{ key: "vender", title: "单位" },
{ key: "modify", title: "提交审核时间" },
- { key: "modify", title: "提交人" },
+ { key: "operate", title: "提交人" },
]);
this.tableList = this.tableList.setOptions([
{
title: "详情",
premissions: [],
- onClick: this.showFoodForm.bind(this),
+ onClick: this.preview.bind(this),
},
{
title: "导出",
premissions: [],
- onClick: this.showFoodForm.bind(this),
+ onClick: this.export.bind(this),
},
{
title: "通过",
@@ -101,6 +101,19 @@ export class IngredientStatusListComponent {
]);
}
+ preview({ id }: any) {
+ window.open(`/ingredient/preview?id=${id}`);
+ }
+
+ export({ id }: any) {
+ this.msg.loading("导出中...");
+ this.api.exportMenu(id).subscribe(() => {
+ setTimeout(() => {
+ this.msg.remove();
+ }, 1500);
+ });
+ }
+
fetchData(query: AnyObject, pager: AnyObject) {
return this.api.getMenuStatusPage(pager, { ...query, status: this.status }).pipe(
tap((res) => {
diff --git a/projects/admin/src/app/pages/dish/dish.component.html b/projects/admin/src/app/pages/dish/dish.component.html
index 9ef59ac..166ba03 100644
--- a/projects/admin/src/app/pages/dish/dish.component.html
+++ b/projects/admin/src/app/pages/dish/dish.component.html
@@ -87,4 +87,57 @@
保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{printData.name}}
+
+
+
+
+ 营养成分表
+
+
+
+
+ 名称
+
+
+ 每100克(g)
+
+
+ 营养参考值%(NVR%)
+
+
+
+
+
+
{{ th.name }}
+
{{ th.nutrition }}
+
{{ th.nvr }}
+
+
+
+
+
+ 主要原料:{{printData.ingredients.join(',')}}
+
+
+ 1毫克(mg)钠相当于2.5毫克食盐
+
+
\ No newline at end of file
diff --git a/projects/admin/src/app/pages/dish/dish.component.ts b/projects/admin/src/app/pages/dish/dish.component.ts
index ea434dd..3b2c460 100644
--- a/projects/admin/src/app/pages/dish/dish.component.ts
+++ b/projects/admin/src/app/pages/dish/dish.component.ts
@@ -18,6 +18,7 @@ import {
import { NzModalService } from "ng-zorro-antd/modal";
import { NzMessageService } from "ng-zorro-antd/message";
import { ResponseType } from "@cdk/types";
+import { PrintComponent } from "@cdk/shared/components";
@Component({
selector: "app-dish",
@@ -34,6 +35,8 @@ export class DishComponent {
@ViewChild("formFooterTpl") formFooterTpl!: TemplateRef<{}>;
+ @ViewChild("print") printRef!: PrintComponent;
+
private drawerRef?: NzDrawerRef;
private destroy$ = new Subject();
@@ -42,6 +45,8 @@ export class DishComponent {
public globalEnum = this.api.globalEnum;
+ public printData: any | null;
+
public tableList = new TableListOption(this.fetchData.bind(this), {
selectable: true,
frontPagination: false,
@@ -114,7 +119,7 @@ export class DishComponent {
{
title: "打印营养标签",
premissions: [],
- onClick: this.showFoodForm.bind(this),
+ onClick: this.print.bind(this),
},
{
title: "编辑",
@@ -129,6 +134,17 @@ export class DishComponent {
]);
}
+ print(v: any) {
+ this.msg.loading("数据请求中,请不要刷新页面", {
+ nzDuration: 0,
+ });
+ this.api.getDishLabel(v.id).subscribe((res) => {
+ this.printData = res.body[0];
+ this.printRef.print();
+ this.msg.remove();
+ });
+ }
+
fetchData(query: AnyObject, pager: AnyObject) {
return this.api.getDishPage(pager, query).pipe(
tap((res) => {
diff --git a/projects/admin/src/app/pages/ingredients/ingredient-form/ingredient-form.component.html b/projects/admin/src/app/pages/ingredients/ingredient-form/ingredient-form.component.html
index 0c7f3da..0db1e17 100644
--- a/projects/admin/src/app/pages/ingredients/ingredient-form/ingredient-form.component.html
+++ b/projects/admin/src/app/pages/ingredients/ingredient-form/ingredient-form.component.html
@@ -26,7 +26,7 @@
-