Browse Source

修改 bug

main
kely 11 months ago
parent
commit
c8326a6528
  1. 2
      web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts
  2. 4
      web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.ts
  3. 4
      web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.ts
  4. 2
      web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.ts
  5. 2
      web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.ts
  6. 6
      web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.ts
  7. 2
      web-admin-app/src/app/components/asset-category-select/asset-category-select.component.ts
  8. 8
      web-admin-app/src/app/components/asset-form/asset-form.component.ts
  9. 2
      web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.ts
  10. 1
      web-admin-app/src/app/components/component-org-tree/component-org-tree.component.ts
  11. 4
      web-admin-app/src/app/components/org-select/org-select.component.ts
  12. 23
      web-admin-app/src/app/pages/fixed-asset/alert/alert-borrow/alert-borrow.component.html
  13. 14
      web-admin-app/src/app/pages/fixed-asset/alert/alert-borrow/alert-borrow.component.ts
  14. 10
      web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.ts
  15. 11
      web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts
  16. 2
      web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html
  17. 2
      web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html
  18. 2
      web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html
  19. 2
      web-admin-app/src/app/pages/org-setting/org-setting.component.ts
  20. 2
      web-admin-app/src/app/shared/permission/permission.directive.ts
  21. 2
      web-admin-app/src/app/shared/permission/permission.guard.ts

2
web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts

@ -84,7 +84,7 @@ export class AssetEmployeeApplyComponent {
values = { values = {
...v, ...v,
applyDepartmentId: Number(v.applyDepartmentId?.[0]), applyDepartmentId: Number(v.applyDepartmentId),
} }
} }
return values return values

4
web-admin-app/src/app/components/asset-business-allot-form/asset-business-allot-form.component.ts

@ -94,9 +94,9 @@ export class AssetBusinessAllotFormComponent {
useUserId: v.useUserId?.[0], useUserId: v.useUserId?.[0],
manager: v.manager?.[0], manager: v.manager?.[0],
categoryId: v.categoryId?.[0], categoryId: v.categoryId?.[0],
ownCompanyId: v.ownCompanyId?.[0], ownCompanyId: v.ownCompanyId,
positionId: Number(v.positionId?.[0]), positionId: Number(v.positionId?.[0]),
useOrganizationId: Number(v.useOrganizationId?.[0]), useOrganizationId: Number(v.useOrganizationId),
assetIdList: v.assetIdList, assetIdList: v.assetIdList,
} }
} }

4
web-admin-app/src/app/components/asset-business-borrow-form/asset-business-borrow-form.component.ts

@ -89,9 +89,9 @@ export class AssetBusinessBorrowFormComponent {
useUserId: v.useUserId?.[0], useUserId: v.useUserId?.[0],
manager: v.manager?.[0], manager: v.manager?.[0],
categoryId: v.categoryId?.[0], categoryId: v.categoryId?.[0],
ownCompanyId: v.ownCompanyId?.[0], // ownCompanyId: v.ownCompanyId?.[0],
positionId: Number(v.positionId?.[0]), positionId: Number(v.positionId?.[0]),
useOrganizationId: Number(v.useOrganizationId?.[0]), // useOrganizationId: Number(v.useOrganizationId?.[0]),
assetIdList: v.assetIdList, assetIdList: v.assetIdList,
} }
} }

2
web-admin-app/src/app/components/asset-business-collection/asset-business-collection.component.ts

@ -101,7 +101,7 @@ export class AssetBusinessCollectionComponent {
categoryId: v.categoryId?.[0], categoryId: v.categoryId?.[0],
ownCompanyId: v.ownCompanyId?.[0], ownCompanyId: v.ownCompanyId?.[0],
positionId: Number(v.positionId?.[0]), positionId: Number(v.positionId?.[0]),
useOrganizationId: Number(v.useOrganizationId?.[0]), // useOrganizationId: Number(v.useOrganizationId?.[0]),
assetIdList: v.assetIdList, assetIdList: v.assetIdList,
// assetIdList: typeof v.assetIdList === 'string' ? v.assetIdList : JSON.stringify(v.assetIdList), // assetIdList: typeof v.assetIdList === 'string' ? v.assetIdList : JSON.stringify(v.assetIdList),
} }

2
web-admin-app/src/app/components/asset-business-return-form/asset-business-return-form.component.ts

@ -101,7 +101,7 @@ export class AssetBusinessReturnFormComponent {
categoryId: v.categoryId?.[0], categoryId: v.categoryId?.[0],
ownCompanyId: v.ownCompanyId?.[0], ownCompanyId: v.ownCompanyId?.[0],
positionId: Number(v.positionId?.[0]), positionId: Number(v.positionId?.[0]),
useOrganizationId: Number(v.useOrganizationId?.[0]), useOrganizationId: Number(v.useOrganizationId),
assetIdList: v.assetIdList, assetIdList: v.assetIdList,
} }
} }

6
web-admin-app/src/app/components/asset-business-transfer-form/asset-business-transfer-form.component.ts

@ -72,7 +72,7 @@ export class AssetBusinessTransferFormComponent {
if (data) { if (data) {
this.formGroup.patchValue({ this.formGroup.patchValue({
...data, ...data,
managerId: data._manager?.userId ? [data._manager?.userId] : [],
useUserId: data._useUser?.userId ? [data._useUser?.userId] : [], useUserId: data._useUser?.userId ? [data._useUser?.userId] : [],
positionId: data._position?.positionId + '', positionId: data._position?.positionId + '',
useOrganizationId: data._useOrganization?.organizationId + '', useOrganizationId: data._useOrganization?.organizationId + '',
@ -98,8 +98,8 @@ export class AssetBusinessTransferFormComponent {
categoryId: v.categoryId?.[0], categoryId: v.categoryId?.[0],
ownCompanyId: v.ownCompanyId?.[0], ownCompanyId: v.ownCompanyId?.[0],
positionId: Number(v.positionId?.[0]), positionId: Number(v.positionId?.[0]),
useOrganizationId: Number(v.useOrganizationId?.[0]), useOrganizationId: Number(v.useOrganizationId),
inUseOrganizationId: Number(v.inUseOrganizationId?.[0]), inUseOrganizationId: Number(v.inUseOrganizationId),
outUseOrganizationId: Number(v.outUseOrganizationId?.[0]), outUseOrganizationId: Number(v.outUseOrganizationId?.[0]),
assetIdList: v.assetIdList, assetIdList: v.assetIdList,
} }

2
web-admin-app/src/app/components/asset-category-select/asset-category-select.component.ts

@ -55,7 +55,7 @@ export class AssetCategorySelectComponent implements ControlValueAccessor, OnIni
this.api.getBasicCategoryTree().subscribe((res) => { this.api.getBasicCategoryTree().subscribe((res) => {
this.originTreeData = res.body this.originTreeData = res.body
this.assetCategoryTree = Utils.buildTree(this.originTreeData, 'categoryId', 'categoryName') this.assetCategoryTree = Utils.buildTree(this.originTreeData, 'categoryId', 'categoryName')
console.log('this.assetCategoryTree', this.originTreeData, this.assetCategoryTree) // console.log('this.assetCategoryTree', this.originTreeData, this.assetCategoryTree)
}) })
} }

8
web-admin-app/src/app/components/asset-form/asset-form.component.ts

@ -119,6 +119,7 @@ export class AssetFormComponent implements OnInit {
patchValues() { patchValues() {
const { value: data, preview } = this.data const { value: data, preview } = this.data
if (data) { if (data) {
console.log('data', data)
this.formGroup.patchValue({ this.formGroup.patchValue({
...data, ...data,
useUserId: data._useUser?.userId ? [data._useUser?.userId] : [], useUserId: data._useUser?.userId ? [data._useUser?.userId] : [],
@ -141,14 +142,15 @@ export class AssetFormComponent implements OnInit {
let values = null let values = null
if (FormValidators.validateFormGroup(this.formGroup)) { if (FormValidators.validateFormGroup(this.formGroup)) {
const v = this.formGroup.getRawValue() const v = this.formGroup.getRawValue()
values = { values = {
...v, ...v,
useUserId: v.useUserId?.[0], useUserId: v.useUserId?.[0],
manager: v.manager?.[0], manager: v.manager?.[0],
categoryId: v.categoryId?.[0], categoryId: v.categoryId,
ownCompanyId: v.ownCompanyId?.[0], ownCompanyId: v.ownCompanyId,
positionId: v.positionId?.[0], positionId: v.positionId?.[0],
useOrganizationId: v.useOrganizationId?.[0], useOrganizationId: v.useOrganizationId,
responsiblePerson: v.responsiblePerson?.[0], responsiblePerson: v.responsiblePerson?.[0],
} }
} }

2
web-admin-app/src/app/components/component-basic-category-tree/component-basic-category-tree.component.ts

@ -129,7 +129,9 @@ export class ComponentBasicCategoryTreeComponent {
categoryName: '新分类', categoryName: '新分类',
}) })
.subscribe((res) => { .subscribe((res) => {
this.expandedKeys.push(String(parentId))
this.initTree() this.initTree()
this.msg.success(res.desc) this.msg.success(res.desc)
}) })
} }

1
web-admin-app/src/app/components/component-org-tree/component-org-tree.component.ts

@ -154,6 +154,7 @@ export class ComponentOrgTreeComponent implements OnInit {
onConfirm() { onConfirm() {
if (FormValidators.validateFormGroup(this.form)) { if (FormValidators.validateFormGroup(this.form)) {
const { value } = this.form const { value } = this.form
this.expandedKeys.push(String(this.parentId))
this.api this.api
.saveOrg({ .saveOrg({
...value, ...value,

4
web-admin-app/src/app/components/org-select/org-select.component.ts

@ -70,7 +70,9 @@ export class OrgSelectComponent implements ControlValueAccessor, OnInit {
onTouched = () => {} onTouched = () => {}
onChange(v: NzSafeAny[]) {} onChange(v: NzSafeAny[]) {
console.log('v2', v)
}
writeValue(v: NzSafeAny): void { writeValue(v: NzSafeAny): void {
this.value = v this.value = v

23
web-admin-app/src/app/pages/fixed-asset/alert/alert-borrow/alert-borrow.component.html

@ -3,15 +3,26 @@
<app-server-paginated-table [options]="table" [formGroup]="queryForm" [renderColumn]="renderColumnTpl"> <app-server-paginated-table [options]="table" [formGroup]="queryForm" [renderColumn]="renderColumnTpl">
<ng-template #renderColumnTpl let-data let-key="key" let-row="row"> <ng-template #renderColumnTpl let-data let-key="key" let-row="row">
@switch (key) { @switch (key) {
@case ('status') { @case ('_useUser') {
@switch (data) { {{ data?.userName ?? '-' }}
@case ('0') {
<nz-badge nzStatus="processing" nzText="正常"></nz-badge>
} }
@case ('1') { @case ('_warehouse') {
<nz-badge nzStatus="error" nzText="停用"></nz-badge> {{ data?.name ?? '-' }}
} }
@case ('_position') {
{{ data?.name ?? '-' }}
} }
@case ('_head') {
{{ data?.userName ?? '-' }}
}
@case ('_ownCompany') {
{{ data?.organizationName ?? '-' }}
}
@case ('_useOrganization') {
{{ data?.organizationName ?? '-' }}
}
@case ('_category') {
{{ data?.categoryName ?? '-' }}
} }
@default { @default {
{{ data }} {{ data }}

14
web-admin-app/src/app/pages/fixed-asset/alert/alert-borrow/alert-borrow.component.ts

@ -42,15 +42,13 @@ export class AlertBorrowComponent {
// rowKey: 'id', // rowKey: 'id',
// }) // })
.setColumn([ .setColumn([
{ key: 'roleId', title: '主键', visible: false }, { key: '_category', title: '资产分类', visible: true },
{ key: 'assetCode', title: '资产编号', visible: true },
{ key: 'name', title: '名称', visible: true },
{ key: 'model', title: '规格型号', visible: true },
{ key: 'roleName', title: '资产分类', visible: true }, { key: 'serialNumber', title: '序列号', visible: true },
{ key: 'roleSort', title: '资产编号', visible: true }, { key: 'notes', title: '备注', visible: true },
{ key: 'roleSort', title: '名称', visible: true },
{ key: 'roleSort', title: '规格型号', visible: true },
{ key: 'status', title: '状态', visible: true },
{ key: 'remark', title: '备注', visible: true },
// { key: 'createTime', title: '创建时间', visible: true }, // { key: 'createTime', title: '创建时间', visible: true },
]) ])
} }

10
web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.ts

@ -161,10 +161,12 @@ export class StockakingJobComponent {
stocktakingUserId: data._stocktakingUser?.userId ? [data._stocktakingUser?.userId] : [], stocktakingUserId: data._stocktakingUser?.userId ? [data._stocktakingUser?.userId] : [],
head: data._head?.userId ? [data._head?.userId] : [], head: data._head?.userId ? [data._head?.userId] : [],
useUserId: data._useUser?.userId ? [data._useUser?.userId] : [], useUserId: data._useUser?.userId ? [data._useUser?.userId] : [],
categoryId: data._category?.categoryId, categoryId: data._category?.categoryId ? String(data._category?.categoryId) : null,
positionId: data._position?.positionId, positionId: data._position?.positionId ? String(data._position?.positionId) : null,
ownCompanyId: data._ownCompany?.organizationId, ownCompanyId: data._ownCompany?.organizationId ? String(data._ownCompany?.organizationId) : null,
useOrganizationId: data._useOrganization?.organizationId, useOrganizationId: data._useOrganization?.organizationId
? String(data._useOrganization?.organizationId)
: null,
warehouseId: data._warehouse?.warehouseId, warehouseId: data._warehouse?.warehouseId,
}) })
} }

11
web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts

@ -158,12 +158,13 @@ export class StockakingPlanComponent {
stocktakingUserId: data._stocktakingUser?.userId ? [data._stocktakingUser?.userId] : [], stocktakingUserId: data._stocktakingUser?.userId ? [data._stocktakingUser?.userId] : [],
head: data._head?.userId ? [data._head?.userId] : [], head: data._head?.userId ? [data._head?.userId] : [],
useUserId: data._useUser?.userId ? [data._useUser?.userId] : [], useUserId: data._useUser?.userId ? [data._useUser?.userId] : [],
categoryId: data._category?.categoryId, categoryId: data._category?.categoryId ? String(data._category?.categoryId) : null,
positionId: data._position?.positionId, positionId: data._position?.positionId ? String(data._position?.positionId) : null,
ownCompanyId: data._ownCompany?.organizationId, ownCompanyId: data._ownCompany?.organizationId ? String(data._ownCompany?.organizationId) : null,
useOrganizationId: data._useOrganization?.organizationId, useOrganizationId: data._useOrganization?.organizationId
? String(data._useOrganization?.organizationId)
: null,
warehouseId: data._warehouse?.warehouseId, warehouseId: data._warehouse?.warehouseId,
status: data.status === 1,
}) })
} }
this.drawerRef = this.drawer.create({ this.drawerRef = this.drawer.create({

2
web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html

@ -23,7 +23,7 @@
} }
@case ('urgency') { @case ('urgency') {
<nz-tag> <nz-tag>
{{ data === 2 ? '紧急' : '普通' }} {{ row.procVars.urgency === 2 ? '紧急' : '普通' }}
</nz-tag> </nz-tag>
} }
@default { @default {

2
web-admin-app/src/app/pages/flow/flow-my-finished/flow-my-finished.component.html

@ -16,7 +16,7 @@
} }
@case ('urgency') { @case ('urgency') {
<nz-tag> <nz-tag>
{{ data === 2 ? '紧急' : '普通' }} {{ row.procVars.urgency === 2 ? '紧急' : '普通' }}
</nz-tag> </nz-tag>
} }
@default { @default {

2
web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html

@ -23,7 +23,7 @@
} }
@case ('urgency') { @case ('urgency') {
<nz-tag> <nz-tag>
{{ data === 2 ? '紧急' : '普通' }} {{ row.procVars.urgency === 2 ? '紧急' : '普通' }}
</nz-tag> </nz-tag>
} }
@default { @default {

2
web-admin-app/src/app/pages/org-setting/org-setting.component.ts

@ -124,7 +124,7 @@ export class OrgSettingComponent implements OnInit {
onCreate(data?: NzSafeAny) { onCreate(data?: NzSafeAny) {
if (data) { if (data) {
this.createForm.patchValue({ ...data, roleId: data._umsRole.roleId }) this.createForm.patchValue({ ...data, roleId: data._umsRole?.roleId })
} }
this.drawerRef = this.drawer.create({ this.drawerRef = this.drawer.create({
nzTitle: data ? '编辑员工' : '新增员工', nzTitle: data ? '编辑员工' : '新增员工',

2
web-admin-app/src/app/shared/permission/permission.directive.ts

@ -21,7 +21,7 @@ export class PermissionDirective {
private checkPermission(): void { private checkPermission(): void {
const hasPermission = const hasPermission =
this.permissionService.isRoot || this.permissionService.hasPermission(this.requiredPermission) this.permissionService.isRoot || this.permissionService.hasPermission(this.requiredPermission)
console.log('hasPermission', this.permissionService) // console.log('hasPermission', this.permissionService)
if (hasPermission) { if (hasPermission) {
this.viewContainerRef.createEmbeddedView(this.templateRef) this.viewContainerRef.createEmbeddedView(this.templateRef)
} else { } else {

2
web-admin-app/src/app/shared/permission/permission.guard.ts

@ -12,7 +12,7 @@ export const permissionGuard: CanActivateFn = (route, state) => {
return true return true
} }
const redirectTo = route.data?.['permission']?.redirectTo const redirectTo = route.data?.['permission']?.redirectTo
console.log('redirectTo', redirectTo) // console.log('redirectTo', redirectTo)
if (redirectTo) { if (redirectTo) {
return router.createUrlTree([redirectTo]) return router.createUrlTree([redirectTo])
} }

Loading…
Cancel
Save