Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -90,6 +90,17 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
title: '邀请码',
|
||||
index: 'inviteCode'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
className: 'text-center',
|
||||
index: 'stateLocked',
|
||||
type: 'badge',
|
||||
badge: {
|
||||
true: { text: '冻结', color: 'error' },
|
||||
false: { text: '正常', color: 'success' }
|
||||
},
|
||||
width: 130
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
className: 'text-center',
|
||||
@ -100,7 +111,7 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
text: '冻结',
|
||||
click: (_record, _modal, _instance) => this.stop(_record.id),
|
||||
click: (_record, _modal, _instance) => this.stop(_record),
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -135,22 +146,24 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
stop(id: any) {
|
||||
stop(record: STData) {
|
||||
if (!record.stateLocked) {
|
||||
const params = {
|
||||
id: record.id
|
||||
}
|
||||
this.modalService.confirm({
|
||||
nzTitle: '<i>冻结确认</i>',
|
||||
nzContent: `<b>确定冻结该账号吗?</br>`,
|
||||
// nzOnOk: () =>
|
||||
// this.service.request('', '').subscribe(res => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('冻结成功!');
|
||||
// this.st.reload();
|
||||
// }
|
||||
// })
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_frozenChannelSales, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('冻结成功!');
|
||||
this.st.reload();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
|
||||
@ -19,6 +19,8 @@ export class ChannelSalesService extends BaseService {
|
||||
$api_listChannelSalesManagement = '/api/mdc/channelSalesManagement/list/listChannelSalesManagement';
|
||||
// 根据渠道销售id获取渠道信息
|
||||
$api_getChannelSalesInfo = '/api/mdc/channelSalesManagement/getChannelSalesInfo';
|
||||
// 冻结渠道销售
|
||||
$api_frozenChannelSales = '/api/mdc/channelSalesManagement/frozenChannelSales';
|
||||
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
|
||||
Reference in New Issue
Block a user