车辆对接
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-24 15:12:35
|
||||
* @LastEditTime: 2021-12-24 16:42:46
|
||||
* @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
|
||||
@ -117,9 +117,6 @@
|
||||
<span style="padding: 0 10px"
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap('start', idx)"></i
|
||||
></span>
|
||||
<!-- <span
|
||||
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i
|
||||
></span> -->
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
@ -133,10 +130,6 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<!-- <button nz-button nzType="primary" (click)="addStartInfo($event)">
|
||||
<i nz-icon nzType="plus"></i>
|
||||
添加装货地
|
||||
</button> -->
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8">
|
||||
<div style="display: flex; justify-content: center">
|
||||
@ -159,9 +152,6 @@
|
||||
/>
|
||||
</nz-input-group>
|
||||
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"></i></span>
|
||||
<!-- <span
|
||||
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i
|
||||
></span> -->
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
@ -175,30 +165,14 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<!-- <button nz-button nzType="primary" (click)="addEndInfo($event)">
|
||||
<i nz-icon nzType="plus"></i>
|
||||
添加卸货地
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div nz-row [nzGutter]="24" style="margin-top: 24px">
|
||||
<div nz-col [nzSpan]="9">
|
||||
<!-- <nz-form-item>
|
||||
<nz-form-label [nzSpan]="4" nzRequired>装货时间</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入装货时间'">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="loadTime" [(ngModel)]="loadTime"></nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item> -->
|
||||
<p class="time-info">计划装货时间:{{i?.goodsResource?.[0]?.loadTime}}</p>
|
||||
<p class="time-info">计划装货时间:{{i?.loadPlanTime}}</p>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8">
|
||||
<!-- <nz-form-item>
|
||||
<nz-form-label [nzSpan]="9" nzRequired>卸货时间</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="unloadingTime" [(ngModel)]="unloadingTime"></nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item> -->
|
||||
<p class="time-info">计划卸货时间:{{i?.goodsResource?.[0]?.unloadingTime}}</p>
|
||||
<p class="time-info">计划卸货时间:{{i?.unloadPlanTime}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #endInconTemp1><i nz-icon nzType="global"></i></ng-template>
|
||||
@ -301,10 +275,10 @@
|
||||
<nz-card nzTitle="运费信息" id="distannce3">
|
||||
<st #st [data]="dirvingMessage" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<ng-template st-row="price" let-item let-index="index">
|
||||
<input nz-input [ngModel]="item?.price" (ngModelChange)="st.setRow(index, { name: $event })" />
|
||||
<input nz-input [ngModel]="item?.price" (ngModelChange)="st.setRow(index, { price: $event })" />
|
||||
</ng-template>
|
||||
<ng-template st-row="paymentMethodRate" let-item let-index="index">
|
||||
<input nz-input [ngModel]="item?.paymentMethodRate" (ngModelChange)="st.setRow(index, { name: $event })" />
|
||||
<input nz-input [ngModel]="item?.paymentMethodRate" (ngModelChange)="st.setRow(index, { paymentMethodRate: $event })" />
|
||||
</ng-template>
|
||||
</st>
|
||||
<div style="margin-top: 15px;">总计:{{i?.total | currency: '¥'}}(运费¥3500.00,附加运费¥191.98,附加费率3.5%)</div>
|
||||
|
||||
@ -80,5 +80,7 @@
|
||||
width : 300px;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.ant-col-10 {
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
@ -2,14 +2,14 @@ import { ViewChild } from '@angular/core';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-24 16:27:03
|
||||
* @LastEditTime: 2021-12-24 16:50:42
|
||||
* @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
|
||||
*/
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
@ -68,6 +68,7 @@ loadTime: any; // 货源单设置回显
|
||||
ui: SFUISchema = {};
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private msgSrv: NzMessageService,
|
||||
public service: OrderManagementService,
|
||||
private modalService: NzModalService,
|
||||
@ -424,7 +425,7 @@ loadTime: any; // 货源单设置回显
|
||||
}
|
||||
console.log('dirvingMessage=>>>>>>'+ this.dirvingMessage)
|
||||
console.log( this.dirvingMessage)
|
||||
console.log( this.st)
|
||||
console.log( this.st._data)
|
||||
const params = {
|
||||
id: this.id,
|
||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
||||
@ -435,7 +436,7 @@ loadTime: any; // 货源单设置回显
|
||||
...this.sf4.value
|
||||
}],
|
||||
// 运费信息
|
||||
billExpenseDetailDTOList: this.dirvingMessage,
|
||||
billExpenseDetailDTOList: this.st._data,
|
||||
// 收款人
|
||||
payeeId: this.dirverPhone,
|
||||
dirverBankCard: this.dirverBankCard, // 银行卡
|
||||
@ -454,6 +455,12 @@ loadTime: any; // 货源单设置回显
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_set_modifyWholeOrder, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('修改成功!');
|
||||
this.router.navigate(['/order-management/vehicle']);
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
addPreZero(num: any){
|
||||
@ -464,68 +471,6 @@ loadTime: any; // 货源单设置回显
|
||||
}
|
||||
}
|
||||
// -------------------装卸货信息处理
|
||||
addStartInfo(event: any) {
|
||||
if (this.startInfo.length < 5) {
|
||||
const controlId = this.startInfo.length;
|
||||
this.startInfo.push({
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: 1
|
||||
});
|
||||
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||
}
|
||||
}
|
||||
subStartInfo(event: any, index: number, id?:any) {
|
||||
console.log(event, index, id)
|
||||
if(id) {
|
||||
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
this.startInfo.splice(index, 1);
|
||||
this.validateForm1.removeControl(`loadAddress${index}`);
|
||||
this.validateForm1.removeControl(`loadName${index}`);
|
||||
this.validateForm1.removeControl(`loadPhone${index}`);
|
||||
}
|
||||
subEndInfo(event: any, index: number, id?:any) {
|
||||
if(id) {
|
||||
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
console.log(event, index, id)
|
||||
this.endInfo.splice(index, 1);
|
||||
this.validateForm1.removeControl(`unloadAddress${index}`);
|
||||
this.validateForm1.removeControl(`unloadName${index}`);
|
||||
this.validateForm1.removeControl(`unloadPhone${index}`);
|
||||
}
|
||||
addEndInfo(event: any) {
|
||||
if (this.addEndInfo.length < 5) {
|
||||
const controlId = this.endInfo.length;
|
||||
this.endInfo.push({
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: 2
|
||||
});
|
||||
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||
}
|
||||
}
|
||||
// 打开地图
|
||||
openMap(type: string, index: number) {
|
||||
const modalRef = this.modalService.create({
|
||||
|
||||
Reference in New Issue
Block a user