diff --git a/src/app/routes/sys-setting/components/cart-config/cart-config-action-modal/cart-config-action-modal.component.ts b/src/app/routes/sys-setting/components/cart-config/cart-config-action-modal/cart-config-action-modal.component.ts
index e891497d..065689a8 100644
--- a/src/app/routes/sys-setting/components/cart-config/cart-config-action-modal/cart-config-action-modal.component.ts
+++ b/src/app/routes/sys-setting/components/cart-config/cart-config-action-modal/cart-config-action-modal.component.ts
@@ -22,23 +22,44 @@ export class CartConfigActionModalComponent implements OnInit {
};
@Input()
configType: number = 1;
+ @Input()
+ params = {};
+ dictKey = '';
constructor(private modal: NzModalRef, public service: SystemService) {}
ngOnInit(): void {
this.initSF(this.i);
- console.log(this.configType);
}
initSF(staff: any) {
- let required: any = [];
+ let option: any = {};
switch (this.configType) {
case 1:
- required = ['phone1'];
+ option = {
+ title: '车型',
+ ui: {
+ placeholder: '请输入'
+ }
+ };
+ this.dictKey = 'car:model';
break;
case 2:
- required = ['phone2'];
+ option = {
+ title: '车长',
+ ui: {
+ placeholder: '请输入',
+ addOnAfter: '米'
+ } as SFStringWidgetSchema
+ };
+ this.dictKey = 'car:length';
break;
case 3:
- required = ['phone3'];
+ option = {
+ title: '物品名称',
+ ui: {
+ placeholder: '请输入'
+ }
+ };
+ this.dictKey = 'car:model';
break;
default:
@@ -46,48 +67,25 @@ export class CartConfigActionModalComponent implements OnInit {
}
this.schema = {
properties: {
- phone1: {
- title: '车型',
+ itemValue: {
+ ...option,
type: 'string',
- ui: {
- placeholder: '请输入',
- hidden: this.configType === 2 || this.configType === 3
- },
- default: staff.phone1
+ default: staff.itemValue
},
- phone2: {
- title: '车长',
- type: 'string',
- ui: {
- placeholder: '请输入',
- addOnAfter: '米',
- hidden: this.configType === 1 || this.configType === 3
- } as SFStringWidgetSchema,
- default: staff.phone2
- },
- phone3: {
- title: '物品名称',
- type: 'string',
- ui: {
- placeholder: '请输入',
- hidden: this.configType === 1 || this.configType === 2
- },
- default: staff.phone3
- },
- roleId: {
+ stateLocked: {
type: 'string',
title: '状态',
enum: [
- { label: '启用', value: 1 },
- { label: '停用', value: 0 }
+ { label: '启用', value: false },
+ { label: '停用', value: true }
],
ui: {
widget: 'radio'
} as SFRadioWidgetSchema,
- default: staff?.roleId || 1
+ default: staff?.stateLocked || false
}
},
- required: required
+ required: ['itemValue']
};
}
@@ -95,26 +93,27 @@ export class CartConfigActionModalComponent implements OnInit {
if (this.i.id === 0) {
const params: any = {
...this.sf.value,
- roleId: this.sf.value.roleId,
- telephone: this.sf.value.phone,
- staffName: this.sf.value.name
+ ...this.params,
+ dictKey: this.dictKey,
+ itemData: this.sf.value.itemValue
};
- // this.service.request(this.service.$api_addStaff, params).subscribe((res) => {
- // console.log(res);
- // if (res) {
- // this.service.msgSrv.success('保存成功!');
- // this.modal.close(true);
- // }
- // // this.showInviteFlag = true;
- // // this.inviteCode = res.inviteCode;
- // });
+ this.service.request(this.service.$api_add_dict, params).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('保存成功!');
+ this.modal.close(true);
+ }
+ });
} else {
const params: any = {
- appUserId: this.i.appUserId,
- staffName: this.sf.value.name,
- roleId: this.sf.value.roleId,
- telephone: this.i.telephone
+ ...this.i,
+ ...this.sf.value
};
+ this.service.request(this.service.$api_update_dict, params).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('保存成功!');
+ this.modal.close(true);
+ }
+ });
}
}
diff --git a/src/app/routes/sys-setting/components/cart-config/cart-config.component.html b/src/app/routes/sys-setting/components/cart-config/cart-config.component.html
index 755e4a0a..f58a18d7 100644
--- a/src/app/routes/sys-setting/components/cart-config/cart-config.component.html
+++ b/src/app/routes/sys-setting/components/cart-config/cart-config.component.html
@@ -25,9 +25,9 @@
-
+ [loading]="service.http.loading" [scroll]="{ y: '370px' }">
\ No newline at end of file
diff --git a/src/app/routes/sys-setting/components/cart-config/cart-config.component.ts b/src/app/routes/sys-setting/components/cart-config/cart-config.component.ts
index b56ee7a1..d0ee30ab 100644
--- a/src/app/routes/sys-setting/components/cart-config/cart-config.component.ts
+++ b/src/app/routes/sys-setting/components/cart-config/cart-config.component.ts
@@ -33,7 +33,6 @@ export class CartConfigComponent implements OnInit {
}
];
tabType = 1;
- url = `/rule?_allow_anonymous=true`;
searchSchema: SFSchema = {
properties: {
@@ -77,24 +76,22 @@ export class CartConfigComponent implements OnInit {
};
columns: STColumn[] = [
- { title: '车型', index: 'no', iif: () => this.tabType === 1 },
- { title: '车长', index: 'no', iif: () => this.tabType === 2 },
- { title: '物品名称', index: 'no', iif: () => this.tabType === 3 },
+ { title: '车型', index: 'itemValue', iif: () => this.tabType === 1 },
+ { title: '车长', index: 'itemValue', iif: () => this.tabType === 2 },
+ { title: '物品名称', index: 'itemValue', iif: () => this.tabType === 3 },
{
title: '启用状态',
className: 'text-center',
- index: 'status',
+ index: 'stateLocked',
type: 'badge',
badge: {
- 0: { text: '启用', color: 'success' },
- 2: { text: '禁用', color: 'error' },
- 3: { text: '禁用', color: 'error' },
- 1: { text: '禁用', color: 'error' }
+ false: { text: '启用', color: 'success' },
+ true: { text: '禁用', color: 'error' }
}
},
{
title: '创建时间',
- index: 'updatedAt',
+ index: 'modifyTime',
type: 'date'
},
{
@@ -112,9 +109,24 @@ export class CartConfigComponent implements OnInit {
}
];
- selectedRows: any[] = [];
+ get reqParams() {
+ let params = {};
+ switch (this.tabType) {
+ case 1:
+ Object.assign(params, { dictKey: 'car:model', itemValue: this.sf?.value.params1 });
+ break;
+ case 2:
+ Object.assign(params, { dictKey: 'car:length', itemValue: this.sf?.value.params2 });
+ break;
+ case 3:
+ Object.assign(params, { dictKey: 'car:model', itemValue: this.sf?.value.params3 });
+ break;
- reqParams = { pageIndex: 1, pageSize: 10 };
+ default:
+ break;
+ }
+ return { ...params };
+ }
constructor(public service: SystemService, private nzModalService: NzModalService) {}
@@ -133,27 +145,18 @@ export class CartConfigComponent implements OnInit {
}, 500);
}
- stChange(e: STChange): void {
- switch (e.type) {
- case 'checkbox':
- this.selectedRows = e.checkbox!;
- break;
- case 'filter':
- this.st.load();
- break;
- }
- }
-
configAction(item?: any) {
const modal = this.nzModalService.create({
nzContent: CartConfigActionModalComponent,
nzComponentParams: item
- ? { i: { ...item, roleId: 1, phone1: '车辆审核', phone2: '车辆审核', phone3: '车辆审核' }, configType: this.tabType }
- : { i: { id: 0 }, configType: this.tabType },
+ ? { i: { ...item }, configType: this.tabType }
+ : { i: { id: 0 }, configType: this.tabType, params: { itemKey: this.st.total + 1 } },
nzFooter: null
});
modal.afterClose.subscribe(res => {
- this.st.load();
+ if (res) {
+ this.st.load();
+ }
});
}
@@ -162,7 +165,14 @@ export class CartConfigComponent implements OnInit {
nzTitle: '确认删除?',
nzClosable: false,
nzCancelText: '取消',
- nzOnOk: () => {}
+ nzOnOk: () => {
+ this.service.request(this.service.$api_delete_dict_by_ids, [item.id]).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('删除配置成功');
+ this.st.load();
+ }
+ });
+ }
});
}
/**
diff --git a/src/app/routes/sys-setting/services/system.service.ts b/src/app/routes/sys-setting/services/system.service.ts
index 99a0c00b..193d58dc 100644
--- a/src/app/routes/sys-setting/services/system.service.ts
+++ b/src/app/routes/sys-setting/services/system.service.ts
@@ -17,6 +17,15 @@ export class SystemService extends BaseService {
$api_delete_staff = '/api/mdc/cuc/userApp/deleteAppUser';
// 冻结或恢复员工
$api_free_or_resume_staff = '/api/mdc/cuc/userApp/freezeOrResumeStaff';
+
+ // 查询字典选项列表
+ $api_get_dict_page = '/api/mdc/pbc/dictItems/list/page';
+ // 根据id批量删除字典选项
+ $api_delete_dict_by_ids = '/api/mdc/pbc/dictItems/deleteBatchByIds';
+ // 新增字典选项
+ $api_add_dict = '/api/mdc/pbc/dictItems/save';
+ // 更新字典选项
+ $api_update_dict = '/api/mdc/pbc/dictItems/update';
$api_getAllFunctionInfoByAppId: string = '';
diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.html b/src/app/routes/usercenter/components/driver/detail/detail.component.html
index 8c5eb1a0..6cc0afb8 100644
--- a/src/app/routes/usercenter/components/driver/detail/detail.component.html
+++ b/src/app/routes/usercenter/components/driver/detail/detail.component.html
@@ -252,7 +252,7 @@
关联企业
+ [res]="{ reName: { list: 'data' } }" style="width: 100%;">
diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.less b/src/app/routes/usercenter/components/driver/detail/detail.component.less
index 23a3e79e..3fc40149 100644
--- a/src/app/routes/usercenter/components/driver/detail/detail.component.less
+++ b/src/app/routes/usercenter/components/driver/detail/detail.component.less
@@ -20,5 +20,14 @@
}
}
+
+ .imgBox {
+ display: flex;
+
+ img {
+ width : 200px !important;
+ height: 160px;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.ts b/src/app/routes/usercenter/components/driver/detail/detail.component.ts
index e8ce8bcf..6978f3e4 100644
--- a/src/app/routes/usercenter/components/driver/detail/detail.component.ts
+++ b/src/app/routes/usercenter/components/driver/detail/detail.component.ts
@@ -82,11 +82,11 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
}
});
// 获取载具信息
- // this.service.request(this.service.$api_get_driver_car_license, { appUserId: this.route.snapshot.params.id }).subscribe(res => {
- // if (res) {
- // this.carList = res;
- // }
- // });
+ this.service.request(this.service.$api_get_driver_car_license, { appUserId: [this.route.snapshot.params.id] }).subscribe(res => {
+ if (res) {
+ this.carList = res;
+ }
+ });
}
/** 启用/冻结司机 */
diff --git a/src/app/routes/usercenter/components/driver/driver.component.html b/src/app/routes/usercenter/components/driver/driver.component.html
index f16163bc..568fcba3 100644
--- a/src/app/routes/usercenter/components/driver/driver.component.html
+++ b/src/app/routes/usercenter/components/driver/driver.component.html
@@ -8,7 +8,7 @@
-
+
diff --git a/src/app/routes/usercenter/components/driver/driver.component.ts b/src/app/routes/usercenter/components/driver/driver.component.ts
index 92a7ad9e..1c073f7c 100644
--- a/src/app/routes/usercenter/components/driver/driver.component.ts
+++ b/src/app/routes/usercenter/components/driver/driver.component.ts
@@ -89,6 +89,11 @@ export class UserCenterComponentsDriverComponent implements OnInit {
this._$expand = false;
}
+ exportList() {
+ const params = this.reqParams;
+ this.service.downloadFile(this.service.$api_export_driver, params);
+ }
+
private initSF(): SFSchema {
return {
properties: {
@@ -213,6 +218,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
index: 'identityStatus',
type: 'badge',
badge: {
+ '-1': { text: '未提交', color: 'default' },
0: { text: '待审核', color: 'default' },
1: { text: '通过', color: 'success' },
2: { text: '驳回', color: 'warning' }
@@ -224,6 +230,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
index: 'driverLicenseStatus',
type: 'badge',
badge: {
+ '-1': { text: '未提交', color: 'default' },
10: { text: '待审核', color: 'default' },
20: { text: '审核通过', color: 'success' },
30: { text: '驳回', color: 'warning' },
@@ -236,6 +243,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
index: 'practiceSenioritLicenseStatus',
type: 'badge',
badge: {
+ '-1': { text: '未提交', color: 'default' },
10: { text: '待审核', color: 'default' },
20: { text: '审核通过', color: 'success' },
30: { text: '驳回', color: 'warning' },
diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.html b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.html
index 39683ab6..7f03b3b5 100644
--- a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.html
+++ b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.html
@@ -10,7 +10,8 @@
-
+
-
@@ -54,29 +56,49 @@
nzType="close-circle" nzTheme="fill" class="mr-xs">驳回
- 审核通过
- 驳回审核
- 修改
+
+
+ 取消
+
+
+ 保存
+
+
+
+ 审核通过
+ 驳回审核
+ 修改
+
- {{ userIdentityDetail?.name }}
+
- {{ userIdentityDetail?.certificateNumber }}
+
-
-
+
+
+
+
+
+
关联企业
-
+
+
@@ -99,4 +121,27 @@
+
+
+
+
+
+
+
+ 上传
+
+
+
![]()
+
+
+
+
\ No newline at end of file
diff --git a/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts b/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts
index 4b551384..b1dd7c16 100644
--- a/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts
+++ b/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts
@@ -1,10 +1,12 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
+import { apiConf } from '@conf/api.conf';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
+import { ImageViewComponent } from 'src/app/shared/components/imagelist';
import { UsermanageService } from '../../../../services/usercenter.service';
@Component({
@@ -18,29 +20,27 @@ export class FreightComponentsUserDetailComponent implements OnInit {
userDetail: any = {};
userIdentityDetail: any = {};
+ tempalateUserIdentityDetail = { ...this.userIdentityDetail };
@ViewChild('st', { static: false }) st!: STComponent;
columns: STColumn[] = [
- { title: '企业名称', index: 'perPrice', width: 300, className: 'text-center' },
- { title: '项目名称', index: 'goodsQuantity', width: 300, className: 'text-center' },
- { title: '角色', index: 'totalPrice', width: 300, className: 'text-center' }
+ { title: '企业名称', className: 'text-center', index: 'enterpriseName' },
+ { title: '项目名称', className: 'text-center', index: 'projectName' },
+ { title: '角色', className: 'text-center', index: 'roleName' }
];
approvalOpinion = '';
reasonTags = ['身份证照片太丑', '姓名与身份证号不匹配'];
- constructor(private nzModalService: NzModalService, public service: UsermanageService, private route: ActivatedRoute) {}
+
+ isEditUser = false;
+ uploadURl = apiConf.waterFileUpload;
+ disabledUpload = false;
+ constructor(private nzModalService: NzModalService, public service: UsermanageService, public route: ActivatedRoute) {}
ngOnInit() {
this.initData();
// this.launchSign();
}
async initData() {
- console.log(this.route.snapshot, 'this.route.snapshot');
-
- const params = {
- id: this.route.snapshot.params.id
- // tenantId: this.route.snapshot.queryParams.tenantId,
- };
-
// 获取司机头部信息
this.service
.request(this.service.$api_get_user_detail, {
@@ -59,6 +59,7 @@ export class FreightComponentsUserDetailComponent implements OnInit {
.subscribe(res => {
if (res) {
this.userIdentityDetail = res;
+ this.tempalateUserIdentityDetail = { ...this.userIdentityDetail };
}
});
}
@@ -71,8 +72,19 @@ export class FreightComponentsUserDetailComponent implements OnInit {
? '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作'
: '启用后,该用户将恢复正常使用功能,请再次确认',
nzOnOk: () => {
- // this.service.request(this.service.$api_lock_user)
- this.st.reload();
+ 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();
+ });
}
});
}
@@ -118,7 +130,62 @@ export class FreightComponentsUserDetailComponent implements OnInit {
});
}
- ratify() {}
+ /**
+ * 开启修改
+ * @param type 修改类型
+ */
+ ratify() {
+ this.isEditUser = true;
+ }
+
+ /**
+ * 需求修改
+ * @param type 修改类型
+ */
+ reset() {
+ this.userIdentityDetail = { ...this.tempalateUserIdentityDetail };
+ this.isEditUser = false;
+ }
+
+ saveUser() {
+ const params = { ...this.userIdentityDetail };
+ this.service.request(this.service.$api_update_driver_identity, params).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('修改成功');
+ this.isEditUser = false;
+ this.initData();
+ }
+ });
+ }
+
+ 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;
+ }
+ }
+
+ showImg(url: any) {
+ const params = {
+ imgList: [url],
+ index: 0
+ };
+ this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
+ }
+
+ deleteImg(data: any, key: string, key2: string) {
+ this.nzModalService.warning({
+ nzTitle: '是否确认删除该图片',
+ nzOnOk: () => {
+ this.disabledUpload = true;
+ data[key] = '';
+ data[key2] = '';
+ setTimeout(() => {
+ this.disabledUpload = false;
+ }, 100);
+ }
+ });
+ }
goBack() {
window.history.go(-1);
diff --git a/src/app/routes/usercenter/services/usercenter.service.ts b/src/app/routes/usercenter/services/usercenter.service.ts
index d9fd671b..00e99631 100644
--- a/src/app/routes/usercenter/services/usercenter.service.ts
+++ b/src/app/routes/usercenter/services/usercenter.service.ts
@@ -66,7 +66,7 @@ export class UsermanageService extends BaseService {
// 司机详情查看-从业资格证信息
$api_get_driver_practice_seniority = '/api/mdc/cuc/driver/getDriversPracticeSeniority';
// 司机详情查看-载具信息
- $api_get_driver_car_license = '/api/mdc/cuc/driver/getUserCarLicense';
+ $api_get_driver_car_license = '/api/mdc/cuc/carLicense/getUserCatListByUserIds';
// 司机详情查看-获取用户关联的企业项目角色信息
$api_get_driver_projects = '/api/mdc/cuc/user/getEnterpriceProjectInfo';
@@ -94,6 +94,11 @@ export class UsermanageService extends BaseService {
// 根据地区code查询列表
$api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode';
+ // 导出企业
+ $api_export_enterprise = '/api/mdc/cuc/enterpriseInfo/operate/export';
+ // 司机列表导出
+ $api_export_driver = '/api/mdc/cuc/driver/export';
+
constructor(public injector: Injector, private nzModalService: NzModalService) {
super(injector);
}
diff --git a/src/app/shared/services/business/user.service.ts b/src/app/shared/services/business/user.service.ts
index ce398dbc..c735a014 100644
--- a/src/app/shared/services/business/user.service.ts
+++ b/src/app/shared/services/business/user.service.ts
@@ -145,8 +145,8 @@ export class EAUserService extends BaseService {
*/
async loadUserMenus() {
return this.asyncRequest('assets/mocks/menu-data.json', {}, 'GET').then(res => {
- this.cacheSrv.set(cacheConf.menu, res.menu);
- this.menuService.add(res.menu);
+ this.cacheSrv.set(cacheConf.menu, res.menu);
+ this.menuService.add(res.menu);
});
// this.request('assets/mocks/menu-data.json', {}, 'GET').subscribe((res: any) => {
// this.cacheSrv.set(cacheConf.menu, res.menu);