|
@@ -0,0 +1,583 @@
|
|
|
|
|
+<script>
|
|
|
|
|
+ // Página de formulário CPR — sem envio para endpoint (apenas preview e copiar JSON)
|
|
|
|
|
+ // Datas: use dd/MM/yyyy | Números: strings (ex: "1000")
|
|
|
|
|
+ // Campos S/N: "S" ou "N"
|
|
|
|
|
+
|
|
|
|
|
+ // Estado do formulário com a estrutura exatamente como o payload final precisa
|
|
|
|
|
+ let form = {
|
|
|
|
|
+ instrument: {
|
|
|
|
|
+ cprTypeCode: '',
|
|
|
|
|
+ otcRegisterAccountCode: '',
|
|
|
|
|
+ otcPaymentAgentAccountCode: '',
|
|
|
|
|
+ otcCustodianAccountCode: '',
|
|
|
|
|
+ internalControlNumber: '',
|
|
|
|
|
+ electronicEmissionIndicator: '', // "S" | "N"
|
|
|
|
|
+ isinCode: '',
|
|
|
|
|
+ issueDate: '',
|
|
|
|
|
+ maturityDate: '',
|
|
|
|
|
+ issueQuantity: '',
|
|
|
|
|
+ issueValue: '',
|
|
|
|
|
+ issueFinancialValue: '',
|
|
|
|
|
+ unitValue: '',
|
|
|
|
|
+ referenceDate: '',
|
|
|
|
|
+ profitabilityStartDate: '',
|
|
|
|
|
+ automaticExpirationIndicator: '', // "S" | "N"
|
|
|
|
|
+
|
|
|
|
|
+ collaterals: [
|
|
|
|
|
+ {
|
|
|
|
|
+ collateralTypeCode: '',
|
|
|
|
|
+ collateralTypeName: '',
|
|
|
|
|
+ constitutionProcessIndicator: '', // "S" | "N"
|
|
|
|
|
+ otcBondsmanAccountCode: '',
|
|
|
|
|
+ documentNumber: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ products: [
|
|
|
|
|
+ {
|
|
|
|
|
+ cprProductName: '',
|
|
|
|
|
+ cprProductClassName: '',
|
|
|
|
|
+ cprProductHarvest: '',
|
|
|
|
|
+ cprProductDescription: '',
|
|
|
|
|
+ cprProductQuantity: '',
|
|
|
|
|
+ measureUnitName: '',
|
|
|
|
|
+ packagingWayName: '',
|
|
|
|
|
+ cprProductStatusCode: '',
|
|
|
|
|
+ productionTypeCode: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ issuers: [
|
|
|
|
|
+ {
|
|
|
|
|
+ cprIssuerName: '',
|
|
|
|
|
+ documentNumber: '',
|
|
|
|
|
+ personTypeAcronym: '',
|
|
|
|
|
+ stateAcronym: '',
|
|
|
|
|
+ cityName: '',
|
|
|
|
|
+ ibgeCode: '',
|
|
|
|
|
+ issuerLegalNatureCode: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ deposit: {
|
|
|
|
|
+ otcFavoredAccountCode: '',
|
|
|
|
|
+ documentNumber: '',
|
|
|
|
|
+ personTypeAcronym: '',
|
|
|
|
|
+ selfNumber: '',
|
|
|
|
|
+ settlementModalityTypeCode: '',
|
|
|
|
|
+ otcSettlementBankAccountCode: '',
|
|
|
|
|
+ depositQuantity: '',
|
|
|
|
|
+ depositUnitPriceValue: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ paymentMethod: {
|
|
|
|
|
+ paymentMethodCode: '',
|
|
|
|
|
+ indexCode: '',
|
|
|
|
|
+ indexShortName: '',
|
|
|
|
|
+ vcpIndicatorTypeCode: '',
|
|
|
|
|
+ indexadorPercentageValue: '',
|
|
|
|
|
+ interestRateSpreadPercentage: '',
|
|
|
|
|
+ interestRateCriteriaTypeCode: '',
|
|
|
|
|
+ interestPaymentDate: '',
|
|
|
|
|
+ interestPaymentValue: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ interestPaymentFlow: {
|
|
|
|
|
+ interestPaymentFrequencyCode: '',
|
|
|
|
|
+ interestMonthsQuantity: '',
|
|
|
|
|
+ timeUnitTypeCode: '',
|
|
|
|
|
+ deadlineTypeCode: '',
|
|
|
|
|
+ paymentStartDate: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ amortizationPaymentFlow: {
|
|
|
|
|
+ amortizationTypeCode: '',
|
|
|
|
|
+ amortizationMonthsQuantity: '',
|
|
|
|
|
+ timeUnitTypeCode: '',
|
|
|
|
|
+ deadlineTypeCode: '',
|
|
|
|
|
+ amortizationStartDate: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ scr: {
|
|
|
|
|
+ scrTypeCode: '',
|
|
|
|
|
+ scrCustomerDetail: '',
|
|
|
|
|
+ personTypeAcronym: '',
|
|
|
|
|
+ documentNumber: '',
|
|
|
|
|
+ contractCode: '',
|
|
|
|
|
+ operationModalityTypeCode: '',
|
|
|
|
|
+ bacenReferenceCode: '',
|
|
|
|
|
+ finalityCode: '',
|
|
|
|
|
+ ipocCode: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ dolarEuroProfitability: {
|
|
|
|
|
+ calculationTypeCode: '',
|
|
|
|
|
+ initialExchangeValue: '',
|
|
|
|
|
+ fixingTypeCode: '',
|
|
|
|
|
+ dataSourceTypeCode: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ igpmIpcaProfitability: {
|
|
|
|
|
+ adjustmentFrequencyTypeCode: '',
|
|
|
|
|
+ adjustmentProRataTypeCode: '',
|
|
|
|
|
+ adjustmentTypeCode: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ creditor: {
|
|
|
|
|
+ creditorName: '',
|
|
|
|
|
+ documentNumber: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ ballast: {
|
|
|
|
|
+ ballastTypeCode: '',
|
|
|
|
|
+ lotNumber: '',
|
|
|
|
|
+ ballastQuantity: '',
|
|
|
|
|
+ currencyCode: '',
|
|
|
|
|
+ transactionIdentification: '',
|
|
|
|
|
+ additionalText: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ registerOffice: {
|
|
|
|
|
+ cprNumber: '',
|
|
|
|
|
+ cprContractNumber: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ events: [
|
|
|
|
|
+ {
|
|
|
|
|
+ eventTypeCode: '',
|
|
|
|
|
+ eventOriginalDate: '',
|
|
|
|
|
+ unitPriceValue: '',
|
|
|
|
|
+ interestUnitPriceValue: '',
|
|
|
|
|
+ residualValue: '',
|
|
|
|
|
+ amortizationPercentage: '',
|
|
|
|
|
+ eventQuantity: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ productionPlaces: [
|
|
|
|
|
+ {
|
|
|
|
|
+ productionPlaceName: '',
|
|
|
|
|
+ propertyRegistrationNumber: '',
|
|
|
|
|
+ notaryName: '',
|
|
|
|
|
+ totalProductionAreaInHectaresNumber: '',
|
|
|
|
|
+ totalAreaInHectaresNumber: '',
|
|
|
|
|
+ carCode: '',
|
|
|
|
|
+ latitudeCode: '',
|
|
|
|
|
+ longitudeCode: '',
|
|
|
|
|
+ zipCode: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ greenCpr: {
|
|
|
|
|
+ greenCprIndicator: '', // "S" | "N"
|
|
|
|
|
+ greenCprCertificateName: '',
|
|
|
|
|
+ greenCprCertificateCnpjNumber: '',
|
|
|
|
|
+ greenCprGeoreferencingDescription: '',
|
|
|
|
|
+ greenCprDeclarationIndicator: '' // "S" | "N"
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // DeliveryPlace ainda não definido — deixo como JSON livre (textarea)
|
|
|
|
|
+ deliveryPlace: {}
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // Derivados para preview e copiar
|
|
|
|
|
+ $: payload = { data: form };
|
|
|
|
|
+ $: payloadString = JSON.stringify(payload, null, 2);
|
|
|
|
|
+
|
|
|
|
|
+ let previewOpen = false;
|
|
|
|
|
+ let copied = false;
|
|
|
|
|
+
|
|
|
|
|
+ async function copyJson() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await navigator.clipboard.writeText(payloadString);
|
|
|
|
|
+ copied = true;
|
|
|
|
|
+ setTimeout(() => (copied = false), 2000);
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.error('Falha ao copiar JSON:', e);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // Atualiza deliveryPlace via JSON livre
|
|
|
|
|
+ let deliveryPlaceDraft = '';
|
|
|
|
|
+ $: deliveryPlaceDraft = JSON.stringify(form.instrument.deliveryPlace || {}, null, 2);
|
|
|
|
|
+
|
|
|
|
|
+ function updateDeliveryPlaceFromDraft() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const parsed = JSON.parse(deliveryPlaceDraft || '{}');
|
|
|
|
|
+ form.instrument.deliveryPlace = parsed;
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ alert('JSON inválido em DeliveryPlace');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const inputCls =
|
|
|
|
|
+ 'w-full rounded-md border border-border1_contact/20 bg-border2_contact/5 p-3 text-tx_contact_form focus:outline-none focus:ring-2 focus:ring-blue-400';
|
|
|
|
|
+ const cardCls =
|
|
|
|
|
+ 'rounded-xl border border-border1_contact/20 bg-border2_contact/5 backdrop-blur-sm p-6 md:p-8 shadow-md transition hover:shadow-lg';
|
|
|
|
|
+ const btnPrimary =
|
|
|
|
|
+ 'inline-flex items-center justify-center gap-2 rounded-md border-2 border-border1_contact bg-gradient-to-r from-bg1_button_contact to-bg2_button_contact px-6 py-3 font-bold text-tx_contact_form transition duration-300 ease-out hover:shadow-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400/60';
|
|
|
|
|
+ const btnGhost =
|
|
|
|
|
+ 'inline-flex items-center justify-center gap-2 rounded-md border-2 border-border1_contact/40 px-4 py-2 font-medium text-tx_contact_form/80 transition hover:bg-border1_contact/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400/60';
|
|
|
|
|
+
|
|
|
|
|
+ // Blanks para listas dinâmicas
|
|
|
|
|
+ const blankCollateral = {
|
|
|
|
|
+ collateralTypeCode: '',
|
|
|
|
|
+ collateralTypeName: '',
|
|
|
|
|
+ constitutionProcessIndicator: '',
|
|
|
|
|
+ otcBondsmanAccountCode: '',
|
|
|
|
|
+ documentNumber: ''
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const blankProduct = {
|
|
|
|
|
+ cprProductName: '',
|
|
|
|
|
+ cprProductClassName: '',
|
|
|
|
|
+ cprProductHarvest: '',
|
|
|
|
|
+ cprProductDescription: '',
|
|
|
|
|
+ cprProductQuantity: '',
|
|
|
|
|
+ measureUnitName: '',
|
|
|
|
|
+ packagingWayName: '',
|
|
|
|
|
+ cprProductStatusCode: '',
|
|
|
|
|
+ productionTypeCode: ''
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const blankIssuer = {
|
|
|
|
|
+ cprIssuerName: '',
|
|
|
|
|
+ documentNumber: '',
|
|
|
|
|
+ personTypeAcronym: '',
|
|
|
|
|
+ stateAcronym: '',
|
|
|
|
|
+ cityName: '',
|
|
|
|
|
+ ibgeCode: '',
|
|
|
|
|
+ issuerLegalNatureCode: ''
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const blankEvent = {
|
|
|
|
|
+ eventTypeCode: '',
|
|
|
|
|
+ eventOriginalDate: '',
|
|
|
|
|
+ unitPriceValue: '',
|
|
|
|
|
+ interestUnitPriceValue: '',
|
|
|
|
|
+ residualValue: '',
|
|
|
|
|
+ amortizationPercentage: '',
|
|
|
|
|
+ eventQuantity: ''
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const blankProductionPlace = {
|
|
|
|
|
+ productionPlaceName: '',
|
|
|
|
|
+ propertyRegistrationNumber: '',
|
|
|
|
|
+ notaryName: '',
|
|
|
|
|
+ totalProductionAreaInHectaresNumber: '',
|
|
|
|
|
+ totalAreaInHectaresNumber: '',
|
|
|
|
|
+ carCode: '',
|
|
|
|
|
+ latitudeCode: '',
|
|
|
|
|
+ longitudeCode: '',
|
|
|
|
|
+ zipCode: ''
|
|
|
|
|
+ };
|
|
|
|
|
+ </script>
|
|
|
|
|
+ <div class="bg-gradient-to-b from-bg1_contact to-bg2_contact min-h-screen">
|
|
|
|
|
+ <section id="formcpr" class="relative overflow-hidden py-24 text-tx_contact">
|
|
|
|
|
+ <!-- Blobs decorativos -->
|
|
|
|
|
+ <div aria-hidden="true" class="pointer-events-none absolute -top-24 -left-24 h-72 w-72 rounded-full bg-gradient-to-br from-bg1_button_contact/20 to-bg2_button_contact/20 blur-3xl"></div>
|
|
|
|
|
+ <div aria-hidden="true" class="pointer-events-none absolute -bottom-24 -right-24 h-72 w-72 rounded-full bg-gradient-to-tr from-bg1_button_contact/15 to-bg2_button_contact/15 blur-3xl"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="mx-auto max-w-7xl px-4">
|
|
|
|
|
+ <h1 class="mb-8 text-center text-3xl md:text-4xl font-extrabold tracking-wide uppercase bg-gradient-to-r from-bg1_button_contact to-bg2_button_contact bg-clip-text text-transparent">
|
|
|
|
|
+ Faça sua CPR conosco
|
|
|
|
|
+ </h1>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Ações topo -->
|
|
|
|
|
+
|
|
|
|
|
+ {#if previewOpen}
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <p class="mb-3 font-semibold">Pré-visualização do JSON</p>
|
|
|
|
|
+ <pre class="max-h-[420px] overflow-auto rounded-md bg-black/30 p-4 text-sm"><code>{payloadString}</code></pre>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/if}
|
|
|
|
|
+
|
|
|
|
|
+ <!-- INSTRUMENT -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Instrumento</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">cprTypeCode</label><input class={inputCls} bind:value={form.instrument.cprTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">otcRegisterAccountCode</label><input class={inputCls} bind:value={form.instrument.otcRegisterAccountCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">otcPaymentAgentAccountCode</label><input class={inputCls} bind:value={form.instrument.otcPaymentAgentAccountCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">otcCustodianAccountCode</label><input class={inputCls} bind:value={form.instrument.otcCustodianAccountCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">internalControlNumber</label><input class={inputCls} bind:value={form.instrument.internalControlNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">electronicEmissionIndicator (S/N)</label><input class={inputCls} bind:value={form.instrument.electronicEmissionIndicator} /></div>
|
|
|
|
|
+ <div><label class="text-sm">isinCode</label><input class={inputCls} bind:value={form.instrument.isinCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">issueDate (dd/MM/yyyy)</label><input class={inputCls} placeholder="dd/MM/aaaa" bind:value={form.instrument.issueDate} /></div>
|
|
|
|
|
+ <div><label class="text-sm">maturityDate (dd/MM/yyyy)</label><input class={inputCls} placeholder="dd/MM/aaaa" bind:value={form.instrument.maturityDate} /></div>
|
|
|
|
|
+ <div><label class="text-sm">issueQuantity</label><input class={inputCls} bind:value={form.instrument.issueQuantity} /></div>
|
|
|
|
|
+ <div><label class="text-sm">issueValue</label><input class={inputCls} bind:value={form.instrument.issueValue} /></div>
|
|
|
|
|
+ <div><label class="text-sm">issueFinancialValue</label><input class={inputCls} bind:value={form.instrument.issueFinancialValue} /></div>
|
|
|
|
|
+ <div><label class="text-sm">unitValue</label><input class={inputCls} bind:value={form.instrument.unitValue} /></div>
|
|
|
|
|
+ <div><label class="text-sm">referenceDate (dd/MM/yyyy)</label><input class={inputCls} placeholder="dd/MM/aaaa" bind:value={form.instrument.referenceDate} /></div>
|
|
|
|
|
+ <div><label class="text-sm">profitabilityStartDate (dd/MM/yyyy)</label><input class={inputCls} placeholder="dd/MM/aaaa" bind:value={form.instrument.profitabilityStartDate} /></div>
|
|
|
|
|
+ <div><label class="text-sm">automaticExpirationIndicator (S/N)</label><input class={inputCls} bind:value={form.instrument.automaticExpirationIndicator} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- COLLATERALS -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <div class="mb-3 flex items-center justify-between">
|
|
|
|
|
+ <h2 class="text-xl font-bold">Collaterals</h2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {#each form.instrument.collaterals as c, i}
|
|
|
|
|
+ <div class="mb-4 rounded-md border border-border1_contact/10 p-4">
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">collateralTypeCode</label><input class={inputCls} bind:value={c.collateralTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">collateralTypeName</label><input class={inputCls} bind:value={c.collateralTypeName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">constitutionProcessIndicator (S/N)</label><input class={inputCls} bind:value={c.constitutionProcessIndicator} /></div>
|
|
|
|
|
+ <div><label class="text-sm">otcBondsmanAccountCode</label><input class={inputCls} bind:value={c.otcBondsmanAccountCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">documentNumber</label><input class={inputCls} bind:value={c.documentNumber} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="mt-3">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/each}
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- PRODUCTS -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <div class="mb-3 flex items-center justify-between">
|
|
|
|
|
+ <h2 class="text-xl font-bold">Products</h2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {#each form.instrument.products as p, i}
|
|
|
|
|
+ <div class="mb-4 rounded-md border border-border1_contact/10 p-4">
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">cprProductName</label><input class={inputCls} bind:value={p.cprProductName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">cprProductClassName</label><input class={inputCls} bind:value={p.cprProductClassName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">cprProductHarvest</label><input class={inputCls} bind:value={p.cprProductHarvest} /></div>
|
|
|
|
|
+ <div class="md:col-span-3"><label class="text-sm">cprProductDescription</label><input class={inputCls} bind:value={p.cprProductDescription} /></div>
|
|
|
|
|
+ <div><label class="text-sm">cprProductQuantity</label><input class={inputCls} bind:value={p.cprProductQuantity} /></div>
|
|
|
|
|
+ <div><label class="text-sm">measureUnitName</label><input class={inputCls} bind:value={p.measureUnitName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">packagingWayName</label><input class={inputCls} bind:value={p.packagingWayName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">cprProductStatusCode</label><input class={inputCls} bind:value={p.cprProductStatusCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">productionTypeCode</label><input class={inputCls} bind:value={p.productionTypeCode} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="mt-3">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/each}
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- ISSUERS -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <div class="mb-3 flex items-center justify-between">
|
|
|
|
|
+ <h2 class="text-xl font-bold">Issuers</h2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {#each form.instrument.issuers as u, i}
|
|
|
|
|
+ <div class="mb-4 rounded-md border border-border1_contact/10 p-4">
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">cprIssuerName</label><input class={inputCls} bind:value={u.cprIssuerName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">documentNumber</label><input class={inputCls} bind:value={u.documentNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">personTypeAcronym</label><input class={inputCls} bind:value={u.personTypeAcronym} /></div>
|
|
|
|
|
+ <div><label class="text-sm">stateAcronym</label><input class={inputCls} bind:value={u.stateAcronym} /></div>
|
|
|
|
|
+ <div><label class="text-sm">cityName</label><input class={inputCls} bind:value={u.cityName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">ibgeCode</label><input class={inputCls} bind:value={u.ibgeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">issuerLegalNatureCode</label><input class={inputCls} bind:value={u.issuerLegalNatureCode} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="mt-3">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/each}
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- DEPOSIT -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Deposit</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">otcFavoredAccountCode</label><input class={inputCls} bind:value={form.instrument.deposit.otcFavoredAccountCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">documentNumber</label><input class={inputCls} bind:value={form.instrument.deposit.documentNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">personTypeAcronym</label><input class={inputCls} bind:value={form.instrument.deposit.personTypeAcronym} /></div>
|
|
|
|
|
+ <div><label class="text-sm">selfNumber</label><input class={inputCls} bind:value={form.instrument.deposit.selfNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">settlementModalityTypeCode</label><input class={inputCls} bind:value={form.instrument.deposit.settlementModalityTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">otcSettlementBankAccountCode</label><input class={inputCls} bind:value={form.instrument.deposit.otcSettlementBankAccountCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">depositQuantity</label><input class={inputCls} bind:value={form.instrument.deposit.depositQuantity} /></div>
|
|
|
|
|
+ <div><label class="text-sm">depositUnitPriceValue</label><input class={inputCls} bind:value={form.instrument.deposit.depositUnitPriceValue} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- PAYMENT METHOD -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Payment Method</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">paymentMethodCode</label><input class={inputCls} bind:value={form.instrument.paymentMethod.paymentMethodCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">indexCode</label><input class={inputCls} bind:value={form.instrument.paymentMethod.indexCode} /></div>
|
|
|
|
|
+ <div class="md:col-span-3"><label class="text-sm">indexShortName</label><input class={inputCls} bind:value={form.instrument.paymentMethod.indexShortName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">vcpIndicatorTypeCode</label><input class={inputCls} bind:value={form.instrument.paymentMethod.vcpIndicatorTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">indexadorPercentageValue</label><input class={inputCls} bind:value={form.instrument.paymentMethod.indexadorPercentageValue} /></div>
|
|
|
|
|
+ <div><label class="text-sm">interestRateSpreadPercentage</label><input class={inputCls} bind:value={form.instrument.paymentMethod.interestRateSpreadPercentage} /></div>
|
|
|
|
|
+ <div><label class="text-sm">interestRateCriteriaTypeCode</label><input class={inputCls} bind:value={form.instrument.paymentMethod.interestRateCriteriaTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">interestPaymentDate (dd/MM/yyyy)</label><input class={inputCls} placeholder="dd/MM/aaaa" bind:value={form.instrument.paymentMethod.interestPaymentDate} /></div>
|
|
|
|
|
+ <div><label class="text-sm">interestPaymentValue</label><input class={inputCls} bind:value={form.instrument.paymentMethod.interestPaymentValue} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- INTEREST PAYMENT FLOW -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Interest Payment Flow</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">interestPaymentFrequencyCode</label><input class={inputCls} bind:value={form.instrument.interestPaymentFlow.interestPaymentFrequencyCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">interestMonthsQuantity</label><input class={inputCls} bind:value={form.instrument.interestPaymentFlow.interestMonthsQuantity} /></div>
|
|
|
|
|
+ <div><label class="text-sm">timeUnitTypeCode</label><input class={inputCls} bind:value={form.instrument.interestPaymentFlow.timeUnitTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">deadlineTypeCode</label><input class={inputCls} bind:value={form.instrument.interestPaymentFlow.deadlineTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">paymentStartDate (dd/MM/yyyy)</label><input class={inputCls} placeholder="dd/MM/aaaa" bind:value={form.instrument.interestPaymentFlow.paymentStartDate} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- AMORTIZATION PAYMENT FLOW -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Amortization Payment Flow</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">amortizationTypeCode</label><input class={inputCls} bind:value={form.instrument.amortizationPaymentFlow.amortizationTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">amortizationMonthsQuantity</label><input class={inputCls} bind:value={form.instrument.amortizationPaymentFlow.amortizationMonthsQuantity} /></div>
|
|
|
|
|
+ <div><label class="text-sm">timeUnitTypeCode</label><input class={inputCls} bind:value={form.instrument.amortizationPaymentFlow.timeUnitTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">deadlineTypeCode</label><input class={inputCls} bind:value={form.instrument.amortizationPaymentFlow.deadlineTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">amortizationStartDate (dd/MM/yyyy)</label><input class={inputCls} placeholder="dd/MM/aaaa" bind:value={form.instrument.amortizationPaymentFlow.amortizationStartDate} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- SCR -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">SCR</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">scrTypeCode</label><input class={inputCls} bind:value={form.instrument.scr.scrTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">scrCustomerDetail</label><input class={inputCls} bind:value={form.instrument.scr.scrCustomerDetail} /></div>
|
|
|
|
|
+ <div><label class="text-sm">personTypeAcronym</label><input class={inputCls} bind:value={form.instrument.scr.personTypeAcronym} /></div>
|
|
|
|
|
+ <div><label class="text-sm">documentNumber</label><input class={inputCls} bind:value={form.instrument.scr.documentNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">contractCode</label><input class={inputCls} bind:value={form.instrument.scr.contractCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">operationModalityTypeCode</label><input class={inputCls} bind:value={form.instrument.scr.operationModalityTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">bacenReferenceCode</label><input class={inputCls} bind:value={form.instrument.scr.bacenReferenceCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">finalityCode</label><input class={inputCls} bind:value={form.instrument.scr.finalityCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">ipocCode</label><input class={inputCls} bind:value={form.instrument.scr.ipocCode} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- DOLAR/EURO PROFITABILITY -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Dólar/Euro Profitability</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">calculationTypeCode</label><input class={inputCls} bind:value={form.instrument.dolarEuroProfitability.calculationTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">initialExchangeValue</label><input class={inputCls} bind:value={form.instrument.dolarEuroProfitability.initialExchangeValue} /></div>
|
|
|
|
|
+ <div><label class="text-sm">fixingTypeCode</label><input class={inputCls} bind:value={form.instrument.dolarEuroProfitability.fixingTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">dataSourceTypeCode</label><input class={inputCls} bind:value={form.instrument.dolarEuroProfitability.dataSourceTypeCode} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- IGPM/IPCA PROFITABILITY -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">IGPM/IPCA Profitability</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">adjustmentFrequencyTypeCode</label><input class={inputCls} bind:value={form.instrument.igpmIpcaProfitability.adjustmentFrequencyTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">adjustmentProRataTypeCode</label><input class={inputCls} bind:value={form.instrument.igpmIpcaProfitability.adjustmentProRataTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">adjustmentTypeCode</label><input class={inputCls} bind:value={form.instrument.igpmIpcaProfitability.adjustmentTypeCode} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- CREDITOR -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Creditor</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">creditorName</label><input class={inputCls} bind:value={form.instrument.creditor.creditorName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">documentNumber</label><input class={inputCls} bind:value={form.instrument.creditor.documentNumber} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- BALLAST -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Ballast</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">ballastTypeCode</label><input class={inputCls} bind:value={form.instrument.ballast.ballastTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">lotNumber</label><input class={inputCls} bind:value={form.instrument.ballast.lotNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">ballastQuantity</label><input class={inputCls} bind:value={form.instrument.ballast.ballastQuantity} /></div>
|
|
|
|
|
+ <div><label class="text-sm">currencyCode</label><input class={inputCls} bind:value={form.instrument.ballast.currencyCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">transactionIdentification</label><input class={inputCls} bind:value={form.instrument.ballast.transactionIdentification} /></div>
|
|
|
|
|
+ <div class="md:col-span-3"><label class="text-sm">additionalText</label><input class={inputCls} bind:value={form.instrument.ballast.additionalText} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- REGISTER OFFICE -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Register Office</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">cprNumber</label><input class={inputCls} bind:value={form.instrument.registerOffice.cprNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">cprContractNumber</label><input class={inputCls} bind:value={form.instrument.registerOffice.cprContractNumber} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- EVENTS -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <div class="mb-3 flex items-center justify-between">
|
|
|
|
|
+ <h2 class="text-xl font-bold">Events</h2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {#each form.instrument.events as ev, i}
|
|
|
|
|
+ <div class="mb-4 rounded-md border border-border1_contact/10 p-4">
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">eventTypeCode</label><input class={inputCls} bind:value={ev.eventTypeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">eventOriginalDate (dd/MM/yyyy)</label><input class={inputCls} placeholder="dd/MM/aaaa" bind:value={ev.eventOriginalDate} /></div>
|
|
|
|
|
+ <div><label class="text-sm">unitPriceValue</label><input class={inputCls} bind:value={ev.unitPriceValue} /></div>
|
|
|
|
|
+ <div><label class="text-sm">interestUnitPriceValue</label><input class={inputCls} bind:value={ev.interestUnitPriceValue} /></div>
|
|
|
|
|
+ <div><label class="text-sm">residualValue</label><input class={inputCls} bind:value={ev.residualValue} /></div>
|
|
|
|
|
+ <div><label class="text-sm">amortizationPercentage</label><input class={inputCls} bind:value={ev.amortizationPercentage} /></div>
|
|
|
|
|
+ <div><label class="text-sm">eventQuantity</label><input class={inputCls} bind:value={ev.eventQuantity} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="mt-3">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/each}
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- PRODUCTION PLACES -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <div class="mb-3 flex items-center justify-between">
|
|
|
|
|
+ <h2 class="text-xl font-bold">Production Places</h2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {#each form.instrument.productionPlaces as pl, i}
|
|
|
|
|
+ <div class="mb-4 rounded-md border border-border1_contact/10 p-4">
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">productionPlaceName</label><input class={inputCls} bind:value={pl.productionPlaceName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">propertyRegistrationNumber</label><input class={inputCls} bind:value={pl.propertyRegistrationNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">notaryName</label><input class={inputCls} bind:value={pl.notaryName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">totalProductionAreaInHectaresNumber</label><input class={inputCls} bind:value={pl.totalProductionAreaInHectaresNumber} /></div>
|
|
|
|
|
+ <div><label class="text-sm">totalAreaInHectaresNumber</label><input class={inputCls} bind:value={pl.totalAreaInHectaresNumber} /></div>
|
|
|
|
|
+ <div class="md:col-span-3"><label class="text-sm">carCode</label><input class={inputCls} bind:value={pl.carCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">latitudeCode</label><input class={inputCls} bind:value={pl.latitudeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">longitudeCode</label><input class={inputCls} bind:value={pl.longitudeCode} /></div>
|
|
|
|
|
+ <div><label class="text-sm">zipCode</label><input class={inputCls} bind:value={pl.zipCode} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="mt-3">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/each}
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- GREEN CPR -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <h2 class="mb-4 text-xl font-bold">Green CPR</h2>
|
|
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
|
|
|
+ <div><label class="text-sm">greenCprIndicator (S/N)</label><input class={inputCls} bind:value={form.instrument.greenCpr.greenCprIndicator} /></div>
|
|
|
|
|
+ <div><label class="text-sm">greenCprCertificateName</label><input class={inputCls} bind:value={form.instrument.greenCpr.greenCprCertificateName} /></div>
|
|
|
|
|
+ <div><label class="text-sm">greenCprCertificateCnpjNumber</label><input class={inputCls} bind:value={form.instrument.greenCpr.greenCprCertificateCnpjNumber} /></div>
|
|
|
|
|
+ <div class="md:col-span-3"><label class="text-sm">greenCprGeoreferencingDescription</label><input class={inputCls} bind:value={form.instrument.greenCpr.greenCprGeoreferencingDescription} /></div>
|
|
|
|
|
+ <div><label class="text-sm">greenCprDeclarationIndicator (S/N)</label><input class={inputCls} bind:value={form.instrument.greenCpr.greenCprDeclarationIndicator} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- DELIVERY PLACE (JSON livre por enquanto) -->
|
|
|
|
|
+ <div class={cardCls + ' mb-8'}>
|
|
|
|
|
+ <div class="mb-3 flex items-center justify-between">
|
|
|
|
|
+ <h2 class="text-xl font-bold">Delivery Place (JSON)</h2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <textarea class={inputCls + ' min-h-[180px] font-mono'} bind:value={deliveryPlaceDraft}></textarea>
|
|
|
|
|
+ <p class="mt-2 text-sm text-tx_contact_form/70">Cole aqui o JSON do deliveryPlace. Quando tiver a estrutura final, eu troco por inputs dedicados.</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Rodapé de ações -->
|
|
|
|
|
+ <div class="flex flex-wrap items-center gap-3">
|
|
|
|
|
+ <button class={btnPrimary} type="button" on:click={() => (previewOpen = true)}>
|
|
|
|
|
+ Enviar
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ </div>
|