|
@ -6,7 +6,12 @@ import { ApiService } from 'app/services' |
|
|
import { SharedModule } from 'app/shared/shared.module' |
|
|
import { SharedModule } from 'app/shared/shared.module' |
|
|
import { format } from 'date-fns' |
|
|
import { format } from 'date-fns' |
|
|
import { lastValueFrom, of } from 'rxjs' |
|
|
import { lastValueFrom, of } from 'rxjs' |
|
|
import { AssetFormComponent, ManufacturerSelectComponent, PositionSelectComponent } from 'app/components' |
|
|
import { |
|
|
|
|
|
AssetFormComponent, |
|
|
|
|
|
ManufacturerSelectComponent, |
|
|
|
|
|
PositionSelectComponent, |
|
|
|
|
|
SelectUserByOrgComponent, |
|
|
|
|
|
} from 'app/components' |
|
|
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal' |
|
|
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal' |
|
|
import { NzMessageService } from 'ng-zorro-antd/message' |
|
|
import { NzMessageService } from 'ng-zorro-antd/message' |
|
|
import { NzSafeAny } from 'ng-zorro-antd/core/types' |
|
|
import { NzSafeAny } from 'ng-zorro-antd/core/types' |
|
@ -16,7 +21,13 @@ import { Utils } from 'app/utils' |
|
|
@Component({ |
|
|
@Component({ |
|
|
selector: 'app-fixed-asset-myown', |
|
|
selector: 'app-fixed-asset-myown', |
|
|
standalone: true, |
|
|
standalone: true, |
|
|
imports: [SharedModule, AssetFormComponent, PositionSelectComponent, ManufacturerSelectComponent], |
|
|
imports: [ |
|
|
|
|
|
SharedModule, |
|
|
|
|
|
AssetFormComponent, |
|
|
|
|
|
PositionSelectComponent, |
|
|
|
|
|
ManufacturerSelectComponent, |
|
|
|
|
|
SelectUserByOrgComponent, |
|
|
|
|
|
], |
|
|
templateUrl: './fixed-asset-myown.component.html', |
|
|
templateUrl: './fixed-asset-myown.component.html', |
|
|
styleUrl: './fixed-asset-myown.component.less', |
|
|
styleUrl: './fixed-asset-myown.component.less', |
|
|
}) |
|
|
}) |
|
@ -35,6 +46,7 @@ export class FixedAssetMyownComponent { |
|
|
serialNumber: new FormControl(), |
|
|
serialNumber: new FormControl(), |
|
|
sourceId: new FormControl(), |
|
|
sourceId: new FormControl(), |
|
|
positionId: new FormControl(), |
|
|
positionId: new FormControl(), |
|
|
|
|
|
manager: new FormControl(), |
|
|
manufacturersVendorId: new FormControl(), |
|
|
manufacturersVendorId: new FormControl(), |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
@ -57,7 +69,8 @@ export class FixedAssetMyownComponent { |
|
|
{ key: 'assetCode', title: '资产编号', visible: true }, |
|
|
{ key: 'assetCode', title: '资产编号', visible: true }, |
|
|
{ key: 'name', title: '资产名称', visible: true }, |
|
|
{ key: 'name', title: '资产名称', visible: true }, |
|
|
{ key: '_category', title: '资产分类', visible: true }, |
|
|
{ key: '_category', title: '资产分类', visible: true }, |
|
|
{ key: 'status', title: '资产状态', visible: true }, |
|
|
{ key: 'status', title: '资产状态', visible: true, width: '120px' }, |
|
|
|
|
|
{ key: '_manager', title: '管理人员', visible: true }, |
|
|
{ key: '_ownCompany', title: '所属公司', visible: true }, |
|
|
{ key: '_ownCompany', title: '所属公司', visible: true }, |
|
|
{ key: '_useOrganization', title: '使用组织', visible: true }, |
|
|
{ key: '_useOrganization', title: '使用组织', visible: true }, |
|
|
{ key: '_position', title: '存放位置', visible: true }, |
|
|
{ key: '_position', title: '存放位置', visible: true }, |
|
@ -73,7 +86,8 @@ export class FixedAssetMyownComponent { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fetchData(p: {}, q: AnyObject) { |
|
|
fetchData(p: {}, q: AnyObject) { |
|
|
return this.api.getAssetPage({ ...p, ...q }) |
|
|
const manager = Array.isArray(q['manager']) ? q['manager'][0] : null |
|
|
|
|
|
return this.api.getAssetPage({ ...p, ...q, manager }) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
onCreate(data?: NzSafeAny, preview?: boolean) { |
|
|
onCreate(data?: NzSafeAny, preview?: boolean) { |
|
|