车辆对接

This commit is contained in:
wangshiming
2021-12-29 17:20:00 +08:00
parent a3f3b2e9a8
commit 2ded33f4d6
23 changed files with 443 additions and 94 deletions

View File

@ -1,12 +1,11 @@
<!--
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-28 16:32:53
* @LastEditTime: 2021-12-29 14:44:43
* @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
-->
<nz-affix [nzOffsetTop]="10">
<page-header-wrapper [title]="''" [logo]="logo" [content]="headerContent">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
@ -53,8 +52,7 @@
</div>
</ng-template>
</page-header-wrapper>
</nz-affix>
<nz-card nzTitle="运单进度" #distannce1>
<nz-card nzTitle="运单进度" #distannce1 >
<div class="approval-status">
<div style="width: 60%; margin: 0 auto">
  <nz-steps [nzCurrent]="approvalLsit?.length + 1" nzLabelPlacement="vertical">
@ -66,7 +64,7 @@
</div>
</nz-card>
<nz-card nzTitle="基本信息" #distannce2 >
<nz-card nzTitle="基本信息" #distannce2 >
<sv-container col="1">
<sv-title>货物信息</sv-title>
<sv label="网络货运人">

View File

@ -77,4 +77,8 @@
margin-left: 56px;
}
}
.target-fix {
display: block;
margin-top: 290px;
}
}

View File

@ -2,7 +2,7 @@ import { ViewChild } from '@angular/core';
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-28 16:22:50
* @LastEditTime: 2021-12-29 14:42:04
* @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
@ -112,7 +112,9 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
goDistance(elf: NzCardComponent) {
if (elf) {
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' , yOffset : 400 });
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' , });
// elf['elementRef'].nativeElement.className = 'target-fix'
}
console.log(elf)
}
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-27 13:25:08
* @LastEditTime: 2021-12-29 15:00:48
* @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
@ -212,6 +212,15 @@
</nz-modal>
<ng-template #extraTemplate>
<div>
<button nz-button nzType="primary"(click)="modifyRate()">
修改附加费率
</button>
<button nz-button nzType="primary"(click)="modifyFreightPeople()">
修改网络货运人
</button>
<button nz-button nzType="primary"(click)="modifyRate()">
修改车队长
</button>
<button nz-button nzType="primary" nzGhost nz-popconfirm
[nzPopconfirmTitle]="enable" (nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight">
批量签收

View File

@ -14,6 +14,8 @@ import { VehicleSureArriveComponent } from '../../modal/vehicle/sure-arrive/sure
import { VehicleSureDepartComponent } from '../../modal/vehicle/sure-depart/sure-depart.component';
import { VehicleUpdateFreightComponent } from '../../modal/vehicle/update-freight/update-freight.component';
import { OrderManagementService } from '../../services/order-management.service';
import { VehicleModifyRateComponent } from '../../modal/vehicle/modify-rate/modify-rate.component';
import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component';
@Component({
@ -590,21 +592,82 @@ resourceStatus: any;
nzWidth: 580,
nzContent: VehicleUpdateFreightComponent,
nzComponentParams: { data: { ...data, id: item.id } },
nzOnOk: sin => {
this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
if (res) {
this.service.msgSrv.success('变更运费成功');
modal.destroy();
this.st.reload();
}
});
return false;
}
nzFooter: null,
// nzOnOk: sin => {
// this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
// if (res) {
// this.service.msgSrv.success('变更运费成功');
// modal.destroy();
// this.st.reload();
// }
// });
// return false;
// }
});
modal.afterClose.subscribe(_ => this.st.reload());
}
});
}
/**
*修改附加费率
*/
modifyRate() {
let params: any[] = [];
this.selectedRows.forEach(item => {
params.push(item.id);
});
if(params.length === 0) {
this.service.msgSrv.error('请先选择订单!')
return
}
const modal = this.modal.create({
nzTitle: '修改附加费率',
nzWidth: 600,
nzContent: VehicleModifyRateComponent,
nzComponentParams: { data: { ids: params } },
nzFooter: null,
// nzOnOk: sin => {
// this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
// if (res) {
// this.service.msgSrv.success('变更运费成功');
// modal.destroy();
// this.st.reload();
// }
// });
// return false;
// }
});
}
/**
*修改网络货运人
*/
modifyFreightPeople() {
let params: any[] = [];
this.selectedRows.forEach(item => {
params.push(item.id);
});
if(params.length === 0) {
this.service.msgSrv.error('请先选择订单!')
return
}
const modal = this.modal.create({
nzTitle: '修改网络货运人',
nzWidth: 600,
nzContent: VehicleFreightPeopleComponent,
nzComponentParams: { data: { ids: params } },
nzFooter: null,
// nzOnOk: sin => {
// this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
// if (res) {
// this.service.msgSrv.success('变更运费成功');
// modal.destroy();
// this.st.reload();
// }
// });
// return false;
// }
});
}
// *确认签收
@ -656,8 +719,10 @@ resourceStatus: any;
this.selectedRows.forEach(item => {
params.push(item.id);
});
console.log(this.selectedRows)
console.log(params)
if(params.length === 0) {
this.service.msgSrv.error('请先选择订单!')
return
}
this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => {
if (res) {
console.log(res);

View File

@ -0,0 +1,14 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-29 15:12:09
* @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\update-freight\update-freight.component.html
-->
<nz-alert nzType="info" [nzMessage]="'已选择' + data?.ids?.length + '已选择条订单'" nzShowIcon></nz-alert>
<sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
<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">确定</button>
</div>

View File

@ -0,0 +1,7 @@
.left_btn {
width: 50px;
height: 32px;
padding-left: 8px;
line-height:32px;
background-color: #d7d7d7;
}

View File

@ -0,0 +1,81 @@
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-29 17:02: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\bulk\update-freight\update-freight.component.ts
*/
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import {
SFComponent, SFSchema, SFUISchema
} from '@delon/form';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service';
import { ShipperBaseService } from './../../../../../shared/services/business/shipper-base.service';
@Component({
selector: 'app-order-management-vehicle-freight-people',
templateUrl: './freight-people.component.html',
styleUrls: ['./freight-people.component.less']
})
export class VehicleFreightPeopleComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
ui: SFUISchema = {};
aggreechecked = false;
@Input()
data: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, private service2: ShipperBaseService) {}
ngOnInit(): void {
console.log(this.data)
this.initSF(this.data);
}
initSF(data: any) {
this.schema = {
enterpriseInfoName: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder(),
},
},
required: ['enterpriseInfoName']
};
this.ui = {
'*': {
spanLabelFixed: 100,
grid: { span: 16 }
}
};
}
save(value: any): void {
const params = {
};
this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => {
if (res) {
this.modal.destroy();
this.service.msgSrv.success('变更运费成功');
}
});
}
close(): void {
this.modal.destroy();
}
}

View File

@ -0,0 +1,14 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-29 15:12:09
* @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\update-freight\update-freight.component.html
-->
<nz-alert nzType="info" [nzMessage]="'已选择' + data?.ids?.length + '已选择条订单'" nzShowIcon></nz-alert>
<sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
<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">确定</button>
</div>

View File

@ -0,0 +1,7 @@
.left_btn {
width: 50px;
height: 32px;
padding-left: 8px;
line-height:32px;
background-color: #d7d7d7;
}

View File

@ -0,0 +1,92 @@
import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-29 15:02:47
* @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, Input, OnInit, ViewChild } from '@angular/core';
import {
SFComponent,
SFCustomWidgetSchema,
SFNumberWidgetSchema,
SFRadioWidgetSchema,
SFSchema,
SFSelectWidgetSchema,
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service';
@Component({
selector: 'app-order-management-vehicle-modify-rate',
templateUrl: './modify-rate.component.html',
styleUrls: ['./modify-rate.component.less']
})
export class VehicleModifyRateComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
ui: SFUISchema = {};
aggreechecked = false;
@Input()
data: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {}
ngOnInit(): void {
console.log(this.data)
this.initSF(this.data);
}
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: '附加费率',
ui: {
unit: '%',
widgetWidth: 200,
precision: 2,
} as SFNumberWidgetSchema
},
},
required: ['prePay']
};
this.ui = {
'*': {
spanLabelFixed: 100,
grid: { span: 16 }
}
};
}
save(value: any): void {
const params = {
};
this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => {
if (res) {
this.modal.destroy();
this.service.msgSrv.success('变更运费成功');
}
});
}
close(): void {
this.modal.destroy();
}
}

View File

@ -1,3 +1,11 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-29 14:48:31
* @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\update-freight\update-freight.component.html
-->
<sf #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
<nz-divider></nz-divider>
<div>

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-23 17:13:28
* @LastEditTime: 2021-12-29 16:49:32
* @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\order-management.module.ts
@ -27,6 +27,8 @@ import { SureDepartComponent } from './modal/bulk/sure-depart/sure-depart.compon
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 { VehicleFreightPeopleComponent } from './modal/vehicle/freight-people/freight-people.component';
import { VehicleModifyRateComponent } from './modal/vehicle/modify-rate/modify-rate.component';
import { VehicleSureArriveComponent } from './modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from './modal/vehicle/sure-depart/sure-depart.component';
import { VehicleUpdateFreightComponent } from './modal/vehicle/update-freight/update-freight.component';
@ -53,7 +55,9 @@ const COMPONENTS: Type<void>[] = [
OrderManagementRiskDetailComponent,
OneCarOrderCancelComponent,
OrderManagementVehicleDetailChangeComponent,
OrderManagementBulkDetailChangeComponent
OrderManagementBulkDetailChangeComponent,
VehicleModifyRateComponent,
VehicleFreightPeopleComponent
];
@NgModule({