From 900fe4fca78caea0447783cb8164cc448d6213cb Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 15:58:02 +0800 Subject: [PATCH] fix bug --- .../components/edit/edit.component.ts | 17 ++++++++++------- .../components/list/list.component.ts | 1 + 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts index 6b143413..bd01de45 100644 --- a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -16,6 +16,7 @@ export class ParterChannelSalesEditComponent implements OnInit { schema!: SFSchema; ui!: SFUISchema; i: any; + sts: any; type: any; record:any; currentOAItem:any; @@ -29,13 +30,15 @@ export class ParterChannelSalesEditComponent implements OnInit { ) {} ngOnInit(): void { - - this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { - if(res){ - this.record = res; - } - this.initSF(); - }); + if(!this.sts) { + this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { + if(res){ + this.record = res; + this.initSF(); + } + }); + } + this.initSF(); } initSF() { diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts index ba7097ec..9c150c22 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.ts +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -112,6 +112,7 @@ export class ParterChannelSalesListComponent implements OnInit { nzWidth:600, nzTitle: '新增', nzContent: ParterChannelSalesEditComponent, + nzComponentParams: {sts: 'add'} }); modalRef.afterClose.subscribe(res => { if (res) {