Поправила баги, сдвинула ИНН

This commit is contained in:
Daria Golova
2023-10-04 14:03:38 +03:00
parent 35cc0ee059
commit a0b186a8d0
4 changed files with 29 additions and 11 deletions

View File

@@ -8,8 +8,12 @@
:open-edit="openEdit", :open-edit="openEdit",
:save="saveChange" :save="saveChange"
) )
q-form.form-wrap.gap-6.w-full(ref="documentForm", :no-error-focus="true") q-form.form-wrap.gap-x-6.w-full(ref="documentForm", :no-error-focus="true")
.data-section.flex.flex-col.gap-2(v-for="data in configData", :key="data.dataLabel") .data-section.flex.flex-col.gap-2(
v-for="data in configData",
:key="data.dataLabel",
:class="data?.dataClass"
)
.font-semibold.text-sm.whitespace-nowrap {{data.dataLabel}} .font-semibold.text-sm.whitespace-nowrap {{data.dataLabel}}
.flex.w-full.items-center.gap-4( .flex.w-full.items-center.gap-4(
v-for="field in data.fields", v-for="field in data.fields",
@@ -66,7 +70,9 @@
:rule="[(val) => !personDataField.includes(data.dataKey + ':' + field.key) ? checkPassportFields(val, field.rules) : field.rules(val, initialDocData?.[data.dataKey]?.id)]", :rule="[(val) => !personDataField.includes(data.dataKey + ':' + field.key) ? checkPassportFields(val, field.rules) : field.rules(val, initialDocData?.[data.dataKey]?.id)]",
size="M" size="M"
) )
.icon-copy.my-auto.text-lg.label-field.cursor-pointer( q-icon.my-auto.cursor-pointer.copy(
size="20px",
name="app:copy",
v-if="checkCopiedFields(field.key) && !!docData[data.dataKey][field.key]", v-if="checkCopiedFields(field.key) && !!docData[data.dataKey][field.key]",
@click="copyValue(docData[data.dataKey][field.key])" @click="copyValue(docData[data.dataKey][field.key])"
) )
@@ -314,10 +320,11 @@ export default {
.form-wrap .form-wrap
display: grid display: grid
grid-template-columns: repeat(3, 1fr) grid-template-columns: repeat(3, 1fr)
grid-template-rows: repeat(1, 1fr) row-gap: 32px
grid-template-rows: 1.2fr 1.8fr
@media(max-width: 1440px) @media(max-width: 1440px)
grid-template-columns: repeat(2, 1fr) grid-template-columns: repeat(2, 1fr)
grid-template-rows: 3fr 1fr grid-template-rows: 1.2fr 1.8fr
.label-field .label-field
min-width: 110px min-width: 110px
color: var(--font-grey-color) color: var(--font-grey-color)
@@ -336,4 +343,15 @@ export default {
background-color: var(--btn-red-color) background-color: var(--btn-red-color)
.cancel-icon :deep(path) .cancel-icon :deep(path)
fill: white fill: white
.copy :deep(path)
fill: var(--font-grey-color)
.passport
grid-column: 1 / 2
grid-row: 1 / 3
.insurance
grid-column: 2 / 3
grid-row: 1 / 2
.tax
grid-column: 2 / 3
grid-row: 2 / 3
</style> </style>

View File

@@ -18,9 +18,8 @@
:style="{marginTop: field.label === 'Документы' ? '20px' : null}" :style="{marginTop: field.label === 'Документы' ? '20px' : null}"
) )
.label-field.font-sm.text-sm.whitespace-nowrap {{`${field.label} :`}} .label-field.font-sm.text-sm.whitespace-nowrap {{`${field.label} :`}}
.flex.gap-3.items-center.h-10.w-10( .flex.gap-3.items-center.h-10(
v-if="field.type === 'photo'", v-if="field.type === 'photo'",
:style="{'min-width': field.label === 'Документы' ? '324px' : '302px'}"
) )
.flex.w-10.h-10.relative(v-if="insuranceData[insurance.insuranceKey]?.attachments?.photo") .flex.w-10.h-10.relative(v-if="insuranceData[insurance.insuranceKey]?.attachments?.photo")
img.rounded.avatar.object-cover( img.rounded.avatar.object-cover(
@@ -90,8 +89,8 @@
:name="insurance.insuranceKey + ':' + field.key", :name="insurance.insuranceKey + ':' + field.key",
:rule="[(val) => checkFields(val, insurance.insuranceKey, field.rules)]" :rule="[(val) => checkFields(val, insurance.insuranceKey, field.rules)]"
) )
q-icon.my-auto.text-lg.label-field.cursor-pointer.copy( q-icon.my-auto.cursor-pointer.copy(
size="18px", size="20px",
name="app:copy", name="app:copy",
v-if="checkCopiedFields(field.key, insuranceData[insurance.insuranceKey])", v-if="checkCopiedFields(field.key, insuranceData[insurance.insuranceKey])",
@click="copyValue(insuranceData[insurance.insuranceKey][field.key])" @click="copyValue(insuranceData[insurance.insuranceKey][field.key])"

View File

@@ -25,6 +25,4 @@ export default {
min-height: 350px min-height: 350px
@media (max-width: 600px) @media (max-width: 600px)
width: fit-content width: fit-content
&::-webkit-scrollbar
width: 0
</style> </style>

View File

@@ -468,6 +468,7 @@ export const documentForm = [
{ {
dataLabel: "Паспорт", dataLabel: "Паспорт",
dataKey: "passport", dataKey: "passport",
dataClass: "passport",
fields: [ fields: [
{ {
key: "series", key: "series",
@@ -532,6 +533,7 @@ export const documentForm = [
{ {
dataLabel: "СНИЛС", dataLabel: "СНИЛС",
dataKey: "insurance_number", dataKey: "insurance_number",
dataClass: "insurance",
fields: [ fields: [
{ {
key: "number", key: "number",
@@ -554,6 +556,7 @@ export const documentForm = [
{ {
dataLabel: "ИНН", dataLabel: "ИНН",
dataKey: "tax_identification_number", dataKey: "tax_identification_number",
dataClass: "tax",
fields: [ fields: [
{ {
key: "number", key: "number",