From c0740ecbbff8465816456a44e67fb2e209430de0 Mon Sep 17 00:00:00 2001 From: kely Date: Mon, 27 May 2024 22:38:08 +0800 Subject: [PATCH] license --- web-admin-app/src/app/app.routes.ts | 17 ++++++ .../eam-asset-purchase-apply.component.html | 2 +- .../asset-business-allot-form.component.ts | 2 +- .../asset-business-borrow-form.component.ts | 2 +- .../asset-business-collection.component.ts | 2 +- .../asset-business-retirement.component.ts | 2 +- .../asset-business-return-form.component.ts | 2 +- .../asset-business-revert-form.component.ts | 2 +- .../asset-business-storage-form.component.ts | 2 +- .../asset-business-transfer-form.component.ts | 2 +- .../asset-form/asset-form.component.ts | 31 ++++------- .../asset-select/asset-select.component.html | 4 +- .../asset-select/asset-select.component.ts | 2 + .../component-org-tree.component.html | 4 +- .../components/license/license.component.html | 46 ++++++++++++++++ .../components/license/license.component.less | 0 .../components/license/license.component.ts | 55 +++++++++++++++++++ .../repair-fault-form.component.ts | 2 +- .../repair-form/repair-form.component.ts | 2 +- web-admin-app/src/app/constants/index.ts | 9 +++ .../alert-borrow/alert-borrow.component.ts | 2 + .../alert-inventory-down.component.ts | 1 + .../alert-inventory-safety.component.ts | 1 + .../alert-inventory-up.component.ts | 1 + .../fixed-asset-manage-scrap.component.ts | 10 +++- .../stockaking-plan.component.ts | 2 +- .../flow-my-apply.component.html | 10 ++-- .../flow-my-apply/flow-my-apply.component.ts | 2 + .../flow-my-finished.component.html | 7 ++- .../flow-my-finished.component.ts | 4 ++ .../flow-my-todo/flow-my-todo.component.html | 10 ++-- .../flow-my-todo/flow-my-todo.component.ts | 2 + .../app/pages/license/license.component.html | 5 ++ .../app/pages/license/license.component.less | 8 +++ .../app/pages/license/license.component.ts | 12 ++++ .../org-setting/org-setting.component.html | 22 ++++---- .../org-setting/org-setting.component.ts | 12 +++- .../pages/system/index/system.component.html | 9 +++ .../system/license/license.component.html | 5 ++ .../system/license/license.component.less | 0 .../pages/system/license/license.component.ts | 12 ++++ web-admin-app/src/app/services/api.service.ts | 10 +++- .../local-http-interceptor.service.ts | 6 ++ 43 files changed, 277 insertions(+), 66 deletions(-) create mode 100644 web-admin-app/src/app/components/license/license.component.html create mode 100644 web-admin-app/src/app/components/license/license.component.less create mode 100644 web-admin-app/src/app/components/license/license.component.ts create mode 100644 web-admin-app/src/app/pages/license/license.component.html create mode 100644 web-admin-app/src/app/pages/license/license.component.less create mode 100644 web-admin-app/src/app/pages/license/license.component.ts create mode 100644 web-admin-app/src/app/pages/system/license/license.component.html create mode 100644 web-admin-app/src/app/pages/system/license/license.component.less create mode 100644 web-admin-app/src/app/pages/system/license/license.component.ts diff --git a/web-admin-app/src/app/app.routes.ts b/web-admin-app/src/app/app.routes.ts index 6edef79..5e91f71 100644 --- a/web-admin-app/src/app/app.routes.ts +++ b/web-admin-app/src/app/app.routes.ts @@ -60,12 +60,18 @@ import { FlowLayoutComponent } from './pages/flow/flow-layout/flow-layout.compon import { FlowMyFinishedComponent } from './pages/flow/flow-my-finished/flow-my-finished.component' import { FixedAssetStorageComponent } from './pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component' import { HomeComponent } from './pages/home/home.component' +import { LicensePageComponent } from './pages/license/license.component' +import { SystemLicenseComponent } from './pages/system/license/license.component' export const routes: Routes = [ { path: 'login', component: LoginComponent, }, + { + path: 'license', + component: LicensePageComponent, + }, { path: '', @@ -155,6 +161,17 @@ export const routes: Routes = [ }, }, }, + { + path: 'license', + component: SystemLicenseComponent, + canActivate: [permissionGuard], + title: '授权证书', + data: { + permission: { + only: ['system-license:view'], + }, + }, + }, { path: 'flow', canActivate: [permissionGuard], 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 aad4bfb..2509824 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 @@ -125,7 +125,7 @@ 资产列表 - + diff --git a/web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.ts b/web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.ts index 55542be..2c5d939 100644 --- a/web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.ts +++ b/web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.ts @@ -95,7 +95,7 @@ export class AssetBusinessAllotFormComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId, - positionId: Number(v.positionId?.[0]), + positionId: Number(v.positionId), useOrganizationId: Number(v.useOrganizationId), assetIdList: v.assetIdList, } diff --git a/web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.ts b/web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.ts index d5ab953..2ed7333 100644 --- a/web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.ts +++ b/web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.ts @@ -90,7 +90,7 @@ export class AssetBusinessBorrowFormComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], // ownCompanyId: v.ownCompanyId?.[0], - positionId: Number(v.positionId?.[0]), + positionId: Number(v.positionId), // useOrganizationId: Number(v.useOrganizationId?.[0]), assetIdList: v.assetIdList, } diff --git a/web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.ts b/web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.ts index 8b4f874..3e3420d 100644 --- a/web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.ts +++ b/web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.ts @@ -100,7 +100,7 @@ export class AssetBusinessCollectionComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId?.[0], - positionId: Number(v.positionId?.[0]), + positionId: Number(v.positionId), // useOrganizationId: Number(v.useOrganizationId?.[0]), assetIdList: v.assetIdList, // assetIdList: typeof v.assetIdList === 'string' ? v.assetIdList : JSON.stringify(v.assetIdList), diff --git a/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.ts b/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.ts index c09f957..fc4bdca 100644 --- a/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.ts +++ b/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.ts @@ -101,7 +101,7 @@ export class AssetBusinessRetirementComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId?.[0], - positionId: Number(v.positionId?.[0]), + positionId: Number(v.positionId), useOrganizationId: Number(v.useOrganizationId?.[0]), assetIdList: v.assetIdList, // assetIdList: typeof v.assetIdList === 'string' ? v.assetIdList : JSON.stringify(v.assetIdList), diff --git a/web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.ts b/web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.ts index af682cc..3e87b36 100644 --- a/web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.ts +++ b/web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.ts @@ -100,7 +100,7 @@ export class AssetBusinessReturnFormComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId?.[0], - positionId: Number(v.positionId?.[0]), + positionId: Number(v.positionId), useOrganizationId: Number(v.useOrganizationId), assetIdList: v.assetIdList, } diff --git a/web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.ts b/web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.ts index f566d95..4d7c2c6 100644 --- a/web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.ts +++ b/web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.ts @@ -97,7 +97,7 @@ export class AssetBusinessRevertFormComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId?.[0], - positionId: Number(v.positionId?.[0]), + positionId: Number(v.positionId), useOrganizationId: Number(v.useOrganizationId?.[0]), assetIdList: v.assetIdList, } diff --git a/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.ts b/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.ts index 6d860d2..c3aa114 100644 --- a/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.ts +++ b/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.ts @@ -95,7 +95,7 @@ export class AssetBusinessStorageFormComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId?.[0], - positionId: v.positionId?.[0], + positionId: v.positionId, useOrganizationId: v.useOrganizationId?.[0], responsiblePerson: v.responsiblePerson?.[0], assetIdList: v.assetIdList, diff --git a/web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.ts b/web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.ts index d3be921..e49fa82 100644 --- a/web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.ts +++ b/web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.ts @@ -97,7 +97,7 @@ export class AssetBusinessTransferFormComponent { managerId: v.managerId?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId?.[0], - positionId: Number(v.positionId?.[0]), + positionId: Number(v.positionId), useOrganizationId: Number(v.useOrganizationId), inUseOrganizationId: Number(v.inUseOrganizationId), outUseOrganizationId: Number(v.outUseOrganizationId?.[0]), 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 a9c574d..e69b4bf 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 @@ -100,20 +100,9 @@ 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 - }) + this.api.getBasicFinancialCategory({}).subscribe((res) => { + this.financialCategory = res.body + }) } patchValues() { @@ -125,10 +114,12 @@ export class AssetFormComponent implements OnInit { useUserId: data._useUser?.userId ? [data._useUser?.userId] : [], manager: data._manager?.userId ? [data._manager?.userId] : [], responsiblePerson: data._responsiblePerson?.userId ? [data._responsiblePerson?.userId] : [], - categoryId: data._category?.categoryId + '', - positionId: data._position?.positionId + '', - ownCompanyId: data._ownCompany?.organizationId + '', - useOrganizationId: data._useOrganization?.organizationId + '', + categoryId: data._category?.categoryId ? data._category?.categoryId + '' : null, + positionId: data._position?.positionId ? data._position?.positionId + '' : null, + ownCompanyId: data._ownCompany?.organizationId ? data._ownCompany?.organizationId + '' : null, + useOrganizationId: data._useOrganization?.organizationId + ? data._useOrganization?.organizationId + '' + : null, maintenanceVendor: data._maintenanceVendor?.maintenanceVendorId, manufacturersVendorId: data._manufacturersVendor?.manufacturersVendorId, }) @@ -142,14 +133,14 @@ export class AssetFormComponent implements OnInit { let values = null if (FormValidators.validateFormGroup(this.formGroup)) { const v = this.formGroup.getRawValue() - + console.log('v', v) values = { ...v, useUserId: v.useUserId?.[0], manager: v.manager?.[0], categoryId: v.categoryId, ownCompanyId: v.ownCompanyId, - positionId: v.positionId?.[0], + positionId: v.positionId, useOrganizationId: v.useOrganizationId, responsiblePerson: v.responsiblePerson?.[0], } diff --git a/web-admin-app/src/app/components/asset-select/asset-select.component.html b/web-admin-app/src/app/components/asset-select/asset-select.component.html index 292a58b..6192847 100644 --- a/web-admin-app/src/app/components/asset-select/asset-select.component.html +++ b/web-admin-app/src/app/components/asset-select/asset-select.component.html @@ -119,7 +119,7 @@ 资产编号 资产状态 资产名称 - 库存数量 + {{ buy ? '采购' : '库存' }}数量 规格型号 资产序列号 @@ -142,7 +142,7 @@ {{ data.name }} () allGetedDataMap = new Map() diff --git a/web-admin-app/src/app/components/component-org-tree/component-org-tree.component.html b/web-admin-app/src/app/components/component-org-tree/component-org-tree.component.html index 8a82e75..6c2f767 100644 --- a/web-admin-app/src/app/components/component-org-tree/component-org-tree.component.html +++ b/web-admin-app/src/app/components/component-org-tree/component-org-tree.component.html @@ -91,12 +91,12 @@ } - + diff --git a/web-admin-app/src/app/components/license/license.component.html b/web-admin-app/src/app/components/license/license.component.html new file mode 100644 index 0000000..b3283fa --- /dev/null +++ b/web-admin-app/src/app/components/license/license.component.html @@ -0,0 +1,46 @@ +

License 管理

+@if (license.time.includes('过期')) { + +} @else { + +} + +
+ + + + 证书标题 + + {{ license.subject }} + + + + 描述信息 + + {{ license.description }} + + + + 授权时间 + + {{ license.time }} + + + + 更新证书 + + + + + + + @if (!license.time.includes('过期')) { +
+ +
+ } +
diff --git a/web-admin-app/src/app/components/license/license.component.less b/web-admin-app/src/app/components/license/license.component.less new file mode 100644 index 0000000..e69de29 diff --git a/web-admin-app/src/app/components/license/license.component.ts b/web-admin-app/src/app/components/license/license.component.ts new file mode 100644 index 0000000..a316147 --- /dev/null +++ b/web-admin-app/src/app/components/license/license.component.ts @@ -0,0 +1,55 @@ +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' +import { NzMessageService } from 'ng-zorro-antd/message' +import { finalize } from 'rxjs' + +@Component({ + selector: 'app-license', + standalone: true, + imports: [SharedModule], + templateUrl: './license.component.html', + styleUrl: './license.component.less', +}) +export class LicenseComponent implements OnInit { + constructor( + private api: ApiService, + private msg: NzMessageService, + ) {} + + license: NzSafeAny = null + + ngOnInit(): void { + this.loadLicense() + } + + uploadLoading = false + + loadLicense() { + this.api.getLicenseInfo().subscribe((res) => { + this.license = res.body + }) + } + + onFileChange(e: Event) { + const target = e.target as HTMLInputElement + const file = target.files![0] + target.value = '' + + const formdata = new FormData() + formdata.append('file', file) + this.uploadLoading = true + this.api + .uploadLicenseInfo(formdata) + .pipe( + finalize(() => { + this.uploadLoading = false + }), + ) + .subscribe((res) => { + this.msg.success(res.desc) + this.loadLicense() + }) + } +} diff --git a/web-admin-app/src/app/components/repair-fault-form/repair-fault-form.component.ts b/web-admin-app/src/app/components/repair-fault-form/repair-fault-form.component.ts index c569e35..535633c 100644 --- a/web-admin-app/src/app/components/repair-fault-form/repair-fault-form.component.ts +++ b/web-admin-app/src/app/components/repair-fault-form/repair-fault-form.component.ts @@ -93,7 +93,7 @@ export class RepairFaultFormComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId?.[0], - positionId: v.positionId?.[0], + positionId: v.positionId, useOrganizationId: v.useOrganizationId?.[0], responsiblePerson: v.responsiblePerson?.[0], assetIdList: v.assetIdList, diff --git a/web-admin-app/src/app/components/repair-form/repair-form.component.ts b/web-admin-app/src/app/components/repair-form/repair-form.component.ts index 052d40d..fe40101 100644 --- a/web-admin-app/src/app/components/repair-form/repair-form.component.ts +++ b/web-admin-app/src/app/components/repair-form/repair-form.component.ts @@ -90,7 +90,7 @@ export class RepairFormComponent { manager: v.manager?.[0], categoryId: v.categoryId?.[0], ownCompanyId: v.ownCompanyId?.[0], - positionId: v.positionId?.[0], + positionId: v.positionId, useOrganizationId: v.useOrganizationId?.[0], responsiblePerson: v.responsiblePerson?.[0], assetIdList: v.assetIdList, diff --git a/web-admin-app/src/app/constants/index.ts b/web-admin-app/src/app/constants/index.ts index f16210c..7f453b6 100644 --- a/web-admin-app/src/app/constants/index.ts +++ b/web-admin-app/src/app/constants/index.ts @@ -72,3 +72,12 @@ export const ASSET_SCRAP_STATUS = new Map([ [3, '审批中'], [4, '取消'], ]) +// 1-起草中,2-审批中,3-已结束,4-已驳回,5-已废弃,6-流程异常 +export const FLOW_STATUS = new Map([ + [1, '起草中'], + [2, '审批中'], + [3, '已结束'], + [4, '已驳回'], + [5, '已废弃'], + [6, '流程异常'], +]) diff --git a/web-admin-app/src/app/pages/fixed-asset/alert/alert-borrow/alert-borrow.component.ts b/web-admin-app/src/app/pages/fixed-asset/alert/alert-borrow/alert-borrow.component.ts index 9d9312f..30dc20d 100644 --- a/web-admin-app/src/app/pages/fixed-asset/alert/alert-borrow/alert-borrow.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/alert/alert-borrow/alert-borrow.component.ts @@ -49,6 +49,8 @@ export class AlertBorrowComponent { { key: 'serialNumber', title: '序列号', visible: true }, { key: 'notes', title: '备注', visible: true }, + { key: 'returnTime', title: '归还时间', visible: true }, + { key: 'businessId', title: '借用业务编号', visible: true }, // { key: 'createTime', title: '创建时间', visible: true }, ]) } 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 be3838d..2523a0f 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 @@ -46,6 +46,7 @@ export class AlertInventoryDownComponent { { key: 'model', title: '规格型号', visible: true }, { key: 'warehouseName', title: '仓库', visible: true }, + { key: 'count', title: '库存数量', visible: true, width: '100px' }, { key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' }, { key: 'upperLimit', title: '库存上限', visible: true, width: '100px' }, { key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' }, 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 c5213e2..2984df8 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 @@ -46,6 +46,7 @@ export class AlertInventorySafetyComponent { { key: 'model', title: '规格型号', visible: true }, { key: 'warehouseName', title: '仓库', visible: true }, + { key: 'count', title: '库存数量', visible: true, width: '100px' }, { key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' }, { key: 'upperLimit', title: '库存上限', visible: true, width: '100px' }, { key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' }, 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 e54f93c..9bbcd8e 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 @@ -46,6 +46,7 @@ export class AlertInventoryUpComponent { { key: 'model', title: '规格型号', visible: true }, { key: 'warehouseName', title: '仓库', visible: true }, + { key: 'count', title: '库存数量', visible: true, width: '100px' }, { key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' }, { key: 'upperLimit', title: '库存上限', visible: true, width: '100px' }, { key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' }, diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts index a98563f..e58a86d 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts @@ -61,8 +61,14 @@ export class FixedAssetManageScrapComponent { this.onCreate(v, true) }, }, - { title: '清理', onClick: this.onClean.bind(this) }, - { title: '确认', onClick: this.confirm.bind(this) }, + { + title: '清理', + visible(v) { + return true + }, + onClick: this.onClean.bind(this), + }, + { title: '报废', onClick: this.confirm.bind(this) }, { title: '修改', onClick: this.onCreate.bind(this) }, { title: '删除', onClick: this.deleteItem.bind(this) }, ]) 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 28698ab..810d225 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 @@ -88,7 +88,7 @@ export class StockakingPlanComponent { .setColumn([ { key: 'name', title: '名称' }, { key: 'fullStocktaking', title: '全员盘点' }, - { key: 'status', title: '盘点状态' }, + // { key: 'status', title: '盘点状态' }, { key: '_head', title: '负责人', width: '150px' }, { key: '_stocktakingUser', title: '盘点人', width: '150px' }, // { key: 'countPending', title: '待盘点', width: '100px' }, 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 7ec68ea..2a60d57 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 @@ -15,14 +15,12 @@ {{ data?.title }} } @case ('status') { - @if (row.finishTime) { - - } @else { - - } + + {{ FLOW_STATUS.get(data) }} + } @case ('urgency') { - + {{ row.procVars.urgency === 2 ? '紧急' : '普通' }} } 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 20e9fa7..e569fe9 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 @@ -12,6 +12,7 @@ import { NzMessageService } from 'ng-zorro-antd/message' import { FormValidators } from 'app/utils' import { AssetEmployeeApplyComponent } from 'app/components' import { comsMap } from '../flow-main/flow-main.component' +import { FLOW_STATUS } from 'app/constants' @Component({ selector: 'app-flow-my-apply', @@ -40,6 +41,7 @@ export class FlowMyApplyComponent { name: new FormControl(''), }) + FLOW_STATUS = FLOW_STATUS ngOnInit(): void { this.table // .setConfig({ diff --git a/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html b/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html index 61c6df0..baf0c28 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html +++ b/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html @@ -14,8 +14,13 @@ @case ('procVars') { {{ data.title }} } + @case ('status') { + + {{ FLOW_STATUS.get(data) }} + + } @case ('urgency') { - + {{ row.procVars.urgency === 2 ? '紧急' : '普通' }} } diff --git a/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.ts b/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.ts index 46e7659..f10a9eb 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.ts +++ b/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.ts @@ -11,6 +11,7 @@ import { NzModalService } from 'ng-zorro-antd/modal' import { NzMessageService } from 'ng-zorro-antd/message' import { FormValidators } from 'app/utils' import { comsMap } from '../flow-main/flow-main.component' +import { FLOW_STATUS } from 'app/constants' @Component({ selector: 'app-flow-my-finished', @@ -39,6 +40,8 @@ export class FlowMyFinishedComponent { name: new FormControl(''), }) + FLOW_STATUS = FLOW_STATUS + ngOnInit(): void { this.table // .setConfig({ @@ -48,6 +51,7 @@ export class FlowMyFinishedComponent { .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 10455db..baf0c28 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 @@ -15,14 +15,12 @@ {{ data.title }} } @case ('status') { - @if (row.finishTime) { - - } @else { - - } + + {{ FLOW_STATUS.get(data) }} + } @case ('urgency') { - + {{ row.procVars.urgency === 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 b39743b..6ca06bd 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 @@ -11,6 +11,7 @@ import { NzModalService } from 'ng-zorro-antd/modal' import { NzMessageService } from 'ng-zorro-antd/message' import { FormValidators } from 'app/utils' import { comsMap } from '../flow-main/flow-main.component' +import { FLOW_STATUS } from 'app/constants' @Component({ selector: 'app-flow-my-todo', @@ -39,6 +40,7 @@ export class FlowMyTodoComponent { name: new FormControl(''), }) + FLOW_STATUS = FLOW_STATUS ngOnInit(): void { this.table // .setConfig({ diff --git a/web-admin-app/src/app/pages/license/license.component.html b/web-admin-app/src/app/pages/license/license.component.html new file mode 100644 index 0000000..eb9f3a7 --- /dev/null +++ b/web-admin-app/src/app/pages/license/license.component.html @@ -0,0 +1,5 @@ +
+
+ +
+
diff --git a/web-admin-app/src/app/pages/license/license.component.less b/web-admin-app/src/app/pages/license/license.component.less new file mode 100644 index 0000000..7024679 --- /dev/null +++ b/web-admin-app/src/app/pages/license/license.component.less @@ -0,0 +1,8 @@ +.page-container { + position: fixed; + inset: 0; + z-index: 100; + display: flex; + align-items: center; + justify-content: center; +} \ No newline at end of file diff --git a/web-admin-app/src/app/pages/license/license.component.ts b/web-admin-app/src/app/pages/license/license.component.ts new file mode 100644 index 0000000..42a2ba8 --- /dev/null +++ b/web-admin-app/src/app/pages/license/license.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core' +import { LicenseComponent } from 'app/components/license/license.component' +import { SharedModule } from 'app/shared/shared.module' + +@Component({ + selector: 'app-upload-license', + standalone: true, + imports: [SharedModule, LicenseComponent], + templateUrl: './license.component.html', + styleUrl: './license.component.less', +}) +export class LicensePageComponent {} 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 f3ac6cd..efb40c7 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 @@ -8,7 +8,7 @@ [disabled]="organization?.organizationType !== '2'" (click)="onCreate()" > - 新建 + 新建员工 @@ -137,28 +137,28 @@
- - 密码 + 角色 - + + + - - 确认密码 + 密码 - + + - 角色 + 确认密码 - - - + + 状态 diff --git a/web-admin-app/src/app/pages/org-setting/org-setting.component.ts b/web-admin-app/src/app/pages/org-setting/org-setting.component.ts index c11b1b9..463b161 100644 --- a/web-admin-app/src/app/pages/org-setting/org-setting.component.ts +++ b/web-admin-app/src/app/pages/org-setting/org-setting.component.ts @@ -70,13 +70,13 @@ export class OrgSettingComponent implements OnInit { '', [FormValidators.required('请输入'), FormValidators.pattern(/^1[3-9]\d{9}$/, '请输入正确的手机号')], ], - password: [], - repassword: [], + password: [null, FormValidators.required('请输入')], + repassword: [null, FormValidators.required('请输入')], email: [], status: ['0'], sex: ['0'], avatar: [], - roleId: [], + roleId: [null, [FormValidators.required('请选择角色')]], }) } initQueryForm() { @@ -124,6 +124,9 @@ export class OrgSettingComponent implements OnInit { onCreate(data?: NzSafeAny) { if (data) { + this.createForm.get('password')?.clearValidators() + this.createForm.get('repassword')?.clearValidators() + this.createForm.updateValueAndValidity() this.createForm.patchValue({ ...data, roleId: data._umsRole?.roleId }) } this.drawerRef = this.drawer.create({ @@ -157,6 +160,9 @@ export class OrgSettingComponent implements OnInit { async onCancel() { this.drawerRef?.close() + this.createForm.get('password')?.addValidators(FormValidators.required('请输入')) + this.createForm.get('repassword')?.addValidators(FormValidators.required('请输入')) + this.createForm.updateValueAndValidity() this.createForm.reset({ sex: '0', status: '0', diff --git a/web-admin-app/src/app/pages/system/index/system.component.html b/web-admin-app/src/app/pages/system/index/system.component.html index 90eb8f0..407bca9 100644 --- a/web-admin-app/src/app/pages/system/index/system.component.html +++ b/web-admin-app/src/app/pages/system/index/system.component.html @@ -20,6 +20,15 @@ > 角色管理 +
  • + 授权证书 +
  • + + + + diff --git a/web-admin-app/src/app/pages/system/license/license.component.less b/web-admin-app/src/app/pages/system/license/license.component.less new file mode 100644 index 0000000..e69de29 diff --git a/web-admin-app/src/app/pages/system/license/license.component.ts b/web-admin-app/src/app/pages/system/license/license.component.ts new file mode 100644 index 0000000..ae6d1b2 --- /dev/null +++ b/web-admin-app/src/app/pages/system/license/license.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core' +import { LicenseComponent } from 'app/components/license/license.component' +import { SharedModule } from 'app/shared/shared.module' + +@Component({ + selector: 'app-system-license', + standalone: true, + imports: [SharedModule, LicenseComponent], + templateUrl: './license.component.html', + styleUrl: './license.component.less', +}) +export class SystemLicenseComponent {} diff --git a/web-admin-app/src/app/services/api.service.ts b/web-admin-app/src/app/services/api.service.ts index 25991f5..884612d 100644 --- a/web-admin-app/src/app/services/api.service.ts +++ b/web-admin-app/src/app/services/api.service.ts @@ -48,6 +48,14 @@ export class ApiService { return this.http.post('/api/common/upload', data) } + getLicenseInfo() { + return this.http.post('/api/license/info', null) + } + + uploadLicenseInfo(formData: FormData) { + return this.http.post('/api/license/update', formData) + } + login(data: {}) { return this.http.post('/api/oauth/login', data).pipe( tap((res) => { @@ -125,7 +133,7 @@ export class ApiService { } getBasicFinancialCategory(data: {}) { - return this.http.post('/api/eamBasicFinancialCategory/list', data) + return this.http.post('/api/eamBasicFinancialCategory/all', data) } getAssetPage(data: {}) { return this.http.post('/api/eamAsset/list', data) diff --git a/web-admin-app/src/app/services/local-http-interceptor.service.ts b/web-admin-app/src/app/services/local-http-interceptor.service.ts index c779460..99c5405 100644 --- a/web-admin-app/src/app/services/local-http-interceptor.service.ts +++ b/web-admin-app/src/app/services/local-http-interceptor.service.ts @@ -143,6 +143,12 @@ export class LocalHttpInterceptorService implements HttpInterceptor { case 404: this.msg.error(getErrorMessage(res.error, '没有找到资源')) break + case 406: + this.msg.error(getErrorMessage(res.error)) + setTimeout(() => { + window.location.href = '/license' + }, 1500) + break default: this.msg.error(getErrorMessage(res.error))