From 2e00998b54a06be655feb4928f16048624365819 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 9 May 2022 14:25:30 +0800 Subject: [PATCH] fix bug --- .../datascreen/datascreen.component.less | 2 +- .../components/list/list.component.ts | 26 ++++++++++++++++++- .../services/channel-sales.service.ts | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.less b/src/app/routes/datatable/components/datascreen/datascreen.component.less index b6591429..871034c1 100644 --- a/src/app/routes/datatable/components/datascreen/datascreen.component.less +++ b/src/app/routes/datatable/components/datascreen/datascreen.component.less @@ -8,7 +8,7 @@ font-size: 14px; } .ant-table-thead > tr > th, .ant-table-tbody > tr > td, .ant-table tfoot > tr > th, .ant-table tfoot > tr > td { - padding: 0; + padding: 5px; font-size: 12px; } } 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 1939905f..22363457 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 @@ -133,7 +133,13 @@ export class ParterChannelSalesListComponent implements OnInit { acl: { ability: ['channelSales-frozen'] }, iif: (item) => {return item.stateLocked == false}, click: (_record, _modal, _instance) => this.stop(_record), - } + }, + { + text: '启用', + acl: { ability: ['channelSales-frozen'] }, + iif: (item) => {return item.stateLocked == true}, + click: (_record, _modal, _instance) => this.open(_record), + }, ] } ]; @@ -185,6 +191,24 @@ export class ParterChannelSalesListComponent implements OnInit { }); } } + open(record: STData) { + if (record.stateLocked) { + const params = { + id: record.id + } + this.modalService.confirm({ + nzTitle: '启用确认', + nzContent: `确定启用该账号吗?
`, + nzOnOk: () => + this.service.request(this.service.$api_activeChannelSales, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('启用成功!'); + this.st.reload(); + } + }) + }); + } + } /** * 重置表单 diff --git a/src/app/routes/partner/channel-sales/services/channel-sales.service.ts b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts index 6c17a145..7d3a7ca5 100644 --- a/src/app/routes/partner/channel-sales/services/channel-sales.service.ts +++ b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts @@ -21,6 +21,8 @@ export class ChannelSalesService extends BaseService { $api_getChannelSalesInfo = '/api/mdc/channelSalesManagement/getChannelSalesInfo'; // 冻结渠道销售 $api_frozenChannelSales = '/api/mdc/channelSalesManagement/frozenChannelSales'; + // 激活渠道销售 + $api_activeChannelSales = '/api/mdc/channelSalesManagement/activeChannelSales'; constructor(public injector: Injector) {