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