This commit is contained in:
wangshiming
2021-12-13 13:16:52 +08:00
parent c4b249fe94
commit abafcd8326
10 changed files with 139 additions and 75 deletions

View File

@ -1,3 +1,11 @@
<!--
* @Author: your name
* @Date: 2021-12-13 10:47:28
* @LastEditTime: 2021-12-13 11:24:23
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\user\user.component.html
-->
<!-- 页头 -->
<page-header-wrapper [title]="'员工列表'"></page-header-wrapper>
<nz-card>

View File

@ -78,7 +78,7 @@ export class FreightComponentsUserComponent implements OnInit {
});
}
userAction(status: number) {
userAction(status: number, item: any) {
this.modal.warning({
nzTitle: status === 1 ? '确定启用该用户吗?' : '确定冻结该用户吗?',
nzContent:
@ -86,7 +86,15 @@ export class FreightComponentsUserComponent implements OnInit {
? '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作'
: '启用后,该用户将恢复正常使用功能,请再次确认',
nzOnOk: () => {
// this.service.request(this.service.$api_lock_user)
console.log(item)
const params = {
appUserId: [item.appUserId],
telephone: item.telephone,
freezeOrResume: status === 0 ? true : false
}
this.service.request(this.service.$api_audit_freezeOrResume, params).subscribe((res: any) => {
this.st.reload();
})
this.st.reload();
}
});
@ -219,12 +227,12 @@ export class FreightComponentsUserComponent implements OnInit {
{
text: '冻结',
iif: item => item.stateLocked === 0,
click: (item: any) => this.userAction(0)
click: (item: any) => this.userAction(0, item)
},
{
text: '启用',
iif: item => item.stateLocked === 1,
click: (item: any) => this.userAction(1)
click: (item: any) => this.userAction(1, item)
}
]
}