车辆对接

This commit is contained in:
wangshiming
2021-12-28 10:51:30 +08:00
parent 269355e7bc
commit ec51030da0
8 changed files with 111 additions and 135 deletions

View File

@ -56,16 +56,16 @@
<sv-title>货物信息</sv-title>
<ng-container *ngFor="let item of i?.goodsInfoList">
<sv label="货物名称">
{{item.goodsName}}
{{item?.goodsName}}
</sv>
<sv label="货物数量">
{{item.weight}}顿 | {{item.volume}}方
{{item?.weight}}顿 | {{item?.volume}}方
</sv>
<sv label="剩余">
{{10}}顿 | {{10}}方
</sv>
<sv label="用车需求">
{{item.maxWeight}} | {{item.maxCube}}米
{{item?.maxWeight}} | {{item?.maxCube}}米
</sv>
<sv label="承运信息">
{{i?.carrierInformationVO?.driverName}} / {{i?.carrierInformationVO?.driverTelephone}} /
@ -88,11 +88,11 @@
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">
<div class="flex" *ngFor="let item of i?.unLoadingPlaceVOList">
<div *ngIf="item.type === '1'" class="loading-row">
<div *ngIf="item?.type === '1'" class="loading-row">
<div class="handling-info-icon loading-bg"></div>
<div class="info">
<h4>装货地:{{item?.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</h4>
<p>联系人:{{item.appUserName}}/{{item.contractTelephone}}</p>
<h4>装货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item?.detailedAddress}}</h4>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
</div>
</div>
</div>
@ -102,11 +102,11 @@
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">
<div class="flex" *ngFor="let item of i?.unLoadingPlaceVOList">
<div *ngIf="item.type === '2'" class="loading-row">
<div *ngIf="item?.type === '2'" class="loading-row">
<div class="handling-info-icon unloaing-bg"></div>
<div class="info">
<h4>卸货地:{{item?.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</h4>
<p>联系人:{{item.appUserName}}/{{item.contractTelephone}}</p>
<h4>卸货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item?.detailedAddress}}</h4>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
</div>
</div>
</div>
@ -138,7 +138,7 @@
</nz-card>
<nz-card nzTitle="关联运单">
<sv-container col="5">
<sv [label]="item.wayBillStatusLabel" *ngFor="let item of i?.wayBillClassifiedStatisticsVOList">
<sv [label]="item?.wayBillStatusLabel" *ngFor="let item of i?.wayBillClassifiedStatisticsVOList">
(<span [ngClass]="{ 'text-primary': item?.count > 0 }">{{ item?.count }}</span>)
</sv>
<!-- <sv label="运输中">

View File

@ -328,49 +328,24 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
maxWeight: {
type: 'string',
title: '车型/车长',
enum: [
{ label: '1', value: '1' },
{ label: '2', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择车型',
widget: 'dict-select',
params: { dictKey: 'car:model' },
mode: 'multiple',
placeholder: '请选择车型',
errors: { required: '请选择车型' }
// asyncData: () =>
// this.categoryService.loadChildData2('0', '2').pipe(
// map((data: any) => {
// return data.map((m: any) => {
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
} as SFSelectWidgetSchema
}
},
maxCube: {
type: 'string',
title: '',
enum: [
{ label: '1', value: '1' },
{ label: '2', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择车长',
widget: 'dict-select',
params: { dictKey: 'car:length' },
mode: 'multiple',
placeholder: '请选择车长',
errors: { required: '请选择车长' }
// asyncData: () =>
// this.categoryService.loadChildData2('0', '2').pipe(
// map((data: any) => {
// return data.map((m: any) => {
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
} as SFSelectWidgetSchema
}
}
},
required: ['weight', 'maxWeight', 'maxCube', 'freightPrice', 'rule', 'settlementBasis']

View File

@ -135,23 +135,22 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
return of([]);
}
},
change: (q: any) => {
this.getRegionCode(q)
},
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
},
enterpriseProjectId: {
title: '项目',
type: 'string',
default: '',
title: '项目',
ui: {
widget: 'select',
visibleIf: {
_$expand: (value: boolean) => value,
},
asyncData: () =>
this.shipperSrv.getEnterpriseProject()
} as SFSelectWidgetSchema,
placeholder: '请选择',
allowClear: true,
} as SFSelectWidgetSchema
},
enterpriseInfoName: {
type: 'string',
@ -288,49 +287,24 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
maxWeight: {
type: 'string',
title: '车型/车长',
enum: [
{ label: '1', value: '1' },
{ label: '2', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择车型',
widget: 'dict-select',
params: { dictKey: 'car:model' },
mode: 'multiple',
placeholder: '请选择车型',
errors: { required: '请选择车型' }
// asyncData: () =>
// this.categoryService.loadChildData2('0', '2').pipe(
// map((data: any) => {
// return data.map((m: any) => {
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
} as SFSelectWidgetSchema
}
},
maxCube: {
type: 'string',
title: '',
enum: [
{ label: '1', value: '1' },
{ label: '2', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择车长',
widget: 'dict-select',
params: { dictKey: 'car:length' },
mode: 'multiple',
placeholder: '请选择车长',
errors: { required: '请选择车长' }
// asyncData: () =>
// this.categoryService.loadChildData2('0', '2').pipe(
// map((data: any) => {
// return data.map((m: any) => {
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
} as SFSelectWidgetSchema
}
}
},
required: ['weight', 'maxWeight', 'maxCube']
@ -357,7 +331,24 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
};
}
// 获取城市列表
getRegionCode(regionCode: any) {
console.log(regionCode)
return this.service
.request(this.service.$api_get_enterprise_project, { id: regionCode })
.pipe(
map((res) =>
res.map((item: any) => ({
label: item.projectName,
value: item.id,
})),
),
)
.subscribe((res) => {
this.sf1.getProperty('/enterpriseProjectId')!.schema.enum = res;
this.sf1.getProperty('/enterpriseProjectId')!.widget.reset(res);
});
}
initSF5() {
this.schema5 = {
properties: {
@ -835,7 +826,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
volume: res?.goodsInfoVOList[0]?.volume ,
vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand ,
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') ,
maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') ,
maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '',
number: res?.goodsInfoVOList[0]?.number ,
goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName ,
modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId ,

View File

@ -49,38 +49,7 @@
</div>
</div>
</nz-card>
<nz-card nzTitle="装货卸货信息 (一装一卸)">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">
<div class="flex" *ngFor="let item of i?.unLoadingPlaceVOList">
<div *ngIf="item.type === '1'" class="loading-row">
<div class="handling-info-icon loading-bg"></div>
<div class="info">
<h4>装货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item.detailedAddress}}</h4>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
</div>
</div>
</div>
<p class="time-info">装货时间:{{i?.loadingTime}}</p>
</div>
</div>
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">
<div class="flex" *ngFor="let item of i?.unLoadingPlaceVOList">
<div *ngIf="item.type === '2'" class="loading-row">
<div class="handling-info-icon unloaing-bg"></div>
<div class="info">
<h4>卸货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item?.detailedAddress}}</h4>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
</div>
</div>
</div>
<p class="time-info">卸货时间:{{i?.unloadingTime}}</p>
</div>
</div>
</div>
</nz-card>
<nz-card nzTitle="基本信息">
<sv-container col="2">
@ -106,6 +75,45 @@
{{i?.carrierInformationVO?.driverLicensePlate}}
</sv>
</sv-container>
<div class="mt-md">
<h4 class="text-md">装货卸货信息
<span class="ml-sm text-sm">(
<label>{{i?.loadingCount}}装</label>
<label>{{i?.unloadingCount}}卸</label>
)
</span>
</h4>
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">
<div class="flex" *ngFor="let item of i?.unLoadingPlaceVOList">
<div *ngIf="item?.type === '1'" class="loading-row">
<div class="handling-info-icon loading-bg"></div>
<div class="info">
<h4>装货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item?.detailedAddress}}</h4>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
</div>
</div>
</div>
<p class="time-info">装货时间:{{i?.loadingTime}}</p>
</div>
</div>
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">
<div class="flex" *ngFor="let item of i?.unLoadingPlaceVOList">
<div *ngIf="item?.type === '2'" class="loading-row">
<div class="handling-info-icon unloaing-bg"></div>
<div class="info">
<h4>卸货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item?.detailedAddress}}</h4>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
</div>
</div>
</div>
<p class="time-info">卸货时间:{{i?.unloadingTime}}</p>
</div>
</div>
</div>
</div>
</nz-card>
<nz-card nzTitle="服务信息">