hl-core 0.0.10-beta.29 → 0.0.10-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api/base.api.ts CHANGED
@@ -456,7 +456,12 @@ export class ApiClass {
456
456
  url: `/${this.productUrl}/api/Application/CheckBeneficiariesInActualPolicy?iin=${iin}`,
457
457
  });
458
458
  }
459
-
459
+ async checkBeneficiariesActualPolicy(id: string) {
460
+ return await this.axiosCall<boolean>({
461
+ method: Methods.GET,
462
+ url: `/${this.productUrl}/api/Application/checkBeneficiariesActualPolicy?processInstanceId=${id}`,
463
+ });
464
+ }
460
465
  async setMember(whichMember: keyof typeof MemberCodes, data: any) {
461
466
  return await this.axiosCall({
462
467
  method: Methods.POST,
@@ -992,6 +997,27 @@ export class ApiClass {
992
997
  });
993
998
  }
994
999
 
1000
+ async getContractByBin(bin: string) {
1001
+ return await this.axiosCall<Types.GetContractByBinResponse>({
1002
+ method: Methods.GET,
1003
+ url: `/${this.productUrl}/api/Application/getContractByBin`,
1004
+ params: {
1005
+ bin,
1006
+ },
1007
+ });
1008
+ }
1009
+
1010
+ async checkProActiveService(processInstanceId: string | number, iin: string) {
1011
+ return await this.axiosCall({
1012
+ method: Methods.GET,
1013
+ url: `/${this.productUrl}/api/Application/CheckProActiveService`,
1014
+ params: {
1015
+ processInstanceId,
1016
+ iin,
1017
+ },
1018
+ });
1019
+ }
1020
+
995
1021
  pensionannuityNew = {
996
1022
  base: '/pensionannuityNew',
997
1023
  getEnpfRedirectUrl: async (id: string) => {
@@ -68,6 +68,9 @@ export default function (axios: AxiosInstance) {
68
68
  if (error.response.status === 403 && error.response.config.url) {
69
69
  dataStore.showToaster('error', `Нет доступа на запрос: ${error.response.config.url.substring(error.response.config.url.lastIndexOf('/') + 1)}`, 5000);
70
70
  }
71
+ if (error.response.status === 413) {
72
+ dataStore.showToaster('error', dataStore.t('error.exceedUploadLimitFile'), 5000);
73
+ }
71
74
  }
72
75
  }
73
76
  return Promise.reject(error);
@@ -75,17 +75,20 @@
75
75
  @keyup.enter.prevent="otpCondition ? openCustomPanel('otp') : null"
76
76
  :rules="phoneRule"
77
77
  />
78
- <base-form-input
79
- v-model="member.iin"
80
- :label="$dataStore.t('form.iin')"
81
- :maska="$maska.iin"
82
- :readonly="!!isDisabled || !!isIinPhoneDisabled || !!member.parsedDocument?.iin || !!isDataFromGov"
83
- :clearable="!isDisabled && !isIinPhoneDisabled && !member.parsedDocument?.iin && !isDataFromGov"
84
- :append-inner-icon="hasMemberSearch || !isNonResident ? (hasDocumentReader ? 'mdi mdi-credit-card-scan-outline' : 'mdi mdi-magnify') : ''"
85
- @append="searchMember"
86
- @input="onIinInput"
87
- :rules="isNonResident ? [] : $rules.required.concat($rules.iinRight)"
88
- />
78
+ <base-animation>
79
+ <base-form-input
80
+ v-if="!isNonResident"
81
+ v-model="member.iin"
82
+ :label="$dataStore.t('form.iin')"
83
+ :maska="$maska.iin"
84
+ :readonly="!!isDisabled || !!isIinPhoneDisabled || !!member.parsedDocument?.iin || !!isDataFromGov"
85
+ :clearable="!isDisabled && !isIinPhoneDisabled && !member.parsedDocument?.iin && !isDataFromGov"
86
+ :append-inner-icon="hasMemberSearch || !isNonResident ? (hasDocumentReader ? 'mdi mdi-credit-card-scan-outline' : 'mdi mdi-magnify') : ''"
87
+ @append="searchMember"
88
+ @input="onIinInput"
89
+ :rules="isNonResident ? [] : $rules.required.concat($rules.iinRight)"
90
+ />
91
+ </base-animation>
89
92
  <base-form-input
90
93
  v-model.trim="member.lastName"
91
94
  :readonly="isDisabled || isDataFromGov || !!member.parsedDocument?.lastName"
@@ -100,7 +103,7 @@
100
103
  :label="$dataStore.t('form.firstName')"
101
104
  :rules="$rules.required.concat($rules.cyrillic)"
102
105
  :append-inner-icon="isNonResident ? 'mdi mdi-magnify' : ''"
103
- @append="isNonResident && searchMember"
106
+ @append="searchMember"
104
107
  />
105
108
  <base-form-input
106
109
  v-if="hasMiddleName"
@@ -491,6 +494,31 @@
491
494
  append-inner-icon="mdi mdi-chevron-right"
492
495
  @append="openPanel($dataStore.t('form.documentIssuers'), [], 'documentIssuers', $dataStore.getDocumentIssuers)"
493
496
  />
497
+ <base-animation>
498
+ <div v-if="hasIssuerOther" class="flex flex-col gap-[1px]">
499
+ <base-form-input
500
+ v-model="member.documentIssuers.issuerOtherName"
501
+ :label="$dataStore.t('form.issuerOtherName')"
502
+ :readonly="isDisabled"
503
+ :clearable="!isDisabled"
504
+ :rules="$rules.required.concat($rules.onlySymbols)"
505
+ />
506
+ <base-form-input
507
+ v-model="member.documentIssuers.issuerOtherNameOrig"
508
+ :label="$dataStore.t('form.issuerOtherNameOrig')"
509
+ :readonly="isDisabled"
510
+ :clearable="!isDisabled"
511
+ :rules="$rules.required"
512
+ />
513
+ <base-form-input
514
+ v-model="member.documentIssuers.issuerOtherNameRu"
515
+ :label="$dataStore.t('form.issuerOtherNameRu')"
516
+ :readonly="isDisabled"
517
+ :clearable="!isDisabled"
518
+ :rules="$rules.required.concat($rules.cyrillic)"
519
+ />
520
+ </div>
521
+ </base-animation>
494
522
  <base-form-input
495
523
  v-model="member.documentDate"
496
524
  :label="$dataStore.t('form.documentDate')"
@@ -1004,6 +1032,7 @@ export default {
1004
1032
  (dataStore.isLifetrip && whichForm.value === formStore.insuredFormKey && member.value.isInsuredUnderage),
1005
1033
  );
1006
1034
  const hasWorkPositionDict = dataStore.isBaiterek;
1035
+ const hasIssuerOther = computed(() => !useEnv().isProduction && member.value.documentIssuers && member.value.documentIssuers.nameRu === 'Другое');
1007
1036
 
1008
1037
  const birthDateRule = computed(() => {
1009
1038
  const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
@@ -1681,7 +1710,9 @@ export default {
1681
1710
  };
1682
1711
  const isApplicationSaved = await dataStore.setApplication(data);
1683
1712
  if (isApplicationSaved === false) return;
1684
- dataStore.showToaster('info', dataStore.t('toaster.needToRecalculate'), 5000);
1713
+ if (formStore.applicationData.pensionApp.amount && formStore.applicationData.pensionApp.amount !== 0)
1714
+ dataStore.showToaster('info', dataStore.t('toaster.needToRecalculate'), 5000);
1715
+ await dataStore.saveMember(member.value, 'Client', memberFromApplicaiton);
1685
1716
  }
1686
1717
  }
1687
1718
  await router.replace({
@@ -1735,6 +1766,7 @@ export default {
1735
1766
  isSubmittingForm.value = true;
1736
1767
  const docType = member.value.documentType.ids;
1737
1768
  if (
1769
+ !isNonResident.value &&
1738
1770
  member.value.gotFromInsis === true &&
1739
1771
  (docType === CoreEnums.Insis.DocTypes['1UDL'] ||
1740
1772
  docType === CoreEnums.Insis.DocTypes.SBI ||
@@ -2167,6 +2199,7 @@ export default {
2167
2199
  hasInsurancePay,
2168
2200
  hasSignOfIPDL,
2169
2201
  hasSameAddressToggle,
2202
+ hasIssuerOther,
2170
2203
  hasMemberSearch,
2171
2204
  hasWorkPositionDict,
2172
2205
  gbdDocuments,
@@ -161,16 +161,16 @@
161
161
  :label="$dataStore.t('agent.currency')"
162
162
  :rules="$rules.objectRequired"
163
163
  append-inner-icon="mdi mdi-chevron-right"
164
- @append="openPanel($dataStore.t('agent.currency'), $constants.currencyList, 'currency')"
164
+ @append="openPanel($dataStore.t('agent.currency'), currencyListFiltered, 'currency')"
165
165
  />
166
166
  <base-form-input
167
167
  v-if="hasInsStartDate"
168
168
  v-model="productConditionsForm.calcDate"
169
169
  :maska="$maska.date"
170
- :readonly="isDisabled"
171
- :clearable="!isDisabled"
170
+ :readonly="isDisabledInsStartDate"
171
+ :clearable="!isDisabledInsStartDate"
172
172
  :label="$dataStore.t('labels.insuranceStartDate')"
173
- :rules="$rules.required"
173
+ :rules="formStore.lfb.add ? $rules.required : $rules.required.concat($rules.checkPastDate)"
174
174
  append-inner-icon="mdi mdi-calendar-blank-outline"
175
175
  />
176
176
  <base-form-input
@@ -307,7 +307,7 @@
307
307
  :label="$dataStore.t('productConditionsForm.agencyPart')"
308
308
  :readonly="isDisabledAgentCommission"
309
309
  :clearable="!isDisabledAgentCommission"
310
- :rules="$rules.required.concat($rules.numbers, $rules.agentCommission)"
310
+ :rules="formStore.lfb.add ? $rules.required : $rules.required.concat($rules.numbers, $rules.agentCommission)"
311
311
  />
312
312
  </base-form-section>
313
313
  <section v-if="whichProduct === 'pensionannuitynew'">
@@ -359,7 +359,7 @@
359
359
  :label="$dataStore.t('pension.ownFundsRaisAmount')"
360
360
  />
361
361
  </base-form-section>
362
- <base-form-section v-if="formStore.applicationData.processCode !== 2" :title="$dataStore.t('pension.companyName')">
362
+ <base-form-section v-if="formStore.applicationData.processCode !== 2 && !isDisabled" :title="$dataStore.t('pension.companyName')">
363
363
  <base-btn :text="$dataStore.t('buttons.add')" size="sm" :btn="$styles.blueBtn" @click="addTransferContract" />
364
364
  <section v-for="(contract, index) in transferContracts" class="py-2">
365
365
  <base-panel-input
@@ -821,6 +821,9 @@ export default defineComponent({
821
821
  if (whichProduct.value === 'gons') {
822
822
  return true;
823
823
  }
824
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
825
+ return true;
826
+ }
824
827
  if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && dataStore.isUnderwriter()) {
825
828
  return false;
826
829
  }
@@ -875,6 +878,9 @@ export default defineComponent({
875
878
  if (whichProduct.value === 'halykkazyna') {
876
879
  return false;
877
880
  }
881
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
882
+ return false;
883
+ }
878
884
  return true;
879
885
  });
880
886
  const hasCoverPeriod = computed(() => {
@@ -993,6 +999,9 @@ export default defineComponent({
993
999
  if (whichProduct.value === 'halykkazyna') {
994
1000
  return dataStore.t('productConditionsForm.requestedSumInsuredInTenge');
995
1001
  }
1002
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1003
+ return dataStore.t('productConditionsForm.amountRefunded');
1004
+ }
996
1005
  if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
997
1006
  return dataStore.t('productConditionsForm.totalRequestedSumInsured');
998
1007
  }
@@ -1005,6 +1014,9 @@ export default defineComponent({
1005
1014
  return dataStore.t('productConditionsForm.coverPeriod');
1006
1015
  });
1007
1016
  const insurancePremiumPerMonthLabel = computed(() => {
1017
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1018
+ return dataStore.t('productConditionsForm.amountPaid');
1019
+ }
1008
1020
  if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
1009
1021
  return dataStore.t('productConditionsForm.totalInsurancePremiumAmountWithCommission');
1010
1022
  }
@@ -1063,11 +1075,20 @@ export default defineComponent({
1063
1075
  return true;
1064
1076
  });
1065
1077
  const isDisabledAgentCommission = computed(() => {
1078
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1079
+ return true;
1080
+ }
1066
1081
  if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns' || dataStore.isUnderwriter()) {
1067
1082
  return false;
1068
1083
  }
1069
1084
  return isDisabled.value;
1070
1085
  });
1086
+ const isDisabledInsStartDate = computed(() => {
1087
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1088
+ return true;
1089
+ }
1090
+ return isDisabled.value;
1091
+ });
1071
1092
  const hasCalcSum = computed(() => {
1072
1093
  if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
1073
1094
  return false;
@@ -1075,7 +1096,7 @@ export default defineComponent({
1075
1096
  return true;
1076
1097
  });
1077
1098
  const hasFixInsSum = computed(() => {
1078
- if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
1099
+ if (!formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1079
1100
  return true;
1080
1101
  }
1081
1102
  return false;
@@ -1122,6 +1143,12 @@ export default defineComponent({
1122
1143
  }
1123
1144
  return isDisabled.value;
1124
1145
  });
1146
+ const currencyListFiltered = computed(() => {
1147
+ if (useEnv().isProduction) {
1148
+ return constants.currencyList.filter(i => i.code !== 'USD');
1149
+ }
1150
+ return constants.currencyList;
1151
+ });
1125
1152
 
1126
1153
  const pensionCalculationParams = ref({
1127
1154
  compulsoryContractAmount: pensionForm && pensionForm.compulsoryContractAmount && pensionForm.compulsoryContractAmount != 0 ? pensionForm.compulsoryContractAmount : null,
@@ -1157,7 +1184,7 @@ export default defineComponent({
1157
1184
  const toStatement = async () => {
1158
1185
  const statementItem = dataStore.menuItems.find(i => i.id === 'statement');
1159
1186
  if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
1160
- await router.push({ name: 'taskId-NewApp', params: route.params, query: { tab: 'statement' } });
1187
+ await router.push({ name: 'taskId-NewApp', params: route.params, query: { tab: 'statement', add: 'false' } });
1161
1188
  return;
1162
1189
  }
1163
1190
  if (whichProduct.value === 'gons') {
@@ -1765,7 +1792,7 @@ export default defineComponent({
1765
1792
  const kazynaPaymentPeriod = dataStore.processPaymentPeriod.find(i => i.code === 'single');
1766
1793
  if (kazynaPaymentPeriod) productConditionsForm.paymentPeriod = kazynaPaymentPeriod;
1767
1794
  }
1768
- if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
1795
+ if (!formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1769
1796
  productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(
1770
1797
  formStore.lfb.clients.reduce((sum: number, i: any) => {
1771
1798
  return sum + Number(i.insSum);
@@ -1952,6 +1979,7 @@ export default defineComponent({
1952
1979
  isTermsDisabled,
1953
1980
  isUnderwriterForm,
1954
1981
  hasCurrencySymbols,
1982
+ currencyListFiltered,
1955
1983
  currencySymbolsLabel,
1956
1984
  isDisabledPaymentPeriod,
1957
1985
  insurancePremiumPerMonthRule,
@@ -1987,6 +2015,7 @@ export default defineComponent({
1987
2015
  hasDefault,
1988
2016
  isShownAdditionalTerms,
1989
2017
  hasCalcSum,
2018
+ isDisabledInsStartDate,
1990
2019
  isDisabledAgentCommission,
1991
2020
  hasFixInsSum,
1992
2021
  isDisabledFixInsSum,
@@ -184,13 +184,7 @@
184
184
  <base-btn :loading="loading" :text="$dataStore.t('payment.copyUrl')" @click="$dataStore.copyToClipboard(formStore.epayLink)" />
185
185
  <base-btn :loading="loading" :text="$dataStore.t('payment.recipientNumber')" @click="openEpayPanel" />
186
186
  <base-btn :loading="loading" :text="$dataStore.t('sign.convertQr')" @click="convertQr(formStore.epayLink)" />
187
- <base-btn
188
- v-if="!useEnv().isProduction"
189
- :loading="loading"
190
- :btn="$styles.greenBtn"
191
- :text="$dataStore.t('payment.halykLink')"
192
- @click="convertQr(formStore.epayLink, 'halyk_pay_link_template')"
193
- />
187
+ <base-btn :loading="loading" :btn="$styles.greenBtn" :text="$dataStore.t('payment.halykLink')" @click="convertQr(formStore.epayLink, 'halyk_pay_link_template')" />
194
188
  </div>
195
189
  </base-form-section>
196
190
  <div v-if="isSendNumberOpen" :class="[$styles.flexColNav]">
@@ -905,7 +899,7 @@ export default defineComponent({
905
899
  }
906
900
  }
907
901
  if (message.length) {
908
- dataStore.showToaster('info', 'Подписано: ' + message.join(', '), 5000);
902
+ // dataStore.showToaster('info', 'Подписывается: ' + message.join(', '), 5000);
909
903
  await checkIfAllSigned();
910
904
  }
911
905
  currentFilePanel.value = [];
@@ -460,7 +460,7 @@ export class Member extends Person {
460
460
  birthRegion: Value;
461
461
  documentType: Value;
462
462
  documentNumber: string | null;
463
- documentIssuers: Value;
463
+ documentIssuers: Types.Base.Document.IssuerOther;
464
464
  documentDate: string | null;
465
465
  documentExpire: string | null;
466
466
  signOfResidency: Value;
@@ -927,7 +927,13 @@ export class ProductConditions {
927
927
  this.fixInsSum = fixInsSum;
928
928
  this.calcDate = calcDate;
929
929
  this.contractEndDate = contractEndDate;
930
- this.currency = currency;
930
+ this.currency = {
931
+ code: 'KZT',
932
+ id: '1',
933
+ nameKz: 'Тенге',
934
+ nameRu: 'Тенге',
935
+ ids: '',
936
+ };
931
937
  }
932
938
 
933
939
  getSingleTripDays() {
@@ -1347,6 +1353,8 @@ export class FormStoreClass {
1347
1353
  clientId: string | null;
1348
1354
  insuredFile: any;
1349
1355
  isPanelInside: boolean;
1356
+ typeChange: string;
1357
+ add: boolean;
1350
1358
  };
1351
1359
  additionalInsuranceTerms: Types.AddCover[];
1352
1360
  additionalInsuranceTermsWithout: Types.AddCover[];
@@ -1418,6 +1426,7 @@ export class FormStoreClass {
1418
1426
  isTask?: boolean | null;
1419
1427
  createDate?: string | null;
1420
1428
  policyAppDto?: Types.PolicyAppDto;
1429
+ parentPolicyDto?: Types.ParentPolicyDto | null;
1421
1430
  insisWorkDataApp?: Types.InsisWorkDataApp;
1422
1431
  addCoverDto?: Types.AddCover[];
1423
1432
  };
@@ -1461,6 +1470,8 @@ export class FormStoreClass {
1461
1470
  clientId: null,
1462
1471
  insuredFile: null,
1463
1472
  isPanelInside: false,
1473
+ typeChange: 'calculation',
1474
+ add: false,
1464
1475
  };
1465
1476
  this.additionalInsuranceTerms = [];
1466
1477
  this.additionalInsuranceTermsWithout = [];
@@ -18,7 +18,9 @@ export const constants = Object.freeze({
18
18
  gns: 16,
19
19
  prepensionannuity: 18,
20
20
  pensionannuitynew: 19,
21
+ halykkazynaap: 20,
21
22
  balam: 21,
23
+ halykkazynaapsms: 23,
22
24
  },
23
25
  amlProducts: {
24
26
  checkcontragent: 1,
@@ -75,6 +77,20 @@ export const constants = Object.freeze({
75
77
  kzt: '₸',
76
78
  usd: '$',
77
79
  },
80
+ pensionAge: {
81
+ man: 63,
82
+ woman: 61,
83
+ },
84
+ genderByIIN: {
85
+ '0': 'Ж',
86
+ '3': 'М',
87
+ '4': 'Ж',
88
+ '5': 'М',
89
+ '6': 'Ж',
90
+ '7': 'М',
91
+ '8': 'Ж',
92
+ '9': 'М',
93
+ },
78
94
  documentTypes: {
79
95
  statement: 5,
80
96
  contract: 6,
@@ -4,7 +4,7 @@ import { XMLParser } from 'fast-xml-parser';
4
4
  import { AxiosError } from 'axios';
5
5
  import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
6
6
  import { PolicyholderClass, Value, User } from '../composables/classes';
7
- import type { EnvModes, NestedKeyOf, ResponseStructure, Utils } from '../types';
7
+ import type { EnvModes, NestedKeyOf, Projects, ResponseStructure, Utils } from '../types';
8
8
  import { Roles, Statuses } from '../types/enum';
9
9
 
10
10
  export const useEnv = () => {
@@ -702,8 +702,15 @@ export class RoleController {
702
702
  }
703
703
  return !!this.user.roles.find(i => i === whichRole);
704
704
  };
705
- isInitiator = () => {
706
- return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti();
705
+ isInitiator = (productFromExternal?: string) => {
706
+ const env = useEnv();
707
+ const dataStore = useDataStore();
708
+ const hasAccessByProduct = (() => {
709
+ const product = productFromExternal as Projects;
710
+ if (dataStore.isLifetrip || product === 'lifetrip' || (!env.isProduction && (dataStore.isPension || product === 'pensionannuitynew'))) return this.isBranchDirector();
711
+ return false;
712
+ })();
713
+ return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
707
714
  };
708
715
  isManager = () => {
709
716
  return this.isRole(constants.roles.Manager);
package/locales/ru.json CHANGED
@@ -28,7 +28,8 @@
28
28
  "noOtpCode": "Заполните поля: ИИН, Номер телефона, Код подтверждения",
29
29
  "memberCopy": "Ошибка при копировании данных участников",
30
30
  "memberSave": "Ошибка при сохранении данных участников",
31
- "notValidIik": "Некорректный ИИК"
31
+ "notValidIik": "Некорректный ИИК",
32
+ "exceedUploadLimitFile": "Размер файла превышает определенный лимит"
32
33
  },
33
34
  "toaster": {
34
35
  "wrongFormatOf": "Некорректный формат \"{text}\"",
@@ -241,7 +242,8 @@
241
242
  "sendDosie": "Отправить досье",
242
243
  "downloadPaymentInvoice": "Скачать счет на оплату",
243
244
  "copyToClient": "Скопировать ссылку для клиента",
244
- "searchByFio": "Поиск по ФИО"
245
+ "searchByFio": "Поиск по ФИО",
246
+ "conclude": "Заключить"
245
247
  },
246
248
  "dialog": {
247
249
  "title": "Подтверждение",
@@ -280,7 +282,9 @@
280
282
  "choosePay": "Вы действительно хотите выбрать метод оплаты?",
281
283
  "searchBeneficiary": "Выполните поиск договоров по ИИН Выгодоприобретателя",
282
284
  "searchFoundBeneficiary": "По данному ИИН уже имеется договор. Создание заявки по продукту “ГОНС” - невозможно.",
283
- "searchNotFoundBeneficiary": "По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”"
285
+ "searchNotFoundBeneficiary": "По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”",
286
+ "searchFoundPolicyholder": "Выполните поиск договоров по БИН Страхователя",
287
+ "searchNotFoundPolicyholder": "По данному БИНу не найден договор {product}.\nПроверьте правильность ввода БИН."
284
288
  },
285
289
  "sign": {
286
290
  "chooseDoc": "Выберите документы для подписание",
@@ -368,6 +372,7 @@
368
372
  "downloadTemplate": "Скачать шаблон",
369
373
  "countriesLength": "Число выбранных стран",
370
374
  "isPolicyholderLegalEntity": "Является ли Страхователь Юридическим лицом?",
375
+ "additionalAgreement": "Заключить дополнительное соглашение",
371
376
  "productConditionsForm": {
372
377
  "coverPeriod": "Срок страхования",
373
378
  "payPeriod": "Период оплаты страховой премии",
@@ -418,7 +423,9 @@
418
423
  "alfa": "Расходы от премии, в %",
419
424
  "gamma": "Расходы от выплат, в %",
420
425
  "mrpPayment": "Выплата на погребение (в тенге)",
421
- "fixInsSum": "Фиксированная сумма"
426
+ "fixInsSum": "Фиксированная сумма",
427
+ "amountRefunded": "Сумма к возврату",
428
+ "amountPaid": "Сумма к доплате"
422
429
  },
423
430
  "calculatorForm": {
424
431
  "selectedCountries": "Выбранные страны",
@@ -455,7 +462,8 @@
455
462
  "factEndDate": "Дата завершения",
456
463
  "decision": "Статус",
457
464
  "userFullName": "Исполнитель",
458
- "stage": "Этап"
465
+ "stage": "Этап",
466
+ "policyNumber": "№ Полиса"
459
467
  },
460
468
  "aml": {
461
469
  "contractSignDate": "Дата заключение контракта",
@@ -794,6 +802,7 @@
794
802
  "resetPassword": "Забыли пароль?",
795
803
  "search": "Поиск",
796
804
  "searchByIIN": "Поиск по ИИН",
805
+ "searchByBIN": "Поиск по БИН",
797
806
  "chooseScannedDoc": "Выбрать отсканированный документ",
798
807
  "inputText": "Введите текст",
799
808
  "waitingStatus": "Ожидание",
@@ -955,6 +964,9 @@
955
964
  "documentNumber": "Номер документа",
956
965
  "date": "Дата",
957
966
  "documentIssuers": "Кем выдан",
967
+ "issuerOtherName": "Название органа выдачи на казахском",
968
+ "issuerOtherNameRu": "Название органа выдачи на русском",
969
+ "issuerOtherNameOrig": "Оригинальное название органа выдачи",
958
970
  "documentDate": "Дата выдачи",
959
971
  "documentExpire": "Действует до",
960
972
  "signOfResidency": "Признак резиденства",
@@ -1002,7 +1014,8 @@
1002
1014
  "recipientDocs": "Документы Получателя",
1003
1015
  "recipientData": "Сведения о Получателе",
1004
1016
  "deathInsFromNS": "Страхование от смерти от НС",
1005
- "deathInsAnyReason": "Смерть Застрахованного по любой причине"
1017
+ "deathInsAnyReason": "Смерть Застрахованного по любой причине",
1018
+ "mark": "Признак"
1006
1019
  },
1007
1020
  "bankDetailsForm": {
1008
1021
  "title": "Банковские реквизиты",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.29",
3
+ "version": "0.0.10-beta.30",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
package/plugins/head.ts CHANGED
@@ -22,5 +22,6 @@ export default defineNuxtPlugin(() => {
22
22
  href: 'https://cdn.jsdelivr.net/npm/animate.css@4.1.1/animate.min.css',
23
23
  },
24
24
  ],
25
+ script: [{ children: 'if (!Object.hasOwn) {Object.hasOwn = function(obj, prop) {return Object.prototype.hasOwnProperty.call(obj, prop);};}' }],
25
26
  });
26
27
  });
@@ -341,14 +341,18 @@ export const useDataStore = defineStore('data', {
341
341
  async getContragent(member: Member, load: boolean = true, showToaster: boolean = true) {
342
342
  this.isLoading = load;
343
343
  const isNonResident = this.isPension && member.signOfResidency.ids === '500011.2';
344
- if (!member.iin || (isNonResident && (!member.firstName || !member.lastName))) return;
344
+ if (isNonResident) {
345
+ if (!member.firstName || !member.lastName) return;
346
+ } else {
347
+ if (!member.iin) return;
348
+ }
345
349
  try {
346
350
  const queryData = isNonResident
347
351
  ? {
348
352
  firstName: member.firstName ?? '',
349
353
  lastName: member.lastName ?? '',
350
354
  middleName: member.middleName ?? '',
351
- iin: member.iin ? member.iin.replace(/-/g, '') : '',
355
+ iin: '',
352
356
  birthDate: member.birthDate ? formatDate(member.birthDate)?.toISOString() ?? '' : '',
353
357
  }
354
358
  : {
@@ -462,6 +466,11 @@ export const useDataStore = defineStore('data', {
462
466
  member.documentType = documentType ? documentType : new Value();
463
467
  member.documentNumber = userDocument.number;
464
468
  member.documentIssuers = documentIssuer ? documentIssuer : new Value();
469
+ if (userDocument.issuerNameRu === 'Другое') {
470
+ member.documentIssuers.issuerOtherNameRu = userDocument.issuerOtherNameRu;
471
+ member.documentIssuers.issuerOtherNameOrig = userDocument.issuerOtherNameOrig;
472
+ member.documentIssuers.issuerOtherName = userDocument.issuerOtherName;
473
+ }
465
474
  member.documentDate = reformatDate(userDocument.issueDate);
466
475
  member.documentExpire = reformatDate(userDocument.expireDate);
467
476
  }
@@ -542,10 +551,14 @@ export const useDataStore = defineStore('data', {
542
551
  },
543
552
  async alreadyInInsis(member: Member) {
544
553
  const isNonResident = this.isPension && member.signOfResidency.ids === '500011.2';
545
- if (!member.iin || (isNonResident && (!member.firstName || !member.lastName))) return;
554
+ if (isNonResident) {
555
+ if (!member.firstName || !member.lastName) return;
556
+ } else {
557
+ if (!member.iin) return;
558
+ }
546
559
  try {
547
560
  const queryData = {
548
- iin: !!member.iin ? member.iin.replaceAll('-', '') : '',
561
+ iin: !!member.iin && !isNonResident ? member.iin.replaceAll('-', '') : '',
549
562
  firstName: !!member.firstName ? member.firstName : '',
550
563
  lastName: !!member.lastName ? member.lastName : '',
551
564
  middleName: !!member.middleName ? member.middleName : '',
@@ -556,6 +569,7 @@ export const useDataStore = defineStore('data', {
556
569
  if (contragent.items.length === 1) {
557
570
  return contragent.items[0];
558
571
  } else {
572
+ if (this.isPension && queryData.iin === '') return contragent.items.find(i => i.id === member.id);
559
573
  const sortedByRegistrationDate = contragent.items.sort(
560
574
  (left, right) => new Date(right.registrationDate).getMilliseconds() - new Date(left.registrationDate).getMilliseconds(),
561
575
  );
@@ -589,8 +603,8 @@ export const useDataStore = defineStore('data', {
589
603
  }
590
604
  },
591
605
  async saveContragent(user: Member, whichForm: keyof typeof StoreMembers | 'contragent', whichIndex: number | null, onlySaveAction: boolean = true) {
592
- if (this.isGons && user.iin && whichForm === 'beneficiaryForm' && useEnv().isProduction) {
593
- const doesHaveActiveContract = await this.api.checkBeneficiariesInActualPolicy(user.iin.replace(/-/g, ''));
606
+ if (this.isGons && user.iin && whichForm === 'beneficiaryForm') {
607
+ const doesHaveActiveContract = await this.api.checkBeneficiariesActualPolicy(String(this.formStore.applicationData.processInstanceId));
594
608
  if (doesHaveActiveContract) {
595
609
  this.showToaster('error', this.t('toaster.doesHaveActiveContract'), 6000);
596
610
  return false;
@@ -627,7 +641,7 @@ export const useDataStore = defineStore('data', {
627
641
  const contragentData: Types.ContragentType = {
628
642
  id: Number(user.id),
629
643
  type: Number(user.type),
630
- iin: user.iin!.replace(/-/g, ''),
644
+ iin: user.iin ? user.iin.replace(/-/g, '') : '',
631
645
  longName: user.longName !== null ? user.longName : (user.lastName ?? '') + (user.firstName ?? '') + (user.middleName ?? ''),
632
646
  lastName: user.lastName ?? '',
633
647
  firstName: user.firstName ?? '',
@@ -781,6 +795,11 @@ export const useDataStore = defineStore('data', {
781
795
  verifyType: user.verifyType,
782
796
  verifyDate: user.verifyDate,
783
797
  };
798
+ if (user.documentIssuers.ids === '1') {
799
+ userDocument.issuerOtherName = user.documentIssuers.issuerOtherName;
800
+ userDocument.issuerOtherNameOrig = user.documentIssuers.issuerOtherNameOrig;
801
+ userDocument.issuerOtherNameRu = user.documentIssuers.issuerOtherNameRu;
802
+ }
784
803
  if (hasAlreadyDocument !== -1) {
785
804
  documentsData[hasAlreadyDocument] = userDocument;
786
805
  } else {
@@ -1024,7 +1043,7 @@ export const useDataStore = defineStore('data', {
1024
1043
  conditionsData.policyAppDto.amountInCurrency = getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
1025
1044
  conditionsData.policyAppDto.currencyExchangeRate = this.currencies.usd;
1026
1045
  }
1027
- if (this.isGons) {
1046
+ if (this.isGons && !useEnv().isProduction) {
1028
1047
  conditionsData.policyAppDto.premiumInCurrency =
1029
1048
  this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar));
1030
1049
  conditionsData.policyAppDto.amountInCurrency =
@@ -1800,7 +1819,7 @@ export const useDataStore = defineStore('data', {
1800
1819
  calculationData.amountInCurrency = getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
1801
1820
  calculationData.currencyExchangeRate = this.currencies.usd;
1802
1821
  }
1803
- if (this.isGons || product === 'gons') {
1822
+ if (!useEnv().isProduction && (this.isGons || product === 'gons')) {
1804
1823
  calculationData.premiumInCurrency =
1805
1824
  this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar));
1806
1825
  calculationData.amountInCurrency =
@@ -1835,7 +1854,7 @@ export const useDataStore = defineStore('data', {
1835
1854
  this.isGons || product === 'gons' ? this.getNumberWithSpacesAfterComma(calculationResponse.premium) : this.getNumberWithSpaces(calculationResponse.premium);
1836
1855
 
1837
1856
  this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
1838
- if (this.isKazyna || product === 'halykkazyna' || this.isGons || product === 'gons') {
1857
+ if (this.isKazyna || product === 'halykkazyna' || ((this.isGons || product === 'gons') && !useEnv().isProduction)) {
1839
1858
  if (this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar != null) {
1840
1859
  this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(calculationResponse.amountInCurrency);
1841
1860
  } else {
@@ -1876,7 +1895,7 @@ export const useDataStore = defineStore('data', {
1876
1895
  this.isLoading = true;
1877
1896
  try {
1878
1897
  const id = this.formStore.applicationData.processInstanceId;
1879
- if (!this.isPension) await this.api.setApplication(this.getConditionsData());
1898
+ if (!this.isPension && !(this.formStore.lfb.add && (this.isLifeBusiness || this.isGns))) await this.api.setApplication(this.getConditionsData());
1880
1899
  const result = ref();
1881
1900
  result.value = await this.api.getCalculation(String(id));
1882
1901
  const applicationData = await this.api.getApplicationData(taskId);
@@ -1916,6 +1935,15 @@ export const useDataStore = defineStore('data', {
1916
1935
  const res = await this.newInsuredList(applicationData.insuredApp);
1917
1936
  this.formStore.lfb.clients = res;
1918
1937
  }
1938
+ if (this.formStore.lfb.add) {
1939
+ if (result.value > 0) {
1940
+ this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(result.value);
1941
+ this.formStore.productConditionsForm.requestedSumInsured = null;
1942
+ } else {
1943
+ this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(result.value);
1944
+ this.formStore.productConditionsForm.insurancePremiumPerMonth = null;
1945
+ }
1946
+ }
1919
1947
  }
1920
1948
 
1921
1949
  this.showToaster('success', this.t('toaster.calculated'), 1000);
@@ -2010,11 +2038,6 @@ export const useDataStore = defineStore('data', {
2010
2038
  this.isLoading = onlyGet;
2011
2039
  try {
2012
2040
  const applicationData = await this.api.getApplicationData(taskId);
2013
- if (this.processCode !== applicationData.processCode && !this.isPension) {
2014
- this.isLoading = false;
2015
- this.sendToParent(constants.postActions.toHomePage, this.t('toaster.noSuchProduct'));
2016
- return;
2017
- }
2018
2041
  this.formStore.regNumber = applicationData.regNumber;
2019
2042
  this.formStore.applicationData = applicationData;
2020
2043
  this.formStore.additionalInsuranceTerms = applicationData.addCoverDto;
@@ -2249,11 +2272,19 @@ export const useDataStore = defineStore('data', {
2249
2272
  ? this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.premium === null ? null : applicationData.policyAppDto.premium)
2250
2273
  : this.getNumberWithSpaces(applicationData.policyAppDto.premium === null ? null : applicationData.policyAppDto.premium);
2251
2274
 
2275
+ if (this.isGons) {
2276
+ const govPremiums = await this.api.getGovernmentPremiums(String(this.formStore.applicationData.processInstanceId));
2277
+ this.formStore.productConditionsForm.totalAmount5 = this.getNumberWithSpaces(govPremiums.totalAmount5 === null ? null : govPremiums.totalAmount5);
2278
+ this.formStore.productConditionsForm.totalAmount7 = this.getNumberWithSpaces(govPremiums.totalAmount7 === null ? null : govPremiums.totalAmount7);
2279
+ this.formStore.productConditionsForm.statePremium5 = this.getNumberWithSpaces(govPremiums.statePremium5 === null ? null : govPremiums.statePremium5);
2280
+ this.formStore.productConditionsForm.statePremium7 = this.getNumberWithSpaces(govPremiums.statePremium7 === null ? null : govPremiums.statePremium7);
2281
+ }
2282
+
2252
2283
  if (this.isKazyna || this.isGons) {
2253
2284
  this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(applicationData.policyAppDto.amountInCurrency);
2254
2285
  this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar = this.getNumberWithSpaces(applicationData.policyAppDto.premiumInCurrency);
2255
2286
  }
2256
- if (this.isGons) {
2287
+ if (this.isGons && !useEnv().isProduction) {
2257
2288
  const currency = constants.currencyList.find(item => item.code === applicationData.policyAppDto.currency);
2258
2289
  this.formStore.productConditionsForm.currency = currency ? currency : new Value();
2259
2290
  }
@@ -2389,9 +2420,11 @@ export const useDataStore = defineStore('data', {
2389
2420
  }
2390
2421
  },
2391
2422
  async createInvoice() {
2392
- if (!this.formStore.applicationData.policyAppDto?.premium) return;
2423
+ const premium =
2424
+ this.isLifeBusiness || this.isGns ? this.formStore.applicationData.policyAppDto?.mainPremiumWithCommission : this.formStore.applicationData.policyAppDto?.premium;
2425
+ if (!premium) return;
2393
2426
  try {
2394
- const created = await this.api.createInvoice(this.formStore.applicationData.processInstanceId, this.formStore.applicationData.policyAppDto.premium);
2427
+ const created = await this.api.createInvoice(this.formStore.applicationData.processInstanceId, premium);
2395
2428
  return !!created;
2396
2429
  } catch (err) {
2397
2430
  this.isLoading = false;
@@ -3341,7 +3374,6 @@ export const useDataStore = defineStore('data', {
3341
3374
 
3342
3375
  if (Array.isArray(person.documents.document)) {
3343
3376
  const filteredDocuments = person.documents.document.filter(i => new Date(i.endDate) > new Date(Date.now()) && i.status.code === '00');
3344
-
3345
3377
  const validDocument = this.isLifetrip
3346
3378
  ? filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.PS)
3347
3379
  : filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes['1UDL']) ??
@@ -3414,11 +3446,14 @@ export const useDataStore = defineStore('data', {
3414
3446
  'clientData.authoritedPerson.bankInfo',
3415
3447
  'clientData.authoritedPerson.economySectorCode',
3416
3448
  'clientData.authoritedPerson.legalAddress',
3417
- 'clientData.authoritedPerson.placeOfBirth',
3418
3449
  'clientData.authoritedPerson.taxResidentCountry',
3419
3450
  'clientData.authoritedPerson.addTaxResidency',
3420
3451
  ]);
3421
3452
  policyholder.clientData.authoritedPerson.gender = policyholder.clientData.authoritedPerson.gender.nameRu === 'Мужской' ? 1 : 2;
3453
+ if (this.formStore.lfb.add) {
3454
+ policyholder.parentContractNumber = localStorage.getItem('policyNo');
3455
+ policyholder.parentContractId = localStorage.getItem('policyId');
3456
+ }
3422
3457
  try {
3423
3458
  const response = await this.api.startApplication(policyholder);
3424
3459
  this.sendToParent(constants.postActions.applicationCreated, response.processInstanceId);
@@ -3451,6 +3486,11 @@ export const useDataStore = defineStore('data', {
3451
3486
  this.formStore.regNumber = applicationData.regNumber;
3452
3487
  this.formStore.additionalInsuranceTerms = applicationData.addCoverDto;
3453
3488
 
3489
+ if (localStorage.getItem('add') === 'true' || this.formStore.applicationData.parentPolicyDto !== null) {
3490
+ this.formStore.lfb.add = true;
3491
+ this.formStore.lfb.policyholder.clientData.iin = localStorage.getItem('bin') as string;
3492
+ }
3493
+
3454
3494
  this.formStore.canBeClaimed = await this.api.isClaimTask(taskId);
3455
3495
  this.formStore.applicationTaskId = taskId;
3456
3496
  this.formStore.RegionPolicy.nameRu = applicationData.insisWorkDataApp.regionPolicyName;
@@ -3527,6 +3567,20 @@ export const useDataStore = defineStore('data', {
3527
3567
  this.formStore.productConditionsForm.paymentPeriod = paymentPeriod ? paymentPeriod : new Value();
3528
3568
  const processGfot = this.processGfot.find(item => item.id == applicationData.policyAppDto.processDefinitionFgotId);
3529
3569
  this.formStore.productConditionsForm.processGfot = processGfot ? processGfot : new Value();
3570
+
3571
+ if (applicationData.parentPolicyDto !== null) {
3572
+ this.formStore.productConditionsForm.calcDate = reformatDate(applicationData.parentPolicyDto.contractInsrBegin);
3573
+ this.formStore.productConditionsForm.contractEndDate = reformatDate(applicationData.parentPolicyDto.contractInsrEnd);
3574
+ }
3575
+ if (this.formStore.lfb.add) {
3576
+ if (applicationData.policyAppDto.mainPremiumWithCommission > 0) {
3577
+ this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(applicationData.policyAppDto.mainPremiumWithCommission);
3578
+ this.formStore.productConditionsForm.requestedSumInsured = null;
3579
+ } else {
3580
+ this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.mainPremiumWithCommission);
3581
+ this.formStore.productConditionsForm.insurancePremiumPerMonth = null;
3582
+ }
3583
+ }
3530
3584
  } catch (err) {
3531
3585
  ErrorHandler(err);
3532
3586
  if (err instanceof AxiosError) {
@@ -3635,6 +3689,8 @@ export const useDataStore = defineStore('data', {
3635
3689
  premium: client.insuredPolicyData.premium,
3636
3690
  premiumWithLoad: client.insuredPolicyData.premiumWithLoad,
3637
3691
  hasAttachedFile: client.hasAttachedFile,
3692
+ insrBeginDate: client.insuredPolicyData.insrBeginDate ?? 'no',
3693
+ insrEndDate: client.insuredPolicyData.insrEndDate ?? 'no',
3638
3694
  };
3639
3695
  });
3640
3696
  return clients;
@@ -3683,7 +3739,7 @@ export const useDataStore = defineStore('data', {
3683
3739
  return false;
3684
3740
  }
3685
3741
 
3686
- if (this.formStore.lfb.beneficialOwners) {
3742
+ if (!this.formStore.lfb.add && this.formStore.lfb.beneficialOwners) {
3687
3743
  if (this.validateMultipleMembersV2('beneficialOwners', 'beneficialOwnerApp', 'бенефициарных собственников') === false) {
3688
3744
  return false;
3689
3745
  }
@@ -3694,7 +3750,7 @@ export const useDataStore = defineStore('data', {
3694
3750
  }
3695
3751
  }
3696
3752
 
3697
- if (this.formStore.applicationData.clientApp.clientData.activityTypes === null) {
3753
+ if (!this.formStore.lfb.add && this.formStore.applicationData.clientApp.clientData.activityTypes === null) {
3698
3754
  this.showToaster('error', this.t('toaster.notSavedMember', { text: 'деятельности Страхователя' }), 3000);
3699
3755
  return false;
3700
3756
  }
@@ -3710,7 +3766,7 @@ export const useDataStore = defineStore('data', {
3710
3766
  }
3711
3767
  }
3712
3768
 
3713
- if (this.formStore.lfb.clients && this.formStore.lfb.clients.length <= 10) {
3769
+ if (!this.formStore.lfb.add && this.formStore.lfb.clients && this.formStore.lfb.clients.length <= 10) {
3714
3770
  for (const client of this.formStore.lfb.clients) {
3715
3771
  if (client.hasAttachedFile === false) {
3716
3772
  this.showToaster('error', this.t('toaster.needAttachQuestionnaire'), 3000);
@@ -3719,12 +3775,12 @@ export const useDataStore = defineStore('data', {
3719
3775
  }
3720
3776
  }
3721
3777
 
3722
- if (this.formStore.productConditionsForm.insurancePremiumPerMonth === null) {
3778
+ if (!this.formStore.lfb.add && this.formStore.productConditionsForm.insurancePremiumPerMonth === null) {
3723
3779
  this.showToaster('error', this.t('toaster.emptyProductConditions'), 3000);
3724
3780
  return false;
3725
3781
  }
3726
3782
 
3727
- if (this.formStore.productConditionsForm.insurancePremiumPerMonth === '0') {
3783
+ if (!this.formStore.lfb.add && this.formStore.productConditionsForm.insurancePremiumPerMonth === '0') {
3728
3784
  this.showToaster('error', this.t('toaster.notZeroPremium'), 3000);
3729
3785
  return false;
3730
3786
  }
@@ -3797,7 +3853,17 @@ export const useDataStore = defineStore('data', {
3797
3853
  const bank = await this.api.getBankByAccountNumber(accountNumber);
3798
3854
  return bank;
3799
3855
  } catch (err) {
3800
- return ErrorHandler(err);
3856
+ ErrorHandler(err);
3857
+ }
3858
+ },
3859
+ async getContractByBin(bin: string) {
3860
+ try {
3861
+ const contract = await this.api.getContractByBin(bin);
3862
+ contract.insrBegin = reformatDate(contract.insrBegin) ?? '';
3863
+ contract.insrEnd = reformatDate(contract.insrEnd) ?? '';
3864
+ return contract;
3865
+ } catch (err) {
3866
+ ErrorHandler(err);
3801
3867
  }
3802
3868
  },
3803
3869
  async isCourseChanged(processInstanceId: string) {
package/store/rules.ts CHANGED
@@ -272,6 +272,18 @@ export const rules = {
272
272
  }
273
273
  },
274
274
  ],
275
+ checkPastDate: [
276
+ (v: any) => {
277
+ let today = new Date();
278
+ const yourDate = new Date(formatDate(v)!);
279
+ today.setHours(0, 0, 0, 0);
280
+ if (yourDate >= today) {
281
+ return true;
282
+ } else {
283
+ return t('rules.checkDate');
284
+ }
285
+ },
286
+ ],
275
287
  fileRequired: [(v: any) => !!v || t('rules.fileRequired'), (v: any) => (v && v.length > 0) || t('rules.fileRequired')],
276
288
  guaranteedPeriodLimit(v: any, termAnnuityPayments: any) {
277
289
  if (Number(v) > Number(termAnnuityPayments)) {
package/types/index.ts CHANGED
@@ -257,6 +257,8 @@ export interface ClientV2 {
257
257
  criticalMultiply?: string;
258
258
  criticalAdditive?: string;
259
259
  hasAttachedFile?: boolean;
260
+ insrBeginDate?: string;
261
+ insrEndDate?: string;
260
262
  }
261
263
 
262
264
  export type RecalculationResponseType = {
@@ -436,6 +438,9 @@ export interface ContragentDocuments {
436
438
  issuerId: number;
437
439
  issuerName: string | null;
438
440
  issuerNameRu: string | null;
441
+ issuerOtherName?: string;
442
+ issuerOtherNameOrig?: string;
443
+ issuerOtherNameRu?: string;
439
444
  description: string | null;
440
445
  note: string | null;
441
446
  verifyType: string;
@@ -557,6 +562,7 @@ export type PolicyAppDto = {
557
562
  mainInsSum?: number | null;
558
563
  agentCommission?: number | null;
559
564
  calcDate?: string;
565
+ mainPremiumWithCommission?: number;
560
566
  };
561
567
 
562
568
  export type InsisWorkDataApp = {
@@ -727,9 +733,31 @@ export type SignedState = {
727
733
  code: string;
728
734
  };
729
735
 
736
+ export type GetContractByBinResponse = {
737
+ bin: string;
738
+ fullName: string;
739
+ insrBegin: string;
740
+ insrEnd: string;
741
+ policyNo: string;
742
+ policyId: string;
743
+ status: string;
744
+ };
745
+
746
+ export type ParentPolicyDto = {
747
+ contractId: number;
748
+ contractInsrBegin: string;
749
+ contractInsrEnd: string;
750
+ contractNumber: string;
751
+ };
752
+
730
753
  export namespace Base {
731
754
  export namespace Document {
732
755
  export type Digital = { iin: string; longName: string; digitalDocument: IDocument | null };
756
+ export type IssuerOther = Value & {
757
+ issuerOtherName?: string;
758
+ issuerOtherNameOrig?: string;
759
+ issuerOtherNameRu?: string;
760
+ };
733
761
  }
734
762
  }
735
763