车辆对接

This commit is contained in:
wangshiming
2021-12-20 17:18:40 +08:00
parent f18f512aac
commit 0a31c9eb4e
33 changed files with 1275 additions and 768 deletions

View File

@ -1,134 +0,0 @@
<page-header-wrapper [title]="''" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<div nz-row>
<div nz-col nzSpan="6">
<sv-container class="bdr">
<sv label="货源编号" col="1">{{ dataList?.resourceCode }}</sv>
<sv-title class="text-center text-lg">
<span *ngIf="dataList?.resourceType === 1">待接单</span>
<span *ngIf="dataList?.resourceType === 2">已接单</span>
<span *ngIf="dataList?.resourceType === 3">已取消</span>
</sv-title>
<sv-title>
<div class="">
<a class="btn-size" (click)="modification()">修改单价</a>
<a class="btn-size m-lg mr-lg">取消货源</a>
<a class="btn-size" (click)="nextOrder()">再下一单</a>
</div>
</sv-title>
</sv-container>
</div>
<div nz-col nzSpan="16" class="approval-status">
<nz-steps style="width: 80%; margin: 0 auto" [nzLabelPlacement]="'vertical'">
<nz-step nzStatus="finish" nzIcon="user" [nzDescription]="i?.createAt" nzTitle="下单"></nz-step>
<nz-step nzStatus="finish" nzIcon="user" nzTitle="完结"></nz-step>
</nz-steps>
</div>
</div>
<nz-divider></nz-divider>
<div sv-container >
<sv label="项目名称">{{ dataList?.enterpriseProjectId }}</sv>
<sv label="外部货源号">{{ dataList?.externalResourceCode }}</sv>
<sv label="录单员">{{ dataList?.enterpriseProjectId }}</sv>
<sv label="调度员">{{ dataList?.dispatchName }}</sv>
</div>
<nz-divider></nz-divider>
<div nz-row>
<div nz-col nzSpan="6">
<div class="source-info">
<div *ngFor="let item of dataList?.unLoadingPlaceVOList; let i = index">
<h3 *ngIf="i === 0" style="font-weight: 700;">装卸货信息</h3>
<div *ngIf="item?.type === 1 || item?.type === '1'">
<p>装货地:{{item?.detailedAddress}}</p>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
<p>发货日期:{{item?.createTime}}</p>
</div>
<div *ngIf="item.type === 2 || item.type === '2'">
<p>卸货地:{{item?.detailedAddress}}</p>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
<p>卸货日期:{{item?.modifyTime}}</p>
</div>
</div>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr bdl pl-md">
<h3 style="font-weight: 700;">货物信息</h3>
<div *ngFor="let item of dataList?.goodsInfoVOList; let i = index">
<p>货物名称:{{item?.goodsName}}</p>
<p>货物数量:{{item?.weight}}吨/{{item?.volume}}立方</p>
<p>剩余:{{item?.weight}}吨/{{item?.volume}}立方</p>
<p>用车需求:{{item?.vehicleDemand}}</p>
</div>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr pl-md">
<h3 style="font-weight: 700;">承运信息</h3>
<p>网络货运人:{{dataList?.carrierInformationVO?.enterpriseInfoName}}</p>
<p>服务类型:{{dataList?.carrierInformationVO?.serviceType === 1 ? '抢单' : '指派'}}</p>
<p><a href="javascript:;" (click)="NowAssign()">当前指派</a></p>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr pl-md">
<h3 style="font-weight: 700;">关联运单</h3>
<p>待发车 ({{dataList?.goodsInfoList?.goodsName}})</p>
<p>运输中 ({{dataList?.goodsInfoList?.goodsName}})</p>
<p>待签收 ({{dataList?.goodsInfoList?.goodsName}})</p>
<p>已完成 ({{dataList?.goodsInfoList?.goodsName}})</p>
<p>已取消 ({{dataList?.goodsInfoList?.goodsName}})</p>
</div>
</div>
<div class="source-info pl-md">
<h3 style="font-weight: 700;">补充信息</h3>
<p>备注:{{dataList?.supplementaryInformationVO?.remarks}}</p>
</div>
</div>
<nz-divider></nz-divider>
<div nz-row>
<div class="freight-info-box">
<h3 style="font-weight: 700;">运费信息</h3>
<div class="text-right">
<p style="color: #f9b523;">到货后15天内支付运费</p>
<p>以发货为准,保留小数</p>
</div>
</div>
<nz-divider></nz-divider>
<div class="freight-info-box" nz-row>
<div nz-col nzSpan="24">
<h3 class="text-right"><label>单价 :</label> <span class="text-error-dark text-xl" style="color: red;">{{dataList?.freightPrice }}</span>元/吨</h3>
</div>
</div>
</div>
<nz-divider></nz-divider>
<div nz-row>
<nz-card nzTitle="操作日志" style="width: 100%;">
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
</nz-card>
</div>
</nz-card>
<nz-modal [(nzVisible)]="isVisibleView" [nzWidth]="600" [nzFooter]="nzModalFooterview" nzTitle="当前指派" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<st
#stFloatView
[data]="i?.auditRecordList"
[columns]="columnsFloatView"
[page]="{ show: false, showSize: false }"
>
</st>
</ng-container>
<ng-template #nzModalFooterview>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>
</ng-template>
</nz-modal>

View File

@ -1,37 +0,0 @@
:host{
.btn-size{
font-size: 14px;
}
.bdr{
border-right: 1px solid #ccc;
}
.bdl{
border-left: 1px solid #ccc;
}
.title{
font-size: 26;
font-weight: bold;
}
.source-info{
p{
margin-bottom: .5em;
}
}
.freight-info-box{
width: 95%;
}
.freigth-label{
display: inline-block;
width: 50px;
text-align: right;
}
::ng-deep{
.approval-status{
.ant-steps{
width: 70%;
margin: 0 auto;
}
}
}
}

View File

@ -1,24 +0,0 @@
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

@ -1,146 +0,0 @@
/*
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-13 15:24:41
* @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\supply-management\components\bulk-detail\bulk-detail.component.ts
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { SupplyManagementAddDriversComponent } from '../add-drivers/add-drivers.component';
import { SupplyManagementService } from '../../services/supply-management.service';
@Component({
selector: 'app-supply-management-bulk-detail',
templateUrl: './bulk-detail.component.html',
styleUrls: ['./bulk-detail.component.less']
})
export class SupplyManagementBulkDetailComponent implements OnInit {
isVisibleView = false
id = this.route.snapshot.params.id;
i: any;
logColumns: STColumn[] = [
{ title: '内容', index: 'theme' },
{ title: '操作人', index: 'operationUserPhone' },
{ title: '操作时间', index: ' createTime' },
];
columnsFloatView: STColumn[] = [
{ title: '司机姓名', index: 'theme' },
{ title: '手机号', index: 'operationUserPhone' },
{ title: '车队长', index: ' createTime' },
{ 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),
},
],
},
];
dataList: any;
constructor(
private route: ActivatedRoute,
private msgSrv: NzMessageService,
private service: SupplyManagementService,
private modal: NzModalService,
private router: Router,private ar: ActivatedRoute
) {
}
ngOnInit(): void {
this.getDetailList();
}
// 获取录单员
getDetailList() {
const params = {
id: this.id
};
this.service.request(`${this.service.$api_get_getBulkDetail}`, params).subscribe((res) => {
console.log(res)
this.dataList = res
})
}
/**
* 移除司机
*/
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() {
const modalRef = this.modal.create({
nzTitle: '指派熟车',
nzWidth: '90%',
nzContent: SupplyManagementAddDriversComponent,
nzComponentParams: {
i: this.i,
},
nzFooter: null,
});
}
goBack() {
window.history.go(-1);
}
// 修改货源
modification() {
this.router.navigate(['/supply-management/bulk-amend', this.id], {
queryParams: {
sta: 3
},
})
}
// 再下一单
nextOrder() {
this.router.navigate(['/supply-management/bulk-amend', this.id], {
queryParams: {
sta: 4
},
})
}
handleCancel() {
this.isVisibleView = false
}
handleOK() {
}
NowAssign() {
this.isVisibleView = true
}
}