车辆对接

This commit is contained in:
wangshiming
2021-12-27 21:08:22 +08:00
parent 1a41c2999e
commit 777e5dd101
19 changed files with 746 additions and 136 deletions

View File

@ -0,0 +1,181 @@
<div *ngIf="i">
<page-header-wrapper [title]="''" [logo]="logo" [content]="headerContent">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
<ng-template #headerContent>
<div class="mb-xs" nz-row>
<button nz-button nzType="primary" nzSize="small" nzDanger>{{i?.resourceStatusLabel}}</button>
<h4 class="ml-md">货源编码 : {{ i?.resourceCode }}</h4>
</div>
<div nz-row>
<div nz-col nzSpan="14" class="text-grey-darker">网络货运人:{{i?.enterpriseInfoName}}</div>
<div nz-col nzSpan="10">
<button nz-button (click)="cancleGoodsSource()" *ngIf="i?.resourceStatus === '1'">取消货源</button>
<button nz-button (click)="assignedCar(i)"
*ngIf="i?.resourceStatus === '1' && i?.serviceType === '2'">重新指派</button>
<button nz-button (click)="updatePrice(i)" *ngIf="i?.resourceStatus === '1'">修改单价</button>
<button nz-button nzType="primary" nzGhost (click)="placeOrder(i)">再下一单</button>
</div>
</div>
<div class="mt-sm mb-sm" nz-row>
<div>
<b>总费用:<span class="text-red-light text-md">{{i?.freightPrice | currency}}</span></b>
</div>
</div>
<nz-divider></nz-divider>
<div sv-container *ngIf="i">
<sv label="项目">{{i?.enterpriseProjectId}}</sv>
<sv label="截止时间">{{i?.deadlineTime}}</sv>
<sv label="录单员">{{i?.createUserId}}</sv>
<sv label="调度员">{{i?.dispatchName}} 18100000000 </sv>
<sv label="服务类型">{{i?.serviceTypeLabel}} </sv>
</div>
</ng-template>
</page-header-wrapper>
<nz-card nzTitle="货源进度">
<div class="approval-status">
<div style="width: 60%; margin: 0 auto">
<nz-steps style="width: 70%; margin: 0 auto" [nzLabelPlacement]="'vertical'">
<nz-step [nzStatus]="i?.resourceStatus !== '1'?'finish':'process'" nzIcon="solution"
[nzDescription]="i?.createAt" nzTitle="下单"></nz-step>
<nz-step *ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2' "
[nzStatus]="i?.resourceStatus=== '1'? 'wait':'finish'" nzIcon="file-done"
[nzTitle]="i?.resourceStatus === '2'?'已完结':'完结'"></nz-step>
<nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'"></nz-step>
</nz-steps>
</div>
</div>
</nz-card>
<nz-card nzTitle="基本信息">
<sv-container col="3">
<sv-title>货物信息</sv-title>
<ng-container *ngFor="let item of i?.goodsInfoList">
<sv label="货物名称">
{{item.goodsName}}
</sv>
<sv label="货物数量">
{{item.weight}}顿 | {{item.volume}}方
</sv>
<sv label="剩余">
{{10}}顿 | {{10}}方
</sv>
<sv label="用车需求">
{{item.maxWeight}} | {{item.maxCube}}米
</sv>
<sv label="承运信息">
{{i?.carrierInformationVO?.driverName}} / {{i?.carrierInformationVO?.driverTelephone}} /
{{i?.carrierInformationVO?.driverLicensePlate}}
</sv>
<!-- <sv label="当前指派">
<a (click)="viewCurrentAssign(i)">查看</a>
</sv> -->
</ng-container>
</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="运费信息">
<div>
<div nz-row>
<div *ngFor="let item of i?.goodsInfoVOList" nz-col nzSpan="24">
<div>
<p class="text-warning-light mb-xs text-right">到货后15天内支付运费</p>
<p class="mb-xs text-right">
{{settlementBasis[item?.settlementBasis]}}{{rule[item?.rule]}}</p>
</div>
<nz-divider class="mb-xs mt-xs"></nz-divider>
<div class="text-right">
<label>单价:</label>
<span class="text-error-dark text-xxl">{{item?.freightPrice | currency}}
{{freightType[item?.freightType]}}</span>
</div>
</div>
</div>
</div>
</nz-card>
<nz-card nzTitle="关联运单">
<sv-container col="5">
<sv [label]="item.wayBillStatusLabel" *ngFor="let item of i?.wayBillClassifiedStatisticsVOList">
(<span [ngClass]="{ 'text-primary': item?.count > 0 }">{{ item?.count }}</span>)
</sv>
<!-- <sv label="运输中">
(<span [ngClass]="{ 'text-primary': i?.id > 0 }">{{ i?.id }}</span>)
</sv>
<sv label="待签收">
(<span [ngClass]="{ 'text-primary': i?.id > 0 }">{{ i?.id }}</span>)
</sv>
<sv label="已完成">
(<span [ngClass]="{ 'text-primary': i?.id > 0 }">{{ i?.id }}</span>)
</sv>
<sv label="已取消">
(<span [ngClass]="{ 'text-primary': i?.id > 0 }">{{ i?.id }}</span>)
</sv> -->
</sv-container>
</nz-card>
<nz-card nzTitle="补充信息">
<sv-container>
<sv label="是否回单">
{{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}}
</sv>
<sv label="回单类型">
{{i?.supplementaryInformationVO?.receiptTypeLabel}}
</sv>
<sv label="所在地区">
{{i?.supplementaryInformationVO?.area}}
</sv>
<sv label="详细地址">
{{i?.supplementaryInformationVO?.address}}
</sv>
<sv label="备注">
{{i?.supplementaryInformationVO?.remarks}}
</sv>
</sv-container>
</nz-card>
<nz-card nzTitle="操作日志">
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [page]="{ show: false, showSize: false }">
</st>
</nz-card>
</div>

View File

@ -0,0 +1,84 @@
:host {
.source-info {
min-height: 210px;
p {
margin-bottom: .5em;
}
}
.btn-size {
font-size: 14px;
}
.bdr {
border-right: 1px solid #ccc;
}
.bdl {
border-left: 1px solid #ccc;
}
.title {
font-weight: bold;
font-size: 26;
}
.freight-info-box {
width: 95%;
p {
margin-bottom: 5px;
}
}
.freigth-label {
display: inline-block;
width: 50px;
text-align: right;
}
::ng-deep {
.approval-status {
.ant-steps {
width: 70%;
margin: 0 auto;
}
}
}
.handling-info {
min-height: 100px;
border: 1px solid #ccc;
.loading-row {
display: flex;
}
.handling-info-icon {
width: 32px;
height: 32px;
margin-right: 24px;
color: #fff;
line-height: 32px;
text-align: center;
border-radius: 50%;
&.loading-bg {
background-color: #50D4AB;
}
&.unloaing-bg {
background: #F66F6A;
}
}
.info {
flex: 1;
}
.time-info {
margin-left: 56px;
}
}
}

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { SupplyManagementBulkDetailComponent } from './bulk-detail.component';
describe('SupplyManagementBulkDetailComponent', () => {
let component: SupplyManagementBulkDetailComponent;
let fixture: ComponentFixture<SupplyManagementBulkDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [SupplyManagementBulkDetailComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SupplyManagementBulkDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,201 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
// import { PublishGoodsChooseFamifiarComponent } from 'src/app/routes/publish-goods/components/choose-famifiar-bulk/choose-famifiar.component';
import { SupplyManagementService } from '../../services/supply-management.service';
// import { SupplyManagementCurrentAssignmentComponent } from '../current-assignment/current-assignment.component';
import { SupplyManagementUpdatePriceComponent } from '../update-price/update-price.component';
@Component({
selector: 'app-supply-management-bulk-detail',
templateUrl: './bulk-detail.component.html',
styleUrls: ['./bulk-detail.component.less']
})
export class SupplyManagementBulkDetailComponent implements OnInit {
id = this.route.snapshot.params.id;
i: any;
logColumns: STColumn[] = [
{ title: '内容', index: 'theme' },
{ title: '操作人', index: 'operationUserPhone' },
{ title: '操作时间', index: ' createTime' },
];
driverColums: STColumn[] = [
{ title: '司机姓名', index: 'theme' },
{ title: '手机号', index: 'operationUserPhone' },
{ title: '车牌号', index: ' createTime' },
{ title: '承运次数', index: 'operationUserPhone' },
{ title: '承运数量', index: ' createTime' },
{
title: '操作',
fixed: 'right',
width: '200px',
className: 'text-center',
buttons: [
{
text: '移除',
click: (_record) => this.delDiver(_record),
},
],
},
];
status: any = { 1: '待接单', 2: '已接单', 3: '已取消' };
serviceType: any = {
1: '抢单',
2: '指派'
}
freightType: any = {
1: '元/吨',
2: '元/方',
3: '元/车'
} // 运单类型
settlementBasis: any = {
1: '以收获为准',
2: '以发货为准'
} // 结算依据
rule: any = {
1: '保留小数',
2: '抹除小数',
3: '抹除个数'
} // 取整规则
currentStatus = 0;
constructor(
private route: ActivatedRoute,
private msgSrv: NzMessageService,
private service: SupplyManagementService,
private modal: NzModalService,
private router: Router
) {
}
ngOnInit(): void {
this.getGoodsSourceDetail();
}
/**
* 移除司机
*/
delDiver(item: any) {
const { id } = item;
// this.modal.confirm({
// nzTitle: '<i>删除确认</i>',
// nzContent: `请仔细核对,避免误操作!<br>是否删除?</br>`,
// nzOnOk: () => {
// this.service.http.post(this.service.$api_del_driver, { id }).subscribe((res) => {
// if (res) {
// this.service.msgSrv.success('数据删除成功!');
// // this.st1.reload();
// } else {
// this.service.msgSrv.error('删除失败!');
// }
// });
// },
// });
}
/**
* 指派熟车
*/
assignedCar(item: any) {
// const modalRef = this.modal.create({
// nzTitle: '指派熟车',
// nzWidth: '90%',
// nzContent: PublishGoodsChooseFamifiarComponent,
// nzComponentParams: {
// i: this.i,
// },
// nzFooter: null,
// });
}
/**
* 查看当前指派
*/
viewCurrentAssign(item: any) {
// const modalRef = this.modal.create({
// nzTitle: '当前指派',
// nzWidth: '600px',
// nzContent: SupplyManagementCurrentAssignmentComponent,
// nzComponentParams: {
// i: item,
// },
// nzFooter: null,
// });
}
/**
*再下一单
* @param record
*/
placeOrder(record: any) {
this.router.navigate(['./pbg/onecar-publish'], {
queryParams: {
id: record?.id
}
})
}
/**
* 修改货源
*/
updateGoodsSource(record: any) {
this.router.navigate(['./pbg/onecar-publish'], {
queryParams: {
id: record?.id
}
})
}
/**
* 更新单价
*/
updatePrice(item: any) {
const modalRef = this.modal.create({
nzTitle: '修改单价',
nzWidth: '600px',
nzContent: SupplyManagementUpdatePriceComponent,
nzComponentParams: {
record: item,
},
nzFooter: null,
});
modalRef.afterClose.subscribe(res => {
if (res) {
this.getGoodsSourceDetail();
}
})
}
/**
* 取消货源
*/
cancleGoodsSource() {
this.modal.confirm({
nzTitle: '<b>确定取消货源吗?</b>',
nzContent: `<b>取消后不可恢复,谨慎操作</b>`,
nzOnOk: () =>
this.service.request(this.service.$api_cancle_goods_source, { id: this.i.id }).subscribe((res) => {
if (res === true) {
this.service.msgSrv.success('操作成功!');
this.getGoodsSourceDetail();
}
}),
})
}
getGoodsSourceDetail() {
this.service.request(this.service.$api_get_getBulkDetail, { id: this.id }).subscribe(res => {
this.i = res;
this.currentStatus = +this.i?.resourceStatus - 1;
})
}
goBack() {
window.history.go(-1);
}
}

View File

@ -49,7 +49,7 @@
</div>
</div>
</nz-card>
<nz-card nzTitle="装货卸货信息 (一装一卸2">
<nz-card nzTitle="装货卸货信息 (一装一卸)">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">

View File

@ -324,7 +324,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
{
title: '货源编号',
width: '100px',
width: '180px',
className: 'text-center',
render: 'resourceCode'
},
@ -345,21 +345,21 @@ export class SupplyManagementVehicleComponent implements OnInit {
{
title: '装货地',
index: 'loadingAddressArr',
width: '120px'
width: '200px'
},
{
title: '卸货地',
index: 'unloadingAddressArr',
width: '120px'
width: '200px'
},
{
title: '货物名称',
index: 'goodsName',
width: '120px'
width: '150px'
},
{
title: '货物数量',
width: '120px',
width: '130px',
index: 'goodsNumber',
format: item => item.goodsNumber.join('/')
},