This commit is contained in:
Taric Xin
2021-12-29 20:32:43 +08:00
parent a99a15e570
commit e2fbea997a

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup,Validators,FormControl } from '@angular/forms'; import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { import {
SFComponent, SFComponent,
@ -11,7 +11,7 @@ import {
SFUISchema SFUISchema
} from '@delon/form'; } from '@delon/form';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
import { AmapPoiPickerComponent,AmapService, ShipperBaseService } from '@shared'; import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component'; import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementService } from '../../services/supply-management.service';
@ -40,9 +40,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
totalFees: any; // 总数信息 totalFees: any; // 总数信息
totalDistance = 0.0; //总里程 totalDistance = 0.0; //总里程
totalTime = 0.0; //路程总时间 totalTime = 0.0; //路程总时间
currentRate = 0 //实时计算的费率 currentRate = 0; //实时计算的费率
npp =false npp = false;
id = this.route.snapshot.params.id; id = this.route.snapshot.params.id;
// // 单位 // // 单位
unit1 = '吨'; unit1 = '吨';
@ -64,7 +64,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
) { ) {
this.validateForm1 = fb.group({ this.validateForm1 = fb.group({
loadingTime: [null, []], loadingTime: [null, []],
unloadingTime: [null, []], unloadingTime: [null, []]
}); });
} }
@ViewChild('sf1', { static: false }) sf1!: SFComponent; @ViewChild('sf1', { static: false }) sf1!: SFComponent;
@ -95,14 +95,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
schema7: SFSchema = {}; schema7: SFSchema = {};
ui7!: SFUISchema; ui7!: SFUISchema;
ngOnInit(): void { ngOnInit(): void {
if(this.route.snapshot?.queryParams?.sta === '1') { if (this.route.snapshot?.queryParams?.sta === '1') {
console.log('修改') console.log('修改');
this.PageStatus = '整车修改'; this.PageStatus = '整车修改';
} else if(this.route.snapshot?.queryParams?.sta === '2') { } else if (this.route.snapshot?.queryParams?.sta === '2') {
this.PageStatus = '整车下一单'; this.PageStatus = '整车下一单';
} else if(this.route.snapshot?.queryParams?.sta === '3') { } else if (this.route.snapshot?.queryParams?.sta === '3') {
this.PageStatus = '大宗修改'; this.PageStatus = '大宗修改';
} else if(this.route.snapshot?.queryParams?.sta === '4') { } else if (this.route.snapshot?.queryParams?.sta === '4') {
this.PageStatus = '大宗下一单'; this.PageStatus = '大宗下一单';
} }
this.initSF1(); this.initSF1();
@ -130,20 +130,20 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
onSearch: (q: any) => { onSearch: (q: any) => {
if (!!q) { if (!!q) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q}) .request(this.service.$api_enterpriceList, { enterpriseName: q })
.pipe(map((res) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise(); .toPromise();
} else { } else {
return of([]); return of([]);
} }
}, },
change: (q: any) => { change: (q: any) => {
this.getRegionCode(q) this.getRegionCode(q);
}, },
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value
}, }
} as SFSelectWidgetSchema, } as SFSelectWidgetSchema
}, },
enterpriseProjectId: { enterpriseProjectId: {
type: 'string', type: 'string',
@ -151,7 +151,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
enterpriseInfoName: { enterpriseInfoName: {
@ -159,7 +159,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
title: '网络货运人', title: '网络货运人',
ui: { ui: {
widget: 'text' widget: 'text'
}, }
}, },
externalResourceCode: { externalResourceCode: {
type: 'string', type: 'string',
@ -243,7 +243,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
} }
}, },
required: ['goodsName', ] required: ['goodsName']
}; };
this.ui3 = { this.ui3 = {
'*': { '*': {
@ -335,18 +335,18 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
// 获取城市列表 // 获取城市列表
getRegionCode(regionCode: any) { getRegionCode(regionCode: any) {
console.log(regionCode) console.log(regionCode);
return this.service return this.service
.request(this.service.$api_get_enterprise_project, { id: regionCode }) .request(this.service.$api_get_enterprise_project, { id: regionCode })
.pipe( .pipe(
map((res) => map(res =>
res.map((item: any) => ({ res.map((item: any) => ({
label: item.projectName, label: item.projectName,
value: item.id, value: item.id
})), }))
),
) )
.subscribe((res) => { )
.subscribe(res => {
this.sf1.getProperty('/enterpriseProjectId')!.schema.enum = res; this.sf1.getProperty('/enterpriseProjectId')!.schema.enum = res;
this.sf1.getProperty('/enterpriseProjectId')!.widget.reset(res); this.sf1.getProperty('/enterpriseProjectId')!.widget.reset(res);
}); });
@ -393,7 +393,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'receipt:type' }, params: { dictKey: 'receipt:type' },
containsAllLable:false, containsAllLable: false,
placeholder: '请选择', placeholder: '请选择',
errors: { required: '请选择' }, errors: { required: '请选择' },
visibleIf: { visibleIf: {
@ -465,7 +465,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} as SFTextareaWidgetSchema } as SFTextareaWidgetSchema
} }
}, },
required: ['stateReceipt', 'receiptType','receiptAddressId'] required: ['stateReceipt', 'receiptType', 'receiptAddressId']
}; };
this.ui6 = { this.ui6 = {
'*': { '*': {
@ -475,8 +475,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}; };
} }
changeValue() { changeValue() {
this.totalFees = Number(this.sf7?.value?.appendFee) + Number(this.sf7?.value?.oilCardPay) + Number(this.sf7?.value?.prePay) + Number(this.sf7?.value?.receiptPay) + Number(this.sf7?.value?.toPay) this.totalFees =
console.log(this.totalFees) Number(this.sf7?.value?.appendFee) +
Number(this.sf7?.value?.oilCardPay) +
Number(this.sf7?.value?.prePay) +
Number(this.sf7?.value?.receiptPay) +
Number(this.sf7?.value?.toPay);
console.log(this.totalFees);
} }
initSF7() { initSF7() {
this.schema7 = { this.schema7 = {
@ -508,8 +513,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
default: 0, default: 0,
ui: { prefix: '¥', change: args => this.payChange() } as SFNumberWidgetSchema ui: { prefix: '¥', change: args => this.payChange() } as SFNumberWidgetSchema
}, },
subtotal: { type: 'number', title: '小计',default: 0, ui: {widget: 'custom' } as SFNumberWidgetSchema }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
appendFee: { type: 'number', title: '附加费', default: 0, ui: {widget: 'custom' } as SFNumberWidgetSchema }, appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
total: { type: 'number', title: '总费用', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, total: { type: 'number', title: '总费用', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
paymentDays: { paymentDays: {
type: 'string', type: 'string',
@ -531,14 +536,18 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}; };
} }
payChange() { payChange() {
const subtotal = (this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.oilCardPay + this.sf7.value.receiptPay) || 0; const subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.oilCardPay + this.sf7.value.receiptPay || 0;
const oilCardPay = this.sf7.value.oilCardPay || 0; const oilCardPay = this.sf7.value.oilCardPay || 0;
this.service.request(this.service.$api_getCalculatedSurcharge+`?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`).subscribe(res => { this.service
.request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`)
.subscribe(res => {
if (res) { if (res) {
this.sf7.setValue('/appendFee', res.surcharge); this.sf7.setValue('/appendFee', res.surcharge);
this.sf7.setValue('/subtotal', subtotal); this.sf7.setValue('/subtotal', subtotal);
this.sf7.setValue('/total', subtotal+res.surcharge); this.sf7.setValue('/total', subtotal + res.surcharge);
this.service.request(this.service.$api_getcalculatedServiceRate+`?invoiceAmount=${subtotal+res.surcharge}&totalFreight=${subtotal}`).subscribe(res => { this.service
.request(this.service.$api_getcalculatedServiceRate + `?invoiceAmount=${subtotal + res.surcharge}&totalFreight=${subtotal}`)
.subscribe(res => {
if (res) { if (res) {
this.currentRate = res.rate; this.currentRate = res.rate;
} else { } else {
@ -549,10 +558,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.service.msgSrv.error(res.msg); this.service.msgSrv.error(res.msg);
} }
}); });
} }
addStartInfo(event: any) { addStartInfo(event: any) {
if (this.startInfo.length < 5) { if (this.startInfo.length < 5) {
const controlId = this.startInfo.length; const controlId = this.startInfo.length;
@ -572,12 +579,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
} }
} }
subStartInfo(event: any, index: number, id?:any) { subStartInfo(event: any, index: number, id?: any) {
console.log(event, index, id) console.log(event, index, id);
if(id) { if (id) {
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => { this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {
console.log(res) console.log(res);
}) });
} }
this.startInfo.splice(index, 1); this.startInfo.splice(index, 1);
this.validateForm1.removeControl(`loadAddress${index}`); this.validateForm1.removeControl(`loadAddress${index}`);
@ -604,13 +611,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
} }
} }
subEndInfo(event: any, index: number, id?:any) { subEndInfo(event: any, index: number, id?: any) {
if(id) { if (id) {
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => { this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {
console.log(res) console.log(res);
}) });
} }
console.log(event, index, id) console.log(event, index, id);
this.endInfo.splice(index, 1); this.endInfo.splice(index, 1);
this.validateForm1.removeControl(`unloadAddress${index}`); this.validateForm1.removeControl(`unloadAddress${index}`);
this.validateForm1.removeControl(`unloadName${index}`); this.validateForm1.removeControl(`unloadName${index}`);
@ -626,8 +633,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}); });
} }
submit(): void { submit(): void {
console.log('进来了') console.log('进来了');
console.log(this.startInfo) console.log(this.startInfo);
// Object.keys(this.validateForm1.controls).forEach(key => { // Object.keys(this.validateForm1.controls).forEach(key => {
// this.validateForm1.controls[key].markAsDirty(); // this.validateForm1.controls[key].markAsDirty();
// this.validateForm1.controls[key].updateValueAndValidity(); // this.validateForm1.controls[key].updateValueAndValidity();
@ -639,14 +646,36 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
// if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) { // if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
// return; // return;
// } // }
console.log(this.validateForm1.value) console.log(this.validateForm1.value);
if(typeof(this.validateForm1.value.unloadingTime) !== 'string' ) { if (typeof this.validateForm1.value.unloadingTime !== 'string') {
var c = new Date(this.validateForm1.value.unloadingTime); var c = new Date(this.validateForm1.value.unloadingTime);
this.validateForm1.value.unloadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds()) this.validateForm1.value.unloadingTime =
c.getFullYear() +
'-' +
this.addPreZero(c.getMonth() + 1) +
'-' +
this.addPreZero(c.getDate()) +
' ' +
this.addPreZero(c.getHours()) +
':' +
this.addPreZero(c.getMinutes()) +
':' +
this.addPreZero(c.getSeconds());
} }
if(typeof(this.validateForm1.value.loadingTime) !== 'string' ) { if (typeof this.validateForm1.value.loadingTime !== 'string') {
var c = new Date(this.validateForm1.value.loadingTime); var c = new Date(this.validateForm1.value.loadingTime);
this.validateForm1.value.loadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds()) this.validateForm1.value.loadingTime =
c.getFullYear() +
'-' +
this.addPreZero(c.getMonth() + 1) +
'-' +
this.addPreZero(c.getDate()) +
' ' +
this.addPreZero(c.getHours()) +
':' +
this.addPreZero(c.getMinutes()) +
':' +
this.addPreZero(c.getSeconds());
} }
// if (this.validateForm1.invalid) { // if (this.validateForm1.invalid) {
// return; // return;
@ -658,7 +687,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
paymentDays: this.sf7.value.paymentDays, paymentDays: this.sf7.value.paymentDays,
loadingTime: this.validateForm1?.value?.loadingTime, loadingTime: this.validateForm1?.value?.loadingTime,
unloadingTime: this.validateForm1?.value?.unloadingTime, unloadingTime: this.validateForm1?.value?.unloadingTime,
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,], unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo],
goodsInfoDTOList: [ goodsInfoDTOList: [
{ {
...this.sf4.value, ...this.sf4.value,
@ -667,21 +696,21 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
maxCube: this.sf4.value.maxCube.join(',') maxCube: this.sf4.value.maxCube.join(',')
} }
] ]
} };
params.shippingInformationDTO = { params.shippingInformationDTO = {
...this.sf7.value, ...this.sf7.value,
totalFees: this.totalFees totalFees: this.totalFees
} };
console.log(params) console.log(params);
if(this.PageStatus === '整车修改') { if (this.PageStatus === '整车修改') {
this.requests(this.service.$api_set_WholeModify, params); this.requests(this.service.$api_set_WholeModify, params);
} else if(this.PageStatus === '整车下一单') { } else if (this.PageStatus === '整车下一单') {
this.requests(this.service.$api_set_saveAnotherWholeOrder, params); this.requests(this.service.$api_set_saveAnotherWholeOrder, params);
} }
} }
addPreZero(num: any){ addPreZero(num: any) {
if(num<10){ if (num < 10) {
return '0'+num; return '0' + num;
} else { } else {
return num; return num;
} }
@ -699,7 +728,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} else { } else {
this.service.msgSrv.error(res.msg); this.service.msgSrv.error(res.msg);
} }
}) });
} }
// 打开地图 // 打开地图
openMap(type: string, index: number) { openMap(type: string, index: number) {
@ -741,50 +770,50 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
} }
}); });
} }
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
} }
// 初始化信息 // 初始化信息
initdata() { initdata() {
this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, {id:this.id}).subscribe((res) => { this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, { id: this.id }).subscribe(res => {
this.dataR(res); this.dataR(res);
}) });
} }
asds(i: any) { asds(i: any) {
console.log(i) console.log(i);
} }
// 初始化信息 // 初始化信息
dataR (res: any) { dataR(res: any) {
// this.dataList = res; // this.dataList = res;
if(res?.shipperAppUserName) { if (res?.shipperAppUserName) {
const List: any = [] const List: any = [];
this.service.request(this.service.$api_enterpriceList, { enterpriseName: res?.shipperAppUserName}).subscribe((res) => { this.service.request(this.service.$api_enterpriceList, { enterpriseName: res?.shipperAppUserName }).subscribe(rs => {
console.log(res) rs?.forEach((element: any) => {
res?.forEach((element: any) => { List.push({ label: element.enterpriseName, value: element.id });
List.push({ label: element.enterpriseName, value: element.id } )
}); });
console.log(List)
this.sf1.getProperty('/shipperAppUserId')!.schema.enum = List; this.sf1.getProperty('/shipperAppUserId')!.schema.enum = List;
this.sf1.getProperty('/shipperAppUserId')!.widget.reset(List); this.sf1.getProperty('/shipperAppUserId')!.widget.reset(List);
}) if (res?.shipperAppUserId) {
this.sf1.setValue('/shipperAppUserId', res?.shipperAppUserId);
this.getRegionCode(res?.shipperAppUserId);
} }
if(res?.shipperAppUserId) { });
this.getRegionCode(res?.shipperAppUserId)
} }
this.sf1data = { this.sf1data = {
// enterpriseProjectId: res?.enterpriseProjectId, // enterpriseProjectId: res?.enterpriseProjectId,
enterpriseInfoName: res?.enterpriseInfoName, enterpriseInfoName: res?.enterpriseInfoName,
externalResourceCode: res?.externalResourceCode, externalResourceCode: res?.externalResourceCode,
dispatchId: res?.dispatchId , dispatchId: res?.dispatchId
} };
if(this.PageStatus === '整车修改') { if (this.PageStatus === '整车修改') {
this.sf1data.id = res?.id; this.sf1data.id = res?.id;
} }
res?.unLoadingPlaceVOList.forEach((element: any) => { res?.unLoadingPlaceVOList.forEach((element: any) => {
if(element.type === 1 || element.type === '1') { if (element.type === 1 || element.type === '1') {
const controlId = this.startInfo.length; const controlId = this.startInfo.length;
if(this.PageStatus === '整车修改') { if (this.PageStatus === '整车修改') {
this.startInfo.push({ this.startInfo.push({
detailedAddress: element.detailedAddress, detailedAddress: element.detailedAddress,
appUserName: element.appUserName, appUserName: element.appUserName,
@ -796,7 +825,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
area: element.area, area: element.area,
type: element.type, type: element.type,
id: element.id id: element.id
}) });
} else { } else {
this.startInfo.push({ this.startInfo.push({
detailedAddress: element.detailedAddress, detailedAddress: element.detailedAddress,
@ -807,16 +836,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
province: element.province, province: element.province,
city: element.city, city: element.city,
area: element.area, area: element.area,
type: element.type, type: element.type
}) });
} }
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadName${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)); this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
} else if(element.type === 2 || element.type === '2') { } else if (element.type === 2 || element.type === '2') {
const controlId = this.endInfo.length; const controlId = this.endInfo.length;
if(this.PageStatus === '整车修改') { if (this.PageStatus === '整车修改') {
this.endInfo.push({ this.endInfo.push({
detailedAddress: element?.detailedAddress, detailedAddress: element?.detailedAddress,
appUserName: element?.appUserName, appUserName: element?.appUserName,
@ -828,7 +857,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
area: element.area, area: element.area,
type: element.type, type: element.type,
id: element.id id: element.id
}) });
} else { } else {
this.endInfo.push({ this.endInfo.push({
detailedAddress: element?.detailedAddress, detailedAddress: element?.detailedAddress,
@ -840,7 +869,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
city: element.city, city: element.city,
area: element.area, area: element.area,
type: element.type type: element.type
}) });
} }
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
@ -849,50 +878,50 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}); });
this.sf3data = { this.sf3data = {
goodsName: res?.goodsInfoVOList[0]?.goodsName , goodsName: res?.goodsInfoVOList[0]?.goodsName
} };
this.sf4data = { this.sf4data = {
weight: res?.goodsInfoVOList[0]?.weight , weight: res?.goodsInfoVOList[0]?.weight,
volume: res?.goodsInfoVOList[0]?.volume , volume: res?.goodsInfoVOList[0]?.volume,
vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand , vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand,
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') , maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(','),
maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '', maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '',
number: res?.goodsInfoVOList[0]?.number , number: res?.goodsInfoVOList[0]?.number,
goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName , goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName,
modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId , modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId,
resourceId: res?.goodsInfoVOList[0]?.resourceId , resourceId: res?.goodsInfoVOList[0]?.resourceId,
rule: res?.goodsInfoVOList[0]?.rule , rule: res?.goodsInfoVOList[0]?.rule,
settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis , settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis
} };
if(res?.loadingTime) { if (res?.loadingTime) {
this.loadingTime = res?.loadingTime; this.loadingTime = res?.loadingTime;
} }
if(res?.unloadingTime) { if (res?.unloadingTime) {
this.unloadingTime = res?.unloadingTime; this.unloadingTime = res?.unloadingTime;
} }
if(this.PageStatus === '整车修改' ) { if (this.PageStatus === '整车修改') {
this.sf4data.id = res?.goodsInfoVOList[0]?.id; this.sf4data.id = res?.goodsInfoVOList[0]?.id;
} }
this.totalFees = res?.shippingInformationVO?.totalFee || '0'; this.totalFees = res?.shippingInformationVO?.totalFee || '0';
this.sf5data = { this.sf5data = {
goodsValue: res?.goodsValue , goodsValue: res?.goodsValue
} };
console.log(res?.stateReceipt) console.log(res?.stateReceipt);
this.sf6data = { this.sf6data = {
stateReceipt: res?.stateReceipt, stateReceipt: res?.stateReceipt,
receiptType: res?.receiptType , receiptType: res?.receiptType,
receiptUserId: res?.receiptUserId , receiptUserId: res?.receiptUserId,
remarks: res?.remarks remarks: res?.remarks
} };
this.sf7data = { this.sf7data = {
prePay: res?.shippingInformationVO?.prePay , prePay: res?.shippingInformationVO?.prePay,
toPay: res?.shippingInformationVO?.toPay , toPay: res?.shippingInformationVO?.toPay,
oilCardPay: res?.shippingInformationVO?.oilCardPay , oilCardPay: res?.shippingInformationVO?.oilCardPay,
receiptPay: res?.shippingInformationVO?.receiptPay , receiptPay: res?.shippingInformationVO?.receiptPay,
// subtotal: res?.shippingInformationVO?.oilCardPay , // subtotal: res?.shippingInformationVO?.oilCardPay ,
appendFee: res?.shippingInformationVO?.appendFee , appendFee: res?.shippingInformationVO?.appendFee,
paymentDays: res?.paymentDays , paymentDays: res?.paymentDays
} };
} }
backBillChange() { backBillChange() {
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({