From a1b294eb8aade3a39487ecfe83940d2430ac6c09 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 31 Mar 2022 13:43:43 +0800 Subject: [PATCH] fix bug --- .../onecar-publish.component.html | 93 +++++++------------ .../onecar-publish.component.ts | 41 ++++---- .../release-publish.component.html | 93 +++++++------------ .../release-publish.component.ts | 41 ++++---- 4 files changed, 114 insertions(+), 154 deletions(-) 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 23ed8a52..7eb10959 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 @@ -188,26 +188,26 @@ - + - + - +
- +
@@ -219,14 +219,22 @@
+ +  货源曝光率 +10   +  车源匹配率 +10 + + +  货源曝光率 +20   +  车源匹配率 +20 + - 香港、澳门、台湾、西藏、新疆不予承保,单次运输保额仅限200万元以内,详见《投保告知》 + ①香港、澳门、台湾、西藏、新疆不予承保,②单次运输保额仅限200万元以内,③保险详细内容及注意事项请见《保险告知函》
@@ -241,74 +249,41 @@ +
运费信息
-
+
- + - + - + {{ i.value | currency }} - {{ i.value | currency }}(费率:{{ currentRate | number: '0.2-4' }}%) + {{ i.value | currency }}(费率:{{ currentRate | number: + '0.2-4' }}%) {{ i.value | currency }} -
-
-
- +
+
+
-
+
 天内支付运费
-
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 b2a27627..3c8848cd 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 @@ -448,6 +448,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { }; } + initSF5() { this.schema5 = { properties: { @@ -461,13 +462,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { map((res: any) => { return [...res]; }) - ); + ) }, change: (tag: any, org: any) => { - if (tag === '3') { + if(tag === '3'){ this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); - } else { + }else { this.getInsurersPrice(tag); } } @@ -477,29 +478,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { type1: { type: 'string', title: '', - enum: ['货源曝光率 +10', '车源匹配率 +10'], - readOnly: true, ui: { - widget: 'checkbox', + widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '0' } - } as SFCheckboxWidgetSchema, - default: ['货源曝光率 +10', '车源匹配率 +10'] + } , }, type2: { type: 'string', title: '', - enum: ['货源曝光率 +20', '车源匹配率 +20'], - readOnly: true, ui: { - widget: 'checkbox', + widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '1' } - } as SFCheckboxWidgetSchema, - default: ['货源曝光率 +20', '车源匹配率 +20'] + } }, insurancePremium: { type: 'string', title: '服务包费用', - readOnly: true, + readOnly:true, ui: { visibleIf: { insuranceType: (value: string) => value !== '3' } } @@ -526,9 +521,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '1' } } - } + }, }, - required: ['insurancePremium'] + required: [ 'insurancePremium'] }; this.ui5 = { '*': { @@ -1022,6 +1017,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { paymentDays: this.sf7.value.paymentDays, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, + subtotal :this.sf7.value.subtotal, + total:this.sf7.value.total, insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, goodsValue: this.sf4.value.goodsValue }; @@ -1419,7 +1416,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { console.log(this.totalDistance); - if (insuranceType !== '3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0) { + if (insuranceType !== '3' && this.totalDistance > 0) { const params = { insuranceType, goodsValue: this.sf4.value.goodsValue, @@ -1436,4 +1433,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { }); } } + // 运费信息价格变更 + priceChange(event:any, i:any){ + i.setValue(event); + if(event>=99999){ + this.modalService.warning({ + nzTitle: '可输入的最大金额为99999元', + }); + } + this.payChange() + } } 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 7423108d..b3be726e 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,7 +180,6 @@ -
货物信息
@@ -191,26 +190,26 @@ - + - + - +
- +
@@ -222,14 +221,22 @@
+ +  货源曝光率 +10   +  车源匹配率 +10 + + +  货源曝光率 +20   +  车源匹配率 +20 + - 香港、澳门、台湾、西藏、新疆不予承保,单次运输保额仅限200万元以内,详见《投保告知》 + ①香港、澳门、台湾、西藏、新疆不予承保,②单次运输保额仅限200万元以内,③保险详细内容及注意事项请见《保险告知函》
@@ -247,71 +254,37 @@
运费信息
-
+
- + - + - + {{ i.value | currency }} - {{ i.value | currency }}(费率:{{ currentRate | number: '0.2-4' }}%) + {{ i.value | currency }}(费率:{{ currentRate | number: + '0.2-4' }}%) {{ i.value | currency }} -
-
-
- +
+
+
-
+
 天内支付运费
-
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 312a5e7d..0f607efa 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 @@ -436,14 +436,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { map((res: any) => { return [...res]; }) - ); + ) }, change: (tag: any, org: any) => { - if (tag === '3') { + if(tag === '3'){ this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); - } else { - console.log(tag); + }else { this.getInsurersPrice(tag); } } @@ -453,29 +452,23 @@ export class SupplyManagementReleasePublishComponent implements OnInit { type1: { type: 'string', title: '', - enum: ['货源曝光率 +10', '车源匹配率 +10'], - readOnly: true, ui: { - widget: 'checkbox', + widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '0' } - } as SFCheckboxWidgetSchema, - default: ['货源曝光率 +10', '车源匹配率 +10'] + } , }, type2: { type: 'string', title: '', - enum: ['货源曝光率 +20', '车源匹配率 +20'], - readOnly: true, ui: { - widget: 'checkbox', + widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '1' } - } as SFCheckboxWidgetSchema, - default: ['货源曝光率 +20', '车源匹配率 +20'] + } }, insurancePremium: { type: 'string', title: '服务包费用', - readOnly: true, + readOnly:true, ui: { visibleIf: { insuranceType: (value: string) => value !== '3' } } @@ -502,9 +495,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '1' } } - } + }, }, - required: ['insurancePremium'] + required: [ 'insurancePremium'] }; this.ui5 = { '*': { @@ -962,6 +955,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ...this.sf6.value, expenseDTOList: expenseList, paymentDays: this.sf7.value.paymentDays, + subtotal :this.sf7.value.subtotal, + total:this.sf7.value.total, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, @@ -1192,7 +1187,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) { console.log(insuranceType); console.log(this.totalDistance); - if (insuranceType !== '3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0) { + if (insuranceType !== '3' && this.totalDistance > 0) { const params = { insuranceType, goodsValue: this.sf4.value.goodsValue, @@ -1209,4 +1204,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }); } } + // 运费信息价格变更 + priceChange(event:any, i:any){ + i.setValue(event); + if(event>=99999){ + this.modalService.warning({ + nzTitle: '可输入的最大金额为99999元', + }); + } + this.payChange() + } }