diff --git a/web-admin-app/src/app/app.config.ts b/web-admin-app/src/app/app.config.ts index 84d5189..05d75d1 100644 --- a/web-admin-app/src/app/app.config.ts +++ b/web-admin-app/src/app/app.config.ts @@ -26,7 +26,7 @@ const disabledLog = () => { } } -// disabledLog() +disabledLog() export function initializeApp(configService: ServerPaginatedTableService) { return () => { diff --git a/web-admin-app/src/app/app.routes.ts b/web-admin-app/src/app/app.routes.ts index 956a39b..43f5e50 100644 --- a/web-admin-app/src/app/app.routes.ts +++ b/web-admin-app/src/app/app.routes.ts @@ -209,14 +209,23 @@ export const routes: Routes = [ canActivate: [permissionGuard], title: '展示设置', data: { - // permission: { - // only: ['system-display:view'], - // }, + permission: { + only: ['api:sysConfig:updateDisplaySettings'], + }, }, }, { path: 'place', title: '场所地址', + data: { + permission: { + only: [ + 'api:eamBasicWarehouse:add', + 'api:eamBasicWarehouse:update', + 'api:eamBasicWarehouse:delete', + ], + }, + }, children: [ { path: '', @@ -227,11 +236,29 @@ export const routes: Routes = [ path: 'warehouse', title: '仓库管理', component: SystemWarehouseComponent, + data: { + permission: { + only: [ + 'api:eamBasicWarehouse:add', + 'api:eamBasicWarehouse:update', + 'api:eamBasicWarehouse:delete', + ], + }, + }, }, { path: 'address', title: '地址管理', component: SystemAddressComponent, + data: { + permission: { + only: [ + 'api:eamBasicPosition:add', + 'api:eamBasicPosition:update', + 'api:eamBasicPosition:delete', + ], + }, + }, }, ], }, @@ -384,28 +411,28 @@ export const routes: Routes = [ component: AssetManagementComponent, title: '资产管理', }, - { - path: 'repair', - title: '维护维保', - children: [ - { - path: '', - redirectTo: 'list', - pathMatch: 'full', - }, + // { + // path: 'repair', + // title: '维护维保', + // children: [ + // { + // path: '', + // redirectTo: 'list', + // pathMatch: 'full', + // }, - { - path: 'list', - component: RepairListComponent, - title: '维修登记', - }, - { - path: 'fault', - component: RepairFaultComponent, - title: '故障登记', - }, - ], - }, + // { + // path: 'list', + // component: RepairListComponent, + // title: '维修登记', + // }, + // { + // path: 'fault', + // component: RepairFaultComponent, + // title: '故障登记', + // }, + // ], + // }, { path: 'manage', // title: '固资管理', 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 deleted file mode 100644 index 78f0e07..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.html +++ /dev/null @@ -1,59 +0,0 @@ - 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 deleted file mode 100644 index 2a6dd04..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Component, Input, OnInit, inject } from '@angular/core' -import { FormBuilder, FormGroup } from '@angular/forms' -import { ApiService } from 'app/services' -import { SharedModule } from 'app/shared/shared.module' -import { FormValidators, Utils } from 'app/utils' -import { NzMessageService } from 'ng-zorro-antd/message' -import { OrgSelectComponent } from '../../org-select/org-select.component' -import { SelectUserByOrgComponent } from '../../select-user-by-org/select-user-by-org.component' -import { PositionSelectComponent } from '../../position-select/position-select.component' -import { NzSafeAny } from 'ng-zorro-antd/core/types' -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', - standalone: true, - imports: [ - SharedModule, - SelectUserByOrgComponent, - SupplierSelectComponent, - AssetSelectComponent, - OrgSelectComponent, - PositionSelectComponent, - WarehouseSelectComponent, - FlowResultComponent, - ], - templateUrl: './asset-employee-apply.component.html', - styleUrl: './asset-employee-apply.component.less', -}) -export class AssetEmployeeApplyComponent { - constructor( - private fb: FormBuilder, - private api: ApiService, - private msg: NzMessageService, - ) {} - - readonly data: NzSafeAny = inject(NZ_MODAL_DATA) - - formGroup!: FormGroup - - groupIndex = 0 - - uploadLoading = false - - ngOnInit(): void { - this.formGroup = this.fb.group({ - id: this.fb.control(null, []), - title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]), - // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), - applyDepartmentId: this.fb.control(null, [FormValidators.required('请选择')]), - applicant: this.fb.control({ value: this.api.authInfo?.userName, disabled: true }, [ - FormValidators.required('请选择'), - ]), - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), - - notes: this.fb.control(null, [FormValidators.required('请输入')]), - urgency: this.fb.control(1, []), - }) - - this.patchValues() - } - - patchValues() { - const { value: data, preview } = this.data - if (data) { - this.formGroup.patchValue({ - ...data.procVars, - applyDepartmentId: data.procVars?.applyDepartmentId + '', - }) - } - if (preview) { - this.formGroup.disable() - } - } - - public getValues() { - let values = null - if (FormValidators.validateFormGroup(this.formGroup)) { - const v = this.formGroup.value - - values = { - ...v, - - applyDepartmentId: Number(v.applyDepartmentId), - } - } - return values - } - - 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.api.upload(formdata).subscribe((res) => { - this.formGroup.get('attach')?.setValue(res.body.fileName) - }) - } -} 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 deleted file mode 100644 index 61e0f0b..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.html +++ /dev/null @@ -1,67 +0,0 @@ - diff --git a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.ts b/web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.ts deleted file mode 100644 index 5f16c96..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Component, Input, OnInit, inject } from '@angular/core' -import { FormBuilder, FormGroup } from '@angular/forms' -import { ApiService } from 'app/services' -import { SharedModule } from 'app/shared/shared.module' -import { FormValidators, Utils } from 'app/utils' -import { NzMessageService } from 'ng-zorro-antd/message' -import { OrgSelectComponent } from '../../org-select/org-select.component' -import { SelectUserByOrgComponent } from '../../select-user-by-org/select-user-by-org.component' -import { PositionSelectComponent } from '../../position-select/position-select.component' -import { NzSafeAny } from 'ng-zorro-antd/core/types' -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' - -@Component({ - selector: 'app-asset-employee-loss', - standalone: true, - imports: [ - SharedModule, - SelectUserByOrgComponent, - SupplierSelectComponent, - AssetSelectComponent, - OrgSelectComponent, - PositionSelectComponent, - WarehouseSelectComponent, - ], - templateUrl: './asset-employee-loss.component.html', - styleUrl: './asset-employee-loss.component.less', -}) -export class AssetEmployeeLossComponent { - constructor( - private fb: FormBuilder, - private api: ApiService, - private msg: NzMessageService, - ) {} - - readonly data: NzSafeAny = inject(NZ_MODAL_DATA) - - formGroup!: FormGroup - - groupIndex = 0 - - uploadLoading = false - - ngOnInit(): void { - this.formGroup = this.fb.group({ - id: this.fb.control(null, []), - title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]), - // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), - applyDepartmentId: this.fb.control(null, [FormValidators.required('请选择')]), - applicant: this.fb.control({ value: this.api.authInfo?.userName, disabled: true }, [ - FormValidators.required('请选择'), - ]), - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), - - notes: this.fb.control(null, [FormValidators.required('请输入')]), - urgency: this.fb.control(1, []), - assetIdList: this.fb.control([], []), - }) - - this.patchValues() - } - - patchValues() { - const { value: data, preview } = this.data - if (data) { - this.formGroup.patchValue({ - ...data.procVars, - applyDepartmentId: data.procVars?.applyDepartmentId + '', - }) - } - if (preview) { - this.formGroup.disable() - } - } - - public getValues() { - let values = null - if (FormValidators.validateFormGroup(this.formGroup)) { - const v = this.formGroup.value - - values = { - ...v, - - applyDepartmentId: Number(v.applyDepartmentId?.[0]), - } - } - return values - } - - 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.api.upload(formdata).subscribe((res) => { - this.formGroup.get('attach')?.setValue(res.body.fileName) - }) - } -} 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 deleted file mode 100644 index 51688d0..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.html +++ /dev/null @@ -1,91 +0,0 @@ - diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.less b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.less deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index 4ec8d8a..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Component, Input, OnInit, inject } from '@angular/core' -import { FormBuilder, FormGroup } from '@angular/forms' -import { ApiService } from 'app/services' -import { SharedModule } from 'app/shared/shared.module' -import { FormValidators, Utils } from 'app/utils' -import { NzMessageService } from 'ng-zorro-antd/message' -import { OrgSelectComponent } from '../../org-select/org-select.component' -import { SelectUserByOrgComponent } from '../../select-user-by-org/select-user-by-org.component' -import { PositionSelectComponent } from '../../position-select/position-select.component' -import { NzSafeAny } from 'ng-zorro-antd/core/types' -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', - standalone: true, - imports: [ - SharedModule, - SelectUserByOrgComponent, - SupplierSelectComponent, - AssetSelectComponent, - OrgSelectComponent, - PositionSelectComponent, - WarehouseSelectComponent, - FlowResultComponent, - ], - templateUrl: './eam-asset-employee-handover.component.html', - styleUrl: './eam-asset-employee-handover.component.less', -}) -export class EamAssetEmployeeHandoverComponent { - constructor( - private fb: FormBuilder, - private api: ApiService, - private msg: NzMessageService, - ) {} - - readonly data: NzSafeAny = inject(NZ_MODAL_DATA) - - formGroup!: FormGroup - - groupIndex = 0 - - uploadLoading = false - - ngOnInit(): void { - this.formGroup = this.fb.group({ - id: this.fb.control(null, []), - title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]), - // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), - applyDepartmentId: this.fb.control(null, [FormValidators.required('请选择')]), - handoverDepartmentId: this.fb.control(null, [FormValidators.required('请选择')]), - handoverUserId: this.fb.control(null, [FormValidators.required('请选择')]), - applicant: this.fb.control({ value: this.api.authInfo?.userName, disabled: true }, [ - FormValidators.required('请选择'), - ]), - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), - - content: this.fb.control(null, [FormValidators.required('请输入')]), - notes: this.fb.control(null, []), - urgency: this.fb.control(1, []), - assetIdList: this.fb.control([], []), - }) - - this.patchValues() - } - - patchValues() { - const { value: data, preview } = this.data - if (data) { - this.formGroup.patchValue({ - ...data.procVars, - handoverUserId: data.procVars?.handoverUserId ? [data.procVars?.handoverUserId] : [], - applyDepartmentId: data.procVars?.applyDepartmentId + '', - handoverDepartmentId: data.procVars?.handoverDepartmentId + '', - }) - } - if (preview) { - this.formGroup.disable() - } - } - - public getValues() { - let values = null - if (FormValidators.validateFormGroup(this.formGroup)) { - const v = this.formGroup.value - - values = { - ...v, - handoverUserId: Number(v.handoverUserId?.[0]), - applyDepartmentId: Number(v.applyDepartmentId?.[0]), - } - } - return values - } - - 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.api.upload(formdata).subscribe((res) => { - this.formGroup.get('attach')?.setValue(res.body.fileName) - }) - } -} 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 deleted file mode 100644 index 2905bfc..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.html +++ /dev/null @@ -1,83 +0,0 @@ - diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.less b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.less deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index 2c2113b..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Component, Input, OnInit, inject } from '@angular/core' -import { FormBuilder, FormGroup } from '@angular/forms' -import { ApiService } from 'app/services' -import { SharedModule } from 'app/shared/shared.module' -import { FormValidators, Utils } from 'app/utils' -import { NzMessageService } from 'ng-zorro-antd/message' -import { OrgSelectComponent } from '../../org-select/org-select.component' -import { SelectUserByOrgComponent } from '../../select-user-by-org/select-user-by-org.component' -import { PositionSelectComponent } from '../../position-select/position-select.component' -import { NzSafeAny } from 'ng-zorro-antd/core/types' -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', - standalone: true, - imports: [ - SharedModule, - SelectUserByOrgComponent, - SupplierSelectComponent, - AssetSelectComponent, - OrgSelectComponent, - PositionSelectComponent, - WarehouseSelectComponent, - FlowResultComponent, - ], - templateUrl: './eam-asset-employee-repair.component.html', - styleUrl: './eam-asset-employee-repair.component.less', -}) -export class EamAssetEmployeeRepairComponent { - constructor( - private fb: FormBuilder, - private api: ApiService, - private msg: NzMessageService, - ) {} - - readonly data: NzSafeAny = inject(NZ_MODAL_DATA) - - formGroup!: FormGroup - - groupIndex = 0 - - uploadLoading = false - - iconPreview = '' - - ngOnInit(): void { - this.formGroup = this.fb.group({ - id: this.fb.control(null, []), - title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]), - // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), - applyDepartmentId: this.fb.control(null, [FormValidators.required('请选择')]), - applicant: this.fb.control({ value: this.api.authInfo?.userName, disabled: true }, [ - FormValidators.required('请选择'), - ]), - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), - - notes: this.fb.control(null, [FormValidators.required('请输入')]), - urgency: this.fb.control(1, []), - assetIdList: this.fb.control([], []), - img: this.fb.control(null, []), - }) - - this.patchValues() - } - - patchValues() { - const { value: data, preview } = this.data - if (data) { - this.iconPreview = data.procVars?.img - this.formGroup.patchValue({ - ...data.procVars, - applyDepartmentId: data.procVars?.applyDepartmentId + '', - }) - } - if (preview) { - this.formGroup.disable() - } - } - - public getValues() { - let values = null - if (FormValidators.validateFormGroup(this.formGroup)) { - const v = this.formGroup.value - - values = { - ...v, - - applyDepartmentId: Number(v.applyDepartmentId?.[0]), - } - } - return values - } - - 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.api.upload(formdata).subscribe((res) => { - this.formGroup.get('img')?.setValue(res.body.fileName) - }) - } -} diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.less b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.less deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index 37e330c..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Component, Input, OnInit, inject } from '@angular/core' -import { FormBuilder, FormGroup } from '@angular/forms' -import { ApiService } from 'app/services' -import { SharedModule } from 'app/shared/shared.module' -import { FormValidators, Utils } from 'app/utils' -import { NzMessageService } from 'ng-zorro-antd/message' -import { OrgSelectComponent } from '../../org-select/org-select.component' -import { SelectUserByOrgComponent } from '../../select-user-by-org/select-user-by-org.component' -import { PositionSelectComponent } from '../../position-select/position-select.component' -import { NzSafeAny } from 'ng-zorro-antd/core/types' -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', - standalone: true, - imports: [ - SharedModule, - SelectUserByOrgComponent, - SupplierSelectComponent, - AssetSelectComponent, - OrgSelectComponent, - PositionSelectComponent, - WarehouseSelectComponent, - FlowResultComponent, - ], - templateUrl: './eam-asset-employee-scrap.component.html', - styleUrl: './eam-asset-employee-scrap.component.less', -}) -export class EamAssetEmployeeScrapComponent { - constructor( - private fb: FormBuilder, - private api: ApiService, - private msg: NzMessageService, - ) {} - - readonly data: NzSafeAny = inject(NZ_MODAL_DATA) - - formGroup!: FormGroup - - groupIndex = 0 - - uploadLoading = false - - iconPreview = '' - - ngOnInit(): void { - this.formGroup = this.fb.group({ - id: this.fb.control(null, []), - title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]), - // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), - scrapType: this.fb.control(null, [FormValidators.required('请选择')]), - scrapTime: this.fb.control(null, [FormValidators.required('请选择')]), - applicant: this.fb.control({ value: this.api.authInfo?.userName, disabled: true }, [ - FormValidators.required('请选择'), - ]), - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), - - notes: this.fb.control(null, [FormValidators.required('请输入')]), - urgency: this.fb.control(1, []), - assetIdList: this.fb.control([], []), - attach: this.fb.control(null, []), - }) - - this.patchValues() - } - - patchValues() { - const { value: data, preview } = this.data - if (data) { - this.iconPreview = data.procVars?.img - this.formGroup.patchValue({ - ...data.procVars, - applyDepartmentId: data.procVars?.applyDepartmentId + '', - }) - } - if (preview) { - this.formGroup.disable() - } - } - - public getValues() { - let values = null - if (FormValidators.validateFormGroup(this.formGroup)) { - const v = this.formGroup.value - - values = { - ...v, - - // applyDepartmentId: Number(v.applyDepartmentId?.[0]), - } - } - return values - } - - 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.api.upload(formdata).subscribe((res) => { - this.formGroup.get('attach')?.setValue(res.body.fileName) - }) - } -} 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 deleted file mode 100644 index 235f28a..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.html +++ /dev/null @@ -1,108 +0,0 @@ - diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.less b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.less deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index 93f535a..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { Component, Input, OnInit, inject } from '@angular/core' -import { FormBuilder, FormGroup } from '@angular/forms' -import { ApiService } from 'app/services' -import { SharedModule } from 'app/shared/shared.module' -import { FormValidators, Utils } from 'app/utils' -import { NzMessageService } from 'ng-zorro-antd/message' -import { OrgSelectComponent } from '../../org-select/org-select.component' -import { SelectUserByOrgComponent } from '../../select-user-by-org/select-user-by-org.component' -import { PositionSelectComponent } from '../../position-select/position-select.component' -import { NzSafeAny } from 'ng-zorro-antd/core/types' -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', - standalone: true, - imports: [ - SharedModule, - SelectUserByOrgComponent, - SupplierSelectComponent, - AssetSelectComponent, - OrgSelectComponent, - PositionSelectComponent, - WarehouseSelectComponent, - FlowResultComponent, - ], - templateUrl: './eam-asset-equipment-repair.component.html', - styleUrl: './eam-asset-equipment-repair.component.less', -}) -export class EamAssetEquipmentRepairComponent { - constructor( - private fb: FormBuilder, - private api: ApiService, - private msg: NzMessageService, - ) {} - - readonly data: NzSafeAny = inject(NZ_MODAL_DATA) - - formGroup!: FormGroup - - groupIndex = 0 - - uploadLoading = false - - iconPreview = '' - - ngOnInit(): void { - this.formGroup = this.fb.group({ - id: this.fb.control(null, []), - title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]), - - repairDepartmentId: this.fb.control(null, [FormValidators.required('请选择')]), - applicant: this.fb.control({ value: this.api.authInfo?.userName, disabled: true }, [ - FormValidators.required('请选择'), - ]), - urgency: this.fb.control(1, []), - assetIdList: this.fb.control([], []), - img: this.fb.control(null, []), - planCompleteTime: this.fb.control(null), - content: this.fb.control(null, [FormValidators.required('请输入')]), - repairer: this.fb.control(null, [FormValidators.required('请选择')]), - repairType: this.fb.control(1, [FormValidators.required('请选择')]), - - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), - - notes: this.fb.control(null, []), - }) - - this.patchValues() - } - - patchValues() { - const { value: data, preview } = this.data - if (data) { - this.iconPreview = data.procVars?.img - this.formGroup.patchValue({ - ...data.procVars, - repairDepartmentId: data.procVars?.repairDepartmentId + '', - }) - } - if (preview) { - this.formGroup.disable() - } - } - - public getValues() { - let values = null - if (FormValidators.validateFormGroup(this.formGroup)) { - const v = this.formGroup.value - - values = { - ...v, - - repairer: Number(v.repairer?.[0]), - applyDepartmentId: Number(v.applyDepartmentId?.[0]), - } - } - return values - } - - 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.api.upload(formdata).subscribe((res) => { - this.formGroup.get('img')?.setValue(res.body.fileName) - }) - } -} 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 deleted file mode 100644 index e4c089d..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.html +++ /dev/null @@ -1,142 +0,0 @@ - diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.less b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.less deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index 99b4aa5..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Component, Input, OnInit, inject } from '@angular/core' -import { FormBuilder, FormGroup } from '@angular/forms' -import { ApiService } from 'app/services' -import { SharedModule } from 'app/shared/shared.module' -import { FormValidators, Utils } from 'app/utils' -import { NzMessageService } from 'ng-zorro-antd/message' -import { OrgSelectComponent } from '../../org-select/org-select.component' -import { SelectUserByOrgComponent } from '../../select-user-by-org/select-user-by-org.component' -import { PositionSelectComponent } from '../../position-select/position-select.component' -import { NzSafeAny } from 'ng-zorro-antd/core/types' -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', - standalone: true, - imports: [ - SharedModule, - SelectUserByOrgComponent, - SupplierSelectComponent, - AssetSelectComponent, - OrgSelectComponent, - PositionSelectComponent, - WarehouseSelectComponent, - FlowResultComponent, - ], - templateUrl: './eam-asset-purchase-apply.component.html', - styleUrl: './eam-asset-purchase-apply.component.less', -}) -export class EamAssetPurchaseApplyComponent { - constructor( - private fb: FormBuilder, - private api: ApiService, - private msg: NzMessageService, - ) {} - - readonly data: NzSafeAny = inject(NZ_MODAL_DATA) - - formGroup!: FormGroup - - groupIndex = 0 - - uploadLoading = false - - iconPreview = '' - - ngOnInit(): void { - this.formGroup = this.fb.group({ - id: this.fb.control(null, []), - title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]), - businessName: this.fb.control('', [FormValidators.required('请输入')]), - applyDepartmentId: this.fb.control(null, [FormValidators.required('请选择')]), - // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), - purchaseTime: this.fb.control(null, []), - purchase: this.fb.control(null, []), - arrivalTime: this.fb.control(null), - supplier: this.fb.control(null), - applicant: this.fb.control({ value: this.api.authInfo?.userName, disabled: true }, [ - FormValidators.required('请选择'), - ]), - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), - - desc: this.fb.control(null, [FormValidators.required('请输入')]), - notes: this.fb.control(null, []), - urgency: this.fb.control(1, []), - assetIdList: this.fb.control([], []), - - attach: this.fb.control(null, []), - }) - - this.patchValues() - } - - patchValues() { - const { value: data, preview } = this.data - if (data) { - this.iconPreview = data.procVars?.img - this.formGroup.patchValue({ - ...data.procVars, - applyDepartmentId: data.procVars?.applyDepartmentId ? data.procVars?.applyDepartmentId + '' : null, - purchase: data.procVars?.purchase ? [data.procVars?.purchase + ''] : null, - }) - } - if (preview) { - this.formGroup.disable() - } - } - - public getValues() { - let values = null - if (FormValidators.validateFormGroup(this.formGroup)) { - const v = this.formGroup.value - - values = { - ...v, - purchase: Number(v.purchase?.[0]) ? Number(v.purchase?.[0]) : null, - applyDepartmentId: Number(v.applyDepartmentId?.[0]), - } - } - return values - } - - 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.api.upload(formdata).subscribe((res) => { - this.formGroup.get('attach')?.setValue(res.body.fileName) - }) - } -} 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 deleted file mode 100644 index de2c6a9..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.html +++ /dev/null @@ -1,60 +0,0 @@ - diff --git a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.less b/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.less deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index 947474f..0000000 --- a/web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { Component, Input, OnInit, inject } from '@angular/core' -import { FormBuilder, FormGroup } from '@angular/forms' -import { ApiService } from 'app/services' -import { SharedModule } from 'app/shared/shared.module' -import { FormValidators, Utils } from 'app/utils' -import { NzMessageService } from 'ng-zorro-antd/message' -import { OrgSelectComponent } from '../../org-select/org-select.component' -import { SelectUserByOrgComponent } from '../../select-user-by-org/select-user-by-org.component' -import { PositionSelectComponent } from '../../position-select/position-select.component' -import { NzSafeAny } from 'ng-zorro-antd/core/types' -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', - standalone: true, - imports: [ - SharedModule, - SelectUserByOrgComponent, - SupplierSelectComponent, - AssetSelectComponent, - OrgSelectComponent, - PositionSelectComponent, - WarehouseSelectComponent, - FlowResultComponent, - ], - templateUrl: './eam-asset-stock-goods-use.component.html', - styleUrl: './eam-asset-stock-goods-use.component.less', -}) -export class EamAssetStockGoodsUseComponent { - constructor( - private fb: FormBuilder, - private api: ApiService, - private msg: NzMessageService, - ) {} - - readonly data: NzSafeAny = inject(NZ_MODAL_DATA) - - formGroup!: FormGroup - - groupIndex = 0 - - 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('请输入')]), - // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), - businessDate: this.fb.control(null, [FormValidators.required('请选择')]), - // applicant: this.fb.control({ value: this.api.authInfo?.userName, disabled: true }, [ - // FormValidators.required('请选择'), - // ]), - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), - - notes: this.fb.control(null, [FormValidators.required('请输入')]), - urgency: this.fb.control(1, []), - assetIdList: this.fb.control([], []), - }) - - this.patchValues() - } - - patchValues() { - const { value: data, preview } = this.data - if (data) { - this.formGroup.patchValue({ - ...data.procVars, - applyDepartmentId: data.procVars?.applyDepartmentId + '', - }) - } - if (preview) { - this.formGroup.disable() - } - } - - public getValues() { - let values = null - if (FormValidators.validateFormGroup(this.formGroup)) { - const v = this.formGroup.value - - values = { - ...v, - - applyDepartmentId: Number(v.applyDepartmentId?.[0]), - } - } - return values - } - - 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.api.upload(formdata).subscribe((res) => { - this.formGroup.get('attach')?.setValue(res.body.fileName) - }) - } -} 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 index 39f3626..e3ecb39 100644 --- 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 @@ -1,30 +1,34 @@

流程记录

-
- - @for (item of flowRecords; track $index) { - -
- {{ item.createTime }} -
-
任务名称:{{ item.taskName }}
-
审批人:{{ item?.assigneeName ?? '-' }}
-
- 审批意见: - {{ item.comment?.comment ?? '-' }} - -
- @if (item.finishTime) { + @if (flowRecords.length) { +
+ + @for (item of flowRecords; track $index) { +
- 流程完成时间:{{ item.finishTime }} - 用时:{{ item.duration }} + {{ item.createTime }}
- } -
- } -
- - - -
+
任务名称:{{ item.taskName }}
+
审批人:{{ item?.assigneeName ?? '-' }}
+
+ 审批意见: + {{ item.comment?.comment ?? '-' }} + +
+ @if (item.finishTime) { +
+ 流程完成时间:{{ item.finishTime }} + 用时:{{ item.duration }} +
+ } +
+ } +
+ + + +
+ } @else { + + }
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 index 054cb30..465d753 100644 --- 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 @@ -19,6 +19,7 @@ export class FlowResultComponent implements OnInit { ngOnInit(): void { if (this.flow) { + console.log('this.flow', 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-allot-form/asset-business-allot-form.component.html b/web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.html index fcaa507..abf193c 100644 --- a/web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.html +++ b/web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.html @@ -26,14 +26,14 @@ -
+
调拨日期 @@ -84,11 +84,14 @@ 资产列表 - +
+ @if (data?.value) { + + } 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 c6db480..8a0f393 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 @@ -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 '../apply-asset-flow/flow-result/flow-result.component' @Component({ selector: 'app-asset-business-allot-form', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../warehouse-select/warehouse-select.c OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './asset-business-allot-form.component.html', styleUrl: './asset-business-allot-form.component.less', @@ -46,7 +48,7 @@ export class AssetBusinessAllotFormComponent { ngOnInit(): void { this.formGroup = this.fb.group({ id: this.fb.control(null, []), - name: this.fb.control('', [FormValidators.required('请输入')]), + name: this.fb.control(this.api.genFlowName('调拨'), [FormValidators.required('请输入')]), // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), // useOrganizationId: this.fb.control(null, [FormValidators.required('请选择')]), businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), diff --git a/web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.html b/web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.html index 0e3edda..c4d6f59 100644 --- a/web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.html +++ b/web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.html @@ -26,14 +26,14 @@ -
+
借出日期 @@ -93,11 +93,14 @@ 资产列表 - +
+ @if (data?.value) { + + } 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 f570b57..42fd0fa 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 @@ -11,6 +11,7 @@ import { NzSafeAny } from 'ng-zorro-antd/core/types' 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 { FlowResultComponent } from '../apply-asset-flow/flow-result/flow-result.component' @Component({ selector: 'app-asset-business-return-form', @@ -22,6 +23,7 @@ import { AssetSelectComponent } from '../asset-select/asset-select.component' AssetSelectComponent, OrgSelectComponent, PositionSelectComponent, + FlowResultComponent, ], templateUrl: './asset-business-borrow-form.component.html', styleUrl: './asset-business-borrow-form.component.less', @@ -44,7 +46,7 @@ export class AssetBusinessBorrowFormComponent { ngOnInit(): void { this.formGroup = this.fb.group({ id: this.fb.control(null, []), - name: this.fb.control('', [FormValidators.required('请输入')]), + name: this.fb.control(this.api.genFlowName('借用'), [FormValidators.required('请输入')]), useUserId: this.fb.control(null, [FormValidators.required('请选择')]), // useOrganizationId: this.fb.control(null, [FormValidators.required('请选择')]), businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), diff --git a/web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.html b/web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.html index beb4917..f5372f5 100644 --- a/web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.html +++ b/web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.html @@ -26,14 +26,14 @@ -
+
领用日期 @@ -100,11 +100,14 @@ 资产列表 - +
+ @if (data?.value) { + + } 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 e407c85..7d98716 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 @@ -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, ASSET_STATUS_V2, MAINTENANCE_STATUS, MAINTENANCE_TYPE } 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' @@ -15,6 +15,7 @@ import { NzSafeAny } from 'ng-zorro-antd/core/types' 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 { FlowResultComponent } from '../apply-asset-flow/flow-result/flow-result.component' @Component({ selector: 'app-asset-business-collection', @@ -26,6 +27,7 @@ import { AssetSelectComponent } from '../asset-select/asset-select.component' AssetSelectComponent, OrgSelectComponent, PositionSelectComponent, + FlowResultComponent, ], templateUrl: './asset-business-collection.component.html', styleUrl: './asset-business-collection.component.less', @@ -48,7 +50,7 @@ export class AssetBusinessCollectionComponent { ngOnInit(): void { this.formGroup = this.fb.group({ id: this.fb.control(null, []), - name: this.fb.control('', [FormValidators.required('请输入')]), + name: this.fb.control(this.api.genFlowName('领用'), [FormValidators.required('请输入')]), useUserId: this.fb.control(null, [FormValidators.required('请选择')]), useOrganizationId: this.fb.control(null, [FormValidators.required('请选择')]), businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), @@ -66,6 +68,8 @@ export class AssetBusinessCollectionComponent { this.patchValues() } + ASSET_STATUS_V2 = ASSET_STATUS_V2 + patchValues() { const { value: data, preview } = this.data if (data) { 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/asset-business-outbound-form/asset-business-outbound-form.component.html similarity index 66% rename from web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.html rename to web-admin-app/src/app/components/asset-business-outbound-form/asset-business-outbound-form.component.html index a5ff4d1..d441c26 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/asset-business-outbound-form/asset-business-outbound-form.component.html @@ -1,46 +1,44 @@ - --> -
+
退库日期 @@ -96,6 +96,19 @@
+
+ + 领用流程 + + + + +
退库说明 @@ -104,15 +117,24 @@
+
资产列表 - +
+ @if (data?.value) { + + } 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 9beb91c..669906b 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 @@ -12,6 +12,8 @@ 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 { SelectAssetFlowComponent } from '../select-asset-flow/select-asset-flow.component' +import { FlowResultComponent } from '../apply-asset-flow/flow-result/flow-result.component' @Component({ selector: 'app-asset-business-return-form', @@ -24,6 +26,8 @@ import { WarehouseSelectComponent } from '../warehouse-select/warehouse-select.c OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + SelectAssetFlowComponent, + FlowResultComponent, ], templateUrl: './asset-business-return-form.component.html', styleUrl: './asset-business-return-form.component.less', @@ -46,7 +50,7 @@ export class AssetBusinessReturnFormComponent { ngOnInit(): void { this.formGroup = this.fb.group({ id: this.fb.control(null, []), - name: this.fb.control('', [FormValidators.required('请输入')]), + name: this.fb.control(this.api.genFlowName('退库'), [FormValidators.required('请输入')]), // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), useOrganizationId: this.fb.control(null, [FormValidators.required('请选择')]), businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), @@ -58,6 +62,8 @@ export class AssetBusinessReturnFormComponent { attach: this.fb.control('', []), positionDetail: this.fb.control('', []), + foreignKey: this.fb.control('', []), + assetIdList: this.fb.control([], []), applicant: this.fb.control({ value: '', disabled: true }, []), @@ -109,6 +115,18 @@ export class AssetBusinessReturnFormComponent { return values } + onFlowSelect(e: any) { + const flowed = e?.assetIdListLog ?? [] + this.formGroup.get('assetIdList')?.setValue( + e.assetIdList.map((i: any) => { + return { + ...i, + _count: i.count - (flowed.find((i2: any) => String(i2.assetId) === String(i.assetId))?.count ?? 0), + } + }), + ) + } + onFileChange(e: Event) { const target = e.target as HTMLInputElement const file = target.files![0] 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 19d49da..2b53217 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 @@ -18,14 +18,14 @@ -
+
存放位置 @@ -98,6 +105,19 @@
+
+ + 借用流程 + + + + +
归还说明 @@ -110,11 +130,19 @@ 资产列表 - +
+ @if (data?.value) { + + } 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 1637698..1a9cfb3 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 @@ -11,6 +11,9 @@ import { NzSafeAny } from 'ng-zorro-antd/core/types' 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 { SelectAssetFlowComponent } from '../select-asset-flow/select-asset-flow.component' +import { WarehouseSelectComponent } from '../warehouse-select/warehouse-select.component' +import { FlowResultComponent } from '../apply-asset-flow/flow-result/flow-result.component' @Component({ selector: 'app-asset-business-return-form', @@ -22,6 +25,9 @@ import { AssetSelectComponent } from '../asset-select/asset-select.component' AssetSelectComponent, OrgSelectComponent, PositionSelectComponent, + SelectAssetFlowComponent, + WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './asset-business-revert-form.component.html', styleUrl: './asset-business-revert-form.component.less', @@ -44,12 +50,13 @@ export class AssetBusinessRevertFormComponent { ngOnInit(): void { this.formGroup = this.fb.group({ id: this.fb.control(null, []), - name: this.fb.control('', [FormValidators.required('请输入')]), + name: this.fb.control(this.api.genFlowName('归还'), [FormValidators.required('请输入')]), businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), + // warehouseId: this.fb.control(null, [FormValidators.required('请选择')]), manager: this.fb.control(null, []), useUserId: this.fb.control(null, []), // useOrganizationId: this.fb.control(null, []), - + foreignKey: this.fb.control('', []), notes: this.fb.control(null, []), positionId: this.fb.control(null, []), attach: this.fb.control('', []), @@ -76,7 +83,7 @@ export class AssetBusinessRevertFormComponent { ownCompanyId: data._ownCompany?.organizationId + '', useOrganizationId: data._useOrganization?.organizationId + '', maintenanceVendor: data._maintenanceVendor?.maintenanceVendorId, - warehouseId: data._warehouse?.warehouseId, + // warehouseId: data._warehouse?.warehouseId, manufacturersVendorId: data._manufacturersVendor?.manufacturersVendorId, applicant: data._applicant?.userName, }) @@ -104,7 +111,17 @@ export class AssetBusinessRevertFormComponent { } return values } - + onFlowSelect(e: any) { + const flowed = e?.assetIdListLog ?? [] + this.formGroup.get('assetIdList')?.setValue( + e.assetIdList.map((i: any) => { + return { + ...i, + _count: i.count - (flowed.find((i2: any) => String(i2.assetId) === String(i.assetId))?.count ?? 0), + } + }), + ) + } onFileChange(e: Event) { const target = e.target as HTMLInputElement const file = target.files![0] diff --git a/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.html b/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.html index dfb2247..779afef 100644 --- a/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.html +++ b/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.html @@ -84,11 +84,15 @@ 资产列表 - + + + @if (data?.value) { + + } diff --git a/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.less b/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.less index 8ce33e4..e69de29 100644 --- a/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.less +++ b/web-admin-app/src/app/components/asset-business-storage-form/asset-business-storage-form.component.less @@ -1,4 +0,0 @@ -.modal { - height: 70vh; - overflow-y: auto; -} \ No newline at end of file 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 5d56c79..7d60a19 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 @@ -16,6 +16,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 '../apply-asset-flow/flow-result/flow-result.component' @Component({ selector: 'app-asset-business-storage', @@ -26,6 +27,7 @@ import { WarehouseSelectComponent } from '../warehouse-select/warehouse-select.c SupplierSelectComponent, AssetSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './asset-business-storage-form.component.html', styleUrl: './asset-business-storage-form.component.less', @@ -48,7 +50,7 @@ export class AssetBusinessStorageFormComponent { ngOnInit(): void { this.formGroup = this.fb.group({ id: this.fb.control(null, []), - name: this.fb.control('', [FormValidators.required('请输入')]), + name: this.fb.control(this.api.genFlowName('入库'), [FormValidators.required('请输入')]), warehouseId: this.fb.control('', [FormValidators.required('请输入')]), manager: this.fb.control(null, []), urgency: this.fb.control(1, []), diff --git a/web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.html b/web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.html index 82001d1..6f0ced6 100644 --- a/web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.html +++ b/web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.html @@ -42,14 +42,14 @@ -
+
存放位置 @@ -108,11 +108,14 @@ 资产列表 - +
+ @if (data?.value) { + + } 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 b839944..44cd54a 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 @@ -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 '../apply-asset-flow/flow-result/flow-result.component' @Component({ selector: 'app-asset-business-transfer-form', @@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../warehouse-select/warehouse-select.c OrgSelectComponent, PositionSelectComponent, WarehouseSelectComponent, + FlowResultComponent, ], templateUrl: './asset-business-transfer-form.component.html', styleUrl: './asset-business-transfer-form.component.less', @@ -46,7 +48,7 @@ export class AssetBusinessTransferFormComponent { ngOnInit(): void { this.formGroup = this.fb.group({ id: this.fb.control(null, []), - name: this.fb.control('', [FormValidators.required('请输入')]), + name: this.fb.control(this.api.genFlowName('转移'), [FormValidators.required('请输入')]), useUserId: this.fb.control(null, [FormValidators.required('请选择')]), // useOrganizationId: this.fb.control(null, [FormValidators.required('请选择')]), // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), 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 464f7f6..7009100 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 @@ -469,14 +469,14 @@ -
+
未税成本 @@ -524,6 +524,7 @@ 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 95db71e..665ad43 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,8 +119,9 @@ 资产编号 资产状态 资产名称 - {{ buy ? '采购' : '库存' }}数量 + {{ countText ? countText : '数量' }} 规格型号 + 仓库 资产序列号 @@ -143,13 +144,14 @@ {{ data.model }} + {{ data.warehouseName }} {{ data.serialNumber }} 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 0f2d775..6dba78d 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 @@ -53,10 +53,14 @@ export class AssetSelectComponent { @Input() storage: boolean = false + @Input() type: string = '' + @Input() buy: boolean = false @Output() onSelected = new EventEmitter() + @Input() countText: string = '' + allGetedDataMap = new Map() originData: NzSafeAny[] = [] @@ -109,11 +113,15 @@ export class AssetSelectComponent { { key: 'status', title: '资产状态', visible: true }, { key: 'count', title: '库存数量', visible: true }, + { key: 'warehouseName', title: '仓库', visible: true }, ]) } fetchData(p: {}, q: AnyObject) { - const fn = this.storage ? 'getAeamBusinessStorageList' : 'getAssetStroagePage' + let fn: keyof ApiService = this.storage ? 'getAeamBusinessStorageList' : 'getAssetStroagePage' + if (['BORROW', 'COLLECTION', 'RETURN', 'TRANSFER', 'RETIREMENT', 'repair', 'task'].includes(this.type)) { + fn = 'getAssetDevicePage' + } return this.api[fn]({ ...p, ...q }).pipe( map((res) => { res.body.rows.forEach((item: NzSafeAny) => { @@ -123,6 +131,16 @@ export class AssetSelectComponent { return res }), ) + // const fn = this.storage ? 'getAeamBusinessStorageList' : 'getAssetStroagePage' + // return this.api[fn]({ ...p, ...q }).pipe( + // map((res) => { + // res.body.rows.forEach((item: NzSafeAny) => { + // item['key'] = item.assetId + '_' + item.warehouseId + // this.allGetedDataMap.set(item.key, item) + // }) + // return res + // }), + // ) } onTrigger(nzContent: TemplateRef<{}>) { @@ -196,11 +214,18 @@ export class AssetSelectComponent { vals = JSON.parse(v) ?? [] } catch (error) {} } + console.log('vals', vals) if (Array.isArray(vals) && vals.length > 0) { // const ids = vals.map((i: NzSafeAny) => i.assetId) this.api.getAssetStorageListByIds(vals).subscribe((res) => { this.selectedDataList = res.body.rows.map((item: NzSafeAny) => { item['key'] = item.assetId + '_' + item.warehouseId + const v = vals.find((f: any) => f.assetId === item.assetId) + if (v?._count) { + item['_max'] = v._count + item['count'] = v._count + } + console.log('v', v, item) this.allGetedDataMap.set(item.assetId, item) return item }) diff --git a/web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.html b/web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.html index e606262..b1c5ab5 100644 --- a/web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.html +++ b/web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.html @@ -9,7 +9,7 @@
@if (createable) { - + }
@@ -25,7 +25,7 @@ [nzTreeTemplate]="nzTreeTemplate" > -
+
@switch (origin.organizationType) { @case ('0') { @@ -40,24 +40,18 @@ } {{ node.title }}
- @if (createable) { - - + }
diff --git a/web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.ts b/web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.ts index a6d8c65..af646f9 100644 --- a/web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.ts +++ b/web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.ts @@ -134,7 +134,11 @@ export class ComponentBasicCategoryTreeComponent { console.log('e', e) } - onCreate(parentId: number) { + onCreate() { + if (this.selectedKeys.length === 0) { + return + } + const parentId = this.selectedKeys[0] this.api .addBasicCategoryTree({ depth: '', @@ -151,7 +155,8 @@ export class ComponentBasicCategoryTreeComponent { }) } - onDelete(id: number) { + onDelete(e: Event, id: number) { + e.stopPropagation() this.modal.confirm({ nzTitle: '警告', nzContent: '是否要删除该分类?', 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 6c2f767..202d7e5 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 @@ -9,7 +9,7 @@
@if (createable) { - +
  • 添加组织
  • @@ -26,6 +26,7 @@ [nzExpandedKeys]="expandedKeys" [nzSearchValue]="searchValue" (nzClick)="nzEvent($event)" + [nzSelectedKeys]="selectedKeys" (nzExpandChange)="onExpandChange($event)" [nzTreeTemplate]="nzTreeTemplate" > 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 731eca2..7cb48b2 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 @@ -33,6 +33,8 @@ export class ComponentOrgTreeComponent implements OnInit { @Input() selectUer = false + @Input() autoSelect = false + @Output() onOrgSelectedChange = new EventEmitter() drawerRef?: NzDrawerRef @@ -49,6 +51,8 @@ export class ComponentOrgTreeComponent implements OnInit { expandedKeys: string[] = [] + selectedKeys: string[] = [] + form!: FormGroup initForm() { @@ -85,6 +89,10 @@ export class ComponentOrgTreeComponent implements OnInit { ? [{ title: '全部', key: 'all' }, ...Utils.buildTree(c, 'organizationId', 'organizationName')] : [...Utils.buildTree(c, 'organizationId', 'organizationName')] this.expandedKeys = [...this.expandedKeys] + if (this.autoSelect) { + this.selectedKeys = [String(this.nodes[0]?.key)] + this.onOrgSelectedChange.emit(this.nodes[0]) + } }) } @@ -96,7 +104,12 @@ export class ComponentOrgTreeComponent implements OnInit { nzEvent(event: NzFormatEmitEvent): void { if (event.eventName === 'click') { const { node } = event - this.onOrgSelectedChange.emit(event.keys?.length === 0 ? null : node?.origin) + if (event.keys && event.keys?.length > 0) { + this.selectedKeys = event.keys + this.onOrgSelectedChange.emit(event.keys?.length === 0 ? null : node?.origin) + } else { + this.selectedKeys = [...this.selectedKeys] + } } } diff --git a/web-admin-app/src/app/components/flow-form-v2/flow-form-v2.component.html b/web-admin-app/src/app/components/flow-form-v2/flow-form-v2.component.html index 883b798..3e9823b 100644 --- a/web-admin-app/src/app/components/flow-form-v2/flow-form-v2.component.html +++ b/web-admin-app/src/app/components/flow-form-v2/flow-form-v2.component.html @@ -48,14 +48,16 @@
-
- - 自动指派 - - - - -
+ @if (!data.type?.includes('资管')) { +
+ + 自动指派 + + + + +
+ }
diff --git a/web-admin-app/src/app/components/flow-form-v2/flow-form-v2.component.ts b/web-admin-app/src/app/components/flow-form-v2/flow-form-v2.component.ts index 6b62a66..b8c4196 100644 --- a/web-admin-app/src/app/components/flow-form-v2/flow-form-v2.component.ts +++ b/web-admin-app/src/app/components/flow-form-v2/flow-form-v2.component.ts @@ -52,7 +52,7 @@ export class FlowFormV2Component { this.formGroup = this.fb.group({ status: this.fb.control(null, [FormValidators.required('请选择')]), - autoAssign: this.fb.control(null, [FormValidators.required('请输入')]), + autoAssign: this.fb.control(false, [FormValidators.required('请输入')]), remark: this.fb.control(null, []), name: this.fb.control({ value: null, disabled: true }, [FormValidators.required('请输入')]), formKey: this.fb.control({ value: null, disabled: true }, [FormValidators.required('请输入')]), @@ -74,7 +74,7 @@ export class FlowFormV2Component { addNode() { this.nodes.push( this.fb.group({ - id: this.fb.control(null, [FormValidators.required('请输入')]), + id: this.fb.control('id_' + (this.nodes.length + 1), [FormValidators.required('请输入')]), isDefault: this.fb.control(false), name: this.fb.control(null, [FormValidators.required('请输入')]), remark: this.fb.control(null), @@ -90,9 +90,9 @@ export class FlowFormV2Component { this.nodes.clear() nodes.forEach((node: NzSafeAny) => { const fg = this.fb.group({ - id: this.fb.control(node.id), + id: this.fb.control({ value: node.id, disabled: node.isDefault }), isDefault: this.fb.control(node.isDefault), - name: this.fb.control(node.name), + name: this.fb.control({ value: node.name, disabled: node.isDefault }), remark: this.fb.control(node.remark), roleIds: this.fb.control(node.roleIds), userIds: this.fb.control(node.userIds), @@ -120,7 +120,7 @@ export class FlowFormV2Component { // this.msg.error('请完善节点信息') // return // } - const v = this.formGroup.value + const v = this.formGroup.getRawValue() values = { ...v, nodes: v.nodes.map((i: NzSafeAny) => { diff --git a/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.html b/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.html index f32acc4..9281399 100644 --- a/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.html +++ b/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.html @@ -10,13 +10,25 @@ @case ('_assignee') { {{ data.userName }} } + @case ('assigneeNameArr') { + + {{ data[0] }}... + + + + @for (item of data; track $index) { + {{ item }} + } + + } @case ('procVars') { {{ data?.title ?? data?.name ?? '-' }} } @case ('status') { - + + } @case ('urgency') { @@ -47,7 +59,7 @@ 任务处置人员 - +
diff --git a/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.less b/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.less index e69de29..18cab4b 100644 --- a/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.less +++ b/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.less @@ -0,0 +1,8 @@ +::ng-deep .modal-for-btn { + .ant-modal-footer .ant-btn[ng-reflect-nz-type="reject"] { + background-color: #f59a23 !important; + border-color: #f59a23 !important; + color: #fff !important; + } + +} \ No newline at end of file diff --git a/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.ts b/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.ts index bac9cf4..5e17712 100644 --- a/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.ts +++ b/web-admin-app/src/app/components/flow-list-by-type/flow-list-by-type.component.ts @@ -10,16 +10,16 @@ import { NzSafeAny } from 'ng-zorro-antd/core/types' import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal' import { NzMessageService } from 'ng-zorro-antd/message' import { FormValidators, Utils } from 'app/utils' -import { AssetEmployeeApplyComponent } from 'app/components' import { FLOW_STATUS, flowIntStatus, flowIntStatusToStr } from 'app/constants' import { comsMap } from 'app/pages/flow/flow-main/flow-main.component' import { TaskFormComponent } from '../plan-task/task-form/task-form.component' import { HandleTaskComponent } from '../plan-task/handle-task/handle-task.component' +import { FlowStatusTagComponent } from '../flow-status-tag/flow-status-tag.component' @Component({ selector: 'app-flow-list-by-type', standalone: true, - imports: [SharedModule], + imports: [SharedModule, FlowStatusTagComponent], templateUrl: './flow-list-by-type.component.html', styleUrl: './flow-list-by-type.component.less', }) @@ -57,27 +57,50 @@ export class FlowListByTypeComponent { FLOW_STATUS = flowIntStatus ngOnInit(): void { + let cols = [ + { key: 'procVars', title: '名称', width: '300px', visible: true }, + { key: 'status', title: '流程状态', visible: true, width: '100px' }, + { key: 'urgency', title: '紧急程度', visible: true, width: '100px' }, + { key: 'procDefName', title: '流程类型', visible: true, width: '120px' }, + { key: 'assigneeNameArr', title: '当前审批人', visible: true }, + { key: 'startUserName', title: '发起人', visible: true }, + { key: 'createTime', title: '提交时间', visible: true }, + { key: 'finishTime', title: '完成时间', visible: true }, + // { key: 'createTime', title: '作废时间', visible: true }, + // { key: 'createTime', title: '完成时间', visible: true }, + ] + + cols = cols.filter((f) => f.key !== (this.page === 'apply' ? 'startUserName' : 'assigneeNameArr')) + cols = cols.map((f) => { + if (this.page === 'todo' && f.key === 'finishTime') { + return { ...f, visible: false } + } + if (this.page === 'finished' && f.key === 'createTime') { + return { ...f, visible: false } + } + return f + }) this.table .setConfig({ cacheKey: this.page + '_' + this.type, }) - .setColumn([ - { key: 'procVars', title: '名称', visible: true }, - { key: 'status', title: '流程状态', visible: true }, - { key: 'urgency', title: '紧急程度', visible: true }, - { key: 'procDefName', title: '流程类型', visible: true }, - { key: 'assigneeName', title: '审批人', visible: true }, - { key: 'createTime', title: '提交时间', visible: true }, - // { key: 'createTime', title: '作废时间', visible: true }, - // { key: 'createTime', title: '完成时间', visible: true }, - ]) + .setColumn(cols) .setRowOperate([ { title: '查看', onClick: this.onDetail.bind(this) }, + { + title: '审批', + visible: (v) => { + return this.page === 'todo' && this.type === 'asset' + }, + onClick: (v) => { + this.onDetail(v, true, true) + }, + }, { title: '撤回', onClick: this.cancleFlow.bind(this), visible: (v) => { - return this.page === 'apply' && [2, 9].includes(v.status) + return this.page === 'apply' && [2, 7, 9].includes(v.status) }, }, { @@ -89,6 +112,33 @@ export class FlowListByTypeComponent { return this.page === 'apply' && [1, 4, 5].includes(v.status) }, }, + { + title: '发起审批', + onClick: (v) => { + this.onReShenpi(v) + }, + visible: (v) => { + return this.page === 'apply' && [1].includes(v.status) + }, + }, + // { + // title: '通过', + // onClick: (v) => { + // this.completeFlow(v) + // }, + // visible: (v) => { + // return this.page === 'todo' && this.type === 'asset' + // }, + // }, + // { + // title: '驳回', + // onClick: (v) => { + // this.rejectProcessFlow(v) + // }, + // visible: (v) => { + // return this.page === 'todo' && this.type === 'asset' + // }, + // }, { title: '删除', onClick: (v) => { @@ -103,7 +153,9 @@ export class FlowListByTypeComponent { title: '受理', onClick: this.shouli.bind(this), visible: (v) => { - return this.page === 'todo' && this.type === 'device' && v.status === 'TO_BE_ASSIGNED' + return ( + this.page === 'todo' && this.type === 'device' && ['TO_BE_ASSIGNED', 7].includes(v.status) + ) }, }, { @@ -121,6 +173,20 @@ export class FlowListByTypeComponent { return this.page === 'todo' && this.type === 'device' && v.status === 9 }, }, + // { + // title: '挂起', + // onClick: this.onGuaQi.bind(this), + // visible: (v) => { + // return this.page === 'todo' && this.type === 'device' && v.status === 9 + // }, + // }, + // { + // title: '激活', + // onClick: this.onGuaQi.bind(this), + // visible: (v) => { + // return this.page === 'todo' && this.type === 'device' && v.status === 8 + // }, + // }, { title: '审批', onClick: this.onHandle.bind(this, false), @@ -132,7 +198,7 @@ export class FlowListByTypeComponent { title: '报表', onClick: this.onReport.bind(this), visible: (v) => { - return this.page === 'todo' && this.type === 'device' && v.status === 3 + return v.status === 3 }, }, ]) @@ -161,16 +227,22 @@ export class FlowListByTypeComponent { } zhipai(item?: NzSafeAny) { + // console.log('item', item) + this.teamListAfterFilter = this.teamList.filter((f) => String(f.teamId) === String(item.procVars?.teamId)) this.modal.create({ nzTitle: '任务指派', nzContent: this.zhipaiTpl, nzOnOk: async () => { - if (!this.assignee) { + if (!this.assignee || this.assignee.length !== 2) { this.msg.error('请选择处理人') return false } const res = await lastValueFrom( - this.api.assignTask({ instanceId: item.procInsId, taskId: item.taskId, assignee: this.assignee }), + this.api.assignTask({ + instanceId: item.procInsId, + taskId: item.taskId, + assignee: this.assignee[1], + }), ) this.msg.success(res.desc) this.table.ref.reload() @@ -193,9 +265,22 @@ export class FlowListByTypeComponent { modalRef?: NzModalRef - assignee?: string + assignee: number[] = [] shenhe = false + + onGuaQi(d: NzSafeAny) { + const text = d.status === 8 ? '激活' : '挂起' + this.modal.confirm({ + nzTitle: '警告', + nzContent: `是否要${text}当前流程?`, + nzOnOk: async () => { + const res = await lastValueFrom(this.api.updateFlowInstanceState(d.status === 8 ? 1 : 2, d.procInsId)) + this.msg.success(res.desc) + this.table.ref.reload() + }, + }) + } onHandle(chuzhi: boolean, d: NzSafeAny) { // console.log('chuzhi', chuzhi, data) let nzTitle = chuzhi ? '处置任务' : '任务审批' @@ -216,8 +301,8 @@ export class FlowListByTypeComponent { ...data, ...vals, }, - taskId: data.taskId, - instanceId: data.procInsId, + taskId: d.taskId, + instanceId: d.procInsId, }), ) this.msg.success(res.desc) @@ -232,7 +317,7 @@ export class FlowListByTypeComponent { onClick: async (e: HandleTaskComponent) => { const vals = e.getValues() if (vals) { - console.log('data', data, d) + // console.log('data', data, d) const res = await lastValueFrom( this.api.handleTaskAssetItem( { @@ -258,7 +343,7 @@ export class FlowListByTypeComponent { onClick: async (e: HandleTaskComponent) => { this.shenhe = false - this.onShenpi(data) + this.onShenpi(d) }, }, { @@ -266,7 +351,7 @@ export class FlowListByTypeComponent { type: 'primary', onClick: async (e: HandleTaskComponent) => { this.shenhe = true - this.onShenpi(data) + this.onShenpi(d) }, }, ] @@ -298,11 +383,17 @@ export class FlowListByTypeComponent { @ViewChild('shenheTpl') shenheTpl!: TemplateRef teamList: NzSafeAny[] = [] + + teamListAfterFilter: NzSafeAny[] = [] onShenpi(item: NzSafeAny) { const nzTitle = this.shenhe ? '请填写审批意见' : '请填写驳回意见' + // console.log('item', item) this.modal.create({ nzTitle, nzContent: this.shenheTpl, + nzOnCancel: () => { + this.comment = '' + }, nzOnOk: async () => { if (!this.comment) { this.msg.error(nzTitle) @@ -313,7 +404,7 @@ export class FlowListByTypeComponent { this.api.completeProcessFlow({ instanceId: item.procInsId, taskId: item.taskId, - assignee: this.assignee, + comment: this.comment, }), ) @@ -323,13 +414,13 @@ export class FlowListByTypeComponent { this.api.rejectProcessFlow({ instanceId: item.procInsId, taskId: item.taskId, - assignee: this.assignee, + comment: this.comment, }), ) this.msg.success(res.desc) } - + this.comment = '' this.table.ref.reload() this.modalRef?.close() return true @@ -338,7 +429,8 @@ export class FlowListByTypeComponent { } onReport(i: NzSafeAny) { this.msg.loading('下载中...') - this.api.downloadTaskReport(i.id).subscribe((res) => { + + this.api.downloadTaskReport(i.procInsId).subscribe((res) => { Utils.downLoadFile( res, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=utf-8', @@ -354,49 +446,119 @@ export class FlowListByTypeComponent { tap((res) => { this.onLoad.emit(res.body.total) }), + map((res) => { + res.body.records = res.body.records.map((i: any) => { + i.assigneeNameArr = this.parseStringToArray(i.assigneeName) + // console.log('i.assigneeNameArr', i.assigneeNameArr) + return i + }) + return res + }), ) } else if (this.page === 'finished') { return this.api.getMyFinishedAssetFlow({ ...p, ...q, type: this.type }).pipe( tap((res) => { this.onLoad.emit(res.body.total) }), + map((res) => { + res.body.records = res.body.records.map((i: any) => { + i.assigneeNameArr = this.parseStringToArray(i.assigneeName) + return i + }) + return res + }), ) } else { return this.api.getMyTodoAssetFlow({ ...p, ...q, type: this.type }).pipe( tap((res) => { this.onLoad.emit(res.body.total) }), + map((res) => { + res.body.records = res.body.records.map((i: any) => { + i.assigneeNameArr = this.parseStringToArray(i.assigneeName) + return i + }) + return res + }), ) } } + parseStringToArray(s: string) { + if (!s) { + return [] + } + if (s.startsWith('[') && s.endsWith(']')) { + // 去掉首尾的 '[' 和 ']' + s = s.slice(1, -1) + // 将字符串中的元素用引号包围 + return s.split(', ') + } else { + // 如果不是以 '[' 开头和 ']' 结尾,直接返回包含该字符串的数组 + return [s] + } + } + onDelete(model: NzSafeAny) { this.modal.confirm({ nzTitle: '删除', nzContent: '是否要删除该申请?', nzOnOk: async () => { - const res = await lastValueFrom( - this.api.deleteAssetFlow({ - instanceId: model.procInsId, - taskId: model.taskId, + const res = await lastValueFrom(this.api.deleteAssetFlow(model.procInsId)) + this.msg.success('删除成功') + this.table.ref.reload() + }, + }) + } + + onReShenpi(v: any) { + this.modal.confirm({ + nzTitle: '警告', + nzContent: '是否要重新发起审批?', + nzOnOk: async () => { + const res2 = await lastValueFrom( + this.api.completeProcessFlow({ + variables: v, + taskId: v.taskId, + instanceId: v.procInsId, }), ) - this.msg.success('删除成功') + this.msg.success(res2.desc) this.table.ref.reload() }, }) } - onDetail(model: NzSafeAny, preview = true) { + onDetail(model: NzSafeAny, preview = true, shenpi = false) { + const editFooter: any = [ + { + label: '保存', + type: 'primary', + onClick: async (e: any) => { + const vals = e.getValues() + + if (vals) { + // const res = await lastValueFrom(this.api.startFlow(vals, model.procDefKey)) + const res1 = await lastValueFrom(this.api.handleTaskAssetItem(vals, model.taskId)) + + this.msg.success(res1.desc) + this.table.ref.reload() + this.detailRef?.close() + } + }, + }, + + { + label: '取消', + onClick: () => { + this.detailRef?.close() + }, + }, + ] if (this.type === 'asset') { // console.log('model', model, comsMap[model.category]) let footer: any = null - if (this.page === 'apply') { - if (!preview) { - footer = void 0 - } else { - } - } - if (this.page === 'todo') { + + if (this.page === 'todo' && shenpi) { footer = [ { label: '通过', @@ -414,7 +576,12 @@ export class FlowListByTypeComponent { }, }, ] + } else { + if (!preview) { + footer = editFooter + } } + this.detailRef = this.modal.create({ nzTitle: preview ? '查看' : '编辑', nzContent: comsMap[model.category ?? model.procDefKey], @@ -423,7 +590,11 @@ export class FlowListByTypeComponent { // nzFooter: preview ? null : void 0, nzFooter: footer, nzData: { - value: model, + value: { + ...model.procVars, + deployId: model.deployId, + procInsId: model.procInsId, + }, preview, }, nzOnOk: async (e: NzSafeAny) => { @@ -431,7 +602,7 @@ export class FlowListByTypeComponent { if (vals) { const res = await lastValueFrom(this.api.startFlow(vals, model.procDefKey)) this.msg.success(res.desc) - + this.table.ref.reload() return true } return false @@ -441,22 +612,23 @@ export class FlowListByTypeComponent { let assetIdList = [] try { - assetIdList = JSON.parse(model?.procVars?.defects) + assetIdList = model?.procVars?.assetIdList ?? [] } catch (error) {} - this.modal.create({ - nzTitle: '查看', + this.detailRef = this.modal.create({ + nzTitle: preview ? '查看' : '编辑', nzContent: TaskFormComponent, nzWidth: '80vw', nzWrapClassName: 'modal-lg', nzData: { value: { + ...model, ...model.procVars, assetIdList, }, - preview: true, + preview, type: model.procVars.jobType, }, - nzFooter: null, + nzFooter: preview ? null : editFooter, }) } } @@ -488,6 +660,9 @@ export class FlowListByTypeComponent { this.modal.create({ nzTitle: '驳回', nzContent: this.commentTpl, + nzOnCancel: () => { + this.comment = '' + }, nzOnOk: async () => { if (!this.comment) { this.msg.error('请输入驳回意见') @@ -504,6 +679,7 @@ export class FlowListByTypeComponent { this.msg.success('驳回成功') this.table.ref.reload() this.detailRef?.close() + this.comment = '' return true }, }) diff --git a/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.html b/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.html new file mode 100644 index 0000000..588a5a9 --- /dev/null +++ b/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.html @@ -0,0 +1,62 @@ +@switch (status) { + @case ('APPROVAL') { + 待审批 + } + @case (2) { + 待审批 + } + @case ('TO_BE_ASSIGNED') { + 待指派 + } + @case (7) { + 待指派 + } + @case ('DISPOSE') { + 待处置 + } + @case (9) { + 待处置 + } + @case ('COMPLETED') { + 已完结 + } + @case (3) { + 已完结 + } + @case ('EXCEPTION') { + 异常 + } + @case (6) { + 异常 + } + @case ('SUSPENDED') { + 已挂起 + } + @case (8) { + 已挂起 + } + + @case ('DISCARDED') { + 废弃 + } + @case (5) { + 废弃 + } + @case ('DRAFTING') { + 草稿 + } + @case (1) { + 草稿 + } + + @case ('REJECTED') { + 被驳回 + } + @case (4) { + 被驳回 + } + + @default { + {{ status }} + } +} diff --git a/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.less b/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.less new file mode 100644 index 0000000..df42487 --- /dev/null +++ b/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.less @@ -0,0 +1,5 @@ +.dark { + background-color: transparent !important; + color: #333; + border-color: #333; +} \ No newline at end of file diff --git a/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.ts b/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.ts new file mode 100644 index 0000000..bdb036d --- /dev/null +++ b/web-admin-app/src/app/components/flow-status-tag/flow-status-tag.component.ts @@ -0,0 +1,17 @@ +import { Component, Input } from '@angular/core' +import { SharedModule } from 'app/shared/shared.module' + +@Component({ + selector: 'app-flow-status-tag', + standalone: true, + imports: [SharedModule], + templateUrl: './flow-status-tag.component.html', + styleUrl: './flow-status-tag.component.less', +}) +export class FlowStatusTagComponent { + constructor() {} + + @Input() status!: string | number + + ngOnInit() {} +} diff --git a/web-admin-app/src/app/components/index.ts b/web-admin-app/src/app/components/index.ts index 64e445d..29698fb 100644 --- a/web-admin-app/src/app/components/index.ts +++ b/web-admin-app/src/app/components/index.ts @@ -30,14 +30,10 @@ export * from './repair-fault-form/repair-fault-form.component' export * from './position-tree/position-tree.component' export * from './stocktaking-detail-form/stocktaking-detail-form.component' -export * from './apply-asset-flow/asset-employee-apply/asset-employee-apply.component' -export * from './apply-asset-flow/asset-employee-loss/asset-employee-loss.component' -export * from './apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component' -export * from './apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component' -export * from './apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component' -export * from './apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component' -export * from './apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component' -export * from './apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component' +// export * from './apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component' +// export * from './apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component' +// export * from './apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component' +// export * from './apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component' export * from './status-tag/status-tag.component' export * from './flow-form-create/flow-form-create.component' diff --git a/web-admin-app/src/app/components/maintain-record-form/maintain-record-form.component.html b/web-admin-app/src/app/components/maintain-record-form/maintain-record-form.component.html index 3bb7ce7..d49265e 100644 --- a/web-admin-app/src/app/components/maintain-record-form/maintain-record-form.component.html +++ b/web-admin-app/src/app/components/maintain-record-form/maintain-record-form.component.html @@ -32,7 +32,7 @@
- 计划完成时间 + 维修完成时间 @@ -70,7 +70,7 @@ 资产列表 - +
diff --git a/web-admin-app/src/app/components/permissions-select/permissions-select.component.html b/web-admin-app/src/app/components/permissions-select/permissions-select.component.html index 95bdd5f..dc77af3 100644 --- a/web-admin-app/src/app/components/permissions-select/permissions-select.component.html +++ b/web-admin-app/src/app/components/permissions-select/permissions-select.component.html @@ -13,7 +13,7 @@
@for (item of menus; track $index) { -
+
} - @if (type === 'maintenance') { + @if (['maintenance', 'repair'].includes(type)) {
- 保养成本 + {{ type === 'maintenance' ? '保养' : '维修' }}成本 @@ -88,7 +88,21 @@
@if (extraFields.length > 0) { -
{{ data.title }}项目
+
+ + @if (type === 'repair') { + 处置详情 + } @else { + {{ data.title }}项目 + } + + @if (data.formName) { + + 表单来源 {{ data.formName }} + + } +
+
@for (item of extraFields; track item.key; let fid = $index) {
@@ -197,62 +211,22 @@ }
- @if (type === 'maintenance') { + @if (['maintenance', 'repair'].includes(type)) {
备件损耗
- + } + @if (data?.repairShenhe) { +
+ + +
审批意见
+
(使用部门)
+
+ + + +
+
} diff --git a/web-admin-app/src/app/components/plan-task/handle-task-asset-item/handle-task-asset-item.component.ts b/web-admin-app/src/app/components/plan-task/handle-task-asset-item/handle-task-asset-item.component.ts index 504c7be..664fbed 100644 --- a/web-admin-app/src/app/components/plan-task/handle-task-asset-item/handle-task-asset-item.component.ts +++ b/web-admin-app/src/app/components/plan-task/handle-task-asset-item/handle-task-asset-item.component.ts @@ -25,7 +25,7 @@ export const defectStatusText: Record = { inspection: ['待检', '正常', '异常', '取消'], // 巡检 stocktaking: ['待盘点', '正常', '盘赢', '盘亏'], // 盘点 maintenance: ['待保养', '正常', '异常', '取消'], // 保养 - repair: ['待保养', '正常', '异常', '取消'], + repair: ['待维修', '完成', '未完成', '取消'], } @Component({ selector: 'app-asset-form', @@ -86,6 +86,7 @@ export class HandleTaskAssetItemComponent { defectStatus: this.fb.control(null, [FormValidators.required('请选择')]), img: this.fb.control(null, []), + opinion: this.fb.control(null, []), attachment: this.fb.control(null, []), notes: this.fb.control(null, []), autoRepair: this.fb.control(false, []), @@ -94,7 +95,6 @@ export class HandleTaskAssetItemComponent { sparePartsList: this.fb.control([], []), }) - console.log('this.data', this.data) this.patchValues() this.api.getBasicFinancialCategory({}).subscribe((res) => { @@ -216,6 +216,7 @@ export class HandleTaskAssetItemComponent { patchValues() { const { asset: data, preview, type } = this.data + if (data) { this.type = type this.formGroup.patchValue({ @@ -226,13 +227,20 @@ export class HandleTaskAssetItemComponent { if (preview) { this.formGroup.disable() } + if (this.data?.repairShenhe) { + this.formGroup.disable() + this.formGroup.get('opinion')?.enable() + } } public getValues() { let values = null if (FormValidators.validateFormGroup(this.formGroup)) { const v = this.formGroup.getRawValue() - + if (this.data?.repairShenhe && !v.opinion) { + this.msg.error('请填写审核意见') + return + } values = { ...v, diff --git a/web-admin-app/src/app/components/plan-task/handle-task/handle-task.component.html b/web-admin-app/src/app/components/plan-task/handle-task/handle-task.component.html index b5b51c2..b868ee8 100644 --- a/web-admin-app/src/app/components/plan-task/handle-task/handle-task.component.html +++ b/web-admin-app/src/app/components/plan-task/handle-task/handle-task.component.html @@ -77,39 +77,7 @@ 任务状态 - @switch (data.value.status) { - - @case ('APPROVAL') { - 待处理 - } - @case ('COMPLETED') { - 已完成 - } - @case ('DISCARDED') { - 已废弃 - } - @case ('DRAFTING') { - 草稿中 - } - @case ('EXCEPTION') { - 异常 - } - @case ('REJECTED') { - 已驳回 - } - @case ('DISPOSE') { - 待处置 - } - @case ('SUSPENDED') { - 已挂起 - } - @case ('TO_BE_ASSIGNED') { - 待分配 - } - @default { - {{ data.value.status | json }} - } - } +
@@ -141,7 +109,7 @@ - 序号 + 序号 设备编号 设备名称 设备分类 @@ -153,7 +121,8 @@ @for (item of data.value.defects; track $index) { - {{ item.assetId }} + + {{ $index + 1 }} {{ item.assetCode }} @@ -172,22 +141,37 @@ - @if (item.defectStatus == 0 && !data.preview) { + @if (item.defectStatus == 0) { 执行 + 执行 + } @else { - 查看 + @if (data.preview) { + + 查看 + + } + + @if (data.type === 'repair') { + + 审批 + + } } diff --git a/web-admin-app/src/app/components/plan-task/handle-task/handle-task.component.ts b/web-admin-app/src/app/components/plan-task/handle-task/handle-task.component.ts index 32d5646..52ce901 100644 --- a/web-admin-app/src/app/components/plan-task/handle-task/handle-task.component.ts +++ b/web-admin-app/src/app/components/plan-task/handle-task/handle-task.component.ts @@ -24,6 +24,7 @@ import { } from '../handle-task-asset-item/handle-task-asset-item.component' import { lastValueFrom } from 'rxjs' import { PlanTaskType } from 'app/types' +import { FlowStatusTagComponent } from 'app/components/flow-status-tag/flow-status-tag.component' @Component({ selector: 'app-stocktaking-detail-form', @@ -36,6 +37,7 @@ import { PlanTaskType } from 'app/types' OrgSelectComponent, PositionSelectComponent, UploadComponent, + FlowStatusTagComponent, ], templateUrl: './handle-task.component.html', styleUrl: './handle-task.component.less', @@ -110,9 +112,13 @@ export class HandleTaskComponent { modal = inject(NzModalService) tempData: NzSafeAny = null - handleItem(asset: NzSafeAny, preview?: boolean) { + handleItem(asset: NzSafeAny, preview?: boolean, repairShenhe = false) { + let nzTitle = this.title + '执行详情' + if (repairShenhe) { + nzTitle = '维修审批详情' + } this.modal.create({ - nzTitle: this.title + '执行详情', + nzTitle, nzContent: HandleTaskAssetItemComponent, nzWidth: '80vw', nzWrapClassName: 'modal-lg', @@ -121,7 +127,9 @@ export class HandleTaskComponent { task: this.data.value, title: this.title, type: this.data.type, + formName: this.data.value?.formName, preview, + repairShenhe, }, nzFooter: preview ? null : void 0, nzOnOk: async (e) => { @@ -155,7 +163,7 @@ export class HandleTaskComponent { patchValues() { const { value: data, preview, type } = this.data this.title = taskTypeTitle.get(type) - console.log('type====', data) + this.defectStatusTextOnThis = this.defectStatusText[type as PlanTaskType] if (data) { this.formGroup.patchValue({ @@ -169,10 +177,11 @@ export class HandleTaskComponent { public getValues() { let values = null - console.log('this.formGroup', this.formGroup) + if (FormValidators.validateFormGroup(this.formGroup)) { const v = this.formGroup.value values = { + ...this.data.value, ...v, assetIdList: v.assetIdList.map((i: NzSafeAny) => { return { diff --git a/web-admin-app/src/app/components/plan-task/plan-form/plan-form.component.html b/web-admin-app/src/app/components/plan-task/plan-form/plan-form.component.html index 4d29e1f..90aa893 100644 --- a/web-admin-app/src/app/components/plan-task/plan-form/plan-form.component.html +++ b/web-admin-app/src/app/components/plan-task/plan-form/plan-form.component.html @@ -1,4 +1,4 @@ -