merge release/dyn-686:

telematic_min-price_products-by-users
This commit is contained in:
Chika 2022-01-21 15:13:03 +03:00
parent f211dd2377
commit 129ab75840
32 changed files with 331 additions and 143 deletions

View File

@ -3,7 +3,7 @@ module.exports = {
service: { service: {
name: 'crmgraphql', name: 'crmgraphql',
url: 'http://localhost/crmgraphql/', url: 'http://localhost/crmgraphql/',
localSchemaFile: 'src/core/graphql/schemas/crm.graphql', // localSchemaFile: 'src/core/graphql/schemas/crm.graphql',
}, },
excludes: ['src/core/graphql/schemas/**/*.*'], excludes: ['src/core/graphql/schemas/**/*.*'],
}, },

View File

@ -12,7 +12,6 @@
"babel-plugin-transform-imports": "^2.0.0", "babel-plugin-transform-imports": "^2.0.0",
"craco-less": "^2.0.0", "craco-less": "^2.0.0",
"dayjs": "^1.10.4", "dayjs": "^1.10.4",
"graphql": "^16.2.0",
"graphql.macro": "^1.4.2", "graphql.macro": "^1.4.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mobx": "^6.1.8", "mobx": "^6.1.8",

View File

@ -468,6 +468,7 @@ const sections: ISection[] = [
// { // {
// elements: [ // elements: [
// // 'cbxInsDecentral', // // 'cbxInsDecentral',
// 'tbxMinPriceChange',
// 'tbxMaxPriceChange', // 'tbxMaxPriceChange',
// 'tbxImporterRewardPerc', // 'tbxImporterRewardPerc',
// 'tbxImporterRewardRub', // 'tbxImporterRewardRub',

View File

@ -175,6 +175,7 @@ const elementsComponents: TElements<Component> = {
selectSubsidy: Select, selectSubsidy: Select,
selectFuelCard: Select, selectFuelCard: Select,
labelSubsidySum: Label, labelSubsidySum: Label,
tbxMinPriceChange: InputNumber,
}; };
const tablesComponents: StoreTables<Component> = { const tablesComponents: StoreTables<Component> = {

View File

@ -457,6 +457,14 @@ const elementsProps: TElements<ElementProps> = {
radioInfuranceOPF: { radioInfuranceOPF: {
style: 'button', style: 'button',
}, },
selectHighSeasonStart: {
tooltip: {
Component: buildTooltip({
title: 'С какого платежа начинается полный высокий сезон',
placement: 'topLeft',
}),
},
},
}; };
export const numberElementsProps: TElements<ElementProps> = Object.keys( export const numberElementsProps: TElements<ElementProps> = Object.keys(

View File

@ -40,7 +40,7 @@ export const elementsTitles: TElements<string> = {
radioGraphType: 'Вид графика', radioGraphType: 'Вид графика',
tbxParmentsDecreasePercent: 'Процент убывания платежей', tbxParmentsDecreasePercent: 'Процент убывания платежей',
selectSeasonType: 'Тип дегрессии/сезонности', selectSeasonType: 'Тип дегрессии/сезонности',
selectHighSeasonStart: 'С какого платежа начинается высокий сезон', selectHighSeasonStart: 'Смещение сезонности',
tbxComissionPerc: 'Комиссия, %', tbxComissionPerc: 'Комиссия, %',
tbxComissionRub: 'Комиссия, руб.', tbxComissionRub: 'Комиссия, руб.',
tbxSaleBonus: 'Размер бонуса МПЛ', tbxSaleBonus: 'Размер бонуса МПЛ',
@ -140,6 +140,7 @@ export const elementsTitles: TElements<string> = {
selectSubsidy: 'Субсидия', selectSubsidy: 'Субсидия',
labelSubsidySum: 'Сумма субсидии с НДС', labelSubsidySum: 'Сумма субсидии с НДС',
selectFuelCard: 'Топливная карта', selectFuelCard: 'Топливная карта',
tbxMinPriceChange: 'Мин. возможное изменение стоимости ПЛ',
}; };
const resultsTitles: TElements<string> = { const resultsTitles: TElements<string> = {

View File

@ -139,6 +139,7 @@ export const elementsValues: TElements<ValuesNames> = {
selectSubsidy: 'subsidy', selectSubsidy: 'subsidy',
labelSubsidySum: 'subsidySum', labelSubsidySum: 'subsidySum',
selectFuelCard: 'fuelCard', selectFuelCard: 'fuelCard',
tbxMinPriceChange: 'minPriceChange',
}; };
const resultElementsValues: TElements<ResultValuesNames> = { const resultElementsValues: TElements<ResultValuesNames> = {

View File

@ -1,6 +1,6 @@
import { getValueName } from 'client/Containers/Calculation/lib/elements/tools'; import { getValueName } from 'client/Containers/Calculation/lib/elements/tools';
import initialFilters, { import initialFilters, {
noResetValueElements, noResetValueElements
} from 'client/stores/CalculationStore/config/initialFilters'; } from 'client/stores/CalculationStore/config/initialFilters';
import initialStatuses from 'client/stores/CalculationStore/config/initialStatuses'; import initialStatuses from 'client/stores/CalculationStore/config/initialStatuses';
import { isNil, mergeWith, pick } from 'lodash'; import { isNil, mergeWith, pick } from 'lodash';
@ -66,11 +66,17 @@ const valuesActions = {
); );
}); });
}, },
getOptions(elementName, fields) { getOptions(elementName, fields, filtered = false) {
if (!this.options[elementName]) { let options = this.options[elementName];
const filter = this.filters[elementName];
if (filtered && filter) {
options = filter(options);
}
if (!options) {
return; return;
} }
if (!fields) return this.options[elementName]; if (!fields) return options;
return this.options[elementName].filter(option => { return this.options[elementName].filter(option => {
return Object.keys(fields).every( return Object.keys(fields).every(
fieldName => option[fieldName] === fields[fieldName], fieldName => option[fieldName] === fields[fieldName],

View File

@ -352,6 +352,7 @@ const gibddReactions: IReactionEffect[] = [
'regionRegistration', 'regionRegistration',
'typePTS', 'typePTS',
'leaseObjectCategory', 'leaseObjectCategory',
'leaseObjectType',
]), ]),
}; };
}, },
@ -361,9 +362,18 @@ const gibddReactions: IReactionEffect[] = [
regionRegistration, regionRegistration,
typePTS, typePTS,
leaseObjectCategory, leaseObjectCategory,
leaseObjectType,
}) => { }) => {
calculationStore.setFilter('selectRegistration', options => calculationStore.setFilter('selectRegistration', options =>
options.filter(x => { options.filter(x => {
if (
!x.evo_leasingobject_types?.find(
x => x.evo_leasingobject_typeid === leaseObjectType,
)
) {
return false;
}
if (!objectRegionRegistration && !regionRegistration) { if (!objectRegionRegistration && !regionRegistration) {
return false; return false;
} }

View File

@ -3,7 +3,7 @@ import { resetIns } from 'client/Components/Calculation/ELT/Content/lib/resetIns
import { numberElementsProps } from 'client/Containers/Calculation/lib/elements/elementsProps'; import { numberElementsProps } from 'client/Containers/Calculation/lib/elements/elementsProps';
import { import {
getTitle, getTitle,
getValueName, getValueName
} from 'client/Containers/Calculation/lib/elements/tools'; } from 'client/Containers/Calculation/lib/elements/tools';
import { elementsValues } from 'client/Containers/Calculation/lib/elements/values'; import { elementsValues } from 'client/Containers/Calculation/lib/elements/values';
import { openNotification } from 'client/Elements/Notification'; import { openNotification } from 'client/Elements/Notification';
@ -12,9 +12,10 @@ import {
getMainOptionsForQuote, getMainOptionsForQuote,
getQuoteQuery, getQuoteQuery,
getSecondaryOptionsForQuote, getSecondaryOptionsForQuote,
getSingleOptionsForQuote, getSingleOptionsForQuote
} from 'core/graphql/query/crm/quote'; } from 'core/graphql/query/crm/quote';
import CrmService from 'core/services/CrmService'; import CrmService from 'core/services/CrmService';
import { TOptionizedEntity } from 'core/services/CrmService/types/common';
import { currentISODate } from 'core/tools/date'; import { currentISODate } from 'core/tools/date';
import { NIL } from 'core/tools/uuid'; import { NIL } from 'core/tools/uuid';
import { IReactionEffect } from 'core/types/Calculation/Store/effect'; import { IReactionEffect } from 'core/types/Calculation/Store/effect';
@ -26,7 +27,7 @@ import {
IEvoGraph, IEvoGraph,
IEvoTown, IEvoTown,
IQuote, IQuote,
TCRMEntity, TCRMEntity
} from 'core/types/Entities/crmEntities'; } from 'core/types/Entities/crmEntities';
import { ElementStatus } from 'core/types/statuses'; import { ElementStatus } from 'core/types/statuses';
import { get, invert, isEqual, isNil } from 'lodash'; import { get, invert, isEqual, isNil } from 'lodash';
@ -72,13 +73,10 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
opportunity, opportunity,
recalcWithRevision, recalcWithRevision,
calcType, calcType,
indAgent,
INNForCalc, INNForCalc,
creditRate, creditRate,
rate, rate,
infuranceOPF, infuranceOPF,
calcBroker,
calcFinDepartment,
balanceHolder, balanceHolder,
} = calculationStore.values; } = calculationStore.values;
@ -129,25 +127,74 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
evo_gps_brandid: quote.evo_gps_brandid || NIL, evo_gps_brandid: quote.evo_gps_brandid || NIL,
evo_regionid: quote.evo_regionid || NIL, evo_regionid: quote.evo_regionid || NIL,
evo_legal_regionid: quote.evo_legal_regionid || NIL, evo_legal_regionid: quote.evo_legal_regionid || NIL,
evo_agency_agreementid_param: { has: true },
}, },
}); });
const { selectDealerBroker } = await CrmService.getCRMOptions< // selectDealerBroker query
'selectDealerBroker', let selectDealerBroker: TOptionizedEntity<IAccount>[] = [];
IAccount const dealer_broker_accountid =
>({ mainOptions?.selectDealerPerson &&
query: getSingleOptionsForQuote, mainOptions?.selectDealerPerson?.length > 0 &&
variables: { mainOptions.selectDealerPerson[0].evo_broker_accountid;
dealer_broker_accountid: quote.evo_dealer_broker_accountid || NIL, if (dealer_broker_accountid) {
hasDealerBroker: quote.evo_dealer_broker_accountid ? true : false, const selectDealerBrokerRes = await CrmService.getCRMOptions<
}, 'selectDealerBroker',
}); IAccount
>({
query: getSingleOptionsForQuote,
variables: {
dealer_broker_accountid,
},
});
if (selectDealerBrokerRes?.selectDealerBroker)
selectDealerBroker = selectDealerBrokerRes.selectDealerBroker;
}
// selectDealerBroker query
calculationStore.applyOptions({ calculationStore.applyOptions({
...mainOptions, ...mainOptions,
selectDealerBroker, selectDealerBroker: selectDealerBroker,
}); });
// agents
//TODO: refactor
const { indAgent, calcBroker, calcFinDepartment } =
calculationStore.values;
let {
indAgentRewardCondition,
indAgentRewardSumm,
calcBrokerRewardCondition,
calcBrokerRewardSum,
finDepartmentRewardCondtion,
finDepartmentRewardSumm,
} = calculationStore.values;
if (indAgent === quote.evo_agent_accountid) {
indAgentRewardCondition = quote.evo_agent_reward_conditionid;
indAgentRewardSumm = quote.evo_agent_reward_total;
}
if (calcBroker === quote.evo_broker_accountid) {
calcBrokerRewardCondition = quote.evo_broker_reward_conditionid;
calcBrokerRewardSum = quote.evo_broker_reward_total;
}
if (calcFinDepartment === quote.evo_fin_department_accountid) {
finDepartmentRewardCondtion =
quote.evo_fin_department_reward_conditionid;
finDepartmentRewardSumm = quote.evo_fin_department_reward_total;
}
const agentsValues = {
indAgentRewardCondition,
indAgentRewardSumm,
calcBrokerRewardCondition,
calcBrokerRewardSum,
finDepartmentRewardCondtion,
finDepartmentRewardSumm,
};
// agents
// fill insurance table // fill insurance table
calculationStore.setTableRows( calculationStore.setTableRows(
'tableInsurance', 'tableInsurance',
@ -519,6 +566,7 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
requirementTelematic, requirementTelematic,
balanceHolder, balanceHolder,
redemptionPaymentSum, redemptionPaymentSum,
...agentsValues,
}; };
// check min max number values // check min max number values

View File

@ -48,17 +48,17 @@ const mapKPtoValues: Partial<Record<ValuesNames, keyof IQuote | string>> = {
dealerBrokerRewardCondition: 'evo_dealer_broker_reward_conditionid', dealerBrokerRewardCondition: 'evo_dealer_broker_reward_conditionid',
dealerBrokerRewardSumm: 'evo_dealer_broker_reward_total', dealerBrokerRewardSumm: 'evo_dealer_broker_reward_total',
// indAgent: 'evo_agent_accountid', // indAgent: 'evo_agent_accountid',
indAgentRewardCondition: 'evo_agent_reward_conditionid', // indAgentRewardCondition: 'evo_agent_reward_conditionid',
indAgentRewardSumm: 'evo_agent_reward_total', // indAgentRewardSumm: 'evo_agent_reward_total',
calcDoubleAgent: 'evo_double_agent_accountid', calcDoubleAgent: 'evo_double_agent_accountid',
calcDoubleAgentRewardCondition: 'evo_double_agent_reward_conditionid', calcDoubleAgentRewardCondition: 'evo_double_agent_reward_conditionid',
calcDoubleAgentRewardSumm: 'evo_double_agent_reward_total', calcDoubleAgentRewardSumm: 'evo_double_agent_reward_total',
// calcBroker: 'evo_broker_accountid', // calcBroker: 'evo_broker_accountid',
calcBrokerRewardCondition: 'evo_broker_reward_conditionid', // calcBrokerRewardCondition: 'evo_broker_reward_conditionid',
calcBrokerRewardSum: 'evo_broker_reward_total', // calcBrokerRewardSum: 'evo_broker_reward_total',
// calcFinDepartment: 'evo_fin_department_accountid', // calcFinDepartment: 'evo_fin_department_accountid',
finDepartmentRewardCondtion: 'evo_fin_department_reward_conditionid', // finDepartmentRewardCondtion: 'evo_fin_department_reward_conditionid',
finDepartmentRewardSumm: 'evo_fin_department_reward_total', // finDepartmentRewardSumm: 'evo_fin_department_reward_total',
GPSBrand: 'evo_gps_brandid', GPSBrand: 'evo_gps_brandid',
GPSModel: 'evo_gps_modelid', GPSModel: 'evo_gps_modelid',
infuranceOPF: 'evo_ins_legal_form', infuranceOPF: 'evo_ins_legal_form',
@ -80,6 +80,7 @@ const mapKPtoValues: Partial<Record<ValuesNames, keyof IQuote | string>> = {
quoteName: 'evo_contact_name', quoteName: 'evo_contact_name',
quoteContactGender: 'evo_gender', quoteContactGender: 'evo_gender',
quoteRedemptionGraph: 'evo_redemption_graph', quoteRedemptionGraph: 'evo_redemption_graph',
minPriceChange: 'evo_min_change_price',
maxPriceChange: 'evo_max_price_change', maxPriceChange: 'evo_max_price_change',
importerRewardPerc: 'evo_importer_reward_perc', importerRewardPerc: 'evo_importer_reward_perc',
importerRewardRub: 'evo_importer_reward_rub', importerRewardRub: 'evo_importer_reward_rub',

View File

@ -169,7 +169,7 @@ const reactionEffects: IReactionEffect[] = [
}, },
effect: indAgentRewardConditionId => { effect: indAgentRewardConditionId => {
if (!indAgentRewardConditionId) { if (!indAgentRewardConditionId) {
calculationStore.setValue('indAgentRewardSumm', null); calculationStore.setValue('indAgentRewardSumm', 0);
calculationStore.setStatus( calculationStore.setStatus(
'tbxIndAgentRewardSumm', 'tbxIndAgentRewardSumm',
ElementStatus.Disabled, ElementStatus.Disabled,
@ -657,11 +657,8 @@ const reactionEffects: IReactionEffect[] = [
calculationStore => ({ calculationStore => ({
expression: () => { expression: () => {
const { const { lastPaymentRub, lastPaymentPerc, insNSIB } =
lastPaymentRub, calculationStore.values;
lastPaymentPerc,
insNSIB,
} = calculationStore.values;
return { lastPaymentRub, lastPaymentPerc, insNSIB }; return { lastPaymentRub, lastPaymentPerc, insNSIB };
}, },
effect: ({ lastPaymentRub, insNSIB }) => { effect: ({ lastPaymentRub, insNSIB }) => {
@ -794,26 +791,14 @@ const reactionEffects: IReactionEffect[] = [
}), }),
calculationStore => ({ calculationStore => ({
expression: () => { expression: () => calculationStore.getOption('selectSeasonType'),
const { seasonType } = calculationStore.values; effect: ({ forbiddenHighSeasonStart }) => {
return seasonType; if (forbiddenHighSeasonStart) {
}, calculationStore.setFilter('selectHighSeasonStart', seasonStart =>
effect: seasonType => { seasonStart.filter(s => !forbiddenHighSeasonStart.includes(s.name)),
if (seasonType) { );
switch (seasonType) { } else {
case 100000001: calculationStore.setFilter('selectHighSeasonStart', undefined);
case 100000002: {
calculationStore.setFilter('selectHighSeasonStart', seasons => {
return seasons.filter(
season => season.value && season.value <= 100000004,
);
});
break;
}
default:
calculationStore.setFilter('selectHighSeasonStart', undefined);
break;
}
} }
}, },
options: { options: {
@ -1495,12 +1480,10 @@ const reactionEffects: IReactionEffect[] = [
const fuelCard = calculationStore.getOption('selectFuelCard'); const fuelCard = calculationStore.getOption('selectFuelCard');
if (fuelCard) { if (fuelCard) {
const selectFuelCard_filter = calculationStore.getFilter( const selectFuelCard_filter =
'selectFuelCard', calculationStore.getFilter('selectFuelCard');
); const selectFueldCard_options =
const selectFueldCard_options = calculationStore.getOptions( calculationStore.getOptions('selectFuelCard');
'selectFuelCard',
);
if (selectFuelCard_filter && selectFueldCard_options) { if (selectFuelCard_filter && selectFueldCard_options) {
const filtered_technicalCards = selectFuelCard_filter( const filtered_technicalCards = selectFuelCard_filter(

View File

@ -1,9 +1,12 @@
import { getFieldName } from 'client/Containers/Calculation/lib/elements/tools';
import { openNotification } from 'client/Elements/Notification'; import { openNotification } from 'client/Elements/Notification';
import valuesConstants from 'core/constants/values'; import valuesConstants from 'core/constants/values';
import { pipe } from 'core/tools/func';
import { IReactionEffect } from 'core/types/Calculation/Store/effect'; import { IReactionEffect } from 'core/types/Calculation/Store/effect';
import { ElementsNames } from 'core/types/Calculation/Store/elements'; import { ElementsNames } from 'core/types/Calculation/Store/elements';
import { Process } from 'core/types/Calculation/Store/process'; import { Process } from 'core/types/Calculation/Store/process';
import { TableNames } from 'core/types/Calculation/Store/tables'; import { TableNames } from 'core/types/Calculation/Store/tables';
import { ValuesNames } from 'core/types/Calculation/Store/values';
import { ElementStatus } from 'core/types/statuses'; import { ElementStatus } from 'core/types/statuses';
import { convertPrice } from '../lib/tools'; import { convertPrice } from '../lib/tools';
import { getPrice } from './priceReactions/calculate'; import { getPrice } from './priceReactions/calculate';
@ -42,12 +45,17 @@ const reactionEffects: IReactionEffect[] = [
calculationStore, calculationStore,
); );
const maxPriceChange = const maxPriceChangeValue =
price - supplierDiscountRub < 800000 price - supplierDiscountRub < 800000
? price - supplierDiscountRub + 50000 ? price - supplierDiscountRub + 50000
: (price - supplierDiscountRub) * 1.05; : (price - supplierDiscountRub) * 1.05;
calculationStore.setValue('maxPriceChange', maxPriceChangeValue);
calculationStore.setValue('maxPriceChange', maxPriceChange); const minPriceChangeValue =
price - supplierDiscountRub < 800000
? price - supplierDiscountRub - 50000
: (price - supplierDiscountRub) * 0.95;
calculationStore.setValue('minPriceChange', minPriceChangeValue);
}, },
options: { options: {
fireImmediately: true, fireImmediately: true,
@ -119,7 +127,7 @@ const reactionEffects: IReactionEffect[] = [
); );
const quote = calculationStore.getOption('selectQuote'); const quote = calculationStore.getOption('selectQuote');
if (quote && quote.evo_max_price_change) { if (quote?.evo_max_price_change) {
if (price - supplierDiscountRub > quote.evo_max_price_change) { if (price - supplierDiscountRub > quote.evo_max_price_change) {
calculationStore.setValidation('tbxLeaseObjectPrice', false); calculationStore.setValidation('tbxLeaseObjectPrice', false);
openNotification({ openNotification({
@ -133,6 +141,21 @@ const reactionEffects: IReactionEffect[] = [
calculationStore.setValidation('tbxLeaseObjectPrice', undefined); calculationStore.setValidation('tbxLeaseObjectPrice', undefined);
} }
} }
if (quote?.evo_min_change_price) {
if (price - supplierDiscountRub < quote.evo_min_change_price) {
calculationStore.setValidation('tbxLeaseObjectPrice', false);
openNotification({
type: 'error',
title: 'Ошибка',
description:
'Указанная стоимость предмета лизинга меньше возмножного изменения стоимости предмета лизинга при пересчете без пересмотра. ' +
'Увеличьте стоимость предмета лизинга',
})();
} else {
calculationStore.setValidation('tbxLeaseObjectPrice', undefined);
}
}
}, },
}), }),
@ -345,7 +368,9 @@ const reactionEffects: IReactionEffect[] = [
return; return;
} }
if (!recalcWithRevision) { if (!recalcWithRevision) {
const allowedReqTelematicValues = [100000000, 100000001]; const allowedReqTelematicValues = [
100000000, 100000001, 100000002, 100000003,
];
calculationStore.setFilter('radioRequirementTelematic', options => calculationStore.setFilter('radioRequirementTelematic', options =>
options.filter( options.filter(
x => x =>
@ -429,32 +454,41 @@ const reactionEffects: IReactionEffect[] = [
(calculationStore, calculationProcess) => ({ (calculationStore, calculationProcess) => ({
expression: () => { expression: () => {
return calculationStore.getValue('requirementTelematic'); return calculationStore.getValues([
}, 'requirementTelematic',
effect: requirementTelematic => {
if (calculationProcess.hasProcess(Process.LoadKp)) {
return;
}
const recalcWithRevision = calculationStore.getValue(
'recalcWithRevision', 'recalcWithRevision',
); ]);
if (!recalcWithRevision) { },
calculationStore.setValue('telematic', null); effect: ({ requirementTelematic, recalcWithRevision }) => {
(['tracker', 'telematic'] as ValuesNames[]).forEach(valueName => {
const elementName = getFieldName(valueName);
const addProducts = calculationStore.getStaticData( calculationStore.setFilter(elementName, options =>
'evo_addproduct_type', options.filter(
); pipe(
let tracker = addProducts.find(x => x => {
x.evo_controls_program?.includes(requirementTelematic), if (x.evo_controls_program?.includes(requirementTelematic))
return x;
},
x => {
if (recalcWithRevision) return x;
if (x?.evo_visible_calc === true) return x;
},
),
),
); );
calculationStore.setValue('tracker', tracker?.evo_addproduct_typeid); if (!calculationProcess.hasProcess(Process.LoadKp)) {
} else { const elementOptions = calculationStore.getOptions(
calculationStore.setStatus( elementName,
'radioRequirementTelematic', undefined,
ElementStatus.Disabled, true,
); );
} //TODO: удалить после рефактора CalculationStore
if (elementOptions?.length === 1)
calculationStore.setValue(valueName, elementOptions[0].value);
}
});
}, },
options: { options: {
fireImmediately: true, fireImmediately: true,

View File

@ -306,18 +306,21 @@ export default [
$statecode: Int $statecode: Int
$currentDate: DateTime $currentDate: DateTime
$evo_agent_accountid: Uuid $evo_agent_accountid: Uuid
$evo_agency_agreementid_param: GuidParamInput
) { ) {
evo_reward_conditions( evo_reward_conditions(
evo_agent_accountid: $evo_agent_accountid evo_agent_accountid: $evo_agent_accountid
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
evo_double_agent_accountid evo_double_agent_accountid
evo_reward_summ evo_reward_summ
evo_reduce_reward evo_reduce_reward
evo_agency_agreementid
} }
} }
`, `,
@ -325,6 +328,7 @@ export default [
evo_agent_accountid: indAgentId, evo_agent_accountid: indAgentId,
currentDate: currentISODate, currentDate: currentISODate,
statecode: 0, statecode: 0,
evo_agency_agreementid_param: { has: true },
}, },
}).then(({ evo_reward_conditions }) => { }).then(({ evo_reward_conditions }) => {
if (evo_reward_conditions) if (evo_reward_conditions)
@ -369,17 +373,20 @@ export default [
$statecode: Int $statecode: Int
$currentDate: DateTime $currentDate: DateTime
$evo_agent_accountid: Uuid $evo_agent_accountid: Uuid
$evo_agency_agreementid_param: GuidParamInput
) { ) {
evo_reward_conditions( evo_reward_conditions(
evo_agent_accountid: $evo_agent_accountid evo_agent_accountid: $evo_agent_accountid
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
evo_reward_summ evo_reward_summ
evo_reduce_reward evo_reduce_reward
evo_agency_agreementid
} }
} }
`, `,
@ -387,6 +394,7 @@ export default [
evo_agent_accountid: doubleAgentId, evo_agent_accountid: doubleAgentId,
currentDate: currentISODate, currentDate: currentISODate,
statecode: 0, statecode: 0,
evo_agency_agreementid_param: { has: true },
}, },
}).then(({ evo_reward_conditions }) => { }).then(({ evo_reward_conditions }) => {
if (evo_reward_conditions) if (evo_reward_conditions)
@ -433,17 +441,20 @@ export default [
$statecode: Int $statecode: Int
$currentDate: DateTime $currentDate: DateTime
$evo_agent_accountid: Uuid $evo_agent_accountid: Uuid
$evo_agency_agreementid_param: GuidParamInput
) { ) {
evo_reward_conditions( evo_reward_conditions(
evo_agent_accountid: $evo_agent_accountid evo_agent_accountid: $evo_agent_accountid
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
evo_reward_summ evo_reward_summ
evo_reduce_reward evo_reduce_reward
evo_agency_agreementid
} }
} }
`, `,
@ -451,6 +462,7 @@ export default [
evo_agent_accountid: calcFinDepartmentId, evo_agent_accountid: calcFinDepartmentId,
currentDate: currentISODate, currentDate: currentISODate,
statecode: 0, statecode: 0,
evo_agency_agreementid_param: { has: true },
}, },
}).then(({ evo_reward_conditions }) => { }).then(({ evo_reward_conditions }) => {
if (evo_reward_conditions) if (evo_reward_conditions)
@ -495,17 +507,20 @@ export default [
$statecode: Int $statecode: Int
$currentDate: DateTime $currentDate: DateTime
$evo_agent_accountid: Uuid $evo_agent_accountid: Uuid
$evo_agency_agreementid_param: GuidParamInput
) { ) {
evo_reward_conditions( evo_reward_conditions(
evo_agent_accountid: $evo_agent_accountid evo_agent_accountid: $evo_agent_accountid
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
evo_reward_summ evo_reward_summ
evo_reduce_reward evo_reduce_reward
evo_agency_agreementid
} }
} }
`, `,
@ -513,6 +528,7 @@ export default [
evo_agent_accountid: calcBrokerId, evo_agent_accountid: calcBrokerId,
currentDate: currentISODate, currentDate: currentISODate,
statecode: 0, statecode: 0,
evo_agency_agreementid_param: { has: true },
}, },
}).then(({ evo_reward_conditions }) => { }).then(({ evo_reward_conditions }) => {
if (evo_reward_conditions) if (evo_reward_conditions)
@ -669,17 +685,20 @@ export default [
$statecode: Int $statecode: Int
$currentDate: DateTime $currentDate: DateTime
$evo_agent_accountid: Uuid $evo_agent_accountid: Uuid
$evo_agency_agreementid_param: GuidParamInput
) { ) {
evo_reward_conditions( evo_reward_conditions(
evo_agent_accountid: $evo_agent_accountid evo_agent_accountid: $evo_agent_accountid
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
evo_reward_summ evo_reward_summ
evo_reduce_reward evo_reduce_reward
evo_agency_agreementid
} }
} }
`, `,
@ -687,6 +706,7 @@ export default [
evo_agent_accountid: dealerBrokerId, evo_agent_accountid: dealerBrokerId,
currentDate: currentISODate, currentDate: currentISODate,
statecode: 0, statecode: 0,
evo_agency_agreementid_param: { has: true },
}, },
}).then(({ evo_reward_conditions }) => { }).then(({ evo_reward_conditions }) => {
if (evo_reward_conditions) if (evo_reward_conditions)
@ -730,17 +750,20 @@ export default [
$statecode: Int $statecode: Int
$currentDate: DateTime $currentDate: DateTime
$evo_agent_accountid: Uuid $evo_agent_accountid: Uuid
$evo_agency_agreementid_param: GuidParamInput
) { ) {
evo_reward_conditions( evo_reward_conditions(
evo_agent_accountid: $evo_agent_accountid evo_agent_accountid: $evo_agent_accountid
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
evo_reward_summ evo_reward_summ
evo_reduce_reward evo_reduce_reward
evo_agency_agreementid
} }
} }
`, `,
@ -748,6 +771,7 @@ export default [
evo_agent_accountid: dealerPersonId, evo_agent_accountid: dealerPersonId,
currentDate: currentISODate, currentDate: currentISODate,
statecode: 0, statecode: 0,
evo_agency_agreementid_param: { has: true },
}, },
}).then(({ evo_reward_conditions }) => { }).then(({ evo_reward_conditions }) => {
if (evo_reward_conditions) if (evo_reward_conditions)

View File

@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */ /* eslint-disable @typescript-eslint/ban-ts-comment */
import { openNotification } from 'client/Elements/Notification'; import { openNotification } from 'client/Elements/Notification';
import { import {
insuranceKaskoDefaultFilter,
insuranceOsagoDefaultFilter, insuranceOsagoDefaultFilter,
singleValueFilter, singleValueFilter,
} from 'core/constants/stores/Calculation/filters'; } from 'core/constants/stores/Calculation/filters';
@ -808,4 +809,44 @@ export default [
} }
}, },
}), }),
(calculationStore, calculationProcess) => ({
expression: () => calculationStore.getOption('selectBrand'),
effect: brand => {
if (calculationProcess.hasProcess(Process.LoadKp)) {
return;
}
if (brand?.evo_id === 'BRAND49') {
const { tableInsurance } = calculationStore.tables;
// ПАО "ГРУППА РЕНЕССАНС СТРАХОВАНИЕ"
const targetInsuranceCompany =
tableInsurance.options?.insuranceCompany?.find(
x => x.evo_inn === '7725497022',
);
if (targetInsuranceCompany) {
const targetInsuranceFilter = singleValueFilter(
targetInsuranceCompany.value,
);
calculationStore.setTableRow('tableInsurance', rows =>
rows.findIndex(x => x.policyType?.value === 'КАСКО'),
)({
insuranceCompany: {
filter: targetInsuranceFilter,
value: targetInsuranceCompany.value,
status: ElementStatus.Disabled,
},
});
}
} else {
calculationStore.setTableRow('tableInsurance', rows =>
rows.findIndex(x => x.policyType?.value === 'КАСКО'),
)({
insuranceCompany: {
filter: insuranceKaskoDefaultFilter,
status: ElementStatus.Default,
value: null,
},
});
}
},
}),
] as IReactionEffect[]; ] as IReactionEffect[];

View File

@ -89,6 +89,7 @@ const initialOptions: TElements<IBaseOption[]> = {
startPositions: [0, 6], startPositions: [0, 6],
paymentsInStep: [6, 6], paymentsInStep: [6, 6],
stepsValues: [100, 50], stepsValues: [100, 50],
forbiddenHighSeasonStart: ['9', '10'],
}, },
{ {
name: '8/4', name: '8/4',
@ -96,6 +97,7 @@ const initialOptions: TElements<IBaseOption[]> = {
startPositions: [0, 8], startPositions: [0, 8],
paymentsInStep: [8, 4], paymentsInStep: [8, 4],
stepsValues: [100, 50], stepsValues: [100, 50],
forbiddenHighSeasonStart: ['7', '8', '9'],
}, },
{ {
name: '4/4/4', name: '4/4/4',
@ -103,6 +105,7 @@ const initialOptions: TElements<IBaseOption[]> = {
startPositions: [0, 4, 8], startPositions: [0, 4, 8],
paymentsInStep: [4, 4, 4], paymentsInStep: [4, 4, 4],
stepsValues: [100, 75, 50], stepsValues: [100, 75, 50],
forbiddenHighSeasonStart: ['11'],
}, },
{ {
name: '100.50.25', name: '100.50.25',
@ -126,36 +129,10 @@ const initialOptions: TElements<IBaseOption[]> = {
}, },
], ],
selectHighSeasonStart: [ selectHighSeasonStart: Array.from({ length: 12 }, (_, i) => ({
{ name: `${i + 2}`,
name: '2', value: 100000000 + i,
value: 100000000, })),
},
{
name: '3',
value: 100000001,
},
{
name: '4',
value: 100000002,
},
{
name: '5',
value: 100000003,
},
{
name: '6',
value: 100000004,
},
{
name: '7',
value: 100000005,
},
{
name: '8',
value: 100000006,
},
],
radioDeliveryTime: [ radioDeliveryTime: [
{ {
@ -269,8 +246,7 @@ const initialOptions: TElements<IBaseOption[]> = {
value: 100000012, value: 100000012,
}, },
{ {
name: name: 'Для экскурсионных перевозок в т.ч. на торжества; трансфер в аэропорт и пр.',
'Для экскурсионных перевозок в т.ч. на торжества; трансфер в аэропорт и пр.',
value: 100000013, value: 100000013,
}, },
{ {

View File

@ -9,7 +9,7 @@ const initialStatuses: TElements<ElementStatus> = {
selectCalcDoubleAgent: ElementStatus.Disabled, selectCalcDoubleAgent: ElementStatus.Disabled,
tbxInsKaskoPriceLeasePeriod: ElementStatus.Disabled, tbxInsKaskoPriceLeasePeriod: ElementStatus.Disabled,
selectClientType: ElementStatus.Disabled, selectClientType: ElementStatus.Disabled,
selectTelematic: ElementStatus.Disabled, // selectTelematic: ElementStatus.Disabled,
tbxImporterRewardRub: ElementStatus.Disabled, tbxImporterRewardRub: ElementStatus.Disabled,
tbxImporterRewardPerc: ElementStatus.Disabled, tbxImporterRewardPerc: ElementStatus.Disabled,
tbxMaxPriceChange: ElementStatus.Disabled, tbxMaxPriceChange: ElementStatus.Disabled,
@ -34,7 +34,7 @@ const initialStatuses: TElements<ElementStatus> = {
tbxCommentLead: ElementStatus.Disabled, tbxCommentLead: ElementStatus.Disabled,
btnCreateLead: ElementStatus.Disabled, btnCreateLead: ElementStatus.Disabled,
selectTracker: ElementStatus.Disabled, // selectTracker: ElementStatus.Disabled,
tbxVehicleTaxInLeasingPeriod: ElementStatus.Disabled, tbxVehicleTaxInLeasingPeriod: ElementStatus.Disabled,
selectObjectTypeTax: ElementStatus.Disabled, selectObjectTypeTax: ElementStatus.Disabled,

View File

@ -1,5 +1,6 @@
import { ICalculationStore } from 'core/types/Calculation/Store'; import { ICalculationStore } from 'core/types/Calculation/Store';
import { Process } from 'core/types/Calculation/Store/process'; import { Process } from 'core/types/Calculation/Store/process';
import { isEmpty } from 'lodash';
import initialOptions from '../config/initialOptions'; import initialOptions from '../config/initialOptions';
import initialValues from '../config/initialValues'; import initialValues from '../config/initialValues';
import { composeRequests } from './requests'; import { composeRequests } from './requests';
@ -16,13 +17,23 @@ export default async function (this: ICalculationStore) {
insuranceRequest, insuranceRequest,
} = composeRequests(); } = composeRequests();
const ownerOptions = await ownerOptionsRequest; const { systemuser } = await systemUserRequest;
const mainOptions = await mainOptionsRequest;
this.applyOptions(Object.assign(initialOptions, ownerOptions, mainOptions));
const systemuser = await systemUserRequest;
const staticEntities = await staticDataRequest; const staticEntities = await staticDataRequest;
this.applyStaticData(Object.assign({ systemuser }, staticEntities)); this.applyStaticData(
Object.assign({ systemuser: [systemuser] }, staticEntities),
);
const ownerOptions = await ownerOptionsRequest;
const mainOptions = await mainOptionsRequest;
let selectProduct = mainOptions?.selectProduct?.filter(
x =>
isEmpty(x.systemusers) ||
x?.systemusers?.some(u => u?.systemuserid === systemuser?.systemuserid),
);
this.applyOptions(
Object.assign(initialOptions, ownerOptions, mainOptions, { selectProduct }),
);
const insuranceData = await insuranceRequest; const insuranceData = await insuranceRequest;
this.setTableColumns('tableInsurance')({ this.setTableColumns('tableInsurance')({
@ -36,13 +47,14 @@ export default async function (this: ICalculationStore) {
); );
this.setValue('supplierCurrency', supplierCurrency?.transactioncurrencyid); this.setValue('supplierCurrency', supplierCurrency?.transactioncurrencyid);
const evo_sot_coefficient_type = staticEntities?.evo_sot_coefficient_type?.find( const evo_sot_coefficient_type =
x => x.evo_id === 'BONUS_LEASING', staticEntities?.evo_sot_coefficient_type?.find(
); x => x.evo_id === 'BONUS_LEASING',
);
const evo_coefficient_bonus = staticEntities?.evo_coefficient?.find( const evo_coefficient_bonus = staticEntities?.evo_coefficient?.find(
x => x =>
x.evo_job_titleid === systemuser[0]?.evo_job_titleid && x.evo_job_titleid === systemuser?.evo_job_titleid &&
x.evo_sot_coefficient_typeid === x.evo_sot_coefficient_typeid ===
evo_sot_coefficient_type?.evo_sot_coefficient_typeid, evo_sot_coefficient_type?.evo_sot_coefficient_typeid,
); );

View File

@ -45,7 +45,7 @@ export function composeRequests() {
const domainname = UserStore.getDomainName(); const domainname = UserStore.getDomainName();
const systemUserRequest = CrmService.getCRMEntities< const systemUserRequest = CrmService.getCRMEntities<
CRMEntityNames, 'systemuser',
ISystemUser ISystemUser
>({ >({
query: getSystemUserQuery, query: getSystemUserQuery,

View File

@ -10,5 +10,6 @@ query GetInsuranceOptions($evo_account_type: [Int!], $statecode: Int) {
evo_id_elt_smr evo_id_elt_smr
evo_id_elt_osago evo_id_elt_osago
evo_legal_region_calc evo_legal_region_calc
evo_inn
} }
} }

View File

@ -92,6 +92,9 @@ query GetMainOptions(
evo_name evo_name
evo_brandid evo_brandid
} }
systemusers {
systemuserid
}
} }
selectRegistration: evo_addproduct_types( selectRegistration: evo_addproduct_types(
statecode: $statecode statecode: $statecode
@ -105,6 +108,9 @@ query GetMainOptions(
evo_description evo_description
evo_gibdd_region evo_gibdd_region
evo_whom_register evo_whom_register
evo_leasingobject_types {
evo_leasingobject_typeid
}
} }
selectInsNSIB: evo_addproduct_types( selectInsNSIB: evo_addproduct_types(
statecode: $statecode statecode: $statecode
@ -121,6 +127,7 @@ query GetMainOptions(
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
) { ) {
...evo_addproduct_types_fields ...evo_addproduct_types_fields
evo_visible_calc
evo_planpayments { evo_planpayments {
evo_name evo_name
evo_cost_equipment_withoutnds evo_cost_equipment_withoutnds
@ -135,6 +142,7 @@ query GetMainOptions(
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
) { ) {
...evo_addproduct_types_fields ...evo_addproduct_types_fields
evo_visible_calc
evo_planpayments { evo_planpayments {
evo_name evo_name
evo_cost_equipment_withoutnds evo_cost_equipment_withoutnds

View File

@ -90,6 +90,8 @@ fragment quoteFields on quote {
evo_modelid evo_modelid
evo_equipmentid evo_equipmentid
evo_engine_type evo_engine_type
evo_category
evo_power evo_power
evo_engine_volume evo_engine_volume
evo_use_for evo_use_for

View File

@ -9,6 +9,7 @@ fragment quoteFieldsLite on quote {
evo_statuscode: evo_statuscodeidData { evo_statuscode: evo_statuscodeidData {
evo_id evo_id
} }
evo_min_change_price
evo_max_price_change evo_max_price_change
evo_max_mass evo_max_mass
evo_seats evo_seats

View File

@ -11,6 +11,7 @@ query GetMainOptionsForKP(
# $broker_accountid: Uuid! # $broker_accountid: Uuid!
# $findepartment_accountid: Uuid! # $findepartment_accountid: Uuid!
$evo_gps_brandid: Uuid! $evo_gps_brandid: Uuid!
$evo_agency_agreementid_param: GuidParamInput
) { ) {
selectModel: evo_models(statecode: $statecode, evo_brandid: $evo_brandid) { selectModel: evo_models(statecode: $statecode, evo_brandid: $evo_brandid) {
evo_id evo_id
@ -52,6 +53,7 @@ query GetMainOptionsForKP(
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
@ -63,6 +65,7 @@ query GetMainOptionsForKP(
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
@ -74,6 +77,7 @@ query GetMainOptionsForKP(
# evo_datefrom_param: { lte: $currentDate } # evo_datefrom_param: { lte: $currentDate }
# evo_dateto_param: { gte: $currentDate } # evo_dateto_param: { gte: $currentDate }
# statecode: $statecode # statecode: $statecode
# evo_agency_agreementid_param: $evo_agency_agreementid_param
# ) { # ) {
# evo_reward_conditionid # evo_reward_conditionid
# evo_name # evo_name
@ -86,6 +90,7 @@ query GetMainOptionsForKP(
evo_datefrom_param: { lte: $currentDate } evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate } evo_dateto_param: { gte: $currentDate }
statecode: $statecode statecode: $statecode
evo_agency_agreementid_param: $evo_agency_agreementid_param
) { ) {
evo_reward_conditionid evo_reward_conditionid
evo_name evo_name
@ -97,6 +102,7 @@ query GetMainOptionsForKP(
# evo_datefrom_param: { lte: $currentDate } # evo_datefrom_param: { lte: $currentDate }
# evo_dateto_param: { gte: $currentDate } # evo_dateto_param: { gte: $currentDate }
# statecode: $statecode # statecode: $statecode
# evo_agency_agreementid_param: $evo_agency_agreementid_param
# ) { # ) {
# evo_reward_conditionid # evo_reward_conditionid
# evo_name # evo_name
@ -108,6 +114,7 @@ query GetMainOptionsForKP(
# evo_datefrom_param: { lte: $currentDate } # evo_datefrom_param: { lte: $currentDate }
# evo_dateto_param: { gte: $currentDate } # evo_dateto_param: { gte: $currentDate }
# statecode: $statecode # statecode: $statecode
# evo_agency_agreementid_param: $evo_agency_agreementid_param
# ) { # ) {
# evo_reward_conditionid # evo_reward_conditionid
# evo_name # evo_name

View File

@ -1,9 +1,5 @@
query GetSingleOptionsForKP( query GetSingleOptionsForKP($dealer_broker_accountid: Uuid!) {
$dealer_broker_accountid: Uuid! selectDealerBroker: account(accountid: $dealer_broker_accountid) {
$hasDealerBroker: Boolean!
) {
selectDealerBroker: account(accountid: $dealer_broker_accountid)
@include(if: $hasDealerBroker) {
accountid accountid
name name
} }

View File

@ -5,5 +5,6 @@ query GetSystemUser($domainname: String) {
firstname firstname
lastname lastname
fullname fullname
systemuserid
} }
} }

View File

@ -105,7 +105,7 @@ type Query {
evo_request_payment(evo_request_paymentid: Uuid!): evo_request_payment evo_request_payment(evo_request_paymentid: Uuid!): evo_request_payment
evo_request_payments(evo_id: String, evo_name: String, statecode: Int): [evo_request_payment] evo_request_payments(evo_id: String, evo_name: String, statecode: Int): [evo_request_payment]
evo_reward_condition(evo_reward_conditionid: Uuid!): evo_reward_condition evo_reward_condition(evo_reward_conditionid: Uuid!): evo_reward_condition
evo_reward_conditions(evo_agent_accountid: Uuid, evo_datefrom_param: DateParamInput, evo_dateto_param: DateParamInput, statecode: Int): [evo_reward_condition] evo_reward_conditions(evo_agency_agreementid_param: GuidParamInput, evo_agent_accountid: Uuid, evo_datefrom_param: DateParamInput, evo_dateto_param: DateParamInput, statecode: Int): [evo_reward_condition]
evo_sot_coefficient_types(statecode: Int): [evo_sot_coefficient_type] evo_sot_coefficient_types(statecode: Int): [evo_sot_coefficient_type]
evo_statuscode(evo_id: String, evo_statuscodeid: Uuid): evo_statuscode evo_statuscode(evo_id: String, evo_statuscodeid: Uuid): evo_statuscode
evo_statuscodes(statecode: Int): [evo_statuscode] evo_statuscodes(statecode: Int): [evo_statuscode]
@ -258,6 +258,11 @@ input ConditionInput {
logicoperation: LogicOperation! logicoperation: LogicOperation!
} }
input GuidParamInput {
eq: Uuid
has: Boolean
}
"""The built-in `Decimal` scalar type.""" """The built-in `Decimal` scalar type."""
scalar Decimal scalar Decimal
@ -334,6 +339,7 @@ type evo_addproduct_type {
evo_towtruck: Boolean evo_towtruck: Boolean
evo_visible_calc: Boolean evo_visible_calc: Boolean
evo_whom_register: Int evo_whom_register: Int
evo_who_register: Int
modifiedon: DateTime modifiedon: DateTime
statecode: Int statecode: Int
toObjectString: String toObjectString: String
@ -1350,6 +1356,8 @@ type evo_contract {
evo_ns_bonus_summ: Decimal evo_ns_bonus_summ: Decimal
evo_number_dkp: String evo_number_dkp: String
evo_paymentorders(evo_name: String, statecode: Int): [evo_paymentorder] evo_paymentorders(evo_name: String, statecode: Int): [evo_paymentorder]
evo_payment_redemption_sum: Decimal
evo_payment_redemption_sum_without_nds: Decimal
evo_period: Int evo_period: Int
evo_price_without_discount: Decimal evo_price_without_discount: Decimal
evo_price_without_discount_supplier_currency: Decimal evo_price_without_discount_supplier_currency: Decimal
@ -1445,6 +1453,7 @@ type evo_paymentorder {
evo_dds_1c: String evo_dds_1c: String
evo_inn_text: String evo_inn_text: String
evo_insurance_periodid: Uuid evo_insurance_periodid: Uuid
evo_money_transfer_paymentorderid: Uuid
evo_name: String evo_name: String
evo_paydate: DateTime evo_paydate: DateTime
evo_paydate_fact: DateTime evo_paydate_fact: DateTime
@ -1904,6 +1913,7 @@ type evo_addcontract {
evo_insurer_kasko_accountid_new: Uuid evo_insurer_kasko_accountid_new: Uuid
evo_insurer_osago_accountid: Uuid evo_insurer_osago_accountid: Uuid
evo_insurer_osago_accountid_new: Uuid evo_insurer_osago_accountid_new: Uuid
evo_ins_period_kasko_date: DateTime
evo_ins_period_kasko_number: Int evo_ins_period_kasko_number: Int
evo_ins_period_osago_date: DateTime evo_ins_period_osago_date: DateTime
evo_ins_period_osago_number: Int evo_ins_period_osago_number: Int
@ -2002,6 +2012,7 @@ type evo_addcontract {
evo_registration_new: Int evo_registration_new: Int
evo_registration_regionid: Uuid evo_registration_regionid: Uuid
evo_registration_regionid_new: Uuid evo_registration_regionid_new: Uuid
evo_remove_restrictions: Boolean
evo_seats: Int evo_seats: Int
evo_seats_new: Int evo_seats_new: Int
evo_signatory_evo_systemuserid: Uuid evo_signatory_evo_systemuserid: Uuid

View File

@ -149,7 +149,8 @@ export type ElementsNames =
| 'selectLegalClientTown' | 'selectLegalClientTown'
| 'selectSubsidy' | 'selectSubsidy'
| 'labelSubsidySum' | 'labelSubsidySum'
| 'selectFuelCard'; | 'selectFuelCard'
| 'tbxMinPriceChange';
export type LinkElementsNames = 'linkDownloadKp'; export type LinkElementsNames = 'linkDownloadKp';

View File

@ -41,6 +41,7 @@ interface ICalculationValues {
getOptions: ( getOptions: (
elementName: ElementsNames, elementName: ElementsNames,
fields?: { [field in keyof (IBaseOption & TCRMEntity)]?: any }, fields?: { [field in keyof (IBaseOption & TCRMEntity)]?: any },
filtered?: boolean,
) => (IBaseOption & TCRMEntity)[] | undefined; ) => (IBaseOption & TCRMEntity)[] | undefined;
setOptions: ( setOptions: (
elementName: ElementsNames, elementName: ElementsNames,

View File

@ -1,6 +1,5 @@
export enum Process { export enum Process {
Init, Init,
LoadKp, LoadKp,
RecalcWithoutRevision,
ELT, ELT,
} }

View File

@ -135,7 +135,8 @@ export type ValuesNames =
| 'legalClientTown' | 'legalClientTown'
| 'subsidy' | 'subsidy'
| 'subsidySum' | 'subsidySum'
| 'fuelCard'; | 'fuelCard'
| 'minPriceChange';
export type ComputedValuesNames = export type ComputedValuesNames =
| 'leaseObjectRiskName' | 'leaseObjectRiskName'

View File

@ -106,6 +106,7 @@ export interface IQuote extends BaseEntity {
evo_period?: number; evo_period?: number;
evo_first_payment_perc?: number; evo_first_payment_perc?: number;
evo_last_payment_perc?: number; evo_last_payment_perc?: number;
evo_min_change_price?: number;
evo_max_price_change?: number; evo_max_price_change?: number;
evo_max_mass?: number; evo_max_mass?: number;
evo_seats?: number; evo_seats?: number;
@ -125,6 +126,15 @@ export interface IQuote extends BaseEntity {
evo_req_telematic_accept?: number; evo_req_telematic_accept?: number;
evo_one_year_insurance?: boolean; evo_one_year_insurance?: boolean;
evo_payment_redemption_sum?: number; evo_payment_redemption_sum?: number;
evo_agent_accountid?: string;
evo_agent_reward_conditionid?: string;
evo_agent_reward_total?: number;
evo_broker_accountid?: string;
evo_fin_department_reward_total?: number;
evo_fin_department_reward_conditionid?: string;
evo_fin_department_accountid?: string;
evo_broker_reward_total?: number;
evo_broker_reward_conditionid?: string;
} }
export interface IEvoGraph extends BaseEntity { export interface IEvoGraph extends BaseEntity {
@ -153,6 +163,7 @@ export interface IEvoBaseproduct extends BaseEntity {
evo_dateto_param?: Date; evo_dateto_param?: Date;
evo_leasingobject_types?: IEvoLeasingObjectType[]; evo_leasingobject_types?: IEvoLeasingObjectType[];
evo_brands?: IEvoBrand[]; evo_brands?: IEvoBrand[];
systemusers?: ISystemUser[];
} }
export interface IEvoLeasingObjectType extends BaseEntity { export interface IEvoLeasingObjectType extends BaseEntity {
@ -212,6 +223,7 @@ export interface IEvoRewardCondition extends BaseEntity {
evo_double_agent_accountid?: string; evo_double_agent_accountid?: string;
evo_reward_summ?: number; evo_reward_summ?: number;
evo_reduce_reward?: boolean; evo_reduce_reward?: boolean;
evo_agency_agreementid?: string;
} }
export interface IEvoGPSBrand extends BaseEntity { export interface IEvoGPSBrand extends BaseEntity {
@ -318,6 +330,7 @@ export interface IEvoAddproductType extends BaseEntity {
evo_cost_price_telematics?: number; evo_cost_price_telematics?: number;
evo_cost_equipment?: number; evo_cost_equipment?: number;
evo_controls_program?: number[]; evo_controls_program?: number[];
evo_visible_calc?: boolean;
evo_helpcard_type?: number; evo_helpcard_type?: number;
evo_towtruck?: boolean; evo_towtruck?: boolean;
evo_pts_type?: number[]; evo_pts_type?: number[];