解决冲突

This commit is contained in:
wangshiming
2022-02-25 15:53:09 +08:00
parent deb9848fb7
commit 8da9e7a56f
4 changed files with 50 additions and 2 deletions

View File

@ -239,7 +239,7 @@
[nzMin]="50000"
[nzMax]="3000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);goodsValuesChange($event)"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-3000000之间数值"
></nz-input-number>
</div>

View File

@ -1299,4 +1299,28 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
});
}
}
getInsurersPrice() {
console.log(this.sf5.value.goodsValue)
console.log(this.sf5.value.insuranceType)
if (this.sf5.value.goodsValue >= 50000) {
if(this.totalDistance <=0){
this.service.msgSrv.warning('当前装卸货距离为0无法计算保价费金额');
return;
}
const params = {
goodsValue: this.sf5.value.goodsValue,
insuranceType: this.sf5.value.insuranceType,
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 {
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
}
});
}
}
}

View File

@ -241,7 +241,7 @@
[nzMin]="50000"
[nzMax]="3000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);goodsValuesChange($event)"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-3000000之间数值"
></nz-input-number>
</div>

View File

@ -1048,4 +1048,28 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
});
}
}
getInsurersPrice() {
console.log(this.sf5.value.goodsValue)
console.log(this.sf5.value.insuranceType)
if (this.sf5.value.goodsValue >= 50000) {
if(this.totalDistance <=0){
this.service.msgSrv.warning('当前装卸货距离为0无法计算保价费金额');
return;
}
const params = {
goodsValue: this.sf5.value.goodsValue,
insuranceType: this.sf5.value.insuranceType,
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 {
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
}
});
}
}
}