73 lines
2.0 KiB
Vue
73 lines
2.0 KiB
Vue
<script setup>
|
|
import { reactive } from 'vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
|
import FormModel from 'components/FormModel.vue';
|
|
import VnRow from 'components/ui/VnRow.vue';
|
|
import VnInput from 'src/components/common/VnInput.vue';
|
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
|
|
|
const { t } = useI18n();
|
|
const route = useRoute();
|
|
const router = useRouter();
|
|
|
|
const initialData = reactive({
|
|
clientFK: Number(route.params.id),
|
|
});
|
|
|
|
const toCustomerCreditContracts = () => {
|
|
router.push({ name: 'CustomerCreditContracts' });
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<FormModel
|
|
:form-initial-data="initialData"
|
|
:observe-form-changes="false"
|
|
url-create="creditClassifications/createWithInsurance"
|
|
@on-data-saved="toCustomerCreditContracts()"
|
|
>
|
|
<template #moreActions>
|
|
<QBtn
|
|
:label="t('globals.cancel')"
|
|
@click="toCustomerCreditContracts"
|
|
color="primary"
|
|
flat
|
|
icon="close"
|
|
/>
|
|
</template>
|
|
|
|
<template #form="{ data }">
|
|
<VnRow class="row q-gutter-md q-mb-md">
|
|
<div class="col">
|
|
<VnInput
|
|
:label="t('Credit')"
|
|
clearable
|
|
type="number"
|
|
v-model.number="data.credit"
|
|
/>
|
|
</div>
|
|
<div class="col">
|
|
<VnInput
|
|
:label="t('Grade')"
|
|
clearable
|
|
type="number"
|
|
v-model.number="data.grade"
|
|
/>
|
|
</div>
|
|
<div class="col">
|
|
<VnInputDate :label="t('Since')" v-model="data.started" />
|
|
</div>
|
|
</VnRow>
|
|
</template>
|
|
</FormModel>
|
|
</template>
|
|
|
|
<i18n>
|
|
es:
|
|
Credit: Crédito
|
|
Grade: Grade
|
|
Since: Desde
|
|
</i18n>
|