This commit is contained in:
wangshiming
2022-05-09 14:25:30 +08:00
parent 1289bb1963
commit 2e00998b54
3 changed files with 28 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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: '<i>启用确认</i>',
nzContent: `<b>确定启用该账号吗?</br>`,
nzOnOk: () =>
this.service.request(this.service.$api_activeChannelSales, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('启用成功!');
this.st.reload();
}
})
});
}
}
/**
* 重置表单

View File

@ -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) {