Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -21,13 +21,13 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
sf!: SFComponent;
|
||||
spuStatus = '1';
|
||||
|
||||
data=[{name1:1111}]
|
||||
data = [{ name1: 1111 }]
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: ChannelSalesService,
|
||||
private modalService: NzModalService
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -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),
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -109,10 +120,10 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
|
||||
add() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzWidth:600,
|
||||
nzWidth: 600,
|
||||
nzTitle: '新增',
|
||||
nzContent: ParterChannelSalesEditComponent,
|
||||
nzComponentParams: {sts: 'add'}
|
||||
nzComponentParams: { sts: 'add' }
|
||||
});
|
||||
modalRef.afterClose.subscribe(res => {
|
||||
if (res) {
|
||||
@ -124,7 +135,7 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
// 编辑
|
||||
edit(record: STData) {
|
||||
const modalRef = this.modalService.create({
|
||||
nzWidth:600,
|
||||
nzWidth: 600,
|
||||
nzTitle: '编辑',
|
||||
nzContent: ParterChannelSalesEditComponent,
|
||||
nzComponentParams: { i: 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