Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
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 => {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button>
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="exportList()">导出</button>
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
|
||||
(click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
|
||||
@ -95,6 +95,11 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit {
|
||||
this._$expand = false;
|
||||
}
|
||||
|
||||
exportList() {
|
||||
const params = this.reqParams;
|
||||
this.service.downloadFile(this.service.$api_export_driver_cap, params);
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
@ -190,7 +195,7 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit {
|
||||
},
|
||||
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },
|
||||
{ title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '自己录入', 2: '货主录入' } },
|
||||
{ title: '注册时间', className: 'text-center', index: 'unifiedSocialCreditCode3' },
|
||||
{ title: '注册时间', className: 'text-center', index: 'createTime' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '170px',
|
||||
|
||||
@ -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])
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -98,6 +98,8 @@ export class UsermanageService extends BaseService {
|
||||
$api_export_enterprise = '/api/mdc/cuc/enterpriseInfo/operate/export';
|
||||
// 司机列表导出
|
||||
$api_export_driver = '/api/mdc/cuc/driver/export';
|
||||
// 车队长导出-运营后台
|
||||
$api_export_driver_cap = '/api/mdc/userDriverExpand/export';
|
||||
|
||||
constructor(public injector: Injector, private nzModalService: NzModalService) {
|
||||
super(injector);
|
||||
|
||||
@ -135,8 +135,8 @@ export class EAUserService extends BaseService {
|
||||
*/
|
||||
async loadUserInfo() {
|
||||
return this.asyncRequest(this.$api_get_user_by_token).then(res => {
|
||||
this.cacheSrv.set(cacheConf.user, res.data);
|
||||
this.settings.setUser(res.data);
|
||||
this.cacheSrv.set(cacheConf.user, res);
|
||||
this.settings.setUser(res);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user