车辆对接

This commit is contained in:
wangshiming
2021-12-21 15:03:59 +08:00
parent c9906c0588
commit c79ea5261f
14 changed files with 450 additions and 403 deletions

View File

@ -599,14 +599,25 @@ tabs = {
*变更运费
*/
updateFreight(item: any) {
const modalRef = this.modal.create({
nzTitle: '变更运费',
nzWidth: '50%',
nzContent: UpdateFreightComponent,
nzComponentParams: {
i: item
},
nzFooter: null
this.service.request(this.service.$api_getFreightChangeBulkDetail, { id: item.id }).subscribe(data => {
if (data) {
const modal = this.modal.create({
nzTitle: '变更运费',
nzWidth: 580,
nzContent: UpdateFreightComponent,
nzComponentParams: { data },
nzOnOk: sin => {
this.service.request(this.service.$api_insertFreightChangeBulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
if (res) {
this.service.msgSrv.success('变更运费成功');
modal.destroy();
this.st.reload();
}
});
return false;
}
});
}
});
}

View File

@ -1,138 +1,165 @@
<!--
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-07 15:09:44
* @LastEditTime: 2021-12-21 14:20:15
* @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\components\vehicle-detail\vehicle-detail.component.html
-->
<page-header-wrapper [title]="''" [logo]="logo">
<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>
</page-header-wrapper>
<nz-card>
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
<div nz-row>
<div nz-col nzSpan="4">
<sv-container class="bdr">
<sv label="订单号" col="1">{{ i?.no }}</sv>
<sv-title class="text-center text-lg">待接单</sv-title>
<sv-title>
<div class="">
<a class="btn-size" (click)="hand()">指派车队长</a>
<!-- <a class="btn-size m-lg mr-lg">取消货源</a>
<a class="btn-size">再下一单</a> -->
</div>
</sv-title>
</sv-container>
<ng-template #headerContent>
<div class="mb-xs" nz-row>
<h4 class="ml-md">订单号: {{ i?.billCode }}</h4>
</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="solution" nzTitle="完结"></nz-step>
<div nz-row style="display: flex; justify-content: end;">
<div nz-col nzSpan="10">
<button nz-button >取消货源</button>
<button nz-button
>重新指派</button>
<button nz-button >修改货源</button>
<button nz-button nzType="primary" nzGhost >再下一单</button>
</div>
</div>
<div sv-container>
<sv label="货主">{{ i?.goodsInfoList[0].shipperAppUserName }} </sv>
<sv label="所属项目">{{i?.enterpriseProjectId}}</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 [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]="'接单'"></nz-step>
<nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'"></nz-step>
</nz-steps>
</div>
</div>
<nz-divider></nz-divider>
<div sv-container *ngIf="i">
<sv label="项目名称">{{ i?.owner }}</sv>
<sv label="调度员">32943898021309809423</sv>
<sv label="承诺付款时间">3321944288191034921</sv>
<sv label="服务类型">18112345678</sv>
</div>
<nz-divider></nz-divider>
<div nz-row>
<div nz-col nzSpan="6">
<div class="source-info">
<h3>装卸货信息</h3>
<p>装货地:广东省深圳市龙岗区怡亚通大厦</p>
<p>联系人:奥利给/13680058545</p>
<p>卸货地广东省深圳市福田区岗厦村9巷8号405新村</p>
<p>联系人:花花世界/13680058545</p>
<p>发货日期广东省深圳市福田区岗厦村9巷8号405新村</p>
<p>卸货日期:花花世界/13680058545</p>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr bdl pl-md">
<h3>货物信息</h3>
<p>货物名称:广东省深圳市龙岗区怡亚通大厦</p>
<p>重量/体积广东省深圳市福田区岗厦村9巷8号405新村</p>
<p>车型/车长:花花世界/13680058545</p>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr bdl pl-md">
<h3>托运信息</h3>
<p>公司名称:广东省深圳市龙岗区怡亚通大厦</p>
<p>联系人广东省深圳市福田区岗厦村9巷8号405新村</p>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr pl-md">
<h3>承运信息</h3>
<p>司机:广东省深圳市龙岗区怡亚通大厦</p>
<p>车牌号广东省深圳市福田区岗厦村9巷8号405新村</p>
<p>车型/车长/承重:{{'拖车'}} | {{'4.5米'}} | {{'15吨'}}</p>
</div>
</div>
<div class="source-info pl-md">
<h3>补充信息</h3>
<p style="color: #1890ff;">协议附件</p>
<p style="color: #1890ff;"> 装车附件</p>
<p style="color: #1890ff;">卸货附件</p>
<p style="color: #1890ff;">回单附件</p>
</div>
</div>
<nz-divider></nz-divider>
<div nz-row>
<div class="freight-info-box">
<h3>运费信息</h3>
<div class="text-right">
<p><label class="freigth-label">收款人:</label><span>{{400 | currency }}</span></p>
<p><label class="freigth-label">预付:</label><span>{{400 | currency }}</span></p>
<p><label class="freigth-label">油卡:</label><span>{{400 | currency }}</span></p>
<p><label class="freigth-label">到付:</label><span>{{400 | currency }}</span></p>
<p><label class="freigth-label">回单付:</label><span>{{400 | currency}}</span></p>
<p><label class="freigth-label">附加费:</label><span>{{400 | currency }}</span></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">{{400 | currency }}</span></h3>
<h3 class="text-right">未支付</h3>
</div>
</nz-card>
</div>
</div>
<nz-divider></nz-divider>
<div style="display: flex; justify-content: space-evenly;">
<div>
<div>
<span class="leftPadding">司机运输费</span>
<span class="leftPadding">1000.00</span>
<span class="leftPadding">未支付</span>
<nz-card nzTitle="装卸货信息(一装一卸)">
<div class="mt-md">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">
<div class="flex" *ngFor="let item of i?.unLoadingPlaceList">
<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>
<div>
<div>
<span class="leftPadding">司机运输费</span>
<span class="leftPadding">1000.00</span>
<span class="leftPadding">未支付</span>
</div>
<div>
<span class="leftPadding">附加费</span>
<span class="leftPadding">1000.00</span>
<span class="leftPadding">未支付</span>
<div nz-col [nzSpan]="12">
<div class="handling-info p-md">
<div class="flex" *ngFor="let item of i?.unLoadingPlaceList">
<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-divider></nz-divider>
</nz-card>
<nz-card nzTitle="基本信息">
<sv-container col="1">
<sv label="网络货运人">
{{i?.goodsName}}
</sv>
<sv label="货物名称">
{{i?.weight}}顿,{{i?.volume}}方,{{i?.number}}件
</sv>
</sv-container>
<sv-container col="2">
<sv label="货物数量">
{{i?.goodsName}}
</sv>
<sv label="用车需求">
{{i?.weight}}顿,{{i?.volume}}方,{{i?.number}}件
</sv>
<sv label="承运司机">
{{i?.weight}}顿,{{i?.volume}}方,{{i?.number}}件
</sv>
<sv label="车型车长载重">
{{i?.weight}}顿,{{i?.volume}}方,{{i?.number}}件
</sv>
</sv-container>
</nz-card>
<nz-card nzTitle="保险待定">
</nz-card>
<nz-card nzTitle="运费信息">
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
<div>总计:{{i?.total | currency: '¥'}}运费¥3500.00附加运费¥191.98附加费率3.5%</div>
<div>收款人:</div>
</nz-card>
<nz-card nzTitle="附件信息">
<sv-container>
<sv label="协议附件">
{{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}}
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
<sv label="装货凭证">
{{i?.supplementaryInformationVO?.remarks}}
</sv>
<sv label="卸货凭证">
{{i?.supplementaryInformationVO?.remarks}}
</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?.receiptUserName}} / {{i?.supplementaryInformationVO?.phon}}
</sv>
<sv label="所在地区">
{{i?.supplementaryInformationVO?.area}}
</sv>
<sv label="详细地址">
{{i?.supplementaryInformationVO?.address}}
</sv>
</sv-container>
<sv-container col="1" class="mt-md">
<sv label="备注">
{{i?.supplementaryInformationVO?.remarks}}
</sv>
</sv-container>
</nz-card>
<nz-card>
<div nz-row>
<nz-card nzTitle="轨迹信息" style="width: 100%;" >
<div nz-row >

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-20 09:35:33
* @LastEditTime: 2021-12-21 11:22:23
* @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\components\vehicle-detail\vehicle-detail.component.ts
@ -37,13 +37,18 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
}
ngOnInit(): void {
this.service.http.get(`/user/${this.id}?_allow_anonymous=true&_allow_badcode=true`).subscribe(res => {
console.log(res);
this.i = res
});
console.log(this.id)
this.initData()
}
initData() {
this.service.request(this.service.$api_get_getWholeBillDetail, {id: this.id}).subscribe(res => {
console.log(res)
if (res) {
this.i =res;
}
})
}
hand() {
this.modalService.create({

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-21 10:36:16
* @LastEditTime: 2021-12-21 13:48:55
* @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\vehicle\vehicle.component.html
@ -60,7 +60,7 @@
>
<ng-template st-row="billCode" let-item let-index="index">
<a [routerLink]="'/waybill-management/vehicle-detail/'+item.id">{{item.wayBillCode}}</a>
<a [routerLink]="'/order-management/vehicle-detail/'+item.id">{{item.wayBillCode}}</a>
<div>
<span>{{item?.billStatusLabel}}</span>
</div>

View File

@ -6,6 +6,7 @@ import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { OneCarOrderCancelComponent } from '../../modal/vehicle/cancel/cancel.component';
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
import { VehicleSureArriveComponent } from '../../modal/vehicle/sure-arrive/sure-arrive.component';
@ -558,14 +559,17 @@ resourceStatus: any;
*变更运费
*/
updateFreight(item: any) {
const modalRef = this.modal.create({
nzTitle: '变更运费',
nzWidth: '50%',
nzContent: VehicleUpdateFreightComponent,
nzComponentParams: {
record: item
},
nzFooter: null
this.service.request(this.service.$api_get_getFreightChangeWholeDetail, { id: item.id }).subscribe(data => {
if (data) {
const modal = this.modal.create({
nzTitle: '变更运费',
nzWidth: 580,
nzContent: VehicleUpdateFreightComponent,
nzComponentParams: { data: { ...data, id: item.id } },
nzFooter: null
});
modal.afterClose.subscribe(_ => this.st.reload());
}
});
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-20 20:26:52
* @LastEditTime: 2021-12-21 14:47:26
* @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\modal\bulk\update-freight\update-freight.component.html
@ -50,10 +50,10 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
<div>{{detailList?.goodsInfoVO?.freightPrice ? detailList?.goodsInfoVO?.freightPrice + '元' : ''}} </div>
</sv>
<sv label="司机车辆">
<div>张三 / 18888888888 / 粤GJ401</div>
<div>{{driverList?.nickName}} / {{driverList?.telephone}}/ {{carList?.carNo}}</div>
</sv>
<sv label="收款人">
<div>李四 / 1888888888</div>
<div>{{payeeList?.nickName}} / {{payeeList?.telephone}}</div>
</sv>
<sv label="回单凭证">
<!-- <app-imagelist

View File

@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-21 09:42:54
* @LastEditTime: 2021-12-21 13:43:08
* @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\modal\bulk\update-freight\update-freight.component.ts
@ -33,6 +33,9 @@ export class ConfirReceiptComponent implements OnInit {
Status:any;
detailList:any;
data: any = {};
driverList: any;
payeeList: any;
carList: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: OrderManagementService) {}
ngOnInit(): void {
@ -42,7 +45,7 @@ export class ConfirReceiptComponent implements OnInit {
save(): void {
// 大宗
this.service.request(this.service.$api_get_signBulkOrder, {id: this.i?.id}).subscribe((res: any) => {
console.log(res)
console.log(res.success)
if(res) {
this.service.msgSrv.success('确认签收成功!')
} else {
@ -55,11 +58,17 @@ export class ConfirReceiptComponent implements OnInit {
this.service.request(this.service.$api_get_getBulkSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
console.log(res)
this.detailList = res;
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.detailList?.id}).subscribe((res: any) => {
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.detailList?.payeeId}).subscribe((res: any) => {
console.log(res)
this.payeeList = res;
})
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.detailList?.driverId}).subscribe((res: any) => {
console.log(res)
this.driverList = res;
})
this.service.request(this.service.$api_getCarLicenseByIds, {id: this.detailList?.carId}).subscribe((res: any) => {
console.log(res)
this.carList = res;
})
})

View File

@ -1,53 +1,17 @@
<!--
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-14 15:16:40
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-12-21 15:03:17
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.html
-->
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'">
<ng-template sf-template="no" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn">元/吨</div>
</div>
</ng-template>
<ng-template sf-template="no2" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place1" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
<ng-template sf-template="no3" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place2" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
<ng-template sf-template="no4" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place3" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
<ng-template sf-template="no5" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place4" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
<sf #sf [schema]="schema" [ui]="{ '*': { spanLabelFixed: 90, grid: { span:24 } } }" [button]="'none'">
</sf>
<nz-divider></nz-divider>
<nz-divider style="margin-top: 0;"></nz-divider>
<div>
<p style="font-weight: bolder;">总运费:<span style="color: red;">¥900.00</span></p>
<p>运输费¥800.00附加费¥100.00</p>
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="!sf.valid" [nzLoading]="http.loading"
>确认</button
>
</div>
<p style="font-size: 16px;">
<span style="font-weight: bolder">总运费:<span style="color: #dc112a">¥{{ data.totalFreight }}</span></span>
</p>
<p style="margin-bottom: 0;"> 运输费:¥{{ data.freight }},附加费:¥{{ data.surcharge }}</p>
</div>

View File

@ -1,4 +1,3 @@
import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
@ -7,20 +6,12 @@ import { preloaderFinished } from '@delon/theme';
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import {
SFComponent,
SFCustomWidgetSchema,
SFNumberWidgetSchema,
SFRadioWidgetSchema,
SFSchema,
SFComponent, SFNumberWidgetSchema, SFSchema,
SFSelectWidgetSchema,
SFTextareaWidgetSchema,
SFUISchema
SFStringWidgetSchema, SFTextWidgetSchema
} from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-order-management-update-freight',
@ -28,116 +19,154 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
styleUrls: ['./update-freight.component.less']
})
export class UpdateFreightComponent implements OnInit {
record: any = {};
i: any;
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
ui: SFUISchema = {};
data: any = {};
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {}
schema!: SFSchema;
@Input()
data: any;
constructor() {}
ngOnInit(): void {
this.initSF();
if (this.record.id > 0) this.http.get(`/user/${this.record.id}`).subscribe(res => (this.i = res));
}
initSF() {
this.schema= {
properties: {
no: {
type: 'string',
title: '运费单价',
ui: {
widget: 'custom',
}
},
sex: {
title: '',
type: 'string',
enum: [
{ label: '保留小数', value: 0 },
{ label: '男', value: 1 },
{ label: '女', value: 2 },
{ label: '保密', value: 3 },
],
ui: {
widget: 'select',
} as SFSelectWidgetSchema,
},
appId: {
type: 'string',
title: '结算依据',
ui: {
width: 300,
grid: { span: 24 },
widget: 'select',
placeholder: '请选择',
allowClear: true,
// asyncData: () => this.getCatalogueMember(),
},
},
no2: {
type: 'string',
title: '装货重量',
ui: {
widget: 'custom',
}
},
no3: {
type: 'string',
title: '装货体积',
ui: {
widget: 'custom',
}
},
no4: {
type: 'string',
title: '卸货重量',
ui: {
widget: 'custom',
}
},
no5: {
type: 'string',
title: '卸货体积',
ui: {
widget: 'custom',
}
},
name3: {
type: 'string',
title: '变更原因',
maxLength: 100,
ui: {
width: 300,
placeholder:"选填最多不超过100字",
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
} as SFTextareaWidgetSchema
},
},
required: ['no', 'appId'],
type: 'object',
};
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 12, gutter: 4 } }
};
}
save(value: any): void {
console.log(value)
console.log(this.data)
this.http.post(`/user/${this.record.id}`, value).subscribe(res => {
this.msgSrv.success('保存成功');
this.modal.close(true);
});
this.schema = this.initSF(this.data);
}
close(): void {
this.modal.destroy();
}
/**
* 更新数字框
* @param value
* @param type
* 初始化表单
*/
changeNumVal(value: any, type: number) {}
private initSF(data: any): SFSchema {
return {
properties: {
dto: {
type: 'object',
properties: {
freightPrice: {
type: 'string',
title: '运费单价',
ui: {
addOnAfter: data.freightTypeLabel,
placeholder: '请输入',
grid: {
span: 12
}
} as SFStringWidgetSchema,
default: data.freightPrice
},
rule: {
title: '',
type: 'string',
default: data.rule,
enum: [
{ label: '保留小数', value: '1' },
{ label: '抹除小数', value: '2' },
{ label: '抹除个数', value: '3' }
],
ui: {
widget: 'select',
spanLabelFixed: 10,
grid: {
span: 10
}
} as SFSelectWidgetSchema
},
settlementBasis: {
title: '结算依据',
type: 'string',
default: data.settlementBasis,
enum: [
{ label: '以收货为准', value: '1' },
{ label: '以发货为准', value: '2' }
],
ui: {
widget: 'select',
grid: {
span: 12
}
} as SFSelectWidgetSchema
},
blank1: {
title: '',
type: 'string',
ui: { widget: 'text', grid: { span: 12 }, class: 'input-back' },
default: ' '
},
freightType: {
title: '',
type: 'string',
ui: { hidden: true },
default: data.freightType
},
acceptWeight: {
type: 'number',
title: '装货重量',
default: data.acceptWeight,
ui: {
unit: '吨',
placeholder: '请输入',
grid: {
span: 12
},
hideStep: true
} as SFNumberWidgetSchema
},
acceptVolume: {
type: 'number',
title: '装货体积',
default: data.acceptVolume,
ui: {
unit: '吨',
placeholder: '请输入',
grid: {
span: 12
},
hideStep: true
} as SFNumberWidgetSchema
},
settlementWeight: {
type: 'number',
title: '卸货重量',
default: data.settlementWeight,
ui: {
unit: '吨',
placeholder: '请输入',
grid: {
span: 12
},
hideStep: true
} as SFNumberWidgetSchema
},
settlementVolume: {
type: 'number',
title: '卸货体积',
default: data.settlementVolume,
ui: {
unit: '吨',
placeholder: '请输入',
grid: {
span: 12
},
hideStep: true
} as SFNumberWidgetSchema
}
},
required: ['freightPrice', 'settlementBasis']
},
changeCause: {
title: '审核备注',
type: 'string',
maxLength: 100,
default: data.changeCause,
ui: {
widget: 'textarea',
span: 24,
placeholder: '选填最多不超过100字',
autosize: {
minRows: 3,
maxRows: 5
}
} as SFTextWidgetSchema
}
}
};
}
}

View File

@ -1,8 +1,8 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-20 20:56:54
* @LastEditors: your name
* @LastEditTime: 2021-12-21 14:34:16
* @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\modal\vehicle\confir-receipt\confir-receipt.component.html
-->
@ -15,13 +15,13 @@
<sv-container col="1">
<sv label="费用明细">
<st #st [widthMode]="{ type: 'strict' }" [data]="dataInfo" [columns]="columns" bordered="true" [page]="{ show: false }"></st>
<st #st [widthMode]="{ type: 'strict' }" [data]="costDetail" [columns]="columns" bordered="true" [page]="{ show: false }"></st>
</sv>
<sv label="司机车辆">
<div>{{ i.driverName }} / {{ i.driverTelephone }} / {{ i.carNo }}</div>
<div>{{driverList?.nickName}} / {{driverList?.telephone}}/ {{carList?.carNo}}</div>
</sv>
<sv label="收款人">
<div>{{ i.payeeName }} / {{ i.payeePhone }}</div>
<div>{{payeeList?.nickName}} / {{payeeList?.telephone}}</div>
</sv>
<sv label="回单凭证">
<nz-upload

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-21 09:34:52
* @LastEditTime: 2021-12-21 14:50:54
* @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\modal\vehicle\confir-receipt\confir-receipt.component.ts
@ -42,6 +42,7 @@ export class VehicleConfirReceiptComponent implements OnInit {
record: any = {};
i:any;
Status: any
costDetail: any // 费用明细
columns!: STColumn[];
previewVisible1 = false;
dataInfo: any;
@ -49,9 +50,13 @@ export class VehicleConfirReceiptComponent implements OnInit {
data: any = {};
previewImage1 = '';
listImagUrls: any[] = [];
payeeList: any;
driverList: any;
carList: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient,public service: OrderManagementService) {}
ngOnInit(): void {
this.initST()
this.initData()
}
@ -96,14 +101,6 @@ export class VehicleConfirReceiptComponent implements OnInit {
});
};
initData() {
// this.dataInfo = [
// {
// prePay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.price || 0,
// toPay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.price || 0,
// receiptPay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.price || 0,
// traiPrice: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseName === '运输费')[0]?.price || 0
// }
// ];
// if (this.i?.receiptCertificate?.length > 0) {
// this.i?.receiptCertificate.forEach((element: any) => {
// const image = {
@ -118,6 +115,34 @@ export class VehicleConfirReceiptComponent implements OnInit {
this.service.request(this.service.$api_get_getWholeSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
console.log(res)
this.dataInfo = res;
const cost: any = {}
res.mybidDetailInfo.forEach((element: any) => {
if(element.expenseName === "预付" || element.expenseCode === 'PRE') {
cost.PRE = element.price
} else if(element.expenseName === "到付" || element.expenseCode === 'RECE') {
cost.RECE = element.price
} else if(element.expenseName === "回单付" || element.expenseCode === 'BACK') {
cost.BACK = element.price
} else if(element.expenseName === "油卡" || element.expenseCode === 'OIL') {
cost.OIL = element.price
} else if(element.expenseName === "总费用") {
cost.traiPrice = element.price
}
});
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.dataInfo?.payeeId}).subscribe((res: any) => {
console.log(res)
this.payeeList = res;
})
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.dataInfo?.driverId}).subscribe((res: any) => {
console.log(res)
this.driverList = res;
})
this.service.request(this.service.$api_getCarLicenseByIds, {id: this.dataInfo?.carId}).subscribe((res: any) => {
console.log(res)
this.carList = res;
})
console.log(cost)
this.costDetail = [cost];
})
}
@ -125,19 +150,19 @@ export class VehicleConfirReceiptComponent implements OnInit {
this.columns = [
{
title: '预付',
index: 'prePay'
index: 'PRE'
},
{
title: '到付',
index: 'toPay'
index: 'RECE'
},
{
title: '油卡',
index: 'OIL'
},
// {
// title: '油卡',
// index: 'name3'
// },
{
title: '回单付',
index: 'receiptPay'
index: 'BACK'
},
{
title: '总运费',

View File

@ -1,20 +1,11 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-20 15:55:51
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\update-freight\update-freight.component.html
-->
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none"></sf>
<sf #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
<nz-divider></nz-divider>
<div>
<p>
<span style="font-weight: bolder"
>总运费:<span style="color: #dc112a">¥{{ totalPrice }}</span></span
>总运费:<span style="color: #dc112a">¥{{ data.totalFreight }}</span></span
>
(运输费:¥{{ tranPrice }},附加费:¥{{ otherPrice }}
(运输费:¥{{ data.freight }},附加费:¥{{ data.surcharge }}
</p>
<p>
<label nz-checkbox [(ngModel)]="aggreechecked">确认已阅读并知晓<a>《变更协议》</a></label>

View File

@ -2,12 +2,12 @@ import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-20 17:57:19
* @LastEditTime: 2021-12-21 14:56:26
* @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\modal\bulk\update-freight\update-freight.component.ts
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import {
SFComponent,
SFCustomWidgetSchema,
@ -29,53 +29,33 @@ import { OrderManagementService } from '../../../services/order-management.servi
styleUrls: ['./update-freight.component.less']
})
export class VehicleUpdateFreightComponent implements OnInit {
record: any;
i: any;
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
ui: SFUISchema = {};
totalPrice = 0;
tranPrice = 0;
otherPrice = 0;
aggreechecked = false;
@Input()
data: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {}
ngOnInit(): void {
console.log(this.record)
this.i = {
prePay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.price || 0,
toPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.price || 0,
oilCardPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.price || 0,
receiptPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'BACK')[0]?.price || 0,
prePayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.paymentStatus,
toPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.paymentStatus,
oilCardPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.paymentStatus,
receiptPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'BACK')[0]?.paymentStatus
};
this.record.list.forEach((element: any) => {
if(element.costCode === 'PRE') {
}
});
this.tranPrice = this.i.prePay + this.i.toPay + this.i.oilCardPay + this.i.receiptPay;
this.totalPrice = this.i.prePay + this.i.toPay + this.i.oilCardPay + this.i.receiptPay + this.otherPrice;
this.initSF();
this.service.request(this.service.$api_get_getFreightChangeWholeDetail, { id: this.record.id}).subscribe((res) => {
console.log(res)
console.log(this.i)
console.log(this.tranPrice)
})
this.initSF(this.data);
}
initSF() {
initSF(data: any) {
const info = {
prePay: data.list?.filter((item: any) => item.costCode === 'PRE')[0],
toPay: data.list?.filter((item: any) => item.costCode === 'RECE')[0],
receiptPay: data.list?.filter((item: any) => item.costCode === 'BACK')[0]
};
this.schema = {
properties: {
prePay: {
type: 'number',
title: '预付',
default: 0.0,
readOnly: this.i.prePayStatus === '2',
default: info.prePay?.price || 0,
readOnly: info.prePay?.paymentStatus === '2' || info.prePay?.paymentStatus === '4',
ui: {
prefix: '¥',
widgetWidth: 200,
@ -86,20 +66,8 @@ export class VehicleUpdateFreightComponent implements OnInit {
toPay: {
type: 'number',
title: '到付',
default: 0.0,
readOnly: this.i.toPayStatus === '2',
ui: {
prefix: '¥',
widgetWidth: 200,
precision: 2,
change: (val: any) => this.changeNumVal()
} as SFNumberWidgetSchema
},
oilCardPay: {
type: 'number',
title: '油卡',
default: 0.0,
readOnly: this.i.oilCardPayStatus === '1' || this.i.oilCardPayStatus === '3',
default: info.toPay?.price || 0,
readOnly: info.toPay?.paymentStatus === '2' || info.toPay?.paymentStatus === '4',
ui: {
prefix: '¥',
widgetWidth: 200,
@ -107,11 +75,23 @@ export class VehicleUpdateFreightComponent implements OnInit {
change: (val: any) => this.changeNumVal()
} as SFNumberWidgetSchema
},
// oilCardPay: {
// type: 'number',
// title: '油卡',
// default: 0.0,
// readOnly: this.i.oilCardPayStatus === '1' || this.i.oilCardPayStatus === '3',
// ui: {
// prefix: '¥',
// widgetWidth: 200,
// precision: 2,
// change: (val: any) => this.changeNumVal()
// } as SFNumberWidgetSchema
// },
receiptPay: {
type: 'number',
title: '回单付',
default: 0.0,
readOnly: this.i.receiptPayStatus === '2',
default: info.receiptPay?.price || 0,
readOnly: info.receiptPay?.paymentStatus === '2' || info.receiptPay?.paymentStatus === '4',
ui: {
prefix: '¥',
widgetWidth: 200,
@ -138,12 +118,11 @@ export class VehicleUpdateFreightComponent implements OnInit {
}
};
}
save(value: any): void {
console.log(this.record?.mybidDetailInfo)
console.log(this.sf.value)
const editItems = this.record?.mybidDetailInfo.filter((data: any) => data.receiptPayStatus !== '2');
const editItems = this.data.list?.filter((info: any) => info.toPay?.paymentStatus !== '2' && info.toPay?.paymentStatus !== '4');
editItems.forEach((item: any) => {
switch (item.expenseName) {
switch (item.costName) {
case '预付':
item.price = this.sf.value.prePay;
break;
@ -159,16 +138,15 @@ export class VehicleUpdateFreightComponent implements OnInit {
});
const params = {
id: this.record?.id,
billId: this.data.id,
dtos: editItems,
changeCause: this.sf.value.changeCause
};
console.log(params)
this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => {
if (res) {
this.modal.destroy();
} else {
this.service.msgSrv.error(res.msg);
this.service.msgSrv.success('变更运费成功');
}
});
}
@ -181,7 +159,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
*
*/
changeNumVal() {
this.tranPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay;
this.totalPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay + this.otherPrice;
// this.tranPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay;
// this.totalPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay + this.otherPrice;
}
}

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-21 11:13:19
* @LastEditTime: 2021-12-21 13:17:37
* @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
@ -64,13 +64,17 @@ export class OrderManagementService extends BaseService {
// 上传图片
public $api_upload_url = `/api/mdc/pbc/upload/multipartFile/file`;
// 根据用户id查用户信息注意nickName才是用户名称
public $api_getUserDetailByAppUserId = `/cuc/user/getUserDetailByAppUserId`;
public $api_getUserDetailByAppUserId = `/api/mdc/cuc/userBasicInfo/get`;
// 根据车辆id查车辆信息
public $api_getCarLicenseByIds = `/cuc/carLicense/getCarLicenseByIds`;
public $api_getCarLicenseByIds = `/api/mdc/cuc/carLicense/getCarLicenseByIds`;
// 统计【整车】订单状态数量
public $api_statisticalStatus = `/api/sdc/billOperate/getWholeStatistical`;
// 统计【大宗】订单状态数量
public $api_getBulkStatistical = `/api/sdc/billOperate/getBulkStatistical`;
// 变更运费页面-大宗
public $api_getFreightChangeBulkDetail = `/api/sdc/billFreightChangeApplication/getFreightChangeBulkDetail`;
// 变更运费页面-大宗
public $api_insertFreightChangeBulk = `/api/sdc/billFreightChangeApplication/insertFreightChangeBulk`;
constructor(public injector: Injector) {
super(injector)
}