From e61ba7f25e6f28f680d793245522276ffa8c028a Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 7 Mar 2022 16:23:33 +0800 Subject: [PATCH 1/5] fix bug --- .../bulk-publish/bulk-publish.component.ts | 6 +++++- .../bulk-release-publish.component.ts | 4 +++- .../onecar-publish.component.ts | 9 ++++---- .../release-publish.component.ts | 21 +++---------------- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 18476354..ec78a65e 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -698,7 +698,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit { ...this.sf1.value, ...this.sf7.value, unLoadingPlaceDTOList: LoadingList, - goodsInfoDTOList: goodsInfoDTOList + goodsInfoDTOList: goodsInfoDTOList, + estimatedKilometers: this.totalDistance, + estimatedTravelTime: this.totalTime, }; params.freightPrice = this.totalFees; const modalRef = this.modalService.create({ @@ -885,6 +887,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit { if (res?.enterpriseProjectId) { this.enterpriseProjectIds = res.enterpriseProjectId; } + this.totalDistance = res?.estimatedKilometers; + this.totalTime = res?.estimatedTravelTime; this.sf1data = { dispatchPhone: res?.dispatchPhone, dispatchName: res?.dispatchName, diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 1811ade3..a124d70b 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -619,7 +619,9 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { ...this.sf1.value, unLoadingPlaceDTOList: LoadingList, goodsInfoDTOList: goodsInfoList, - ...this.sf6.value + ...this.sf6.value, + estimatedKilometers: this.totalDistance, + estimatedTravelTime: this.totalTime, }; const modalRef = this.modalService.create({ nzTitle: '运输协议', diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index a579ccf0..b7a6c3ab 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -657,19 +657,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { prePay: { type: 'number', title: '预付', - default: 0, ui: { widget: 'custom' } }, toPay: { type: 'number', title: '到付', - default: 0, ui: { widget: 'custom' } }, receiptPay: { type: 'number', title: '回单付', - default: 0, ui: { widget: 'custom' } }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, @@ -1001,7 +998,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ...this.sf5.value, ...this.sf6.value, expenseDTOList: expenseList, - paymentDays: this.sf7.value.paymentDays + paymentDays: this.sf7.value.paymentDays, + estimatedKilometers: this.totalDistance, + estimatedTravelTime: this.totalTime, }; const modalRef = this.modalService.create({ nzTitle: '运输协议', @@ -1126,6 +1125,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { if (res?.enterpriseProjectId) { this.enterpriseProjectIds = res.enterpriseProjectId; } + this.totalDistance = res?.estimatedKilometers; + this.totalTime = res?.estimatedTravelTime; this.sf1data = { enterpriseInfoName: res?.enterpriseInfoName, enterpriseInfoId: res?.enterpriseInfoId, diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 3cbfbbc8..ef7111ae 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -614,19 +614,16 @@ export class SupplyManagementReleasePublishComponent implements OnInit { prePay: { type: 'number', title: '预付', - default: 0, ui: { widget: 'custom' } }, toPay: { type: 'number', title: '到付', - default: 0, ui: { widget: 'custom' } }, receiptPay: { type: 'number', title: '回单付', - default: 0, ui: { widget: 'custom' } }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, @@ -924,20 +921,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' }, { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } ]; - console.log(this.sf55?.value); - // const params = { - // id: '', - // ...this.sf1.value, - // unLoadingPlaceDTOList: LoadingList, - // unloadingTime: format(this.validateForm1.value?.unloadingTime, 'yyyy-MM-dd HH:mm:ss'), - // loadingTime: format(this.validateForm1.value?.loadingTime, 'yyyy-MM-dd HH:mm:ss'), - // goodsInfoDTOList: goodsInfoList, - // ...this.sf5.value, - // ...this.sf6.value, - // expenseDTOList: expenseList, - // paymentDays: this.sf7.value?.paymentDays, - // insuranceType:this.sf55?.value?.insuranceType, - // }; const params = { id: '', ...this.sf1.value, @@ -948,7 +931,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ...this.sf5.value, ...this.sf6.value, expenseDTOList: expenseList, - paymentDays: this.sf7.value.paymentDays + paymentDays: this.sf7.value.paymentDays, + estimatedKilometers: this.totalDistance, + estimatedTravelTime: this.totalTime, }; console.log(params); const modalRef = this.modalService.create({ From 4593e3240e28fdb50af0bf433c39ba8a0183c6b2 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 7 Mar 2022 16:40:52 +0800 Subject: [PATCH 2/5] fix bug --- .../components/bulk-publish/bulk-publish.component.ts | 1 + .../bulk-release-publish/bulk-release-publish.component.ts | 1 + .../components/onecar-publish/onecar-publish.component.ts | 1 + .../components/release-publish/release-publish.component.ts | 1 + 4 files changed, 4 insertions(+) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index ec78a65e..9eb12591 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -262,6 +262,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { goodsName1: { type: 'string', title: '', + maxLength: 20, ui: { errors: { required: '请填写货物名称' }, visibleIf: { diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index a124d70b..254cab4f 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -288,6 +288,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { goodsName1: { type: 'string', title: '', + maxLength: 20, ui: { errors: { required: '请填写货物名称' }, visibleIf: { diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index b7a6c3ab..fb25e21b 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -310,6 +310,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { goodsName1: { type: 'string', title: '', + maxLength: 20, ui: { errors: { required: '请填写货物名称' }, visibleIf: { diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index ef7111ae..81dd8d73 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -293,6 +293,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { goodsName1: { type: 'string', title: '', + maxLength: 20, ui: { errors: { required: '请填写货物名称' }, visibleIf: { From 31959f9cbf26f382605bb4b652ed6250a18ef100 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 7 Mar 2022 16:45:08 +0800 Subject: [PATCH 3/5] fix bug --- .../usercenter/components/freight/list/list.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 2db6fa0b..5a32ae81 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -377,11 +377,12 @@ export class FreightComponentsListComponent implements OnInit { { title: '操作', width: '110px', + className: 'text-center', fixed: 'right', buttons: [ { type: 'divider' }, { - text: '查看
', + text: '查看  
', acl: { ability: ['USERCENTER-FREIGHT-LIST-view'] }, click: item => { this.router.navigate(['./detail', item.id], { relativeTo: this.ar }); From 4d61c136ffa0513ef6853012825f433812cda518 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 7 Mar 2022 17:05:09 +0800 Subject: [PATCH 4/5] fix bug --- .../onecar-publish.component.ts | 160 +++++++++--------- .../release-publish.component.ts | 134 ++++++++------- 2 files changed, 154 insertions(+), 140 deletions(-) diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index fb25e21b..949e6221 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -337,7 +337,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ui: { widget: 'custom', placeholder: '请输入', - errors: { required: '必填项' } + errors: { required: '必填项' }, + validator: val => this.customValidator(val) } }, volume: { @@ -345,7 +346,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入' + placeholder: '请输入', } }, number: { @@ -353,7 +354,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入' + placeholder: '请输入', } }, carModel: { @@ -385,37 +386,60 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), change: (tag: any, org: any) => { if (tag.includes('999')) { - this.sf4.setValue('/carModel', ['999']); + this.sf4.setValue('/carLength', ['999']); } } } - } + }, + hidenField: { + type: 'string', + title: '', + default: ' ', + ui: { + widget: 'text' + } + }, + insurancePackagedGoods: { + type: 'string', + title: '货物包装', + ui: { + widget: 'dict-select', + params: { dictKey: 'insure:packaged:goods' }, + containsAllLabel: false, + validator: val => { + if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { + return [{ keyword: 'required', message: '必填项' }]; + } else { + return []; + } + } + } as SFSelectWidgetSchema + }, + goodsValue: { + type: 'string', + title: '货物价值', + ui: { + widget: 'custom', + validator: val => { + if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { + return [{ keyword: 'required', message: '必填项' }]; + } else { + return []; + } + } + } + }, }, required: ['weight', 'carModel', 'carLength'] }; this.ui4 = { '*': { - spanLabelFixed: 90, - grid: { span: 24 } - }, - $weight: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $volume: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $number: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $carModel: { - spanLabelFixed: 100, - grid: { span: 8 } - }, - $carLength: { + spanLabelFixed: 115, grid: { span: 8 } } }; } + initSF5() { this.schema5 = { properties: { @@ -445,73 +469,30 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { type1: { type: 'string', title: '', - enum: ['资源曝光率 +10', '车源匹配率 +10'], + enum: ['货源曝光率 +10', '车源匹配率 +10'], readOnly: true, ui: { widget: 'checkbox', visibleIf: { insuranceType: (value: string) => value === '0' } } as SFCheckboxWidgetSchema, - default: ['资源曝光率 +10', '车源匹配率 +10'] + default: ['货源曝光率 +10', '车源匹配率 +10'] }, type2: { type: 'string', title: '', - enum: ['资源曝光率 +20', '车源匹配率 +20'], + enum: ['货源曝光率 +20', '车源匹配率 +20'], readOnly: true, ui: { widget: 'checkbox', visibleIf: { insuranceType: (value: string) => value === '1' } } as SFCheckboxWidgetSchema, - default: ['资源曝光率 +20', '车源匹配率 +20'] - }, - freeInsurance1: { - type: 'string', - title: '赠送基本险', - ui: { - widget: 'custom', - visibleIf: { insuranceType: (value: string) => value === '0' } - } - }, - freeInsurance2: { - type: 'string', - title: '赠送综合险', - ui: { - widget: 'custom', - visibleIf: { insuranceType: (value: string) => value === '1' } - } - }, - insurancePackagedGoods: { - type: 'string', - title: '货物包装', - ui: { - widget: 'dict-select', - params: { dictKey: 'insure:packaged:goods' }, - containsAllLabel: false, - visibleIf: { insuranceType: (value: string) => value !== '3' } - } as SFSelectWidgetSchema - }, - hidenField: { - type: 'string', - title: '', - default: ' ', - ui: { - widget: 'text' - } - }, - goodsValue: { - type: 'string', - title: '货物价值', - ui: { - widget: 'custom', - visibleIf: { insuranceType: (value: string) => value !== '3' } - } + default: ['货源曝光率 +20', '车源匹配率 +20'] }, insurancePremium: { type: 'string', - title: '', + title: '服务包费用', + readOnly:true, ui: { - widget: 'custom', - validator: val => this.customValidator(val), visibleIf: { insuranceType: (value: string) => value !== '3' } } }, @@ -521,9 +502,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ui: { hidden: true } - } + }, + freeInsurance1: { + type: 'string', + title: '预投基本险', + ui: { + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value === '0' } + } + }, + freeInsurance2: { + type: 'string', + title: '预投综合险', + ui: { + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value === '1' } + } + }, + + }, - required: ['insurancePackagedGoods', 'insurancePremium'] + required: [ 'insurancePremium'] }; this.ui5 = { '*': { @@ -544,6 +543,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }; } + /** * 自定义校验数据 * @param val @@ -1002,6 +1002,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { paymentDays: this.sf7.value.paymentDays, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, + insurancePackagedGoods:this.sf4.value.insurancePackagedGoods, + goodsValue:this.sf4.value.goodsValue, }; const modalRef = this.modalService.create({ nzTitle: '运输协议', @@ -1243,7 +1245,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { volume: res?.goodsInfoVOList[0]?.volume || '', number: res?.goodsInfoVOList[0]?.number || '', carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [], - carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [] + carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [], + goodsValue: res?.goodsValue || '', + insurancePackagedGoods: res?.insurancePackagedGoods || '', }; if (this.PageStatus === '整车修改') { this.sf4data.id = res?.goodsInfoVOList[0]?.id; @@ -1251,10 +1255,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.totalFees = res?.shippingInformationVO?.totalFee || '0'; this.sf5data = { insuranceType: res?.insuranceType || '', - goodsValue: res?.goodsValue || '', insurancePremium: res?.insurancePremium || '', insuranceRate: res?.insuranceRate || '', - insurancePackagedGoods: res?.insurancePackagedGoods || '' }; this.sf6data = { stateReceipt: res?.stateReceipt, @@ -1381,17 +1383,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { - if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { + if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) { const params = { insuranceType, - goodsValue: this.sf5.value.goodsValue, + goodsValue: this.sf4.value.goodsValue, km: this.totalDistance }; this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { if (res) { this.sf5.setValue('/insurancePremium', res.insurancePremium); this.sf5.setValue('/insuranceRate', res.insuranceRate); - } else { + }else{ this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 81dd8d73..6c4a9f46 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -329,7 +329,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入' + placeholder: '请输入', } }, number: { @@ -337,7 +337,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入' + placeholder: '请输入', } }, carModel: { @@ -373,7 +373,45 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } } } - } + }, + hidenField: { + type: 'string', + title: '', + default: ' ', + ui: { + widget: 'text' + } + }, + insurancePackagedGoods: { + type: 'string', + title: '货物包装', + ui: { + widget: 'dict-select', + params: { dictKey: 'insure:packaged:goods' }, + containsAllLabel: false, + validator: val => { + if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { + return [{ keyword: 'required', message: '必填项' }]; + } else { + return []; + } + } + } as SFSelectWidgetSchema + }, + goodsValue: { + type: 'string', + title: '货物价值', + ui: { + widget: 'custom', + validator: val => { + if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { + return [{ keyword: 'required', message: '必填项' }]; + } else { + return []; + } + } + } + }, }, required: ['weight', 'carModel', 'carLength'] }; @@ -381,10 +419,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { '*': { spanLabelFixed: 115, grid: { span: 8 } - }, - $carModel: { - spanLabelFixed: 100, - grid: { span: 8 } } }; } @@ -418,73 +452,30 @@ export class SupplyManagementReleasePublishComponent implements OnInit { type1: { type: 'string', title: '', - enum: ['资源曝光率 +10', '车源匹配率 +10'], + enum: ['货源曝光率 +10', '车源匹配率 +10'], readOnly: true, ui: { widget: 'checkbox', visibleIf: { insuranceType: (value: string) => value === '0' } } as SFCheckboxWidgetSchema, - default: ['资源曝光率 +10', '车源匹配率 +10'] + default: ['货源曝光率 +10', '车源匹配率 +10'] }, type2: { type: 'string', title: '', - enum: ['资源曝光率 +20', '车源匹配率 +20'], + enum: ['货源曝光率 +20', '车源匹配率 +20'], readOnly: true, ui: { widget: 'checkbox', visibleIf: { insuranceType: (value: string) => value === '1' } } as SFCheckboxWidgetSchema, - default: ['资源曝光率 +20', '车源匹配率 +20'] - }, - freeInsurance1: { - type: 'string', - title: '赠送基本险', - ui: { - widget: 'custom', - visibleIf: { insuranceType: (value: string) => value === '0' } - } - }, - freeInsurance2: { - type: 'string', - title: '赠送综合险', - ui: { - widget: 'custom', - visibleIf: { insuranceType: (value: string) => value === '1' } - } - }, - insurancePackagedGoods: { - type: 'string', - title: '货物包装', - ui: { - widget: 'dict-select', - params: { dictKey: 'insure:packaged:goods' }, - containsAllLabel: false, - visibleIf: { insuranceType: (value: string) => value !== '3' } - } as SFSelectWidgetSchema - }, - hidenField: { - type: 'string', - title: '', - default: ' ', - ui: { - widget: 'text' - } - }, - goodsValue: { - type: 'string', - title: '货物价值', - ui: { - widget: 'custom', - visibleIf: { insuranceType: (value: string) => value !== '3' } - } + default: ['货源曝光率 +20', '车源匹配率 +20'] }, insurancePremium: { type: 'string', - title: '', + title: '服务包费用', + readOnly:true, ui: { - widget: 'custom', - validator: val => this.customValidator(val), visibleIf: { insuranceType: (value: string) => value !== '3' } } }, @@ -494,9 +485,27 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { hidden: true } - } + }, + freeInsurance1: { + type: 'string', + title: '预投基本险', + ui: { + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value === '0' } + } + }, + freeInsurance2: { + type: 'string', + title: '预投综合险', + ui: { + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value === '1' } + } + }, + + }, - required: ['insurancePackagedGoods', 'insurancePremium'] + required: [ 'insurancePremium'] }; this.ui5 = { '*': { @@ -518,6 +527,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }; } + initSF6() { this.schema6 = { properties: { @@ -935,6 +945,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { paymentDays: this.sf7.value.paymentDays, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, + insurancePackagedGoods:this.sf4.value.insurancePackagedGoods, + goodsValue:this.sf4.value.goodsValue, }; console.log(params); const modalRef = this.modalService.create({ @@ -1150,17 +1162,17 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { - if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { + if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) { const params = { insuranceType, - goodsValue: this.sf5.value.goodsValue, + goodsValue: this.sf4.value.goodsValue, km: this.totalDistance }; this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { if (res) { this.sf5.setValue('/insurancePremium', res.insurancePremium); this.sf5.setValue('/insuranceRate', res.insuranceRate); - } else { + }else{ this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); } From 0d12b0bfa1437c2f61e4bcb20ba308732e995508 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 7 Mar 2022 17:27:43 +0800 Subject: [PATCH 5/5] fix bug --- .../bulk-detail-change.component.ts | 3 +- .../vehicle-detail-change.component.ts | 3 +- .../onecar-publish.component.html | 74 +++---------- .../release-publish.component.html | 102 ++++++------------ 4 files changed, 51 insertions(+), 131 deletions(-) diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts index 8de03795..337fa6ce 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-24 16:58:02 * @LastEditors : Shiming - * @LastEditTime : 2022-03-04 14:15:21 + * @LastEditTime : 2022-03-07 17:26:41 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -495,7 +495,6 @@ loadTime: any; // 货源单设置回显 this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => { if(res) { this.service.msgSrv.success('修改成功!'); - this.router.navigate(['/order-management/bulk']); } else { this.service.msgSrv.error(res?.msg); } diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts index 49a3a278..bdeac811 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-23 13:39:58 * @LastEditors : Shiming - * @LastEditTime : 2022-03-04 10:48:50 + * @LastEditTime : 2022-03-07 17:27:38 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -545,7 +545,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { console.log(res); if (res) { this.service.msgSrv.success('修改成功!'); - this.router.navigate(['/order-management/vehicle']); } else { this.service.msgSrv.error(res?.msg); } diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index a3fc1b2d..23ed8a52 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -177,6 +177,7 @@ +
货物信息
@@ -187,47 +188,32 @@ - + - + - + + +
+ + +
+
+
服务信息
@@ -239,34 +225,8 @@ - 推荐投保,填写货值自动估保费,司机接单后不可退保。详见《投保告知》 - -
- -
-
- -
- - - -

注意事项:

-

①请仔细阅读《投保告知函》;

-

②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;

-

③最低保费12元/每单;单次运输保额仅限200万元以内;

-

④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;

-
-
-
+ 香港、澳门、台湾、西藏、新疆不予承保,单次运输保额仅限200万元以内,详见《投保告知》
diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index 5b61cda9..7423108d 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -180,55 +180,43 @@
+
货物信息
-
+
- - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + +
+ + +
+
+
+
服务信息
@@ -240,34 +228,8 @@ - 推荐投保,填写货值自动估保费,司机接单后不可退保。详见《投保告知》 - -
- -
-
- -
- - - -

注意事项:

-

①请仔细阅读《投保告知函》;

-

②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;

-

③最低保费12元/每单;单次运输保额仅限200万元以内;

-

④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;

-
-
-
+ 香港、澳门、台湾、西藏、新疆不予承保,单次运输保额仅限200万元以内,详见《投保告知》