From b399c19f9f03b29a21a259342da76db10c311330 Mon Sep 17 00:00:00 2001 From: kely Date: Sat, 18 May 2024 18:10:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web-admin-app/README.md | 17 + .../asset-employee-apply.component.html | 3 + .../asset-employee-apply.component.ts | 3 +- .../asset-employee-loss.component.html | 3 + ...eam-asset-employee-handover.component.html | 3 + .../eam-asset-employee-handover.component.ts | 2 + .../eam-asset-employee-repair.component.html | 3 + .../eam-asset-employee-repair.component.ts | 2 + .../eam-asset-employee-scrap.component.html | 3 + .../eam-asset-employee-scrap.component.ts | 2 + .../eam-asset-equipment-repair.component.html | 3 + .../eam-asset-equipment-repair.component.ts | 2 + .../eam-asset-purchase-apply.component.html | 3 + .../eam-asset-purchase-apply.component.ts | 3 + .../eam-asset-stock-goods-use.component.html | 3 + .../eam-asset-stock-goods-use.component.ts | 3 + .../flow-result/flow-result.component.html | 28 ++ .../flow-result/flow-result.component.less | 0 .../flow-result/flow-result.component.ts | 27 ++ .../asset-business-revert-form.component.html | 2 +- .../asset-form/asset-form.component.html | 32 +- .../asset-form/asset-form.component.ts | 19 +- .../asset-select/asset-select.component.ts | 2 +- .../component-org-tree.component.ts | 11 +- .../select-user-by-org.component.html | 6 +- .../select-user-by-org.component.ts | 9 +- web-admin-app/src/app/constants/index.ts | 4 + web-admin-app/src/app/guards/auth.guard.ts | 2 +- .../pages/dashboard/dashboard.component.html | 357 ++++++++++++++---- .../pages/dashboard/dashboard.component.less | 88 +++++ .../pages/dashboard/dashboard.component.ts | 326 +++++++++++----- .../alert-inventory-down.component.ts | 7 +- .../alert-inventory-safety.component.ts | 7 +- .../alert-inventory-up.component.ts | 7 +- .../fixed-asset-manage.component.html | 23 +- .../fixed-asset-manage.component.ts | 1 + .../stockaking-job.component.html | 16 +- .../stockaking-plan.component.html | 10 +- .../stockaking-plan.component.ts | 2 + .../stocktaking-detail.component.html | 6 +- .../stocktaking-detail.component.ts | 2 +- .../flow-my-apply.component.html | 9 +- .../flow-my-apply/flow-my-apply.component.ts | 2 +- .../flow-my-todo/flow-my-todo.component.html | 7 + .../flow-my-todo/flow-my-todo.component.ts | 3 +- .../org-setting/org-setting.component.html | 9 +- web-admin-app/src/app/services/api.service.ts | 12 + 47 files changed, 872 insertions(+), 222 deletions(-) create mode 100644 web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.html create mode 100644 web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.less create mode 100644 web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.ts diff --git a/web-admin-app/README.md b/web-admin-app/README.md index 22b7d27..113013a 100644 --- a/web-admin-app/README.md +++ b/web-admin-app/README.md @@ -69,3 +69,20 @@ - 驳回 - 取消 + +# 05-17 + +- ~~新增用户 按钮位置 #~~ +- ~~部门状态 status 类型问题 #~~ +- ~~导入提示文字 #~~ +- ~~盘点明细 null .assetCode #~~ +- ~~开始盘点的按钮颜色 # ~~ +- ~~流程处理结果~~ +- ~~流程列表状态:finishTime 审批中 /已完成~~ +- ~~选择员工 添加 全部 ~~ +- ~~资产管理 财务信息 残值率 百分比 / 最小值 0~~ +- ~~资产管理 财务信息 caiwufenlei 后面隐藏~~ +- ~~盘点计划 状态 启用/禁用 #~~ +- ~~归还 #~~ +- ~~库存 列表字段 / 仓库、分类字段~~ +- ~~ 我处理 不要作废 ~~ \ No newline at end of file diff --git a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.html b/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.html index 9341c64..78f0e07 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.html +++ b/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.html @@ -47,6 +47,9 @@ + @if (data?.value) { + + } diff --git a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts b/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts index 63de9a8..0f73d43 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts +++ b/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts @@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal' import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component' import { AssetSelectComponent } from '../../asset-select/asset-select.component' import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component' +import { FlowResultComponent } from '../flow-result/flow-result.component' @Component({ selector: 'app-asset-employee-apply', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './asset-employee-apply.component.html', styleUrl: './asset-employee-apply.component.less', @@ -44,7 +46,6 @@ export class AssetEmployeeApplyComponent { uploadLoading = false ngOnInit(): void { - console.log('this.data', this.data) this.formGroup = this.fb.group({ id: this.fb.control(null, []), title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]), diff --git a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.html b/web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.html index 7fe3a2a..61e0f0b 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.html +++ b/web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.html @@ -55,6 +55,9 @@ + diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.html b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.html index 9506d3d..51688d0 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.html +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.html @@ -79,6 +79,9 @@ + @if (data?.value) { + + } diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.ts b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.ts index cd8d10e..4ec8d8a 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.ts +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.ts @@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal' import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component' import { AssetSelectComponent } from '../../asset-select/asset-select.component' import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component' +import { FlowResultComponent } from '../flow-result/flow-result.component' @Component({ selector: 'app-eam-asset-employee-handover', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './eam-asset-employee-handover.component.html', styleUrl: './eam-asset-employee-handover.component.less', diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.html b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.html index c285247..2905bfc 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.html +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.html @@ -71,6 +71,9 @@ + @if (data?.value) { + + } diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.ts b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.ts index 89a69c2..2c2113b 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.ts +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.ts @@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal' import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component' import { AssetSelectComponent } from '../../asset-select/asset-select.component' import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component' +import { FlowResultComponent } from '../flow-result/flow-result.component' @Component({ selector: 'app-eam-asset-employee-repair', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './eam-asset-employee-repair.component.html', styleUrl: './eam-asset-employee-repair.component.less', diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.html b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.html index 27f743d..a5ff4d1 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.html +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.html @@ -86,6 +86,9 @@ + @if (data?.value) { + + } diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.ts b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.ts index 8305359..37e330c 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.ts +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.ts @@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal' import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component' import { AssetSelectComponent } from '../../asset-select/asset-select.component' import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component' +import { FlowResultComponent } from '../flow-result/flow-result.component' @Component({ selector: 'app-eam-asset-employee-scrap', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './eam-asset-employee-scrap.component.html', styleUrl: './eam-asset-employee-scrap.component.less', diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.html b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.html index 9b25a76..235f28a 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.html +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.html @@ -96,6 +96,9 @@ + @if (data?.value) { + + } diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.ts b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.ts index 54985a1..93f535a 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.ts +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.ts @@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal' import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component' import { AssetSelectComponent } from '../../asset-select/asset-select.component' import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component' +import { FlowResultComponent } from '../flow-result/flow-result.component' @Component({ selector: 'app-eam-asset-equipment-repair', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './eam-asset-equipment-repair.component.html', styleUrl: './eam-asset-equipment-repair.component.less', diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.html b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.html index 121157c..aad4bfb 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.html +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.html @@ -130,6 +130,9 @@ + @if (data?.value) { + + } diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.ts b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.ts index 063cdbb..b565207 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.ts +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.ts @@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal' import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component' import { AssetSelectComponent } from '../../asset-select/asset-select.component' import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component' +import { FlowResultComponent } from '../flow-result/flow-result.component' @Component({ selector: 'app-eam-asset-purchase-apply', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './eam-asset-purchase-apply.component.html', styleUrl: './eam-asset-purchase-apply.component.less', @@ -65,6 +67,7 @@ export class EamAssetPurchaseApplyComponent { notes: this.fb.control(null, []), urgency: this.fb.control(1, []), assetIdList: this.fb.control([], []), + attach: this.fb.control(null, []), }) diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.html b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.html index d7edc72..de2c6a9 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.html +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.html @@ -48,6 +48,9 @@ + @if (data?.value) { + + } diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.ts b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.ts index c72731c..947474f 100644 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.ts +++ b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.ts @@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal' import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component' import { AssetSelectComponent } from '../../asset-select/asset-select.component' import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component' +import { FlowResultComponent } from '../flow-result/flow-result.component' @Component({ selector: 'app-eam-asset-stock-goods-use', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './eam-asset-stock-goods-use.component.html', styleUrl: './eam-asset-stock-goods-use.component.less', @@ -57,6 +59,7 @@ export class EamAssetStockGoodsUseComponent { notes: this.fb.control(null, [FormValidators.required('请输入')]), urgency: this.fb.control(1, []), + assetIdList: this.fb.control([], []), }) this.patchValues() diff --git a/web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.html b/web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.html new file mode 100644 index 0000000..1f7ee80 --- /dev/null +++ b/web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.html @@ -0,0 +1,28 @@ +
+

流程记录

+
+ + @for (item of flowRecords; track $index) { + +
+ {{ item.createTime }} + + {{ item.comment?.comment }} + +
+
任务名称:{{ item.taskName }}
+
审批人:{{ item?.assigneeName ?? '-' }}
+ @if (item.finishTime) { +
+ 流程完成时间:{{ item.finishTime }} + 用时:{{ item.duration }} +
+ } +
+ } +
+ + + +
+
diff --git a/web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.less b/web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.less new file mode 100644 index 0000000..e69de29 diff --git a/web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.ts b/web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.ts new file mode 100644 index 0000000..054cb30 --- /dev/null +++ b/web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.ts @@ -0,0 +1,27 @@ +import { Component, Input, OnInit } from '@angular/core' +import { ApiService } from 'app/services' +import { SharedModule } from 'app/shared/shared.module' +import { NzSafeAny } from 'ng-zorro-antd/core/types' + +@Component({ + selector: 'app-flow-result', + standalone: true, + imports: [SharedModule], + templateUrl: './flow-result.component.html', + styleUrl: './flow-result.component.less', +}) +export class FlowResultComponent implements OnInit { + constructor(private api: ApiService) {} + + @Input() flow: NzSafeAny = null + + flowRecords: NzSafeAny[] = [] + + ngOnInit(): void { + if (this.flow) { + this.api.getFlowRecord(this.flow.deployId, this.flow.procInsId).subscribe((res) => { + this.flowRecords = res.body.flowList + }) + } + } +} diff --git a/web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.html b/web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.html index 2b2e6c2..2d104ae 100644 --- a/web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.html +++ b/web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.html @@ -98,7 +98,7 @@ 资产列表 - + diff --git a/web-admin-app/src/app/components/asset-form/asset-form.component.html b/web-admin-app/src/app/components/asset-form/asset-form.component.html index 67c2fac..92eb724 100644 --- a/web-admin-app/src/app/components/asset-form/asset-form.component.html +++ b/web-admin-app/src/app/components/asset-form/asset-form.component.html @@ -269,12 +269,20 @@
财务分类 - - + + + @for (item of financialCategory; track $index) { + + + } +
-
+
入账日期 @@ -312,6 +320,7 @@ @@ -324,6 +333,7 @@ @@ -336,6 +346,7 @@ @@ -346,11 +357,14 @@ 残值率 - + + +
diff --git a/web-admin-app/src/app/components/asset-form/asset-form.component.ts b/web-admin-app/src/app/components/asset-form/asset-form.component.ts index 755271c..d2b57f0 100644 --- a/web-admin-app/src/app/components/asset-form/asset-form.component.ts +++ b/web-admin-app/src/app/components/asset-form/asset-form.component.ts @@ -6,7 +6,7 @@ import { FormValidators, Utils } from 'app/utils' import { NzMessageService } from 'ng-zorro-antd/message' import { AssetCategorySelectComponent } from '../asset-category-select/asset-category-select.component' import { OrgSelectComponent } from '../org-select/org-select.component' -import { ASSET_SOURCE_MAP, ASSET_STATUS, MAINTENANCE_STATUS, MAINTENANCE_TYPE } from 'app/constants' +import { ASSET_SOURCE_MAP, ASSET_STATUS, MAINTENANCE_STATUS, MAINTENANCE_TYPE, MAX_PAGE_SIZE } from 'app/constants' import { SelectUserByOrgComponent } from '../select-user-by-org/select-user-by-org.component' import { ManufacturerSelectComponent } from '../manufacturer-select/manufacturer-select.component' import { PositionSelectComponent } from '../position-select/position-select.component' @@ -54,6 +54,8 @@ export class AssetFormComponent implements OnInit { MAINTENANCE_TYPE = MAINTENANCE_TYPE + financialCategory: NzSafeAny[] = [] + ngOnInit(): void { this.formGroup = this.fb.group({ assetId: this.fb.control(null, []), @@ -97,6 +99,21 @@ export class AssetFormComponent implements OnInit { }) this.patchValues() + + this.api + .getBasicFinancialCategory({ + depth: '', + financialCategoryId: 0, + financialCategoryName: '', + notes: '', + parentId: 0, + useTerms: 0, + pageSize: MAX_PAGE_SIZE, + pageNum: 1, + }) + .subscribe((res) => { + this.financialCategory = res.body.rows + }) } patchValues() { diff --git a/web-admin-app/src/app/components/asset-select/asset-select.component.ts b/web-admin-app/src/app/components/asset-select/asset-select.component.ts index 9463194..cb6b8a7 100644 --- a/web-admin-app/src/app/components/asset-select/asset-select.component.ts +++ b/web-admin-app/src/app/components/asset-select/asset-select.component.ts @@ -134,7 +134,7 @@ export class AssetSelectComponent { this.allGetedDataMap.forEach((i: NzSafeAny) => { if (this.table.ref.selected.has(String(i.assetId))) { if (!this.selectedDataList.some((s) => s.assetId === i.assetId)) { - this.selectedDataList.push({ ...i, count: 1, max: i.count }) + this.selectedDataList.push({ ...i, count: i.count === 0 ? 0 : 1, max: i.count }) } } }) diff --git a/web-admin-app/src/app/components/component-org-tree/component-org-tree.component.ts b/web-admin-app/src/app/components/component-org-tree/component-org-tree.component.ts index 4d6f8df..591b13a 100644 --- a/web-admin-app/src/app/components/component-org-tree/component-org-tree.component.ts +++ b/web-admin-app/src/app/components/component-org-tree/component-org-tree.component.ts @@ -31,6 +31,8 @@ export class ComponentOrgTreeComponent implements OnInit { @Input() companyAndOrg: boolean = false + @Input() selectUer = false + @Output() onOrgSelectedChange = new EventEmitter() drawerRef?: NzDrawerRef @@ -79,7 +81,9 @@ export class ComponentOrgTreeComponent implements OnInit { }) } - this.nodes = Utils.buildTree(c, 'organizationId', 'organizationName') + this.nodes = this.selectUer + ? [{ title: '全部', key: 'all' }, ...Utils.buildTree(c, 'organizationId', 'organizationName')] + : [...Utils.buildTree(c, 'organizationId', 'organizationName')] this.expandedKeys = [...this.expandedKeys] }) } @@ -118,7 +122,10 @@ export class ComponentOrgTreeComponent implements OnInit { }) if (edit) { this.isOrg = origin.organizationType !== '2' - this.form.patchValue(origin) + this.form.patchValue({ + ...origin, + status: origin.status === '0', + }) } else { this.parentId = origin?.organizationId } diff --git a/web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.html b/web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.html index b18ae9f..c0a5d56 100644 --- a/web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.html +++ b/web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.html @@ -36,7 +36,11 @@ >
- +
diff --git a/web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.ts b/web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.ts index 11e69e8..1fa21f1 100644 --- a/web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.ts +++ b/web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.ts @@ -89,14 +89,19 @@ export class SelectUserByOrgComponent implements ControlValueAccessor, OnInit { onOrgSelectedChange(v?: NzSafeAny, uid?: number) { this.api - .getUserPage({ pageSize: MAX_PAGE_SIZE, pageNum: 1, userId: uid, organizationId: v?.organizationId }) + .getUserPage({ + tree: Boolean(v?.organizationId), + pageSize: MAX_PAGE_SIZE, + pageNum: 1, + userId: uid, + organizationId: v?.organizationId, + }) .subscribe((res) => { if (Array.isArray(res.body?.rows) && res.body.rows.length > 0) { res.body.rows.forEach((element: NzSafeAny) => { this.currentUsers = res.body.rows this.allGetedDataMap.set(element.userId, element) this.statusChange() - console.log('this.allGetedDataMap', this.allGetedDataMap) }) } }) diff --git a/web-admin-app/src/app/constants/index.ts b/web-admin-app/src/app/constants/index.ts index 467a80b..f16210c 100644 --- a/web-admin-app/src/app/constants/index.ts +++ b/web-admin-app/src/app/constants/index.ts @@ -1,5 +1,9 @@ export const MAX_PAGE_SIZE = 10000000 +export const LOCALSTORAGKEY = { + quickAction: 'QUICKACTION', +} + export const ASSET_STATUS = [ { label: '闲置', value: 0 }, { label: '在用', value: 1 }, diff --git a/web-admin-app/src/app/guards/auth.guard.ts b/web-admin-app/src/app/guards/auth.guard.ts index 78bdefd..411b65f 100644 --- a/web-admin-app/src/app/guards/auth.guard.ts +++ b/web-admin-app/src/app/guards/auth.guard.ts @@ -12,7 +12,7 @@ export const authGuard: CanActivateFn = (route, state) => { return router.createUrlTree(['/login']) } permission.loadPermission(authInfo?.permissions ?? []) - permission.isRoot = Boolean(authInfo?.roles.includes('admin')) + // permission.isRoot = Boolean(authInfo?.roles.includes('admin')) // console.log('authInfo', authInfo, Boolean(authInfo?.roles.includes('admin')), permission) return true } diff --git a/web-admin-app/src/app/pages/dashboard/dashboard.component.html b/web-admin-app/src/app/pages/dashboard/dashboard.component.html index 8724705..59e9b32 100644 --- a/web-admin-app/src/app/pages/dashboard/dashboard.component.html +++ b/web-admin-app/src/app/pages/dashboard/dashboard.component.html @@ -1,87 +1,302 @@ - -
-
-
- -
- -
-
-
-
- -
-
- -
-
- + +
+
+ +
+
+
+
+ +
+
+ +
+ + + + + + {{ data.assetTotal.change }} + + 今日变化 +
+
-
- +
+
+
+
+ +
+
+ +
+ + + + + + {{ data.borrowWarning.change }} + + 今日变化 +
+
- -
-
- -
-
- +
+
+
+ +
+
+ +
+ + + + + + {{ data.maintenanceWarning.change }} + + 今日变化 +
+
-
- +
+
+
+
+ +
+
+ + +
- -
-
+
+
-
-
-
- -
-
+
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+
+ + + + + +
+
+
+
+ + + + +
+
+
-
- -
+
+
+
+ + + + + {{ count || 0 }} + + + +
-
- -
+
+ + + 排序 + + +
拖拽排序
+
+ @for (i of quickAction; track i.link) { +
+ + + {{ i.title }} + +
+ } +
+
+ + @for (g of quickActionGroup; track $index) { +
+
    + @for (i of g; track $index) { +
  • +
    + +
    +
    + {{ i.title }} +
    +
  • + } +
+
+ } +
-
- - - - - xx - - 到期时间 - - - - @for (p of expiringSoon; track $index) { - - {{ p.clientName }} - - - {{ p.endTime * 1000 | date: 'yyyy-MM-dd HH:mm:ss' }} - - - } @empty { - - - - - +
+ + + + + +
+ + @for (item of data.recentlyAddedAssets; track item) { + +
+
+ + {{ item.name }} + +
+
+ + {{ item.assetCode }} + + + {{ item.createTime }} + +
+
+
} - - +
+
diff --git a/web-admin-app/src/app/pages/dashboard/dashboard.component.less b/web-admin-app/src/app/pages/dashboard/dashboard.component.less index e69de29..d949cfa 100644 --- a/web-admin-app/src/app/pages/dashboard/dashboard.component.less +++ b/web-admin-app/src/app/pages/dashboard/dashboard.component.less @@ -0,0 +1,88 @@ +.dashboard { + .statistic { + @apply flex; + + + } + + .icon { + display: block; + width: 48px; + height: 48px; + border-radius: 50%; + background-color: #1890ff; + color: #fff; + font-size: 20px; + @apply flex items-center justify-center mr-2 flex-shrink-0; + } + + [nz-carousel-content] { + text-align: center; + height: 160px !important; + + + } + + ::ng-deep { + .ant-carousel .slick-dots-bottom { + bottom: 0; + } + + .ant-carousel .slick-dots li button { + background-color: rgba(0, 0, 0, .35); + } + + .ant-carousel .slick-dots li.slick-active button { + background-color: #1890ff; + } + } +} + +.example-list { + width: 500px; + max-width: 100%; + border: solid 1px #ccc; + min-height: 30px; + display: block; + background: white; + border-radius: 4px; + overflow: hidden; +} + +.example-box { + padding: 6px 10px; + border-bottom: solid 1px #ccc; + color: rgba(0, 0, 0, 0.87); + display: flex; + flex-direction: row; + align-items: center; + + box-sizing: border-box; + cursor: move; + background: white; + font-size: 14px; +} + +.cdk-drag-preview { + box-sizing: border-box; + border-radius: 4px; + box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), + 0 8px 10px 1px rgba(0, 0, 0, 0.14), + 0 3px 14px 2px rgba(0, 0, 0, 0.12); +} + +.cdk-drag-placeholder { + opacity: 0; +} + +.cdk-drag-animating { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); +} + +.example-box:last-child { + border: none; +} + +.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder) { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); +} \ No newline at end of file diff --git a/web-admin-app/src/app/pages/dashboard/dashboard.component.ts b/web-admin-app/src/app/pages/dashboard/dashboard.component.ts index 71628b3..627ebfd 100644 --- a/web-admin-app/src/app/pages/dashboard/dashboard.component.ts +++ b/web-admin-app/src/app/pages/dashboard/dashboard.component.ts @@ -1,8 +1,13 @@ -import { AfterViewInit, Component, ElementRef, HostListener, OnInit, ViewChild } from '@angular/core' +import { AfterViewInit, Component, ElementRef, HostListener, OnInit, TemplateRef, ViewChild } from '@angular/core' import { init, EChartsType } from 'echarts' import { SharedModule } from '../../shared/shared.module' import { ApiService } from 'app/services' import { ConsoleClientTopDTO, ConsoleCountDTO, ConsoleExpireDTO } from 'app/services/api.dto' +import { NzSafeAny } from 'ng-zorro-antd/core/types' +import { NzModalService } from 'ng-zorro-antd/modal' +import { NzMessageService } from 'ng-zorro-antd/message' +import { CdkDragDrop, CdkDropList, CdkDrag, moveItemInArray } from '@angular/cdk/drag-drop' +import { LOCALSTORAGKEY } from 'app/constants' const antvColor = [ '#5B8FF9', @@ -17,15 +22,35 @@ const antvColor = [ '#F08BB4', ] +const defaultAction = [ + { icon: 'database', title: '资产管理', link: '/fixed-asset/manage/list' }, + { icon: 'download', title: '资产入库', link: '/fixed-asset/manage/entry' }, + { icon: 'user-add', title: '资产领用', link: '/fixed-asset/manage/distribution' }, + { icon: 'import', title: '资产退库', link: '/fixed-asset/manage/return' }, + { icon: 'node-expand', title: '资产借用', link: '/fixed-asset/manage/borrow' }, + { icon: 'node-collapse', title: '资产归还', link: '/fixed-asset/manage/revert' }, + { icon: 'node-index', title: '资产调拨', link: '/fixed-asset/manage/allot' }, + { icon: 'sync', title: '资产转换', link: '/fixed-asset/manage/transfer' }, + { icon: 'delete', title: '资产报废', link: '/fixed-asset/manage/scrap' }, + { icon: 'profile', title: '盘点计划', link: '/fixed-asset/stocktaking/plan' }, + { icon: 'file-protect', title: '盘点任务', link: '/fixed-asset/stocktaking/job/list' }, + { icon: 'carry-out', title: '维修登记', link: '/fixed-asset/repair/list' }, + { icon: 'alert', title: '故障登记', link: '/fixed-asset/repair/fault' }, +] + @Component({ standalone: true, - imports: [SharedModule], + imports: [SharedModule, CdkDropList, CdkDrag], selector: 'app-dashboard', templateUrl: './dashboard.component.html', styleUrls: ['./dashboard.component.less'], }) export class DashboardComponent implements OnInit, AfterViewInit { - constructor(private api: ApiService) {} + constructor( + private api: ApiService, + private modal: NzModalService, + private msg: NzMessageService, + ) {} @ViewChild('chart1Tpl') chart1!: ElementRef @@ -33,47 +58,186 @@ export class DashboardComponent implements OnInit, AfterViewInit { @ViewChild('chart3Tpl') chart3!: ElementRef + @ViewChild('chart4Tpl') chart4!: ElementRef + + @ViewChild('chart5Tpl') chart5!: ElementRef + + @ViewChild('chart6Tpl') chart6!: ElementRef + echartRef1?: EChartsType echartRef2?: EChartsType + echartRef3?: EChartsType + + echartRef4?: EChartsType + + echartRef5?: EChartsType + + echartRef6?: EChartsType + counter: ConsoleCountDTO = { totalClient: 0, totalLicense: 0, totalProduct: 0 } expiringSoon: ConsoleExpireDTO[] = [] clientTopTen: ConsoleClientTopDTO[] = [] + chartType = { + c1: 0, + c2: 0, + c3: 0, + c4: 0, + c5: 0, + c6: 0, + } + + data = { + assetCategoryChart: [], + assetInventoryChart: [], + assetOwnChart: [], + assetPositionChart: [], + assetStatusChart: [], + assetUseChart: [], + recentlyAddedAssets: [] as NzSafeAny[], + assetTotal: { + change: 0, + total: 0, + }, + borrowWarning: { change: 0, total: 0 }, + inventorySecurityWarning: { change: 0, total: 0 }, + maintenanceWarning: { change: 0, total: 0 }, + todo: null, + } + @HostListener('window:resize') onResize() { // this.echartRef1?.resize(); + this.echartRef1?.resize() this.echartRef2?.resize() + this.echartRef3?.resize() + this.echartRef4?.resize() + this.echartRef5?.resize() + this.echartRef6?.resize() } + count = 0 + + quickActionGroup: NzSafeAny[] = [] + + quickAction: NzSafeAny[] = [] + ngOnInit(): void { - // this.api.getDashboardCounter().subscribe((res) => { - // this.counter = res.data - // }) - // this.api.getDashboardExpire().subscribe((res) => { - // this.expiringSoon = res.data - // }) - // this.api.getDashboardClientTop().subscribe((res) => { - // this.clientTopTen = res.data - // this.initChart2() - // }) + this.api.getHomeData().subscribe((res) => { + this.data = res.body + this.initChartBar(this.chart1, this.data.assetStatusChart, 1) + this.initChartBar(this.chart2, this.data.assetPositionChart, 2) + this.initChartBar(this.chart3, this.data.assetCategoryChart, 3) + this.initChartBar(this.chart4, this.data.assetInventoryChart, 4) + this.initChartBar(this.chart5, this.data.assetOwnChart, 5) + this.initChartBar(this.chart6, this.data.assetUseChart, 6) + }) + this.api.getHomeTodocountData().subscribe((res) => { + this.count = res.body + }) + this.initQuickAction() } ngAfterViewInit(): void { - // this.initChart1(); - this.initChart2(this.chart1.nativeElement) - this.initChart2(this.chart2.nativeElement) - this.initChart2(this.chart3.nativeElement) + this.domMap = [this.chart1, this.chart2, this.chart3, this.chart4, this.chart5, this.chart6] + } + + onSort(nzContent: TemplateRef<{}>) { + this.modal.create({ + nzTitle: '快捷操作排序', + nzContent, + nzFooter: null, + }) } - initChart1() { - const el = this.chart1.nativeElement + drop(event: CdkDragDrop) { + moveItemInArray(this.quickAction, event.previousIndex, event.currentIndex) + localStorage.setItem(LOCALSTORAGKEY.quickAction, JSON.stringify(this.quickAction)) + this.groupQuickAction() + this.msg.success('排序成功') + } + + initQuickAction() { + let quickAction = [] + try { + quickAction = JSON.parse(localStorage.getItem(LOCALSTORAGKEY.quickAction) ?? '[]') + } catch (error) {} + if (quickAction.length === 0) { + quickAction = defaultAction + } + this.quickAction = quickAction + this.groupQuickAction() + } + groupQuickAction() { + this.quickActionGroup = this.quickAction.reduce((a, c, i) => { + const g = Math.floor(i / 8) + if (a[g]) { + a[g].push(c) + } else { + a[g] = [c] + } + return a + }, [] as NzSafeAny[]) + } + + dataMap = [ + 'assetStatusChart', + 'assetPositionChart', + 'assetCategoryChart', + 'assetInventoryChart', + 'assetOwnChart', + 'assetUseChart', + ] + + domMap = [this.chart1, this.chart2, this.chart3, this.chart4, this.chart5, this.chart6] + + echartRefMap = [ + this.echartRef1, + this.echartRef2, + this.echartRef3, + this.echartRef4, + this.echartRef5, + this.echartRef6, + ] + + onChartTypeChange(n: number, index: number) { + //@ts-expect-error + this['echartRef' + n]?.dispose() + + if (index === 0) { + //@ts-expect-error + this.initChartBar(this.domMap[n - 1], this.data[this.dataMap[n - 1]], n) + } else { + //@ts-expect-error + this.initPieChart(this.domMap[n - 1], this.data[this.dataMap[n - 1]], n) + } + } + + initChartBar(e: ElementRef, data: NzSafeAny[] = [], ref?: number) { + const el = e.nativeElement if (el) { - this.echartRef1 = init(el) - this.echartRef1.setOption({ + let names: NzSafeAny[] = [] + let values: NzSafeAny[] = [] + + data.forEach((i) => { + names.push(i.name) + values.push(i.total) + }) + + //@ts-expect-error + if (this['echartRef' + ref]) { + //@ts-expect-error + this['echartRef' + ref].dispose() + } + //@ts-expect-error + this['echartRef' + ref] = init(el) + // this.echartRefMap.push(ref) + //@ts-expect-error + this['echartRef' + ref].setOption({ color: antvColor, tooltip: { trigger: 'axis', @@ -85,20 +249,21 @@ export class DashboardComponent implements OnInit, AfterViewInit { }, }, legend: { - data: ['晶未智慧安全平台', 'NG-WAF', 'DLP', 'API'], + data: names, }, grid: { - left: '10px', - right: '10px', + left: '3%', + right: '3%', bottom: '3%', + top: '3%', containLabel: true, }, xAxis: [ { type: 'category', - boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], + + data: names, }, ], yAxis: [ @@ -108,96 +273,51 @@ export class DashboardComponent implements OnInit, AfterViewInit { ], series: [ { - name: '晶未智慧安全平台', - type: 'line', - smooth: true, - areaStyle: { - opacity: 0.2, - }, - emphasis: { - focus: 'series', - }, - data: [620, 332, 401, 534, 190, 330, 410], - }, - { - name: 'NG-WAF', - type: 'line', - smooth: true, - areaStyle: { - opacity: 0.2, - }, - emphasis: { - focus: 'series', - }, - data: [220, 182, 191, 234, 290, 330, 310], - }, - { - name: 'API', - type: 'line', - smooth: true, - areaStyle: { - opacity: 0.2, - }, - emphasis: { - focus: 'series', - }, - data: [55, 612, 491, 34, 90, 200, 411], - }, - { - name: 'DLP', - type: 'line', - smooth: true, - areaStyle: { - opacity: 0.2, - }, - emphasis: { - focus: 'series', - }, - data: [20, 162, 291, 134, 390, 300, 10], + data: values, + type: 'bar', }, ], }) } } - initChart2(e: HTMLElement) { + initPieChart(e: ElementRef, data: NzSafeAny[] = [], ref?: number) { // const el = this.chart2.nativeElement - const el = e + const el = e.nativeElement + const total = data.reduce((a, b) => a + b.total, 0) + + data = data.map((i) => { + return { + name: i.name, + value: Math.round((i.total / total) * 100), + } + }) if (el) { - this.echartRef2 = init(el) - this.echartRef2.setOption({ + //@ts-expect-error + this['echartRef' + ref] = init(el) + //@ts-expect-error + this['echartRef' + ref].setOption({ color: antvColor, tooltip: { - trigger: 'axis', - axisPointer: { - type: 'cross', - label: { - backgroundColor: '#6a7985', - }, - }, - }, - - grid: { - left: '10px', - right: '10px', - bottom: '3%', - containLabel: true, - }, - xAxis: { - type: 'category', - // data: this.clientTopTen.map((i) => i.clientName), - data: Array.from({ length: 30 }, (_, i) => i + 1), + trigger: 'item', + formatter: '{b}: {d}%', }, - yAxis: { - type: 'value', + legend: { + type: 'scroll', + // orient: 'vertical', + bottom: 'bottom', }, series: [ { - // data: this.clientTopTen.map((i) => i.count), - data: [ - 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, - 110, 130, 110, 130, 110, 130, 110, 130, 110, 130, 130, - ], - type: 'bar', + type: 'pie', + radius: '50%', + data: data, + emphasis: { + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)', + }, + }, }, ], }) diff --git a/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-down/alert-inventory-down.component.ts b/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-down/alert-inventory-down.component.ts index 9d40e78..be3838d 100644 --- a/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-down/alert-inventory-down.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-down/alert-inventory-down.component.ts @@ -40,12 +40,15 @@ export class AlertInventoryDownComponent { // rowKey: 'id', // }) .setColumn([ - { key: '_category', title: '资产分类', visible: true }, + { key: 'categoryName', title: '资产分类', visible: true }, { key: 'assetCode', title: '资产编号', visible: true }, { key: 'name', title: '名称', visible: true }, { key: 'model', title: '规格型号', visible: true }, - { key: '_warehouse', title: '仓库', visible: true }, + { key: 'warehouseName', title: '仓库', visible: true }, + { key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' }, + { key: 'upperLimit', title: '库存上限', visible: true, width: '100px' }, + { key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' }, // { key: 'createTime', title: '创建时间', visible: true }, ]) } diff --git a/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-safety/alert-inventory-safety.component.ts b/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-safety/alert-inventory-safety.component.ts index f53fe48..c5213e2 100644 --- a/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-safety/alert-inventory-safety.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-safety/alert-inventory-safety.component.ts @@ -40,12 +40,15 @@ export class AlertInventorySafetyComponent { // rowKey: 'id', // }) .setColumn([ - { key: '_category', title: '资产分类', visible: true }, + { key: 'categoryName', title: '资产分类', visible: true }, { key: 'assetCode', title: '资产编号', visible: true }, { key: 'name', title: '名称', visible: true }, { key: 'model', title: '规格型号', visible: true }, - { key: '_warehouse', title: '仓库', visible: true }, + { key: 'warehouseName', title: '仓库', visible: true }, + { key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' }, + { key: 'upperLimit', title: '库存上限', visible: true, width: '100px' }, + { key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' }, // { key: 'createTime', title: '创建时间', visible: true }, ]) } diff --git a/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-up/alert-inventory-up.component.ts b/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-up/alert-inventory-up.component.ts index 612c2a2..e54f93c 100644 --- a/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-up/alert-inventory-up.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-up/alert-inventory-up.component.ts @@ -40,12 +40,15 @@ export class AlertInventoryUpComponent { // rowKey: 'id', // }) .setColumn([ - { key: '_category', title: '资产分类', visible: true }, + { key: 'categoryName', title: '资产分类', visible: true }, { key: 'assetCode', title: '资产编号', visible: true }, { key: 'name', title: '名称', visible: true }, { key: 'model', title: '规格型号', visible: true }, - { key: '_warehouse', title: '仓库', visible: true }, + { key: 'warehouseName', title: '仓库', visible: true }, + { key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' }, + { key: 'upperLimit', title: '库存上限', visible: true, width: '100px' }, + { key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' }, // { key: 'createTime', title: '创建时间', visible: true }, ]) } diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.html b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.html index 5ab974a..1452fc9 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.html +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.html @@ -243,10 +243,7 @@
- - 按照要求填写Excel数据,系统会对部分字段做验证! - -
+
模版文件 @@ -264,5 +261,23 @@
+ + + 按照要求填写Excel数据,系统会对部分字段做验证!
+ 资产导入规则 字段填写要求:
+ 1、资产编码:资产编号由后台自动生成,导入数据时不填写
+ 2、资产分类:填写系统中存在的资产分类名称,若资产分类存在重名时,请同时填写上资产分类的id
+ 3、所属公司:填写系统中存在的公司名称,若公司存在重名时,请同时填写上公司的id
+ 4、使用组织:填写系统中存在的组织名称,若组织存在重名时,请同时填写上组织的id
+ 5、管理人员:填写系统中存在的管理员姓名,若管理员姓名存在重名时,请同时填写上管理员id
+ 6、供应商:填写系统中存在的供应商名称,若供应商存在重名时,请同时填写上供应商的id
+ 7、资产厂商:填写系统中存在的资产厂商名称,若资产厂商存在重名时,请同时填写上资产厂商的id
+ 8、使用人员:填写系统中存在的账户姓名,若账户姓名存在重名时,请同时填写上使用人员id
+ 9、存放位置:填写系统中存在的存放位置名称,若存放位置名称存在重名时,请同时填写上存放位置id
+ 10、维保信息_维保厂商:填写系统中存在的维保厂商名称,若维保厂商名称存在重名时,请同时填写上维保厂商id
+ 11、日期格式:yyyy-MM-dd HH:mm:ss
+ 12、财务信息:保留2位小数,若您填写超过2位小数后,系统会自动做四舍五入处理
+
+
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts index 7771ccf..79792d4 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts @@ -176,6 +176,7 @@ export class FixedAssetManageComponent { this.importModalRef = this.modal.create({ nzTitle: '资产数据导入', nzContent, + nzWidth: 800, nzFooter: null, }) } diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html index 01e28e1..b101c44 100644 --- a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html +++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html @@ -73,10 +73,22 @@ - - diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html index a83a0f2..135b3d1 100644 --- a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html +++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html @@ -24,16 +24,10 @@ @case ('status') { @switch (data) { @case (0) { - + } @case (1) { - - } - @case (2) { - - } - @case (3) { - + } @default { - diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts index 73630e0..67bcdee 100644 --- a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts @@ -163,6 +163,7 @@ export class StockakingPlanComponent { ownCompanyId: data._ownCompany?.organizationId + '', useOrganizationId: data._useOrganization?.organizationId + '', warehouseId: data._warehouse?.warehouseId, + status: data.status === 1, }) } this.drawerRef = this.drawer.create({ @@ -193,6 +194,7 @@ export class StockakingPlanComponent { stocktakingUserId: value.stocktakingUserId?.[0], head: value.head?.[0], useUserId: value.useUserId?.[0], + status: value.status ? 1 : 0, }) .subscribe((res) => { this.msg.success(res.desc) diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.html b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.html index 136526c..9a51181 100644 --- a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.html +++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.html @@ -28,13 +28,13 @@ } @case ('code') { - {{ row?._asset.assetCode ?? '-' }} + {{ row?._asset?.assetCode ?? '-' }} } @case ('name') { - {{ row?._asset.name ?? '-' }} + {{ row?._asset?.name ?? '-' }} } @case ('category') { - {{ row?._asset._category?.categoryName ?? '-' }} + {{ row?._asset?._category?.categoryName ?? '-' }} } @case ('_warehouse') { {{ data?.name ?? '-' }} diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.ts b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.ts index af5bb79..3f98a65 100644 --- a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.ts @@ -79,7 +79,7 @@ export class StocktakingDetailComponent { { key: 'id', title: '主键', visible: true }, { key: 'code', title: '资产编号', visible: true }, { key: 'name', title: '资产名称', visible: true }, - { key: 'category', title: '资产分类', visible: true }, + // { key: 'category', title: '资产分类', visible: true }, { key: 'status', title: '盘点状态', visible: true }, { key: 'createTime', title: '操作时间', visible: true }, // { key: '_ownCompany', title: '所属公司', visible: true }, diff --git a/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html b/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html index 8c1627b..2faf545 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html +++ b/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html @@ -12,7 +12,14 @@ {{ data.userName }} } @case ('procVars') { - {{ data.title }} + {{ data?.title }} + } + @case ('status') { + @if (row.finishTime) { + + } @else { + + } } @case ('urgency') { diff --git a/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts b/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts index af205fe..20e9fa7 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts +++ b/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts @@ -48,7 +48,7 @@ export class FlowMyApplyComponent { // }) .setColumn([ { key: 'procVars', title: '名称', visible: true }, - // { key: 'status', title: '审批状态', visible: true }, + { key: 'status', title: '流程状态', visible: true }, { key: 'urgency', title: '紧急程度', visible: true }, { key: 'procDefName', title: '流程类型', visible: true }, { key: 'assigneeName', title: '审批人', visible: true }, diff --git a/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html b/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html index 8c1627b..88f013f 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html +++ b/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html @@ -14,6 +14,13 @@ @case ('procVars') { {{ data.title }} } + @case ('status') { + @if (row.finishTime) { + + } @else { + + } + } @case ('urgency') { {{ data === 2 ? '紧急' : '普通' }} diff --git a/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts b/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts index b0d2ce5..b39743b 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts +++ b/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts @@ -48,6 +48,7 @@ export class FlowMyTodoComponent { .setColumn([ { key: 'procVars', title: '名称', visible: true }, // { key: 'status', title: '审批状态', visible: true }, + { key: 'status', title: '流程状态', visible: true }, { key: 'urgency', title: '紧急程度', visible: true }, { key: 'procDefName', title: '流程类型', visible: true }, // { key: 'assigneeName', title: '审批人', visible: true }, @@ -57,7 +58,7 @@ export class FlowMyTodoComponent { ]) .setRowOperate([ { title: '查看', onClick: this.onDetail.bind(this) }, - { title: '作废', onClick: this.cancleFlow.bind(this) }, + // { title: '作废', onClick: this.cancleFlow.bind(this) }, ]) } diff --git a/web-admin-app/src/app/pages/org-setting/org-setting.component.html b/web-admin-app/src/app/pages/org-setting/org-setting.component.html index b136e80..f3ac6cd 100644 --- a/web-admin-app/src/app/pages/org-setting/org-setting.component.html +++ b/web-admin-app/src/app/pages/org-setting/org-setting.component.html @@ -1,4 +1,4 @@ - +