解决冲突
This commit is contained in:
@ -174,7 +174,7 @@ export class ContractManagementContractListComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'contract:document:type' },
|
||||
params: { dictKey: 'goodresource:type' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
|
||||
@ -128,7 +128,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'contract:template:type' },
|
||||
params: { dictKey: 'goodresource:type' },
|
||||
containsAllLable: true,
|
||||
visibleIf: {
|
||||
templateType: value => value === 'MX'
|
||||
|
||||
@ -105,7 +105,7 @@ export class ContractManagementTemplateFrameComponent implements OnInit {
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'contract:template:type' },
|
||||
params: { dictKey: 'goodresource:type' },
|
||||
containsAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
|
||||
@ -105,7 +105,7 @@ export class ContractManagementTemplatePartnerComponent implements OnInit {
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'contract:template:type' },
|
||||
params: { dictKey: 'goodresource:type' },
|
||||
containsAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
|
||||
@ -105,7 +105,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'contract:template:type' },
|
||||
params: { dictKey: 'goodresource:type' },
|
||||
containsAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
|
||||
@ -236,10 +236,9 @@
|
||||
<div class="align-center">
|
||||
<nz-input-number
|
||||
[ngModel]="i.value"
|
||||
[nzMin]="50000"
|
||||
[nzMax]="3000000"
|
||||
|
||||
[nzStep]="0.01"
|
||||
(ngModelChange)="i.setValue($event);getInsurersPrice($event)"
|
||||
(ngModelChange)="getInsurersPrice($event)"
|
||||
nzPlaceHolder="请输入50000-3000000之间数值"
|
||||
></nz-input-number>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { Subject } from 'rxjs';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import {
|
||||
SFCheckboxWidgetSchema,
|
||||
@ -48,6 +50,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
startInfo: any = []; // 发货地数据
|
||||
endInfo: any = []; // 卸货地数据
|
||||
PageStatus = '';
|
||||
changeSub = new Subject<string>();
|
||||
envCache: any;
|
||||
enterpriseProjectIds: any;
|
||||
constructor(
|
||||
@ -125,6 +128,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.initSF6();
|
||||
this.initSF7();
|
||||
this.initdata();
|
||||
this.getInsurers()
|
||||
}
|
||||
initSF1() {
|
||||
this.schema1 = {
|
||||
@ -1290,30 +1294,54 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
}
|
||||
getInsurersPrice($event: any) {
|
||||
getInsurersPrice($event?: any) {
|
||||
console.log($event);
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
this.changeSub.next(`${$event}`);
|
||||
|
||||
|
||||
}
|
||||
getInsurers($event?: any) {
|
||||
this.changeSub.pipe(debounceTime(500)).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
if (res) {
|
||||
console.log(res)
|
||||
if(res > 3000000 ) {
|
||||
console.log('1111')
|
||||
this.sf5.getProperty('/goodsValue')!.widget.reset(3000000);
|
||||
this.sf5.setValue('/goodsValue', 3000000);
|
||||
this.service.msgSrv.error('请输入50000-3000000之间数值!')
|
||||
}
|
||||
if(res < 50000) {
|
||||
// this.sf5.setValue('/goodsValue', 50000);
|
||||
this.sf5.getProperty('/goodsValue')!.widget.reset(50000);
|
||||
this.sf5.setValue('/goodsValue', 50000);
|
||||
|
||||
console.log('2222')
|
||||
this.service.msgSrv.error('请输入50000-3000000之间数值!')
|
||||
}
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -93,10 +93,6 @@ export class InsuranceTableComponent implements OnInit {
|
||||
* @param i 下标
|
||||
*/
|
||||
changeEndKm(event: any, i: number) {
|
||||
// console.log(this.debounce4(event, i));
|
||||
// console.log(this.data[i].startKm);
|
||||
// console.log(event);
|
||||
// console.log(i);
|
||||
if (event) {
|
||||
console.log(event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user