edit
This commit is contained in:
@ -22,8 +22,6 @@ export class CartConfigActionModalComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
@Input()
|
@Input()
|
||||||
configType: number = 1;
|
configType: number = 1;
|
||||||
@Input()
|
|
||||||
params = {};
|
|
||||||
dictKey = '';
|
dictKey = '';
|
||||||
constructor(private modal: NzModalRef, public service: SystemService) {}
|
constructor(private modal: NzModalRef, public service: SystemService) {}
|
||||||
|
|
||||||
@ -72,7 +70,7 @@ export class CartConfigActionModalComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
default: staff.itemValue
|
default: staff.itemValue
|
||||||
},
|
},
|
||||||
stateLocked: {
|
statePaused: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '状态',
|
title: '状态',
|
||||||
enum: [
|
enum: [
|
||||||
@ -82,7 +80,7 @@ export class CartConfigActionModalComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'radio'
|
widget: 'radio'
|
||||||
} as SFRadioWidgetSchema,
|
} as SFRadioWidgetSchema,
|
||||||
default: staff?.stateLocked || false
|
default: staff?.statePaused || false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
required: ['itemValue']
|
required: ['itemValue']
|
||||||
@ -93,7 +91,6 @@ export class CartConfigActionModalComponent implements OnInit {
|
|||||||
if (this.i.id === 0) {
|
if (this.i.id === 0) {
|
||||||
const params: any = {
|
const params: any = {
|
||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
...this.params,
|
|
||||||
dictKey: this.dictKey,
|
dictKey: this.dictKey,
|
||||||
itemData: this.sf.value.itemValue
|
itemData: this.sf.value.itemValue
|
||||||
};
|
};
|
||||||
|
|||||||
@ -82,7 +82,7 @@ export class CartConfigComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
title: '启用状态',
|
title: '启用状态',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
index: 'stateLocked',
|
index: 'statePaused',
|
||||||
type: 'badge',
|
type: 'badge',
|
||||||
badge: {
|
badge: {
|
||||||
false: { text: '启用', color: 'success' },
|
false: { text: '启用', color: 'success' },
|
||||||
@ -150,7 +150,7 @@ export class CartConfigComponent implements OnInit {
|
|||||||
nzContent: CartConfigActionModalComponent,
|
nzContent: CartConfigActionModalComponent,
|
||||||
nzComponentParams: item
|
nzComponentParams: item
|
||||||
? { i: { ...item }, configType: this.tabType }
|
? { i: { ...item }, configType: this.tabType }
|
||||||
: { i: { id: 0 }, configType: this.tabType, params: { itemKey: this.st.total + 1 } },
|
: { i: { id: 0 }, configType: this.tabType },
|
||||||
nzFooter: null
|
nzFooter: null
|
||||||
});
|
});
|
||||||
modal.afterClose.subscribe(res => {
|
modal.afterClose.subscribe(res => {
|
||||||
|
|||||||
@ -69,8 +69,8 @@ export class FreightComponentsUserDetailComponent implements OnInit {
|
|||||||
nzTitle: status === 1 ? '确定启用该用户吗?' : '确定冻结该用户吗?',
|
nzTitle: status === 1 ? '确定启用该用户吗?' : '确定冻结该用户吗?',
|
||||||
nzContent:
|
nzContent:
|
||||||
status === 1
|
status === 1
|
||||||
? '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作'
|
? '启用后,该用户将恢复正常使用功能,请再次确认'
|
||||||
: '启用后,该用户将恢复正常使用功能,请再次确认',
|
: '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作',
|
||||||
nzOnOk: () => {
|
nzOnOk: () => {
|
||||||
this.service
|
this.service
|
||||||
.request(this.service.$api_lock_or_free_user, {
|
.request(this.service.$api_lock_or_free_user, {
|
||||||
|
|||||||
@ -68,12 +68,14 @@ export class FreightComponentsUserComponent implements OnInit {
|
|||||||
this.service.msgSrv.error('手机格式错误');
|
this.service.msgSrv.error('手机格式错误');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.service.request(this.service.$api_add_user_salesman, { userId: item.userId, mobile: this.promotersTelephone }).subscribe(res => {
|
this.service
|
||||||
if (res) {
|
.request(this.service.$api_add_user_salesman, { userId: item.userId, mobile: this.promotersTelephone })
|
||||||
this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功');
|
.subscribe(res => {
|
||||||
}
|
if (res) {
|
||||||
this.st.load();
|
this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功');
|
||||||
});
|
}
|
||||||
|
this.st.load();
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -84,13 +86,14 @@ export class FreightComponentsUserComponent implements OnInit {
|
|||||||
nzTitle: status === 1 ? '确定启用该用户吗?' : '确定冻结该用户吗?',
|
nzTitle: status === 1 ? '确定启用该用户吗?' : '确定冻结该用户吗?',
|
||||||
nzContent:
|
nzContent:
|
||||||
status === 1
|
status === 1
|
||||||
? '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作'
|
? '启用后,该用户将恢复正常使用功能,请再次确认'
|
||||||
: '启用后,该用户将恢复正常使用功能,请再次确认',
|
: '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作',
|
||||||
nzOnOk: () => {
|
nzOnOk: () => {
|
||||||
this.service
|
this.service
|
||||||
.request(this.service.$api_lock_app_user, {
|
.request(this.service.$api_lock_or_free_user, {
|
||||||
appUserId,
|
appUserId,
|
||||||
freezeOrResume: !!!status
|
freezeOrResume: !!!status,
|
||||||
|
pageName: '货主员工列表'
|
||||||
})
|
})
|
||||||
.subscribe(res => {
|
.subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -229,12 +232,12 @@ export class FreightComponentsUserComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
text: '冻结',
|
text: '冻结',
|
||||||
iif: item => item.stateLocked === 0,
|
iif: item => item.stateLocked === 0,
|
||||||
click: (item: any) => this.userAction(0, [Number(item.appUserId)])
|
click: (item: any) => this.userAction(0, [item.appUserId])
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '启用',
|
text: '启用',
|
||||||
iif: item => item.stateLocked === 1,
|
iif: item => item.stateLocked === 1,
|
||||||
click: (item: any) => this.userAction(1, [Number(item.appUserId)])
|
click: (item: any) => this.userAction(1, [item.appUserId])
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user