Добавить новое поле в разделе Страхование "Лизинг без КАСКО" (SelectLeasingWithoutKasko) - и реакцию на фильтрацию выпадающего списка из записей addproducttype, у которых:
Статус (evo_addproduct_type.statecode) = Активный (0) Тип продукта (evo_addproduct_type.evo_product_type) = Evo_КАСКО (100000007) Начало действия (evo_addproduct_type.evo_datefrom) меньше или равно текущей даты Окончание действия (evo_addproduct_type.evo_dateto) больше или равно текущей даты Min срок лизинга (evo_addproduct_type.evo_min_period) меньше или равно значению из поля "Срок лизинга, мес" (tbxLeasingPeriod) Max срок лизинга (evo_addproduct_type.evo_max_period) больше или равно значению из поля "Срок лизинга, мес" (tbxLeasingPeriod) По связи evo_evo_addproduct_type_evo_leasingobject_typ связана с карточкой Типа предмета лизинга (evo_leasingobject_type),указанной в поле "Тип предмета лизинга" (selectLeaseObjectType) Max стоимость ПЛ (evo_addproduct_type.evo_max_price) больше или равно значению ([Стоимость ПЛ tbxLeaseObjectPrice - Скидка tbxSupplierDiscountRub], переведенное в рубли - labelImportProgramSum + tbxAddEquipmentPrice) Min стоимость ПЛ (evo_addproduct_type.evo_min_price) меньше или равно значению ([Стоимость ПЛ tbxLeaseObjectPrice - Скидка tbxSupplierDiscountRub], переведенное в рубли - labelImportProgramSum + tbxAddEquipmentPrice) Отображать для расчета в ЛК (evo_addproduct_type.evo_visible_calc) = True
This commit is contained in:
parent
7b158a2c1f
commit
5a02082457
@ -822,6 +822,66 @@ const reactionEffects: IReactionEffect[] = [
|
||||
},
|
||||
}),
|
||||
|
||||
/**
|
||||
* сделали здесь для экономии времени
|
||||
* перенести в отдельный процесс leasingWithoutKasko
|
||||
*/
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
//@ts-ignore
|
||||
const plPriceRub = calculationStore.plPriceRub();
|
||||
//@ts-ignore
|
||||
const discountRub = calculationStore.discountRub();
|
||||
|
||||
const {
|
||||
leasingPeriod,
|
||||
leaseObjectType,
|
||||
addEquipmentPrice,
|
||||
importProgram,
|
||||
} = calculationStore.values;
|
||||
return {
|
||||
leasingPeriod,
|
||||
leaseObjectType,
|
||||
plPriceRub,
|
||||
discountRub,
|
||||
addEquipmentPrice,
|
||||
importProgram,
|
||||
};
|
||||
},
|
||||
effect: ({
|
||||
leasingPeriod,
|
||||
leaseObjectType,
|
||||
plPriceRub,
|
||||
discountRub,
|
||||
addEquipmentPrice,
|
||||
importProgram,
|
||||
}) => {
|
||||
calculationStore.setFilter('selectLeasingWithoutKasko', options =>
|
||||
options.filter(
|
||||
x =>
|
||||
x?.evo_max_period &&
|
||||
x?.evo_min_period &&
|
||||
x.evo_max_period >= leasingPeriod &&
|
||||
x.evo_min_period <= leasingPeriod &&
|
||||
x?.evo_max_price &&
|
||||
x?.evo_min_price &&
|
||||
x.evo_max_price >=
|
||||
plPriceRub - discountRub - importProgram + addEquipmentPrice &&
|
||||
x.evo_min_price <=
|
||||
plPriceRub - discountRub - importProgram + addEquipmentPrice &&
|
||||
x.evo_leasingobject_types?.find(
|
||||
x => x.evo_leasingobject_typeid === leaseObjectType,
|
||||
) &&
|
||||
x.evo_visible_calc,
|
||||
),
|
||||
);
|
||||
},
|
||||
options: {
|
||||
fireImmediately: true,
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { leasingPeriod, leaseObjectType } = calculationStore.values;
|
||||
|
||||
@ -556,8 +556,10 @@ type evo_addproduct_type {
|
||||
evo_leasingobject_types(statecode: Int): [evo_leasingobject_type]
|
||||
evo_max_age: Int
|
||||
evo_max_period: Decimal
|
||||
evo_max_price: Decimal
|
||||
evo_min_age: Int
|
||||
evo_min_period: Decimal
|
||||
evo_min_price: Decimal
|
||||
evo_name: String
|
||||
evo_nsib_limit: Decimal
|
||||
evo_planpayments(statecode: Int): [evo_planpayment]
|
||||
@ -956,6 +958,7 @@ type opportunity {
|
||||
evo_assignor_accountid: Uuid
|
||||
evo_businessunitid: Uuid
|
||||
evo_businessunitidData: businessunit
|
||||
evo_cession_incidentid: Uuid
|
||||
evo_check_type: [Int!]
|
||||
evo_check_type_fact: [Int!]
|
||||
evo_client_riskid: Uuid
|
||||
@ -1617,6 +1620,7 @@ type evo_contract {
|
||||
evo_agent_reward: Decimal
|
||||
evo_agent_reward_conditionid: Uuid
|
||||
evo_agent_reward_summ: Decimal
|
||||
evo_agent_reward_tech: Decimal
|
||||
evo_agent_service_list: [Int!]
|
||||
evo_approvallogs: [evo_approvallog]
|
||||
evo_balance_holder: Int
|
||||
@ -1629,6 +1633,7 @@ type evo_contract {
|
||||
evo_broker_reward: Decimal
|
||||
evo_broker_reward_conditionid: Uuid
|
||||
evo_broker_reward_summ: Decimal
|
||||
evo_broker_reward_tech: Decimal
|
||||
evo_broker_service_list: [Int!]
|
||||
evo_businessunitid: Uuid
|
||||
evo_calc_irr: Decimal
|
||||
@ -1655,6 +1660,7 @@ type evo_contract {
|
||||
evo_dealer_broker_reward: Decimal
|
||||
evo_dealer_broker_reward_conditionid: Uuid
|
||||
evo_dealer_broker_reward_summ: Decimal
|
||||
evo_dealer_broker_reward_tech: Decimal
|
||||
evo_dealer_broker_service_list: [Int!]
|
||||
evo_dealer_person_accountid: Uuid
|
||||
evo_dealer_person_accountidData: account
|
||||
@ -1662,6 +1668,7 @@ type evo_contract {
|
||||
evo_dealer_person_reward: Decimal
|
||||
evo_dealer_person_reward_conditionid: Uuid
|
||||
evo_dealer_person_reward_summ: Decimal
|
||||
evo_dealer_person_reward_tech: Decimal
|
||||
evo_dealer_person_service_list: [Int!]
|
||||
evo_debtwork_contractid: Uuid
|
||||
evo_debtwork_contractidData: evo_debtwork_contract
|
||||
@ -1685,6 +1692,7 @@ type evo_contract {
|
||||
evo_double_agent_reward: Decimal
|
||||
evo_double_agent_reward_conditionid: Uuid
|
||||
evo_double_agent_reward_summ: Decimal
|
||||
evo_double_agent_reward_tech: Decimal
|
||||
evo_double_agent_service_list: [Int!]
|
||||
evo_economic: Decimal
|
||||
evo_economic_actual: Decimal
|
||||
@ -1704,6 +1712,7 @@ type evo_contract {
|
||||
evo_fin_department_reward: Decimal
|
||||
evo_fin_department_reward_conditionid: Uuid
|
||||
evo_fin_department_reward_summ: Decimal
|
||||
evo_fin_department_reward_tech: Decimal
|
||||
evo_fin_department_service_list: [Int!]
|
||||
evo_first_payment_fact: Decimal
|
||||
evo_first_payment_fact_date: DateTime
|
||||
@ -2261,6 +2270,7 @@ type evo_addcontract {
|
||||
evo_add_region_director_bonus: Decimal
|
||||
evo_agent_reward: Decimal
|
||||
evo_agent_reward_summ: Decimal
|
||||
evo_agent_reward_tech: Decimal
|
||||
evo_age_drivers: Int
|
||||
evo_age_drivers_new: Int
|
||||
evo_approv_business_analyst: Boolean
|
||||
@ -2276,6 +2286,7 @@ type evo_addcontract {
|
||||
evo_base_new: String
|
||||
evo_broker_reward: Decimal
|
||||
evo_broker_reward_summ: Decimal
|
||||
evo_broker_reward_tech: Decimal
|
||||
evo_businessunitid: Uuid
|
||||
evo_calculation_method: Int
|
||||
evo_calculator_type: Int
|
||||
@ -2313,6 +2324,7 @@ type evo_addcontract {
|
||||
evo_dealer_broker_reward_new: Decimal
|
||||
evo_dealer_broker_reward_summ: Decimal
|
||||
evo_dealer_broker_reward_summ_new: Decimal
|
||||
evo_dealer_broker_reward_tech: Decimal
|
||||
evo_dealer_person_accountid: Uuid
|
||||
evo_dealer_person_accountid_new: Uuid
|
||||
evo_dealer_person_reward: Decimal
|
||||
@ -2321,6 +2333,7 @@ type evo_addcontract {
|
||||
evo_dealer_person_reward_new: Decimal
|
||||
evo_dealer_person_reward_summ: Decimal
|
||||
evo_dealer_person_reward_summ_new: Decimal
|
||||
evo_dealer_person_reward_tech: Decimal
|
||||
evo_deviation_investments_withoutnds: Decimal
|
||||
evo_deviation_irr: Decimal
|
||||
evo_dgo_price: Decimal
|
||||
@ -2334,6 +2347,7 @@ type evo_addcontract {
|
||||
evo_dog_credit_new: Decimal
|
||||
evo_double_agent_reward: Decimal
|
||||
evo_double_agent_reward_summ: Decimal
|
||||
evo_double_agent_reward_tech: Decimal
|
||||
evo_driving_axle: String
|
||||
evo_driving_axle_new: String
|
||||
evo_early_change_discount: Boolean
|
||||
@ -2366,6 +2380,7 @@ type evo_addcontract {
|
||||
evo_fin_department_reward_new: Decimal
|
||||
evo_fin_department_reward_summ: Decimal
|
||||
evo_fin_department_reward_summ_new: Decimal
|
||||
evo_fin_department_reward_tech: Decimal
|
||||
evo_fix_last_payment: Boolean
|
||||
evo_franchise: Decimal
|
||||
evo_franchise_new: Decimal
|
||||
|
||||
@ -435,6 +435,8 @@ export interface IEvoTarif extends BaseEntity {
|
||||
evo_delivery_time?: number[];
|
||||
evo_cut_irr_with_bonus_coefficient?: number;
|
||||
evo_margin_min?: number;
|
||||
evo_min_price?: number;
|
||||
evo_max_price?: number;
|
||||
}
|
||||
|
||||
export interface IEvoRate extends BaseEntity {
|
||||
|
||||
Reference in New Issue
Block a user