This commit is contained in:
Taric Xin
2021-12-15 18:59:52 +08:00
parent 78776dd2ac
commit fbad9c32d8
4 changed files with 45 additions and 51 deletions

View File

@ -94,12 +94,25 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
/** 启用/冻结司机 */
userAction(status: number) {
console.log( this.userDetail );
this.nzModalService.warning({
nzTitle: status === 1 ? '确定启用该司机吗?' : '确定冻结该司机吗?',
nzContent: status === 1 ? '停用后,司机将被限制使用,无法登陆,请谨慎操作!' : '启用后,该司机将恢复正常使用功能,请再次确认!',
nzOnOk: () => {
// this.service.request(this.service.$api_lock_user)
this.initData();
this.service
.request(this.service.$api_lock_or_free_user, {
appUserId: [this.userDetail.appUserId],
freezeOrResume: !!!status,
pageName: '司机详情',
telephone: this.userDetail.phone
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('操作成功');
}
this.initData();
});
}
});
}
@ -303,7 +316,6 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
? userIdentity.validStartTime
: this.datePipe.transform(userIdentity.validStartTime, 'yyyy-MM-dd')
};
console.log(this.userIdentityDetail);
this.service.request(this.service.$api_update_driver_identity, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('修改成功');
@ -315,8 +327,8 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string) {
if (type === 'success') {
data[key] = file.response.data.fullFileWatermarkPath;
data[key2] = file.response.data.fullFilePath;
data[key] = file.response.data?.fullFileWatermarkPath;
data[key2] = file.response.data?.fullFilePath;
}
}