车辆对接

This commit is contained in:
wangshiming
2021-12-31 17:32:57 +08:00
parent 5245db0b39
commit 3168fd2dca
3 changed files with 59 additions and 10 deletions

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-03 15:31:52 * @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-30 16:09:00 * @LastEditTime: 2021-12-31 15:26:07
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\services\order-management.service.ts * @FilePath: \tms-obc-web\src\app\routes\order-management\services\order-management.service.ts
@ -111,14 +111,17 @@ export class OrderManagementService extends ShipperBaseService {
* @returns * @returns
*/ */
getNetworkFreightForwarderHistory(params: any) { getNetworkFreightForwarderHistory(params: any) {
return this.request(this.$api_get_getEnterpriseNetTransHis, params).pipe( const param = {
enterpriseIds: params.ids
}
return this.request(this.$api_get_getEnterpriseNetTransHis, param).pipe(
map((res: any) => { map((res: any) => {
if (!res) { if (!res) {
return []; return [];
} }
const list = res.map((item: any) => ({ const list = res.map((item: any) => ({
label: item.enterpriseName, label: item.networkTransporterName,
value: item.id value: item.networkTransporterId
})); }));
return [{ value: '', label: '全部' }, ...list]; return [{ value: '', label: '全部' }, ...list];
}) })

View File

@ -169,6 +169,19 @@
[nzPlaceHolder]="isEditDriver?'':'-'" [nzBorderless]="!isEditDriver" [nzPlaceHolder]="isEditDriver?'':'-'" [nzBorderless]="!isEditDriver"
[nzSuffixIcon]="isEditDriver?'calendar':''"></nz-date-picker> [nzSuffixIcon]="isEditDriver?'calendar':''"></nz-date-picker>
</sv> </sv>
<sv label="公司所在地" col="3">
<ng-container *ngIf="isEditDriver; else cascaderelseTemplate">
<nz-select [(ngModel)]="licenseDetail.regionCode">
<ng-container *ngFor="let item of adressCodeList">
<nz-option [nzValue]="item.regionFullCodes" [nzLabel]="item.regionFullName"></nz-option>
</ng-container>
</nz-select>
</ng-container>
<ng-template #cascaderelseTemplate>
{{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{
detailData?.fullRegionVO?.areaName }}
</ng-template>
</sv>
<sv label="从业资格证照片" col="1"> <sv label="从业资格证照片" col="1">
<ng-container <ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:licenseDetail,status:isEditDriver,key:'certificatePhotoWatermark',key2:'certificatePhoto',hover:'licenseCertificate'}"> *ngTemplateOutlet="uploadTemplate;context:{data:licenseDetail,status:isEditDriver,key:'certificatePhotoWatermark',key2:'certificatePhoto',hover:'licenseCertificate'}">

View File

@ -21,9 +21,22 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
userDetail: any; userDetail: any;
userIdentityDetail: any = {}; userIdentityDetail: any = {};
tempalateUserIdentityDetail = { ...this.userIdentityDetail }; tempalateUserIdentityDetail = { ...this.userIdentityDetail };
driverDetail: any = {}; driverDetail: any = {
licenseNo: '',
driverModel: '',
validStartTime: '',
validEndTime: '',
signingOrganization: '',
certificatePhotoWatermark: ''
};
tempalateDriverData = { ...this.driverDetail }; tempalateDriverData = { ...this.driverDetail };
licenseDetail: any = {}; licenseDetail: any = {
licenseNo: '',
validStartTime: '',
validEndTime: '',
certificatePhotoWatermark: '',
regionCode: '',
};
tempalateLicenseDetail = { ...this.licenseDetail }; tempalateLicenseDetail = { ...this.licenseDetail };
columns: STColumn[] = [ columns: STColumn[] = [
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' }, { title: '企业名称', className: 'text-center', index: 'enterpriseName' },
@ -36,6 +49,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
redectModal!: any; redectModal!: any;
@ViewChild('rejectedDriverModal', { static: false }) @ViewChild('rejectedDriverModal', { static: false })
rejectedDriverModal!: any; rejectedDriverModal!: any;
adressCodeList: any = [];
approvalOpinion = ''; approvalOpinion = '';
isEditUser = false; isEditUser = false;
@ -52,6 +66,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.initData(); this.initData();
this.initDetailByCode();
} }
initData() { initData() {
// 获取司机头部信息 // 获取司机头部信息
@ -69,14 +84,15 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
}); });
// 获取驾驶证信息 // 获取驾驶证信息
this.service.request(this.service.$api_get_driver_license, { appUserId: this.route.snapshot.params.id }).subscribe(res => { this.service.request(this.service.$api_get_driver_license, { appUserId: this.route.snapshot.params.id }).subscribe(res => {
if (res) { if (res?.id) {
console.log('driverDetail' ,res);
this.driverDetail = res; this.driverDetail = res;
this.tempalateDriverData = { ...this.driverDetail }; this.tempalateDriverData = { ...this.driverDetail };
} }
}); });
// 获取从业资格证信息 // 获取从业资格证信息
this.service.request(this.service.$api_get_driver_practice_seniority, { appUserId: this.route.snapshot.params.id }).subscribe(res => { this.service.request(this.service.$api_get_driver_practice_seniority, { appUserId: this.route.snapshot.params.id }).subscribe(res => {
if (res) { if (res?.id) {
this.licenseDetail = res; this.licenseDetail = res;
this.tempalateLicenseDetail = { ...this.licenseDetail }; this.tempalateLicenseDetail = { ...this.licenseDetail };
} }
@ -213,6 +229,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
*/ */
ratify(type: number) { ratify(type: number) {
if (type) { if (type) {
console.log(this.driverDetail)
this.isEditDriver = true; this.isEditDriver = true;
} else { } else {
this.isEditUser = true; this.isEditUser = true;
@ -233,17 +250,33 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
this.isEditUser = false; this.isEditUser = false;
} }
} }
/*
* 根据地区code查询地区详情
* code请求参数
* type参数 name获取省市区名称fullcode获取省市区code
* num参数 1第一个地区选择2第二个地区选择
*/
initDetailByCode() {
// 根据地区code查询地区详情
this.service.request(this.service.$api_get_region_by_code, { regionCode:'' }).subscribe((res: any) => {
console.log(res)
this.adressCodeList = res
})
}
/** /**
* 修改驾驶证,从业资格证信息 * 修改驾驶证,从业资格证信息
*/ */
saveDriver() { saveDriver() {
console.log(this.route.snapshot.params.id)
const driverDetail = this.driverDetail; const driverDetail = this.driverDetail;
const licenseDetail = this.licenseDetail; const licenseDetail = this.licenseDetail;
console.log(this.driverDetail)
const params = { const params = {
userId: this.route.snapshot.params.id, userId: this.route.snapshot.params.id,
appUserId: driverDetail.appUserId || this.route.snapshot.params.id,
userDriverLicenseDTO: { userDriverLicenseDTO: {
appUserId: driverDetail.appUserId, appUserId: driverDetail?.appUserId || this.route.snapshot.params.id,
certificatePhoto: driverDetail.certificatePhoto, certificatePhoto: driverDetail.certificatePhoto,
certificatePhotoWatermark: driverDetail.certificatePhotoWatermark, certificatePhotoWatermark: driverDetail.certificatePhotoWatermark,
driverModel: driverDetail.driverModel, driverModel: driverDetail.driverModel,
@ -260,7 +293,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
: this.datePipe.transform(driverDetail.validStartTime, 'yyyy-MM-dd') : this.datePipe.transform(driverDetail.validStartTime, 'yyyy-MM-dd')
}, },
userPracticeSeniorityDTO: { userPracticeSeniorityDTO: {
appUserId: licenseDetail.appUserId, appUserId: licenseDetail.appUserId || this.route.snapshot.params.id,
approvalStatus: licenseDetail.approvalStatus, approvalStatus: licenseDetail.approvalStatus,
certificatePhoto: licenseDetail.certificatePhoto, certificatePhoto: licenseDetail.certificatePhoto,
certificatePhotoWatermark: licenseDetail.certificatePhotoWatermark, certificatePhotoWatermark: licenseDetail.certificatePhotoWatermark,