车辆对接

This commit is contained in:
wangshiming
2022-01-13 16:55:51 +08:00
parent 07c936a089
commit db8208f63f
10 changed files with 91 additions and 260 deletions

View File

@ -1,29 +0,0 @@
<!--
* @Author: your name
* @Date: 2021-12-14 15:53:03
* @LastEditTime: 2021-12-14 16:19:03
* @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\sure-depart\sure-depart.component.html
-->
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
<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>
</sf>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [nzLoading]="http.loading"
>确认发车</button
>
</div>

View File

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

View File

@ -1,201 +0,0 @@
import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-20 16:13: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\bulk\update-freight\update-freight.component.ts
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import {
SFComponent,
SFCustomWidgetSchema,
SFDateWidgetSchema,
SFNumberWidgetSchema,
SFRadioWidgetSchema,
SFSchema,
SFSelectWidgetSchema,
SFTextareaWidgetSchema,
SFUISchema,
SFUploadWidgetSchema
} from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { SupplyManagementService } from 'src/app/routes/supply-management/services/supply-management.service';
import { Observable, Observer } from 'rxjs';
@Component({
selector: 'app-order-management-sure-depart',
templateUrl: './sure-depart.component.html',
styleUrls: ['./sure-depart.component.less']
})
export class SureDepartComponent implements OnInit {
record: any = {};
i: any;
Status: any;
data: any ={
place1: '',
place2: ''
};
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
ui: SFUISchema = {};
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: SupplyManagementService ) {}
ngOnInit(): void {
this.initSF();
}
initSF() {
this.schema = {
properties: {
datetime: {
type: 'string',
title: '装货时间',
format: 'date-time',
},
no2: {
type: 'string',
title: '装货重量',
ui: {
widget: 'custom',
}
},
no3: {
type: 'string',
title: '装货体积',
ui: {
widget: 'custom',
}
},
no4: {
type: 'string',
title: '',
ui: {
widget: 'text',
},
default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式',
},
avatar: {
type: 'string',
title: '装货凭证',
ui: {
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
fileType: 'image/png,image/jpeg,image/jpg',
limit: 1,
limitFileCount: 1,
resReName: 'url',
urlReName: 'url',
widget: 'upload',
descriptionI18n: ' 提单号',
data: {
// appId: environment.appId,
},
name: 'multipartFile',
multiple: true,
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.fileList[0].response.url,
response: {
url: args.fileList[0].response.url
}
}
];
this.sf?.setValue('/avatar', avatar);
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
}
} as SFUploadWidgetSchema
},
avatar2: {
type: 'string',
title: '',
ui: {
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
fileType: 'image/png,image/jpeg,image/jpg',
limit: 1,
limitFileCount: 1,
resReName: 'url',
urlReName: 'url',
widget: 'upload',
descriptionI18n: '人车货照片',
data: {
// appId: environment.appId,
},
name: 'multipartFile',
multiple: true,
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.fileList[0].response.url,
response: {
url: args.fileList[0].response.url
}
}
];
this.sf?.setValue('/avatar', avatar);
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
}
} as SFUploadWidgetSchema
}
},
required: ['reason']
};
this.ui = {
'*': {
spanLabelFixed: 100,
grid: { span: 20 }
},
$avatar: { grid: { span: 12} },
$avatar2: { grid: { span: 12} },
};
}
save(value: any): void {
console.log(value)
// this.http.post(`/user/${this.record.id}`, value).subscribe(res => {
// this.msgSrv.success('保存成功');
// this.modal.close(true);
// });
}
close(): void {
this.modal.destroy(true);
}
}

View File

@ -20,7 +20,6 @@ import { OrderManagementVehicleDetailComponent } from './components/vehicle-deta
import { OrderManagementVehicleComponent } from './components/vehicle/vehicle.component';
import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-receipt.component';
import { SureDepartComponent } from './modal/bulk/sure-depart/sure-depart.component';
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';
@ -41,7 +40,6 @@ const COMPONENTS: Type<void>[] = [
OrderManagementComplaintComponent,
UpdateFreightComponent,
ConfirReceiptComponent,
SureDepartComponent,
VehicleUpdateFreightComponent,
VehicleConfirReceiptComponent,
VehicleSureDepartComponent,

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2022-01-04 15:34:07
* @LastEditTime: 2022-01-13 16:43: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\components\vehicle-detail\vehicle-detail.component.html
@ -19,8 +19,8 @@
</div>
<div nz-row style="display: flex; justify-content: end;">
<div nz-col nzSpan="10">
<button nz-button >确认发车</button>
<button nz-button nzType="primary" nzGhost >确认到车</button>
<button nz-button *ngIf="i.wayBillStatus == '2'" (click)="sureDepart(i)">确认发车</button>
<button nz-button nzType="primary" *ngIf="i.wayBillStatus == '3'" (click)="sureArrive(i)" nzGhost >确认到车</button>
</div>
</div>
<nz-divider></nz-divider>

View File

@ -13,6 +13,8 @@ import { _HttpClient } from '@delon/theme';
import { NzCardComponent } from 'ng-zorro-antd/card';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component';
import { WaybillManagementServe } from '../../services/waybill-management.service';
@Component({
selector: 'app-supply-management-bulk-detail',
@ -50,6 +52,7 @@ export class WaybillManagementBulkeDetailComponent implements OnInit {
constructor(
private route: ActivatedRoute,
private msgSrv: NzMessageService,
private modal: NzModalService,
private service: WaybillManagementServe,
private modalService: NzModalService
) {
@ -111,5 +114,38 @@ goDistance(elf: NzCardComponent) {
if (elf) {
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
}
}
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认发车',
nzWidth: '50%',
nzContent: VehicleSureDepartComponent,
nzComponentParams: {
i: item,
Status: 2
},
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.initData()
});
}
// 确认到车
sureArrive(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认到车',
nzWidth: '50%',
nzContent: VehicleSureArriveComponent,
nzComponentParams: {
i: item,
Status: 2
},
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.initData()
});
}
}

View File

@ -58,7 +58,10 @@ tabs = {
totalQuantity: 0,
compolatelQuantity: 0
};
constructor(public service: WaybillManagementServe, private modal: NzModalService, public service2: ShipperBaseService) { }
constructor(
public service: WaybillManagementServe,
private modal: NzModalService,
public service2: ShipperBaseService) { }
/**
* 查询参数
@ -358,7 +361,7 @@ tabs = {
},
{
title: '运费明细',
width: '150px',
width: '220px',
className: 'text-left',
render: 'billExpenseDetailVOList'
},
@ -388,7 +391,7 @@ tabs = {
{
title: '接单数量',
className: 'text-left',
width: '120px',
width: '200px',
index: 'orderReceivingQuantity'
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2022-01-04 15:35:11
* @LastEditTime: 2022-01-13 16:55:33
* @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
@ -19,8 +19,8 @@
</div>
<div nz-row style="display: flex; justify-content: end;">
<div nz-col nzSpan="10">
<button nz-button >确认发车</button>
<button nz-button nzType="primary" nzGhost >确认到车</button>
<button nz-button (click)="sureDepart(i)" *ngIf="i?.wayBillStatus == '2'" >确认发车</button>
<button nz-button nzType="primary" (click)="sureArrive(i)" *ngIf="i?.wayBillStatus == '3'" nzGhost >确认到车</button>
</div>
</div>
<nz-divider></nz-divider>

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-28 17:10:12
* @LastEditTime: 2022-01-13 16:52: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
@ -13,6 +13,8 @@ import { _HttpClient } from '@delon/theme';
import { NzCardComponent } from 'ng-zorro-antd/card';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component';
import { WaybillManagementServe } from '../../services/waybill-management.service';
@Component({
selector: 'app-supply-management-vehicle-detail',
@ -51,7 +53,7 @@ export class WaybillManagementVehicleDetailComponent implements OnInit {
private route: ActivatedRoute,
private msgSrv: NzMessageService,
private service: WaybillManagementServe,
private modalService: NzModalService
private modal: NzModalService,
) {
}
@ -75,15 +77,6 @@ export class WaybillManagementVehicleDetailComponent implements OnInit {
})
}
hand() {
this.modalService.create({
nzTitle: '',
// nzContent: OrderManagementGaodeMapComponent,
nzWidth: 1200
});
}
goBack() {
window.history.go(-1);
}
@ -112,4 +105,39 @@ goDistance(elf: NzCardComponent) {
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
}
}
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认发车',
nzWidth: '50%',
nzContent: VehicleSureDepartComponent,
nzComponentParams: {
i: item,
Status: 1
},
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.initData()
});
}
// 确认到车
sureArrive(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认到车',
nzWidth: '50%',
nzContent: VehicleSureArriveComponent,
nzComponentParams: {
i: item,
Status: 1
},
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.initData()
});
}
}

View File

@ -55,7 +55,10 @@ export class WaybillManagementVehicleComponent implements OnInit {
totalQuantity: 0,
compolatelQuantity: 0
};
constructor(public service: WaybillManagementServe, private modal: NzModalService, public service2: ShipperBaseService) {}
constructor(
public service: WaybillManagementServe,
private modal: NzModalService,
public service2: ShipperBaseService) {}
/**
* 查询参数