From 7b56ae6298af8f8edb80988c55233c80d5e11e74 Mon Sep 17 00:00:00 2001 From: kely Date: Tue, 14 May 2024 00:57:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web-admin-app/src/app/app.routes.ts | 6 + .../asset-business-allot-form.component.html | 12 +- .../asset-business-allot-form.component.ts | 6 +- .../asset-business-retirement.component.html | 91 +++++++++ .../asset-business-retirement.component.less | 0 .../asset-business-retirement.component.ts | 124 ++++++++++++ .../asset-business-return-form.component.html | 4 +- .../asset-business-return-form.component.ts | 2 +- ...asset-business-storage-form.component.html | 2 +- .../asset-business-transfer-form.component.ts | 2 + .../asset-select/asset-select.component.html | 12 +- .../asset-select/asset-select.component.ts | 26 +-- web-admin-app/src/app/components/index.ts | 1 + web-admin-app/src/app/constants/index.ts | 9 + .../fixed-asset/fixed-asset.component.html | 4 +- .../fixed-asset-ledger.component.ts | 4 + .../fixed-asset-storage.component.html | 188 ++++++++++++++++++ .../fixed-asset-storage.component.less | 0 .../fixed-asset-storage.component.ts | 95 +++++++++ .../fixed-asset-manage-allot.component.html | 3 + .../fixed-asset-manage-allot.component.ts | 4 +- .../fixed-asset-manage-borrow.component.ts | 2 +- .../fixed-asset-manage-revert.component.ts | 2 +- .../fixed-asset-manage-scrap.component.html | 103 +++++++--- .../fixed-asset-manage-scrap.component.ts | 143 +++++++++---- ...fixed-asset-manage-transfer.component.html | 9 + .../fixed-asset-manage-transfer.component.ts | 4 +- .../flow-my-apply.component.html | 7 +- .../flow-my-apply/flow-my-apply.component.ts | 19 +- .../flow-my-finished.component.html | 7 +- .../flow-my-finished.component.ts | 42 ++-- .../flow-my-todo/flow-my-todo.component.html | 7 +- .../flow-my-todo/flow-my-todo.component.ts | 99 ++++++--- web-admin-app/src/app/services/api.service.ts | 62 +++++- 34 files changed, 936 insertions(+), 165 deletions(-) create mode 100644 web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.html create mode 100644 web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.less create mode 100644 web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.ts create mode 100644 web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component.html create mode 100644 web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component.less create mode 100644 web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component.ts diff --git a/web-admin-app/src/app/app.routes.ts b/web-admin-app/src/app/app.routes.ts index e68e9fa..d68e08a 100644 --- a/web-admin-app/src/app/app.routes.ts +++ b/web-admin-app/src/app/app.routes.ts @@ -58,6 +58,7 @@ import { FlowMyApplyComponent } from './pages/flow/flow-my-apply/flow-my-apply.c import { FlowMyTodoComponent } from './pages/flow/flow-my-todo/flow-my-todo.component' import { FlowLayoutComponent } from './pages/flow/flow-layout/flow-layout.component' import { FlowMyFinishedComponent } from './pages/flow/flow-my-finished/flow-my-finished.component' +import { FixedAssetStorageComponent } from './pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component' export const routes: Routes = [ { @@ -195,6 +196,11 @@ export const routes: Routes = [ title: '资产公共台账', component: FixedAssetSearchComponent, }, + { + path: 'storage', + title: '资产库存台账', + component: FixedAssetStorageComponent, + }, { path: 'asset-belong', title: '归属组织台账', 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 adbc56b..3277b94 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 @@ -10,14 +10,14 @@ -
+
调入仓库 @@ -34,14 +34,14 @@
- +
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 a3c2045..99fbe1c 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 @@ -49,11 +49,11 @@ export class AssetBusinessAllotFormComponent { name: this.fb.control('', [FormValidators.required('请输入')]), // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), // useOrganizationId: this.fb.control(null, [FormValidators.required('请选择')]), - // businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), + businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), notes: this.fb.control(null, []), inWarehouseId: this.fb.control(null, [FormValidators.required('请选择')]), - outWarehouseId: this.fb.control(null, [FormValidators.required('请选择')]), + // outWarehouseId: this.fb.control(null, [FormValidators.required('请选择')]), attach: this.fb.control('', []), @@ -75,7 +75,7 @@ export class AssetBusinessAllotFormComponent { positionId: data._position?.positionId + '', useOrganizationId: data._useOrganization?.organizationId + '', inWarehouseId: data._inWarehouse?.warehouseId, - outWarehouseId: data._outWarehouse?.warehouseId, + // outWarehouseId: data._outWarehouse?.warehouseId, applicant: data._applicant?.userName, }) } diff --git a/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.html b/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.html new file mode 100644 index 0000000..05bac22 --- /dev/null +++ b/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.html @@ -0,0 +1,91 @@ + diff --git a/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.less b/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.less new file mode 100644 index 0000000..e69de29 diff --git a/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.ts b/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.ts new file mode 100644 index 0000000..c09f957 --- /dev/null +++ b/web-admin-app/src/app/components/asset-business-retirement/asset-business-retirement.component.ts @@ -0,0 +1,124 @@ +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 { 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 { 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' +import { MaintenanceSelectComponent } from '../maintenance-select/maintenance-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' + +@Component({ + selector: 'app-asset-business-retirement', + standalone: true, + imports: [ + SharedModule, + SelectUserByOrgComponent, + SupplierSelectComponent, + AssetSelectComponent, + OrgSelectComponent, + PositionSelectComponent, + ], + templateUrl: './asset-business-retirement.component.html', + styleUrl: './asset-business-retirement.component.less', +}) +export class AssetBusinessRetirementComponent { + 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, []), + name: this.fb.control('', [FormValidators.required('请输入')]), + // useUserId: this.fb.control(null, [FormValidators.required('请选择')]), + type: this.fb.control(null, []), + businessGeneratedDate: this.fb.control(null, [FormValidators.required('请选择')]), + + expeditedStatus: this.fb.control(0, []), + notes: this.fb.control(null, []), + // positionId: this.fb.control(null, []), + attach: this.fb.control('', []), + // positionDetail: this.fb.control('', []), + applicant: this.fb.control({ value: '', disabled: true }, []), + + assetIdList: this.fb.control([], []), + }) + + this.patchValues() + } + + patchValues() { + const { value: data, preview } = this.data + if (data) { + this.formGroup.patchValue({ + ...data, + + useUserId: data._useUser?.userId ? [data._useUser?.userId] : [], + manager: data._manager?.userId ? [data._manager?.userId] : [], + responsiblePerson: data._responsiblePerson?.userId ? [data._responsiblePerson?.userId] : [], + categoryId: data._category?.categoryId + '', + positionId: data._position?.positionId + '', + ownCompanyId: data._ownCompany?.organizationId + '', + useOrganizationId: data._useOrganization?.organizationId + '', + maintenanceVendor: data._maintenanceVendor?.maintenanceVendorId, + warehouseId: data._warehouse?.warehouseId, + manufacturersVendorId: data._manufacturersVendor?.manufacturersVendorId, + applicant: data._applicant?.userName, + }) + } + if (preview) { + this.formGroup.disable() + } + } + + public getValues() { + let values = null + if (FormValidators.validateFormGroup(this.formGroup)) { + const v = this.formGroup.value + + values = { + ...v, + useUserId: v.useUserId?.[0], + manager: v.manager?.[0], + categoryId: v.categoryId?.[0], + ownCompanyId: v.ownCompanyId?.[0], + positionId: Number(v.positionId?.[0]), + useOrganizationId: Number(v.useOrganizationId?.[0]), + assetIdList: v.assetIdList, + // assetIdList: typeof v.assetIdList === 'string' ? v.assetIdList : JSON.stringify(v.assetIdList), + } + } + 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/asset-business-return-form/asset-business-return-form.component.html b/web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.html index 8655f5a..7d549fc 100644 --- a/web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.html +++ b/web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.html @@ -52,7 +52,7 @@
- 存放位置 + 存放位置 @@ -97,7 +97,7 @@ 资产列表 - +
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 5e6395d..7cc4f5f 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 @@ -53,7 +53,7 @@ export class AssetBusinessReturnFormComponent { warehouseId: this.fb.control(null, [FormValidators.required('请选择')]), notes: this.fb.control(null, []), - positionId: this.fb.control(null, []), + positionId: this.fb.control(null, [FormValidators.required('请选择')]), attach: this.fb.control('', []), positionDetail: this.fb.control('', []), 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 14f940e..2d3be6a 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 @@ -73,7 +73,7 @@ 资产列表 - + 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 8d8a68c..d3e25a6 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 @@ -77,6 +77,8 @@ export class AssetBusinessTransferFormComponent { positionId: data._position?.positionId + '', useOrganizationId: data._useOrganization?.organizationId + '', applicant: data._applicant?.userName, + inUseOrganizationId: data._inUseOrganization.organizationId + '', + outUseOrganizationId: data._outUseOrganization.organizationId + '', }) } if (preview) { 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 41dd210..292a58b 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 @@ -117,9 +117,9 @@ (nzCheckedChange)="onAllChecked($event)" > 资产编号 - 资产分类 资产状态 资产名称 + 库存数量 规格型号 资产序列号 @@ -133,13 +133,21 @@ (nzCheckedChange)="onItemChecked(data.assetId, $event)" > {{ data.assetCode }} - {{ data?._category.categoryName ?? '-' }} + {{ ASSET_STATUS_MAP[data.status] }} {{ data.name }} + + + {{ data.model }} {{ 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 425fbcd..9463194 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 @@ -51,6 +51,8 @@ export class AssetSelectComponent { @Input() radio: boolean = false + @Input() storage: boolean = false + @Output() onSelected = new EventEmitter() allGetedDataMap = new Map() @@ -96,22 +98,21 @@ export class AssetSelectComponent { .setConfig({ selectable: true, rowKey: 'assetId', - radio: true, + radio: this.radio, noneCache: true, }) .setColumn([ { key: 'assetCode', title: '资产编号', visible: true }, { key: 'name', title: '资产名称', visible: true }, - { key: '_category', title: '资产分类', visible: true }, + { key: 'status', title: '资产状态', visible: true }, - { key: '_ownCompany', title: '所属公司', visible: true }, - { key: '_useOrganization', title: '使用组织', visible: true }, - { key: '_position', title: '存放位置', visible: true }, + { key: 'count', title: '库存数量', visible: true }, ]) } fetchData(p: {}, q: AnyObject) { - return this.api.getAssetPage({ ...p, ...q }).pipe( + const fn = this.storage ? 'getAeamBusinessStorageList' : 'getAssetStroagePage' + return this.api[fn]({ ...p, ...q }).pipe( tap((res) => { res.body.rows.forEach((item: NzSafeAny) => { this.allGetedDataMap.set(item.assetId, item) @@ -133,13 +134,13 @@ export class AssetSelectComponent { this.allGetedDataMap.forEach((i: NzSafeAny) => { if (this.table.ref.selected.has(String(i.assetId))) { if (!this.selectedDataList.some((s) => s.assetId === i.assetId)) { - this.selectedDataList.push(i) + this.selectedDataList.push({ ...i, count: 1, max: i.count }) } } }) this.selectedDataList = this.selectedDataList.slice() this.refreshCheckedStatus() - this.onChange(this.selectedDataList.map((i) => i.assetId)) + this.onChange(this.selectedDataList) }, }) } @@ -147,7 +148,7 @@ export class AssetSelectComponent { onRemove() { this.selectedDataList = this.selectedDataList.filter((i) => !this.setOfCheckedId.has(i.assetId)) this.refreshCheckedStatus() - this.onChange(this.selectedDataList.map((i) => i.assetId)) + this.onChange(this.selectedDataList) } updateCheckedSet(id: number, checked: boolean): void { @@ -182,15 +183,16 @@ export class AssetSelectComponent { onChange(v: NzSafeAny[]) {} writeValue(v: NzSafeAny): void { - let vals = [] + let vals = v if (typeof v === 'string') { try { vals = JSON.parse(v) ?? [] } catch (error) {} } if (Array.isArray(vals) && vals.length > 0) { - this.api.getAssetListByIds(vals).subscribe((res) => { - this.selectedDataList = res.body.map((item: NzSafeAny) => { + // const ids = vals.map((i: NzSafeAny) => i.assetId) + this.api.getAssetStorageListByIds(vals).subscribe((res) => { + this.selectedDataList = res.body.rows.map((item: NzSafeAny) => { this.allGetedDataMap.set(item.assetId, item) return item }) diff --git a/web-admin-app/src/app/components/index.ts b/web-admin-app/src/app/components/index.ts index a8a6c73..970170d 100644 --- a/web-admin-app/src/app/components/index.ts +++ b/web-admin-app/src/app/components/index.ts @@ -20,6 +20,7 @@ export * from './asset-business-borrow-form/asset-business-borrow-form.component export * from './asset-business-revert-form/asset-business-revert-form.component' export * from './asset-business-allot-form/asset-business-allot-form.component' export * from './asset-business-transfer-form/asset-business-transfer-form.component' +export * from './asset-business-retirement/asset-business-retirement.component' export * from './repair-form/repair-form.component' export * from './repair-fault-form/repair-fault-form.component' diff --git a/web-admin-app/src/app/constants/index.ts b/web-admin-app/src/app/constants/index.ts index bab0284..467a80b 100644 --- a/web-admin-app/src/app/constants/index.ts +++ b/web-admin-app/src/app/constants/index.ts @@ -59,3 +59,12 @@ export const STOCKTAKING_JOB_STATUS_MAP = new Map([ [3, '待盘点'], [4, '异常'], ]) + +// 0-草稿、1-已完成、2-拒绝、3-审批中、4-取消 +export const ASSET_SCRAP_STATUS = new Map([ + [0, '草稿'], + [1, '已完成'], + [2, '拒绝'], + [3, '审批中'], + [4, '取消'], +]) diff --git a/web-admin-app/src/app/pages/fixed-asset/fixed-asset.component.html b/web-admin-app/src/app/pages/fixed-asset/fixed-asset.component.html index d535868..58c1e39 100644 --- a/web-admin-app/src/app/pages/fixed-asset/fixed-asset.component.html +++ b/web-admin-app/src/app/pages/fixed-asset/fixed-asset.component.html @@ -34,9 +34,9 @@
  • 资产转移
  • - + + + + + + + + + + + + + + + + + + @for (item of ASSET_STATUS_MAP | keyvalue; track $index) { + + } + + + + + @for (item of ASSET_SOURCE_MAP | keyvalue; track $index) { + + } + + + + + + + + + + + + + + diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component.less b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component.less new file mode 100644 index 0000000..e69de29 diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component.ts new file mode 100644 index 0000000..da908e1 --- /dev/null +++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-storage/fixed-asset-storage.component.ts @@ -0,0 +1,95 @@ +import { Component, TemplateRef, ViewChild } from '@angular/core' +import { FormControl, FormGroup } from '@angular/forms' + +import { AnyObject, TableOption } from 'app/shared/components/server-paginated-table' +import { ApiService } from 'app/services' +import { SharedModule } from 'app/shared/shared.module' +import { format } from 'date-fns' +import { lastValueFrom, of } from 'rxjs' +import { AssetFormComponent, ManufacturerSelectComponent, PositionSelectComponent } from 'app/components' +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal' +import { NzMessageService } from 'ng-zorro-antd/message' +import { NzSafeAny } from 'ng-zorro-antd/core/types' +import { ASSET_SOURCE_MAP, ASSET_STATUS, ASSET_STATUS_MAP } from 'app/constants' +import { Utils } from 'app/utils' + +@Component({ + selector: 'app-fixed-asset-storage', + standalone: true, + imports: [SharedModule, AssetFormComponent, PositionSelectComponent, ManufacturerSelectComponent], + templateUrl: './fixed-asset-storage.component.html', + styleUrl: './fixed-asset-storage.component.less', +}) +export class FixedAssetStorageComponent { + constructor( + private api: ApiService, + private modal: NzModalService, + private msg: NzMessageService, + ) {} + + queryForm = new FormGroup({ + name: new FormControl(), + model: new FormControl(), + status: new FormControl(), + assetCode: new FormControl(), + serialNumber: new FormControl(), + sourceId: new FormControl(), + positionId: new FormControl(), + manufacturersVendorId: new FormControl(), + }) + + @ViewChild('copyTpl') copyTpl!: TemplateRef + + ASSET_STATUS_MAP = ASSET_STATUS_MAP() + + ASSET_SOURCE_MAP = ASSET_SOURCE_MAP + + table = new TableOption(this.fetchData.bind(this)) + + copyNum = 1 + + ngOnInit(): void { + this.table + .setConfig({ + rowKey: 'assetId', + }) + .setColumn([ + { key: 'assetCode', title: '资产编号', visible: true }, + { key: 'name', title: '资产名称', visible: true }, + { key: 'categoryName', title: '资产分类', visible: true }, + { key: 'status', title: '资产状态', visible: true }, + { key: 'count', title: '库存数量', visible: true }, + { key: 'safetyLimit', title: '安全数量', visible: true }, + { key: 'upperLimit', title: '库存上限', visible: true }, + { key: 'lowerLimit', title: '库存下线', visible: true }, + + { key: 'warehouseName', title: '存放仓库', visible: true }, + ]) + .setRowOperate([ + { + title: '查看', + onClick: (v) => { + this.onCreate(v, true) + }, + }, + ]) + } + + fetchData(p: {}, q: AnyObject) { + return this.api.getAssetStroagePage({ ...p, ...q }) + } + + onCreate(data?: NzSafeAny, preview?: boolean) { + this.modal.create({ + nzTitle: '查看资产', + nzContent: AssetFormComponent, + nzWidth: '80vw', + nzWrapClassName: 'modal-lg', + nzData: { + value: data, + preview, + }, + nzFooter: null, + }) + } +} diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.html b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.html index df5116d..06a8f0b 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.html +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.html @@ -41,6 +41,9 @@ @case ('_category') { {{ data?.categoryName ?? '-' }} } + @case ('_inWarehouse') { + {{ data?.name ?? '-' }} + } @default { {{ data }} } diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.ts index cea4ce3..b76674e 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.ts @@ -48,8 +48,8 @@ export class FixedAssetManageAllotComponent { { key: 'businessId', title: '业务编号', visible: true, width: '350px' }, { key: 'name', title: '业务名称', visible: true }, { key: 'status', title: '办理状态', visible: true }, - { key: 'outWarehouseId', title: '调出仓库', visible: true }, - { key: 'inWarehouseId', title: '调入仓库', visible: true }, + // { key: 'outWarehouseId', title: '调出仓库', visible: true }, + { key: '_inWarehouse', title: '调入仓库', visible: true }, // { key: '_manager', title: '管理人员', visible: true }, // { key: '_position', title: '存放位置', visible: true }, // { key: 'positionDetail', title: '详细位置', visible: true }, diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-borrow/fixed-asset-manage-borrow.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-borrow/fixed-asset-manage-borrow.component.ts index 329a454..c242e73 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-borrow/fixed-asset-manage-borrow.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-borrow/fixed-asset-manage-borrow.component.ts @@ -13,7 +13,7 @@ import { AssetBusinessBorrowFormComponent } from 'app/components' import { BUSINESS_STATUS_MAP } from 'app/constants' @Component({ - selector: 'app-fixed-asset-manage-return', + selector: 'app-fixed-asset-manage-borrow', standalone: true, imports: [SharedModule, AssetBusinessBorrowFormComponent], templateUrl: './fixed-asset-manage-borrow.component.html', diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-revert/fixed-asset-manage-revert.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-revert/fixed-asset-manage-revert.component.ts index 4061306..0e5d8b3 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-revert/fixed-asset-manage-revert.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-revert/fixed-asset-manage-revert.component.ts @@ -13,7 +13,7 @@ import { AssetBusinessRevertFormComponent } from 'app/components' import { BUSINESS_STATUS_MAP } from 'app/constants' @Component({ - selector: 'app-fixed-asset-manage-return', + selector: 'app-fixed-asset-manage-revert', standalone: true, imports: [SharedModule, AssetBusinessRevertFormComponent], templateUrl: './fixed-asset-manage-revert.component.html', diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.html b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.html index 84d8fc0..235b2b2 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.html +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.html @@ -1,51 +1,100 @@ - + - -
    - +
    + + + @switch (key) { + @case ('expeditedStatus') { + + {{ data === 0 ? '普通' : '紧急' }} + + } + @case ('status') { + + {{ ASSET_SCRAP_STATUS.get(data) ?? '-' }} + + } + @case ('_manager') { + {{ data?.userName ?? '-' }} + } + @case ('_warehouse') { + {{ data?.name ?? '-' }} + } + @case ('_position') { + {{ data?.name ?? '-' }} + } + @case ('_supplierVendor') { + {{ data?.name ?? '-' }} + } + @case ('_ownCompany') { + {{ data?.organizationName ?? '-' }} + } + @case ('_useOrganization') { + {{ data?.organizationName ?? '-' }} + } + @case ('_applicant') { + {{ data?.userName ?? '-' }} + } + @default { + {{ data }} + } + } + + - - - - - - - + + + @for (item of ASSET_SCRAP_STATUS | keyvalue; track $index) { + + } - + - + - - - - - + + + + + diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts index 01773b9..a98563f 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts @@ -5,7 +5,12 @@ import { AnyObject, TableOption } from 'app/shared/components/server-paginated-t import { ApiService } from 'app/services' import { SharedModule } from 'app/shared/shared.module' import { format } from 'date-fns' -import { of } from 'rxjs' +import { lastValueFrom, of } from 'rxjs' +import { NzSafeAny } from 'ng-zorro-antd/core/types' +import { NzModalService } from 'ng-zorro-antd/modal' +import { NzMessageService } from 'ng-zorro-antd/message' +import { AssetBusinessRetirementComponent } from 'app/components' +import { ASSET_SCRAP_STATUS } from 'app/constants' @Component({ selector: 'app-fixed-asset-manage-scrap', @@ -15,43 +20,51 @@ import { of } from 'rxjs' styleUrl: './fixed-asset-manage-scrap.component.less', }) export class FixedAssetManageScrapComponent { - constructor(private api: ApiService) {} + constructor( + private api: ApiService, + private modal: NzModalService, + private msg: NzMessageService, + ) {} queryForm = new FormGroup({ - name: new FormControl(''), - type: new FormControl(''), - status: new FormControl(''), - date: new FormControl(''), + name: new FormControl(), + businessId: new FormControl(), + status: new FormControl(), + businessGeneratedDate: new FormControl(), + expeditedStatus: new FormControl(), }) table = new TableOption(this.fetchData.bind(this)) + ASSET_SCRAP_STATUS = ASSET_SCRAP_STATUS + ngOnInit(): void { this.table .setConfig({ selectable: true, }) .setColumn([ - { key: '主键', title: '主键', visible: true }, - { key: '业务编号', title: '业务编号', visible: true }, - { key: '业务名称', title: '业务名称', visible: true }, - { key: '办理状态', title: '办理状态', visible: true }, - { key: '报废方式', title: '报废方式', visible: true }, - { key: '报废说明', title: '报废说明', visible: true }, - { key: '报废时间', title: '报废时间', visible: true }, - { key: '修改人ID', title: '修改人ID', visible: true }, - { key: '制单人', title: '制单人', visible: true }, - { key: '业务日期', title: '业务日期', visible: false }, - { key: '选择数据', title: '选择数据', visible: true }, - - { key: '创建时间', title: '创建时间', visible: true }, + { key: 'id', title: '主键', visible: true }, + { key: 'businessId', title: '业务编号', visible: true }, + { key: 'name', title: '业务名称', visible: true }, + { key: 'notes', title: '备注', visible: true }, + { key: 'status', title: '状态', visible: true }, + { key: 'expeditedStatus', title: '加急状态', visible: true }, + { key: '_applicant', title: '申请人', visible: true }, + // { key: 'status', title: '状态', visible: true }, + { key: 'createTime', title: '创建时间', visible: true }, ]) .setRowOperate([ - { title: '查看', premissions: [] }, - { title: '修改' }, - { title: '确认' }, - { title: '单据' }, - { title: '删除' }, + { + title: '查看', + onClick: (v) => { + this.onCreate(v, true) + }, + }, + { title: '清理', onClick: this.onClean.bind(this) }, + { title: '确认', onClick: this.confirm.bind(this) }, + { title: '修改', onClick: this.onCreate.bind(this) }, + { title: '删除', onClick: this.deleteItem.bind(this) }, ]) } @@ -63,24 +76,72 @@ export class FixedAssetManageScrapComponent { q['createTimeStart'] = createTimeStart ? format(new Date(createTimeStart), 'yyyy-MM-dd HH:mm:ss') : '' q['createTimeEnd'] = createTimeEnd ? format(new Date(createTimeEnd), 'yyyy-MM-dd HH:mm:ss') : '' } - return of({ - data: { - total: 5, - records: [ - { - id: 1, - name: '沙滩', - price: 590, - type: 0, - lifespan: 6, - number: 20, - max: 20, - status: 1, - createTime: '2024-05-01', - }, - ], + + return this.api.getBusinessRetirementPage({ ...p, ...q }) + } + + onCreate(data?: NzSafeAny, preview?: boolean) { + let nzTitle = data ? '编辑资产报废' : '添加资产报废' + if (preview) { + nzTitle = '预览资产报废' + } + this.modal.create({ + nzTitle, + nzContent: AssetBusinessRetirementComponent, + nzWidth: '80vw', + nzWrapClassName: 'modal-lg', + nzData: { + value: data, + preview, + }, + nzOnOk: async (e) => { + const vals = e.getValues() + if (vals) { + const res = await lastValueFrom(this.api.saveBusinessRetirement(vals)) + this.msg.success(res.desc) + this.table.ref.reload() + return true + } + return false + }, + }) + } + + confirm(item?: NzSafeAny) { + const ids = [item.id] + this.modal.confirm({ + nzTitle: '警告', + nzContent: `是否要进行该操作?`, + nzOnOk: async () => { + const res = await lastValueFrom(this.api.confirmBusinessRetirement(ids)) + this.msg.success(res.desc) + this.table.ref.reload() + }, + }) + } + onClean(item?: NzSafeAny) { + const ids = [item.id] + this.modal.confirm({ + nzTitle: '警告', + nzContent: `是否要清理该报废?`, + nzOnOk: async () => { + const res = await lastValueFrom(this.api.cleanBusinessRetirement(ids)) + this.msg.success(res.desc) + this.table.ref.reload() + }, + }) + } + + deleteItem(item?: NzSafeAny) { + const ids = [item.id] + this.modal.confirm({ + nzTitle: '警告', + nzContent: `是否要删除${ids.length}个资产报废?`, + nzOnOk: async () => { + const res = await lastValueFrom(this.api.deleteBusinessRetirement(ids)) + this.msg.success(res.desc) + this.table.ref.reload() }, }) - // return this.api.getEntityPage(p, q) } } diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.html b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.html index df5116d..4c78ff4 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.html +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.html @@ -38,6 +38,15 @@ @case ('_useOrganization') { {{ data?.organizationName ?? '-' }} } + @case ('_inUseOrganization') { + {{ data?.organizationName ?? '-' }} + } + @case ('_outUseOrganization') { + {{ data?.organizationName ?? '-' }} + } + @case ('_useUser') { + {{ data?.userName ?? '-' }} + } @case ('_category') { {{ data?.categoryName ?? '-' }} } diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.ts index 7411304..fa62536 100644 --- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.ts +++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.ts @@ -48,8 +48,8 @@ export class FixedAssetManageTransferComponent { { key: 'businessId', title: '业务编号', visible: true, width: '350px' }, { key: 'name', title: '业务名称', visible: true }, { key: 'status', title: '办理状态', visible: true }, - { key: '_useOrganization', title: '调出公司/部门', visible: true }, - { key: '_useOrganization', title: '调入公司/部门', visible: true }, + { key: '_inUseOrganization', title: '调出公司/部门', visible: true }, + { key: '_outUseOrganization', title: '调入公司/部门', visible: true }, { key: '_manager', title: '管理人员', visible: true }, { key: '_useUser', title: '使用人员', visible: true }, { key: '_position', title: '存放位置', visible: true }, diff --git a/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html b/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html index 0361e46..8c1627b 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html +++ b/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html @@ -1,6 +1,11 @@
    - + + + + + + @switch (key) { @case ('_assignee') { diff --git a/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts b/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts index 97a24d1..af205fe 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts +++ b/web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts @@ -5,12 +5,13 @@ import { AnyObject, TableOption } from 'app/shared/components/server-paginated-t import { ApiService } from 'app/services' import { SharedModule } from 'app/shared/shared.module' -import { lastValueFrom, map, of } from 'rxjs' +import { last, lastValueFrom, map, of } from 'rxjs' import { NzSafeAny } from 'ng-zorro-antd/core/types' import { NzModalService } from 'ng-zorro-antd/modal' import { NzMessageService } from 'ng-zorro-antd/message' import { FormValidators } from 'app/utils' import { AssetEmployeeApplyComponent } from 'app/components' +import { comsMap } from '../flow-main/flow-main.component' @Component({ selector: 'app-flow-my-apply', @@ -35,6 +36,10 @@ export class FlowMyApplyComponent { table = new TableOption(this.fetchData.bind(this)) + queryForm = new FormGroup({ + name: new FormControl(''), + }) + ngOnInit(): void { this.table // .setConfig({ @@ -64,9 +69,10 @@ export class FlowMyApplyComponent { onDetail(model: NzSafeAny) { this.modal.create({ nzTitle: '查看任务', - nzContent: AssetEmployeeApplyComponent, + nzContent: comsMap[model.category], nzWrapClassName: 'modal-lg', nzWidth: '80vw', + nzFooter: null, nzData: { value: model, preview: true, @@ -74,12 +80,17 @@ export class FlowMyApplyComponent { }) } - cancleFlow() { + cancleFlow(d: NzSafeAny) { this.modal.confirm({ nzTitle: '作废', nzContent: '是否要作废该申请?', nzOnOk: async () => { - const res = await lastValueFrom(this.api.deleteAssetFlow({})) + const res = await lastValueFrom( + this.api.cancelFlow({ + instanceId: d.procInsId, + taskId: d.taskId, + }), + ) this.msg.success('作废成功') this.table.ref.reload() }, diff --git a/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html b/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html index 0361e46..8c1627b 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html +++ b/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html @@ -1,6 +1,11 @@
    - + + + + + + @switch (key) { @case ('_assignee') { diff --git a/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.ts b/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.ts index f28bb4f..46e7659 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.ts +++ b/web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.ts @@ -10,6 +10,7 @@ import { NzSafeAny } from 'ng-zorro-antd/core/types' import { NzModalService } from 'ng-zorro-antd/modal' import { NzMessageService } from 'ng-zorro-antd/message' import { FormValidators } from 'app/utils' +import { comsMap } from '../flow-main/flow-main.component' @Component({ selector: 'app-flow-my-finished', @@ -34,6 +35,10 @@ export class FlowMyFinishedComponent { table = new TableOption(this.fetchData.bind(this)) + queryForm = new FormGroup({ + name: new FormControl(''), + }) + ngOnInit(): void { this.table // .setConfig({ @@ -50,41 +55,22 @@ export class FlowMyFinishedComponent { // { key: 'createTime', title: '作废时间', visible: true }, // { key: 'createTime', title: '完成时间', visible: true }, ]) - .setRowOperate([{ title: '详情' }]) + .setRowOperate([{ title: '查看', onClick: this.onDetail.bind(this) }]) } fetchData(p: {}, q: AnyObject) { return this.api.getMyFinishedAssetFlow({ ...p, ...q }) } - onSetApprover(data?: NzSafeAny) { - if (data) { - console.log('data._assignee.userId', data._assignee.userId) - this.createForm.patchValue({ - userId: data._assignee.userId ? [data._assignee.userId] : [], - }) - } + onDetail(model: NzSafeAny) { this.modal.create({ - nzTitle: '设置审批人', - nzContent: this.createFormTpl, - nzOnOk: async () => { - if (FormValidators.validateFormGroup(this.createForm)) { - const vals = this.createForm.value - const res = await lastValueFrom( - this.api.setFlowFormsAssignee({ - ...vals, - userId: vals.userId?.[0], - }), - ) - this.msg.success(res.desc) - this.table.ref.reload() - this.createForm.reset() - return true - } - return false - }, - nzOnCancel: () => { - this.createForm.reset() + nzTitle: '查看任务', + nzContent: comsMap[model.procDefKey], + nzWrapClassName: 'modal-lg', + nzWidth: '80vw', + nzData: { + value: model, + preview: true, }, }) } diff --git a/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html b/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html index 0361e46..8c1627b 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html +++ b/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html @@ -1,6 +1,11 @@
    - + + + + + + @switch (key) { @case ('_assignee') { diff --git a/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts b/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts index 5250854..b0d2ce5 100644 --- a/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts +++ b/web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts @@ -10,6 +10,7 @@ import { NzSafeAny } from 'ng-zorro-antd/core/types' import { NzModalService } from 'ng-zorro-antd/modal' import { NzMessageService } from 'ng-zorro-antd/message' import { FormValidators } from 'app/utils' +import { comsMap } from '../flow-main/flow-main.component' @Component({ selector: 'app-flow-my-todo', @@ -34,6 +35,10 @@ export class FlowMyTodoComponent { table = new TableOption(this.fetchData.bind(this)) + queryForm = new FormGroup({ + name: new FormControl(''), + }) + ngOnInit(): void { this.table // .setConfig({ @@ -50,41 +55,83 @@ export class FlowMyTodoComponent { // { key: 'createTime', title: '作废时间', visible: true }, // { key: 'createTime', title: '完成时间', visible: true }, ]) - .setRowOperate([{ title: '详情' }, { title: '作废' }]) + .setRowOperate([ + { title: '查看', onClick: this.onDetail.bind(this) }, + { title: '作废', onClick: this.cancleFlow.bind(this) }, + ]) } fetchData(p: {}, q: AnyObject) { return this.api.getMyTodoAssetFlow({ ...p, ...q }) } - onSetApprover(data?: NzSafeAny) { - if (data) { - console.log('data._assignee.userId', data._assignee.userId) - this.createForm.patchValue({ - userId: data._assignee.userId ? [data._assignee.userId] : [], - }) - } + onDetail(model: NzSafeAny) { this.modal.create({ - nzTitle: '设置审批人', - nzContent: this.createFormTpl, + nzTitle: '查看任务', + nzContent: comsMap[model.procDefKey], + nzWrapClassName: 'modal-lg', + nzWidth: '80vw', + nzData: { + value: model, + preview: true, + }, + nzFooter: [ + { + label: '通过', + onClick: async () => { + this.completeFlow(model) + }, + }, + { + label: '驳回', + onClick: async () => { + return this.rejectProcessFlow(model) + }, + }, + ], + }) + } + + completeFlow(d: NzSafeAny) { + this.modal.confirm({ + nzTitle: '审核通过', + nzContent: '是否要审核通过该申请?', nzOnOk: async () => { - if (FormValidators.validateFormGroup(this.createForm)) { - const vals = this.createForm.value - const res = await lastValueFrom( - this.api.setFlowFormsAssignee({ - ...vals, - userId: vals.userId?.[0], - }), - ) - this.msg.success(res.desc) - this.table.ref.reload() - this.createForm.reset() - return true - } - return false + await lastValueFrom( + this.api.completeProcessFlow({ + instanceId: d.procInsId, + taskId: d.taskId, + }), + ) + this.msg.success('通过成功') + this.table.ref.reload() }, - nzOnCancel: () => { - this.createForm.reset() + }) + } + rejectProcessFlow(d: NzSafeAny) { + this.modal.confirm({ + nzTitle: '作废', + nzContent: '是否要驳回该申请?', + nzOnOk: async () => { + await lastValueFrom( + this.api.rejectProcessFlow({ + instanceId: d.procInsId, + taskId: d.taskId, + }), + ) + this.msg.success('驳回成功') + this.table.ref.reload() + }, + }) + } + cancleFlow(d: NzSafeAny) { + this.modal.confirm({ + nzTitle: '作废', + nzContent: '是否要作废该申请?', + nzOnOk: async () => { + const res = await lastValueFrom(this.api.cancelFlow({ instanceId: d.procInsId, taskId: d.taskId })) + this.msg.success('作废成功') + this.table.ref.reload() }, }) } diff --git a/web-admin-app/src/app/services/api.service.ts b/web-admin-app/src/app/services/api.service.ts index badb112..74961d7 100644 --- a/web-admin-app/src/app/services/api.service.ts +++ b/web-admin-app/src/app/services/api.service.ts @@ -115,9 +115,38 @@ export class ApiService { getAssetPage(data: {}) { return this.http.post('/api/eamAsset/list', data) } + /** + * r入库/退库 + * @param data + * @returns + */ + getAeamBusinessStorageList(data: {}) { + return this.http.post('/api/eamBusinessStorage/warehouse/list', data) + } + /** + * 领用/调拨/出库 + * @param data + * @returns + */ + getAssetStroagePage(data: {}) { + return this.http.post('/api/eamAsset/warehouse/list', data) + } + /** + * 没有库存的 + * @param ids + * @returns + */ getAssetListByIds(ids: number[]) { return this.http.post('/api/eamAsset/queryByIds', ids) } + /** + * 有库存的 + * @param ids + * @returns + */ + getAssetStorageListByIds(ids: number[]) { + return this.http.post('/api/eamAsset/warehouse/listByIds', ids) + } getAssetLog(data: {}) { return this.http.post('/api/eamAssetLog/list', data) } @@ -353,6 +382,25 @@ export class ApiService { return this.http.post(`/api/eamBusinessCollection/confirm`, ids) } + getBusinessRetirementPage(data: {}) { + return this.http.post('/api/eamBusinessRetirement/list', data) + } + saveBusinessRetirement(data: NzSafeAny) { + if (Utils.isEmpty(data.id)) { + return this.http.post('/api/eamBusinessRetirement/add', data) + } + return this.http.post('/api/eamBusinessRetirement/update', data) + } + deleteBusinessRetirement(ids: number[]) { + return this.http.post(`/api/eamBusinessRetirement/delete`, ids) + } + confirmBusinessRetirement(ids: number[]) { + return this.http.post(`/api/eamBusinessRetirement/confirm`, ids) + } + cleanBusinessRetirement(ids: number[]) { + return this.http.post(`/api/eamBusinessRetirement/clean`, ids) + } + getBusinessReturnInventoryPage(data: {}) { return this.http.post('/api/eamBusinessReturnInventory/list', data) } @@ -484,7 +532,7 @@ export class ApiService { return this.http.post(`/api/flowable/task/myProcess`, data) } deleteAssetFlow(data: {}) { - return this.http.post(`/api/flowable/task/delete`, data) + return this.http.delete(`/api/flowable/task/delete`, data) } getMyTodoAssetFlow(data: {}) { return this.http.post(`/api/flowable/task/todoList`, data) @@ -492,6 +540,18 @@ export class ApiService { getMyFinishedAssetFlow(data: {}) { return this.http.post(`/api/flowable/task/finishedList`, data) } + revokeProcessFlow(data: {}) { + return this.http.post(`/api/flowable/task/revokeProcess`, data) + } + rejectProcessFlow(data: {}) { + return this.http.post(`/api/flowable/task/reject`, data) + } + completeProcessFlow(data: {}) { + return this.http.post(`/api/flowable/task/complete`, data) + } + cancelFlow(data: {}) { + return this.http.post(`/api/flowable/task/stopProcess`, data) + } startFlow(json: {}, form_key: string) { return this.http.post(`/api/flowable/definition/start/${form_key}`, json) }