This commit is contained in:
1107302052
2022-03-16 15:09:46 +08:00
parent 376005df54
commit 01ac9f4e99
13 changed files with 544 additions and 506 deletions

View File

@ -94,7 +94,7 @@
{{ i?.unloadPlanTime }} {{ i?.unloadPlanTime }}
</sv> --> </sv> -->
<sv label="接单数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方 </sv> <sv label="接单数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方 </sv>
<sv *ngIf="i?.billStatus =='3' || i?.billStatus =='4' || i?.billStatus =='5'" label="装货数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方</sv> <sv *ngIf="i?.billStatus =='3' || i?.billStatus =='4' || i?.billStatus =='5'" label="装货数量"> {{ i?.loadWeight }}吨{{ i?.loadVolume }}方</sv>
<sv *ngIf="i?.billStatus =='4' || i?.billStatus =='5'" label="卸货数量"> {{ i?.settlementWeight }}吨,{{ i?.settlementVolume }}方</sv> <sv *ngIf="i?.billStatus =='4' || i?.billStatus =='5'" label="卸货数量"> {{ i?.settlementWeight }}吨,{{ i?.settlementVolume }}方</sv>
</sv-container> </sv-container>
<div class="mt-md"> <div class="mt-md">
@ -209,7 +209,7 @@
</st> </st>
</div> </div>
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="mapList"></amap-path-simplifier> <amap-path-simplifier [mapWidth]="'100%'" [pois]="pois" [mapHeight]="'600px'" [MapList]="mapList"></amap-path-simplifier>
</div> </div>
</div> </div>
</nz-card> </nz-card>

View File

@ -28,6 +28,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
MapList: any[]=[]; MapList: any[]=[];
id = this.route.snapshot.params.id; id = this.route.snapshot.params.id;
billExpenses: any[] = []; //运费信息表格信息 billExpenses: any[] = []; //运费信息表格信息
pois: any[] = [];
i: any; i: any;
imges: any; imges: any;
totalObj: any; totalObj: any;
@ -77,8 +78,22 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => { this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
if (res) { if (res) {
this.i = res; this.i = res;
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA'); this.billExpenses = this.i?.billExpenseDetailVOList?.filter((data: any) => data.expenseCode === 'TRA');
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE"); this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE");
this.pois = [
{
markerLabel: '起',
color: 'blue',
position: [res.startingPoint.longitude, res.startingPoint.latitude],
title: res.startingPoint.detailedAddress
},
{
markerLabel: '卸',
color: 'red',
position: [res.endPoint.longitude, res.endPoint.latitude],
title: res.endPoint.detailedAddress
}
];
} }
}); });
this.service.request(this.service.$api_get_getRiskDetail, { id: this.id }).subscribe(res => { this.service.request(this.service.$api_get_getRiskDetail, { id: this.id }).subscribe(res => {

View File

@ -118,7 +118,7 @@ export class OrderManagementBulkComponent implements OnInit {
}; };
} }
search() { search() {
this.st?.load(1); this.st?.load();
this.getGoodsSourceStatistical(); this.getGoodsSourceStatistical();
} }
getGoodsSourceStatistical() { getGoodsSourceStatistical() {

View File

@ -216,7 +216,7 @@
</div> </div>
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="mapList" [pois]="pois"></amap-path-simplifier> <amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="mapList" [pois]="pois"></amap-path-simplifier>
</div> </div>
</div> </div>
</nz-card> </nz-card>
<ng-template #extraTemplate> <ng-template #extraTemplate>

View File

@ -94,7 +94,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
title: res.endPoint.detailedAddress title: res.endPoint.detailedAddress
} }
]; ];
this.billExpenses = this.i?.billExpenseDetails?.filter( this.billExpenses = this.i?.billExpenseDetailVOList?.filter(
(data: any) => data.expenseCode === 'PRE' || data.expenseCode === 'RECE' || data.expenseCode === 'BACK' (data: any) => data.expenseCode === 'PRE' || data.expenseCode === 'RECE' || data.expenseCode === 'BACK'
); );
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE'); this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE');

View File

@ -12,13 +12,13 @@
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" button="none"> <sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" button="none">
<ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema">
<div style="display: flex"> <div style="display: flex">
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="999" [nzStep]="1"></nz-input-number> <nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2"></nz-input-number>
<div class="left_btn"></div> <div class="left_btn"></div>
</div> </div>
</ng-template> </ng-template>
<ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema">
<div style="display: flex"> <div style="display: flex">
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="999" [nzStep]="1"></nz-input-number> <nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2"></nz-input-number>
<div class="left_btn"></div> <div class="left_btn"></div>
</div> </div>
</ng-template> </ng-template>

View File

@ -1,4 +1,3 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { DatePipe } from '@angular/common'; import { DatePipe } from '@angular/common';
import { import {
@ -32,442 +31,455 @@ export class VehicleSureArriveComponent implements OnInit {
i: any; i: any;
formData: any; formData: any;
Status: any; Status: any;
data: any ={ data: any = {
weight: 0, weight: 0,
volume: 0 volume: 0
}; };
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {}; schema: SFSchema = {};
ui: SFUISchema = {}; ui: SFUISchema = {};
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: WaybillManagementServe,private datePipe: DatePipe,private envSrv: EAEnvironmentService, ) {} constructor(
private modal: NzModalRef,
private msgSrv: NzMessageService,
public http: _HttpClient,
public service: WaybillManagementServe,
private datePipe: DatePipe,
private envSrv: EAEnvironmentService
) {}
ngOnInit(): void { ngOnInit(): void {
console.log(this.i) console.log(this.i);
this.initData() this.initData();
this.i.time = this.i?.loadingTime; this.i.time = this.i?.loadingTime;
this.initSF(); this.initSF();
} }
initSF() { initSF() {
if(this.Status === 1) { if (this.Status === 1) {
this.schema = {
this.schema = { properties: {
properties: { time: {
time: { type: 'string',
type: 'string', title: '卸货时间',
title: '卸货时间', format: 'date-time'
format: 'date-time', },
imgUrl3: {
type: 'string',
title: '装货凭证',
readOnly: true,
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单',
data: {
appId: this.envSrv.env.appId
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card'
} as SFUploadWidgetSchema
},
imgUrl4: {
type: 'string',
title: '',
readOnly: true,
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片',
data: {
appId: this.envSrv.env.appId
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card'
} as SFUploadWidgetSchema
},
no4: {
type: 'string',
title: '',
ui: {
widget: 'text'
},
default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式'
},
imgUrl1: {
type: 'string',
title: '卸货凭证',
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单',
data: {
appId: this.envSrv.env.appId
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card'
} as SFUploadWidgetSchema
},
imgUrl2: {
type: 'string',
title: '',
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片',
data: {
appId: this.envSrv.env.appId
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card'
} as SFUploadWidgetSchema
}
}, },
imgUrl3: { required: ['time']
type: 'string', };
title: '装货凭证', } else {
readOnly: true, this.schema = {
ui: { properties: {
widget: 'upload', time: {
action: apiConf.fileUpload, type: 'string',
accept: 'image/png,image/jpeg,image/jpg,image/gif', title: '卸货时间',
limit: 1, format: 'date-time'
limitFileCount: 1, },
resReName: 'data.fullFileWatermarkPath', weight: {
urlReName: 'data.fullFileWatermarkPath', type: 'string',
descriptionI18n: '提货单', title: '卸货重量',
data: { ui: {
appId: this.envSrv.env.appId, widget: 'custom'
}, }
name: 'multipartFile', },
beforeUpload: (file: any, fileList: any) => { volume: {
return new Observable((observer: Observer<boolean>) => { type: 'string',
const isLt1M = file.size / 1024 / 1024 < 5; title: '卸货体积',
const fileType = 'image/png,image/jpeg,image/jpg,image/gif'; ui: {
if (fileType.indexOf(file.type) === -1) { widget: 'custom'
this.service.msgSrv.warning('图片格式不正确!'); }
},
imgUrl3: {
type: 'string',
title: '装货凭证',
readOnly: true,
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单',
data: {
appId: this.envSrv.env.appId
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete(); observer.complete();
return; });
} },
if (!isLt1M) { multiple: false,
this.service.msgSrv.warning('图片大小超过5M!'); listType: 'picture-card'
} as SFUploadWidgetSchema
},
imgUrl4: {
type: 'string',
title: '',
readOnly: true,
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片',
data: {
appId: this.envSrv.env.appId
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete(); observer.complete();
return; });
} },
observer.next(isLt1M); multiple: false,
observer.complete(); listType: 'picture-card'
}); } as SFUploadWidgetSchema
},
no4: {
type: 'string',
title: '',
ui: {
widget: 'text'
}, },
multiple: false, default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式'
listType: 'picture-card', },
} as SFUploadWidgetSchema, imgUrl1: {
type: 'string',
title: '卸货凭证',
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单',
data: {
appId: this.envSrv.env.appId
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card'
} as SFUploadWidgetSchema
},
imgUrl2: {
type: 'string',
title: '',
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片',
data: {
appId: this.envSrv.env.appId
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card'
} as SFUploadWidgetSchema
}
}, },
imgUrl4: { required: ['time', 'weight', 'volume']
type: 'string', };
title: '', }
readOnly: true,
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
},
no4: {
type: 'string',
title: '',
ui: {
widget: 'text',
},
default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式',
},
imgUrl1: {
type: 'string',
title: '卸货凭证',
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
},
imgUrl2: {
type: 'string',
title: '',
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
}
},
required: ['time']
};
}else {
this.schema = {
properties: {
time: {
type: 'string',
title: '卸货时间',
format: 'date-time',
},
weight: {
type: 'string',
title: '卸货重量',
ui: {
widget: 'custom',
}
},
volume: {
type: 'string',
title: '卸货体积',
ui: {
widget: 'custom',
}
},
imgUrl3: {
type: 'string',
title: '装货凭证',
readOnly: true,
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
},
imgUrl4: {
type: 'string',
title: '',
readOnly: true,
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
},
no4: {
type: 'string',
title: '',
ui: {
widget: 'text',
},
default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式',
},
imgUrl1: {
type: 'string',
title: '卸货凭证',
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
},
imgUrl2: {
type: 'string',
title: '',
ui: {
widget: 'upload',
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg,image/jpg,image/gif';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
observer.complete();
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt1M);
observer.complete();
});
},
multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
}
},
required: ['time','weight','volume' ]
};
}
this.ui = { this.ui = {
'*': { '*': {
spanLabelFixed: 100, spanLabelFixed: 100,
grid: { span: 20 } grid: { span: 20 }
}, },
$imgUrl1: { grid: { span: 12} }, $imgUrl1: { grid: { span: 12 } },
$imgUrl2: { grid: { span: 12} }, $imgUrl2: { grid: { span: 12 } },
$imgUrl3: { grid: { span: 12} }, $imgUrl3: { grid: { span: 12 } },
$imgUrl4: { grid: { span: 12} }, $imgUrl4: { grid: { span: 12 } }
}; };
} }
save(value: any): void { save(value: any): void {
if(this.Status === 1) { if (this.Status === 1) {
if(!value.time) { if (!value.time) {
this.service.msgSrv.warning('卸货时间为空!') this.service.msgSrv.warning('卸货时间为空!');
return; return;
} }
const params = { const params = {
id: this.i.id, id: this.i.id,
imgUrl1: value?.imgUrl1?.data?.fullFilePath, imgUrl1: value?.imgUrl1?.data?.fullFilePath,
imgUrl2: value?.imgUrl2?.data?.fullFilePath, imgUrl2: value?.imgUrl2?.data?.fullFilePath,
time: value?.time, time: value?.time
} };
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ');
this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe((res) => {
if(res) {
this.service.msgSrv.success('确认到车成功!')
this.modal.destroy(true);
}
})
} else {
if(!value.time || !this.data?.volume || !this.data?.weight) {
this.service.msgSrv.warning('卸货时间或卸货重量为空!')
return;
}
const params = {
id: this.i?.id,
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
time: value?.time,
volume: this.data?.volume,
weight: this.data?.weight
}
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe((res) => {
if(res) {
this.service.msgSrv.success('确认到车成功!')
this.modal.destroy(true);
}
})
}
this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('确认到车成功!');
this.modal.destroy(true);
}
});
} else {
if (!value?.time) {
this.service.msgSrv.warning('装货时间为空!');
return;
}
if (!this.data?.volume) {
this.service.msgSrv.warning('装货重量为空!');
return;
}
if (!this.data?.weight) {
this.service.msgSrv.warning('装货体积为空!');
return;
}
const params = {
id: this.i?.id,
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
time: value?.time,
volume: this.data?.volume,
weight: this.data?.weight
};
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ');
this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('确认到车成功!');
this.modal.destroy(true);
}
});
}
} }
// 确认到车界面信息(两个只能看的图片) // 确认到车界面信息(两个只能看的图片)
initData() { initData() {
this.service.request(this.service.$api_get_getUnloadCarInfo, { id : this.i?.id}).subscribe((res) => { this.service.request(this.service.$api_get_getUnloadCarInfo, { id: this.i?.id }).subscribe(res => {
console.log(res) console.log(res);
if (res.imgUrl1) { if (res.imgUrl1) {
this.formData = { this.formData = {
imgUrl3: [ imgUrl3: [
@ -477,10 +489,10 @@ export class VehicleSureArriveComponent implements OnInit {
status: 'done', status: 'done',
url: res.imgUrl1, url: res.imgUrl1,
response: { response: {
url: res.imgUrl1, url: res.imgUrl1
}, }
}, }
], ],
imgUrl4: [ imgUrl4: [
{ {
uid: 'logo', uid: 'logo',
@ -488,16 +500,15 @@ export class VehicleSureArriveComponent implements OnInit {
status: 'done', status: 'done',
url: res.imgUrl2, url: res.imgUrl2,
response: { response: {
url: res.imgUrl2, url: res.imgUrl2
}, }
}, }
], ]
}; };
} }
}) });
} }
close(): void { close(): void {
this.modal.destroy(true); this.modal.destroy(true);
} }
} }

View File

@ -12,13 +12,13 @@
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none"> <sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
<ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema">
<div style="display: flex"> <div style="display: flex">
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="999999" [nzStep]="1"></nz-input-number> <nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="999999" [nzPrecision]="2" [nzStep]="0.01"></nz-input-number>
<div class="left_btn"></div> <div class="left_btn"></div>
</div> </div>
</ng-template> </ng-template>
<ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema">
<div style="display: flex"> <div style="display: flex">
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="999999" [nzStep]="1"></nz-input-number> <nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="999999" [nzStep]="0.01" [nzPrecision]="2"></nz-input-number>
<div class="left_btn"></div> <div class="left_btn"></div>
</div> </div>
</ng-template> </ng-template>

View File

@ -1,4 +1,3 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { import {
SFComponent, SFComponent,
@ -31,37 +30,44 @@ export class VehicleSureDepartComponent implements OnInit {
record: any = {}; record: any = {};
i: any; i: any;
Status: any; Status: any;
data: any ={ data: any = {
weight: '', weight: '',
volume: '' volume: ''
}; };
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {}; schema: SFSchema = {};
ui: SFUISchema = {}; ui: SFUISchema = {};
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: WaybillManagementServe, private envSrv: EAEnvironmentService,private datePipe: DatePipe) {} constructor(
private modal: NzModalRef,
private msgSrv: NzMessageService,
public http: _HttpClient,
public service: WaybillManagementServe,
private envSrv: EAEnvironmentService,
private datePipe: DatePipe
) {}
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.initSF();
console.log(this.i) console.log(this.i);
this.data.weight = this.i?.weight this.data.weight = this.i?.weight;
this.i.time = this.i.loadingTime; this.i.time = this.i.loadingTime;
} }
initSF() { initSF() {
if(this.Status === 1) { if (this.Status === 1) {
this.schema = { this.schema = {
properties: { properties: {
time: { time: {
type: 'string', type: 'string',
title: '装货时间', title: '装货时间',
format: 'date-time', format: 'date-time'
}, },
no4: { no4: {
type: 'string', type: 'string',
title: '', title: '',
ui: { ui: {
widget: 'text', widget: 'text'
}, },
default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式', default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式'
}, },
imgUrl1: { imgUrl1: {
type: 'string', type: 'string',
@ -76,7 +82,7 @@ export class VehicleSureDepartComponent implements OnInit {
urlReName: 'data.fullFileWatermarkPath', urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单', descriptionI18n: '提货单',
data: { data: {
appId: this.envSrv.env.appId, appId: this.envSrv.env.appId
}, },
name: 'multipartFile', name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => { beforeUpload: (file: any, fileList: any) => {
@ -98,8 +104,8 @@ export class VehicleSureDepartComponent implements OnInit {
}); });
}, },
multiple: false, multiple: false,
listType: 'picture-card', listType: 'picture-card'
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema
}, },
imgUrl2: { imgUrl2: {
type: 'string', type: 'string',
@ -114,7 +120,7 @@ export class VehicleSureDepartComponent implements OnInit {
urlReName: 'data.fullFileWatermarkPath', urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片', descriptionI18n: '人车货照片',
data: { data: {
appId: this.envSrv.env.appId, appId: this.envSrv.env.appId
}, },
name: 'multipartFile', name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => { beforeUpload: (file: any, fileList: any) => {
@ -136,8 +142,8 @@ export class VehicleSureDepartComponent implements OnInit {
}); });
}, },
multiple: false, multiple: false,
listType: 'picture-card', listType: 'picture-card'
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema
} }
}, },
required: ['time'] required: ['time']
@ -148,29 +154,29 @@ export class VehicleSureDepartComponent implements OnInit {
time: { time: {
type: 'string', type: 'string',
title: '装货时间', title: '装货时间',
format: 'date-time', format: 'date-time'
}, },
weight: { weight: {
type: 'string', type: 'string',
title: '装货重量', title: '装货重量',
ui: { ui: {
widget: 'custom', widget: 'custom'
} }
}, },
volume: { volume: {
type: 'string', type: 'string',
title: '装货体积', title: '装货体积',
ui: { ui: {
widget: 'custom', widget: 'custom'
} }
}, },
no4: { no4: {
type: 'string', type: 'string',
title: '', title: '',
ui: { ui: {
widget: 'text', widget: 'text'
}, },
default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式', default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式'
}, },
imgUrl1: { imgUrl1: {
type: 'string', type: 'string',
@ -185,7 +191,7 @@ export class VehicleSureDepartComponent implements OnInit {
urlReName: 'data.fullFileWatermarkPath', urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '提货单', descriptionI18n: '提货单',
data: { data: {
appId: this.envSrv.env.appId, appId: this.envSrv.env.appId
}, },
name: 'multipartFile', name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => { beforeUpload: (file: any, fileList: any) => {
@ -207,8 +213,8 @@ export class VehicleSureDepartComponent implements OnInit {
}); });
}, },
multiple: false, multiple: false,
listType: 'picture-card', listType: 'picture-card'
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema
}, },
imgUrl2: { imgUrl2: {
type: 'string', type: 'string',
@ -223,7 +229,7 @@ export class VehicleSureDepartComponent implements OnInit {
urlReName: 'data.fullFileWatermarkPath', urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '人车货照片', descriptionI18n: '人车货照片',
data: { data: {
appId: this.envSrv.env.appId, appId: this.envSrv.env.appId
}, },
name: 'multipartFile', name: 'multipartFile',
beforeUpload: (file: any, fileList: any) => { beforeUpload: (file: any, fileList: any) => {
@ -245,69 +251,75 @@ export class VehicleSureDepartComponent implements OnInit {
}); });
}, },
multiple: false, multiple: false,
listType: 'picture-card', listType: 'picture-card'
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema
} }
}, },
required: ['time','weight', 'volume'] required: ['time', 'weight', 'volume']
}; };
} }
this.ui = { this.ui = {
'*': { '*': {
spanLabelFixed: 100, spanLabelFixed: 100,
grid: { span: 20 } grid: { span: 20 }
}, },
$imgUrl1: { grid: { span: 12} }, $imgUrl1: { grid: { span: 12 } },
$imgUrl2: { grid: { span: 12} }, $imgUrl2: { grid: { span: 12 } }
}; };
} }
save(value: any): void { save(value: any): void {
if(this.Status === 1) { if (this.Status === 1) {
if(!value?.time) { if (!value?.time) {
this.service.msgSrv.warning('装货时间为空!') this.service.msgSrv.warning('装货时间为空!');
return; return;
} }
const params = { const params = {
id: this.i.id,
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
time: value?.time
};
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ');
this.service.request(this.service.$api_get_insertWholeStartCarInfo, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('确认发车成功!');
this.modal.destroy(true);
}
});
} else {
if (!value?.time) {
this.service.msgSrv.warning('装货时间为空!');
return;
}
if (!this.data?.volume) {
this.service.msgSrv.warning('装货重量为空!');
return;
}
if (!this.data?.weight) {
this.service.msgSrv.warning('装货体积为空!');
return;
}
console.log(value);
const params = {
id: this.i.id, id: this.i.id,
imgUrl1: value?.imgUrl1?.data?.fullFilePath, imgUrl1: value?.imgUrl1?.data?.fullFilePath,
imgUrl2: value?.imgUrl2?.data?.fullFilePath, imgUrl2: value?.imgUrl2?.data?.fullFilePath,
time: value?.time, time: value?.time,
} volume: this.data?.volume,
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') weight: this.data?.weight
this.service.request(this.service.$api_get_insertWholeStartCarInfo, params).subscribe((res) => { };
if(res) { params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ');
this.service.msgSrv.success('确认发车成功!') this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe(res => {
this.modal.destroy(true); if (res) {
this.service.msgSrv.success('确认发车成功!');
this.modal.destroy(true);
} }
}) });
} else {
if(!value?.time || !this.data?.volume || !this.data?.weight) {
this.service.msgSrv.warning('装货时间或装货重量为空!')
return;
}
console.log(value)
const params = {
id: this.i.id,
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
time: value?.time,
volume: this.data?.volume,
weight: this.data?.weight
}
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe((res) => {
if(res) {
this.service.msgSrv.success('确认发车成功!')
this.modal.destroy(true);
}
})
} }
} }
close(): void { close(): void {
this.modal.destroy(true); this.modal.destroy(true);
} }
} }

View File

@ -40,14 +40,14 @@
<div class="approval-status"> <div class="approval-status">
<div style="width: 60%; margin: 0 auto"> <div style="width: 60%; margin: 0 auto">
<nz-steps style="width: 70%; margin: 0 auto" [nzLabelPlacement]="'vertical'"> <nz-steps style="width: 70%; margin: 0 auto" [nzLabelPlacement]="'vertical'">
<nz-step [nzStatus]="i?.resourceStatus !== '1' ? 'finish' : 'process'" nzIcon="solution" <nz-step [nzStatus]="i?.resourceStatus !== '1'?'finish':'process'" nzIcon="solution"
[nzDescription]="i?.createAt" nzTitle="下单" [nzSubtitle]="i?.createTime"></nz-step> [nzDescription]="i?.createTime" nzTitle="下单"></nz-step>
<nz-step *ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2'" <nz-step *ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '4' "
[nzStatus]="i?.resourceStatus === '1' ? 'wait' : 'finish'" nzIcon="file-done" [nzStatus]="i?.resourceStatus=== '1'? 'wait':'finish'" nzIcon="file-done"
[nzTitle]="i?.resourceStatus === '2' ? '已完结' : '完结'" [nzSubtitle]="i?.endTime"></nz-step> [nzTitle]="i?.resourceStatus === '4'?'已完结':'完结'" [nzDescription]="i?.endTime"></nz-step>
<nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'" <nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'"
[nzSubtitle]="i?.endTime"></nz-step> [nzDescription]="i?.endTime"></nz-step>
</nz-steps> </nz-steps>
</div> </div>
</div> </div>

View File

@ -73,7 +73,7 @@
[req]="{ process: beforeReq }" [req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}" [res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="loading" [loading]="false"
> >
<ng-template st-row="createUserName" let-item let-index="index"> <ng-template st-row="createUserName" let-item let-index="index">
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div> <div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>

View File

@ -98,7 +98,7 @@ export class SupplyManagementBulkComponent implements OnInit {
return requestOptions; return requestOptions;
}; };
search() { search() {
this.st?.load(1); this.st?.load();
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical()
} }
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {

View File

@ -92,13 +92,13 @@
{{i?.unloadPlanTime}} {{i?.unloadPlanTime}}
</sv> --> </sv> -->
<sv label="接单数量"> <sv label="接单数量">
{{i?.acceptWeight}}吨,{{i?.acceptVolume}}方,{{i?.acceptNumber}}件 {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方
</sv> </sv>
<sv *ngIf="i?.billStatus =='3' || i?.billStatus =='4' || i?.billStatus =='5'" label="装货数量"> <sv *ngIf="i?.billStatus =='3' || i?.billStatus =='4' || i?.billStatus =='5'" label="装货数量">
{{i?.acceptWeight}}吨,{{i?.acceptVolume}}方,{{i?.acceptNumber}}件 {{ i?.loadWeight }}吨{{ i?.loadVolume }}方
</sv> </sv>
<sv *ngIf="i?.billStatus =='4' || i?.billStatus =='5'" label="卸货数量"> <sv *ngIf="i?.billStatus =='4' || i?.billStatus =='5'" label="卸货数量">
{{i?.settlementWeight}}吨,{{i?.settlementVolume}}方,{{i?.acceptNumber}}件 { i?.settlementWeight }}吨,{{ i?.settlementVolume }}方
</sv> </sv>
</sv-container> </sv-container>
<div class="mt-md"> <div class="mt-md">