Ограничение календаря для года
This commit is contained in:
@@ -21,13 +21,27 @@
|
|||||||
:choose-option="chooseOptionNetworks"
|
:choose-option="chooseOptionNetworks"
|
||||||
:choose-priority="choosePriority"
|
:choose-priority="choosePriority"
|
||||||
:priority-list="getPriorityList"
|
:priority-list="getPriorityList"
|
||||||
|
:current-year="currentYear"
|
||||||
)
|
)
|
||||||
.flex(:style="{display :'none'}" ref="doc")
|
.flex(:style="{display :'none'}" ref="doc")
|
||||||
form-create-identity-documents(:identity-document="infoClient.identity_document" :save-client="saveClient")
|
form-create-identity-documents(
|
||||||
|
:identity-document="infoClient.identity_document",
|
||||||
|
:save-client="saveClient",
|
||||||
|
:current-year="currentYear"
|
||||||
|
)
|
||||||
.flex(:style="{display :'none'}" ref="address")
|
.flex(:style="{display :'none'}" ref="address")
|
||||||
form-create-addresses(:addresses="infoClient.addresses" :save-file="saveDocFile" :save-client="saveClient")
|
form-create-addresses(
|
||||||
|
:addresses="infoClient.addresses",
|
||||||
|
:save-file="saveDocFile",
|
||||||
|
:save-client="saveClient"
|
||||||
|
)
|
||||||
.flex(:style="{display :'none'}" ref="additional")
|
.flex(:style="{display :'none'}" ref="additional")
|
||||||
form-create-additional(:additional-info="infoClient.additional" :add-new-additional="addNewAdditionalInfo" :save-file="saveAdditionalFiles" :save-client="saveClient")
|
form-create-additional(
|
||||||
|
:additional-info="infoClient.additional",
|
||||||
|
:add-new-additional="addNewAdditionalInfo",
|
||||||
|
:save-file="saveAdditionalFiles",
|
||||||
|
:save-client="saveClient"
|
||||||
|
)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -148,6 +162,7 @@ export default {
|
|||||||
label: "-",
|
label: "-",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
currentYear: 2022,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -269,6 +284,12 @@ export default {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
printCurrentYear() {
|
||||||
|
return new Date().getFullYear();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
this.currentYear = this.printCurrentYear();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.input-wrapper.flex.gap-x-2.px-4.box-border.py-10px(
|
.input-wrapper.flex.gap-x-2.px-4.box-border.py-10px(
|
||||||
:class="{'border-none': borderNone}"
|
:class="{'border-none': borderNone}",
|
||||||
:style="{ minWidth: widthInput + 'px' }"
|
:style="{ minWidth: widthInput + 'px' }"
|
||||||
)
|
)
|
||||||
input.input.w-full.outline-0.not-italic(
|
input.input.w-full.outline-0.not-italic(
|
||||||
:class="{date:type === 'date'}"
|
:class="{date:type === 'date'}",
|
||||||
:value="value"
|
:value="value",
|
||||||
:type="type"
|
:type="type",
|
||||||
@input="$emit('update:value', $event.target.value)"
|
@input="$emit('update:value', $event.target.value)",
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder",
|
||||||
:maxlength="maxLength"
|
:maxlength="maxLength",
|
||||||
|
:max="maxDate",
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
)
|
)
|
||||||
.slot(v-if="withIcon", :class="iconPosition")
|
.slot(v-if="withIcon", :class="iconPosition")
|
||||||
@@ -37,6 +38,7 @@ export default {
|
|||||||
widthInput: Number,
|
widthInput: Number,
|
||||||
borderNone: Boolean,
|
borderNone: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
|
maxDate: String,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
v-model:value="basicInfo.birth_date",
|
v-model:value="basicInfo.birth_date",
|
||||||
type="date",
|
type="date",
|
||||||
placeholder="00.00.0000",
|
placeholder="00.00.0000",
|
||||||
:width-input="277"
|
:width-input="277",
|
||||||
|
:max-date="`${ currentYear }-12-31`"
|
||||||
)
|
)
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Номер телефона
|
span.text-sm Номер телефона
|
||||||
@@ -73,6 +74,7 @@ export default {
|
|||||||
basicInfo: Object,
|
basicInfo: Object,
|
||||||
saveClient: Function,
|
saveClient: Function,
|
||||||
addNetwork: Function,
|
addNetwork: Function,
|
||||||
|
currentYear: Number,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -5,25 +5,55 @@
|
|||||||
.grid.grid-cols-2.gap-x-4.gap-y-6
|
.grid.grid-cols-2.gap-x-4.gap-y-6
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Серия и номер
|
span.text-sm Серия и номер
|
||||||
base-input.input-info(v-mask="'#### ######'" v-model:value="identityDocument.pass.series_number" placeholder="0000 000000" :width-input="277")
|
base-input.input-info(
|
||||||
|
v-mask="'#### ######'",
|
||||||
|
v-model:value="identityDocument.pass.series_number",
|
||||||
|
placeholder="0000 000000",
|
||||||
|
:width-input="277"
|
||||||
|
)
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Кем и когда выдан
|
span.text-sm Кем и когда выдан
|
||||||
base-input.input-info(v-model:value="identityDocument.pass.issued_by_org" placeholder="Точно как в паспорте" :width-input="277")
|
base-input.input-info(
|
||||||
|
v-model:value="identityDocument.pass.issued_by_org",
|
||||||
|
placeholder="Точно как в паспорте",
|
||||||
|
:width-input="277"
|
||||||
|
)
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Код подразделения
|
span.text-sm Код подразделения
|
||||||
base-input.input-info(v-mask="'###-###'" v-model:value="identityDocument.pass.issued_by_org_code" placeholder="000–000" :width-input="277")
|
base-input.input-info(
|
||||||
|
v-mask="'###-###'",
|
||||||
|
v-model:value="identityDocument.pass.issued_by_org_code",
|
||||||
|
placeholder="000–000",
|
||||||
|
:width-input="277"
|
||||||
|
)
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Дата выдачи
|
span.text-sm Дата выдачи
|
||||||
base-input.input-info( type="date" v-model:value="identityDocument.pass.issued_by_date" placeholder="Дата" :width-input="277")
|
base-input.input-info(
|
||||||
|
type="date",
|
||||||
|
v-model:value="identityDocument.pass.issued_by_date",
|
||||||
|
placeholder="Дата",
|
||||||
|
:width-input="277",
|
||||||
|
:max-date="`${currentYear}-12-31`"
|
||||||
|
)
|
||||||
.flex.flex-col.gap-y-6.px-4
|
.flex.flex-col.gap-y-6.px-4
|
||||||
span.title-info.text-base.font-bold СНИЛС и ИНН
|
span.title-info.text-base.font-bold СНИЛС и ИНН
|
||||||
.grid.grid-cols-2.gap-x-4.gap-y-6
|
.grid.grid-cols-2.gap-x-4.gap-y-6
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Номер СНИЛС
|
span.text-sm Номер СНИЛС
|
||||||
base-input.input-info(v-mask="'###-###-### ##'" v-model:value="identityDocument.snils.numba" placeholder="000–000–000 00" :width-input="277")
|
base-input.input-info(
|
||||||
|
v-mask="'###-###-### ##'",
|
||||||
|
v-model:value="identityDocument.snils.numba",
|
||||||
|
placeholder="000–000–000 00",
|
||||||
|
:width-input="277"
|
||||||
|
)
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Номер ИНН
|
span.text-sm Номер ИНН
|
||||||
base-input.input-info(v-mask="'##########'" v-model:value="identityDocument.inn.numba" placeholder="000000000000" :width-input="277")
|
base-input.input-info(
|
||||||
|
v-mask="'##########'",
|
||||||
|
v-model:value="identityDocument.inn.numba",
|
||||||
|
placeholder="000000000000",
|
||||||
|
:width-input="277"
|
||||||
|
)
|
||||||
.px-4
|
.px-4
|
||||||
base-button(@click="saveClient" :size="40")
|
base-button(@click="saveClient" :size="40")
|
||||||
span.font-semibold Создать клиента
|
span.font-semibold Создать клиента
|
||||||
@@ -39,6 +69,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
identityDocument: Object,
|
identityDocument: Object,
|
||||||
saveClient: Function,
|
saveClient: Function,
|
||||||
|
currentYear: Number,
|
||||||
},
|
},
|
||||||
directives: { mask },
|
directives: { mask },
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user