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