Merge branch 'development'
This commit is contained in:
commit
4fcc896357
@ -87,6 +87,12 @@ export default function ($calculation: ICalculationStore) {
|
||||
x => x.accountid === dealer.accountid,
|
||||
)?.length) &&
|
||||
dealer,
|
||||
dealer =>
|
||||
(!product?.accounts?.length ||
|
||||
//@ts-ignore
|
||||
product.accounts.filter(x => x.accountid === dealer.accountid)
|
||||
?.length) &&
|
||||
dealer,
|
||||
dealer => {
|
||||
if (product?.evo_supplier_financing_accept) {
|
||||
//@ts-ignore
|
||||
@ -116,6 +122,13 @@ export default function ($calculation: ICalculationStore) {
|
||||
x => x.accountid === dealerPerson.accountid,
|
||||
)?.length) &&
|
||||
dealerPerson,
|
||||
dealerPerson =>
|
||||
(!product?.accounts?.length ||
|
||||
product.accounts.filter(
|
||||
//@ts-ignore
|
||||
x => x.accountid === dealerPerson.accountid,
|
||||
)?.length) &&
|
||||
dealerPerson,
|
||||
dealerPerson => {
|
||||
if (product?.evo_supplier_financing_accept) {
|
||||
//@ts-ignore
|
||||
|
||||
@ -20,6 +20,7 @@ const reactionEffects: IReactionEffect[] = [
|
||||
supplierDiscountPerc,
|
||||
leaseObjectPrice,
|
||||
addEquipmentPrice,
|
||||
leaseObjectType,
|
||||
} = calculationStore.values;
|
||||
//@ts-ignore
|
||||
const importProgramSum = calculationStore.importProgramSum();
|
||||
@ -31,6 +32,7 @@ const reactionEffects: IReactionEffect[] = [
|
||||
leaseObjectPrice,
|
||||
importProgramSum,
|
||||
addEquipmentPrice,
|
||||
leaseObjectType,
|
||||
];
|
||||
},
|
||||
effect: ([
|
||||
@ -51,10 +53,19 @@ const reactionEffects: IReactionEffect[] = [
|
||||
calculationStore,
|
||||
);
|
||||
|
||||
const leaseObjectType = calculationStore.getOption(
|
||||
'selectLeaseObjectType',
|
||||
);
|
||||
|
||||
const maxPriceChangeValue =
|
||||
price - supplierDiscountRub < 800000
|
||||
? price - supplierDiscountRub + 50000
|
||||
: (price - supplierDiscountRub) * 1.05;
|
||||
: (price - supplierDiscountRub) *
|
||||
(leaseObjectType?.evo_vehicle_type?.includes(100_000_001) ||
|
||||
leaseObjectType?.evo_vehicle_type?.includes(100_000_005)
|
||||
? 1.01
|
||||
: 1.05);
|
||||
|
||||
calculationStore.setValue('maxPriceChange', maxPriceChangeValue);
|
||||
|
||||
const minPriceChangeValue =
|
||||
@ -180,7 +191,7 @@ const reactionEffects: IReactionEffect[] = [
|
||||
quote.evo_min_change_price -
|
||||
(quote.evo_nds_in_price_supplier_currency || 0);
|
||||
|
||||
if (maxCondition1 || maxCondition2 || maxCondition3) {
|
||||
if (maxCondition1 || maxCondition2) {
|
||||
calculationStore.setValidation('tbxLeaseObjectPrice', false);
|
||||
openNotification({
|
||||
type: 'error',
|
||||
@ -189,6 +200,14 @@ const reactionEffects: IReactionEffect[] = [
|
||||
'Указанная стоимость предмета лизинга больше возможного изменения стоимости предмета лизинга при пересчете без пересмотра. ' +
|
||||
'Уменьшите стоимость предмета лизинга',
|
||||
});
|
||||
} else if (maxCondition3) {
|
||||
calculationStore.setValidation('tbxLeaseObjectPrice', false);
|
||||
openNotification({
|
||||
type: 'error',
|
||||
message: 'Ошибка',
|
||||
description:
|
||||
'При пересчете без пересмотра КП с ПЛ БУ или с непрофессиональным поставщиком недопустимо увеличение стоимости. Создайте новое КП и отправьте его на рассмотрение андеррайтингу для повторной проверки оценщиком.',
|
||||
});
|
||||
} else if (minCondition1 || minCondition2) {
|
||||
calculationStore.setValidation('tbxLeaseObjectPrice', false);
|
||||
openNotification({
|
||||
|
||||
@ -89,6 +89,9 @@ query GetMainOptions(
|
||||
evo_baseproductid
|
||||
}
|
||||
evo_supplier_financing_accept
|
||||
accounts {
|
||||
accountid
|
||||
}
|
||||
}
|
||||
selectRegistration: evo_addproduct_types(
|
||||
statecode: $statecode
|
||||
|
||||
@ -685,6 +685,7 @@ type evo_baseproduct {
|
||||
statecode: Int
|
||||
systemusers(statecode: Int): [systemuser]
|
||||
toObjectString: String
|
||||
accounts: [account]
|
||||
}
|
||||
|
||||
type evo_graph {
|
||||
|
||||
@ -223,6 +223,7 @@ export interface IEvoBaseproduct extends BaseEntity {
|
||||
evo_calculation_method?: number[];
|
||||
evo_baseproducts?: IEvoBaseproduct[];
|
||||
evo_supplier_financing_accept?: boolean;
|
||||
accounts?: IAccount[];
|
||||
}
|
||||
|
||||
export interface IEvoLeasingObjectType extends BaseEntity {
|
||||
|
||||
Reference in New Issue
Block a user