车辆对接

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
* @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
* @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
@ -111,14 +111,17 @@ export class OrderManagementService extends ShipperBaseService {
* @returns
*/
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) => {
if (!res) {
return [];
}
const list = res.map((item: any) => ({
label: item.enterpriseName,
value: item.id
label: item.networkTransporterName,
value: item.networkTransporterId
}));
return [{ value: '', label: '全部' }, ...list];
})

View File

@ -169,6 +169,19 @@
[nzPlaceHolder]="isEditDriver?'':'-'" [nzBorderless]="!isEditDriver"
[nzSuffixIcon]="isEditDriver?'calendar':''"></nz-date-picker>
</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">
<ng-container
*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;
userIdentityDetail: any = {};
tempalateUserIdentityDetail = { ...this.userIdentityDetail };
driverDetail: any = {};
driverDetail: any = {
licenseNo: '',
driverModel: '',
validStartTime: '',
validEndTime: '',
signingOrganization: '',
certificatePhotoWatermark: ''
};
tempalateDriverData = { ...this.driverDetail };
licenseDetail: any = {};
licenseDetail: any = {
licenseNo: '',
validStartTime: '',
validEndTime: '',
certificatePhotoWatermark: '',
regionCode: '',
};
tempalateLicenseDetail = { ...this.licenseDetail };
columns: STColumn[] = [
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' },
@ -36,6 +49,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
redectModal!: any;
@ViewChild('rejectedDriverModal', { static: false })
rejectedDriverModal!: any;
adressCodeList: any = [];
approvalOpinion = '';
isEditUser = false;
@ -52,6 +66,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
ngOnInit() {
this.initData();
this.initDetailByCode();
}
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 => {
if (res) {
if (res?.id) {
console.log('driverDetail' ,res);
this.driverDetail = res;
this.tempalateDriverData = { ...this.driverDetail };
}
});
// 获取从业资格证信息
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.tempalateLicenseDetail = { ...this.licenseDetail };
}
@ -213,6 +229,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
*/
ratify(type: number) {
if (type) {
console.log(this.driverDetail)
this.isEditDriver = true;
} else {
this.isEditUser = true;
@ -233,17 +250,33 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
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() {
console.log(this.route.snapshot.params.id)
const driverDetail = this.driverDetail;
const licenseDetail = this.licenseDetail;
console.log(this.driverDetail)
const params = {
userId: this.route.snapshot.params.id,
appUserId: driverDetail.appUserId || this.route.snapshot.params.id,
userDriverLicenseDTO: {
appUserId: driverDetail.appUserId,
appUserId: driverDetail?.appUserId || this.route.snapshot.params.id,
certificatePhoto: driverDetail.certificatePhoto,
certificatePhotoWatermark: driverDetail.certificatePhotoWatermark,
driverModel: driverDetail.driverModel,
@ -260,7 +293,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
: this.datePipe.transform(driverDetail.validStartTime, 'yyyy-MM-dd')
},
userPracticeSeniorityDTO: {
appUserId: licenseDetail.appUserId,
appUserId: licenseDetail.appUserId || this.route.snapshot.params.id,
approvalStatus: licenseDetail.approvalStatus,
certificatePhoto: licenseDetail.certificatePhoto,
certificatePhotoWatermark: licenseDetail.certificatePhotoWatermark,