Текущая дата при добавлении в архив #5
This commit is contained in:
@@ -4,7 +4,7 @@ import ArchiveHistoryMoveModal from '../ArchiveHistoryMoveModal/Index.vue'
|
||||
import {computed, h, ref, watch} from "vue";
|
||||
import {useMedicalHistoryFilter} from "../../../Composables/useMedicalHistoryFilter.js";
|
||||
import {useNotification} from "../../../Composables/useNotification.js";
|
||||
import {useDebounceFn} from "@vueuse/core";
|
||||
import {useDebounceFn, useTimestamp} from "@vueuse/core";
|
||||
import {useArchiveCard} from "../../../Stores/ArchiveCard.js";
|
||||
|
||||
const open = defineModel('open')
|
||||
@@ -12,6 +12,7 @@ const open = defineModel('open')
|
||||
const {errorApi} = useNotification()
|
||||
const loading = ref(false)
|
||||
const loadingFilterPatients = ref(false)
|
||||
const timestampNow = useTimestamp()
|
||||
const formRef = ref(null)
|
||||
const archiveCardStore = useArchiveCard()
|
||||
const isCardInArchive = computed(() => archiveCardStore.preOpenCard !== null)
|
||||
@@ -19,7 +20,7 @@ const emits = defineEmits(['historyUpdated', 'closeWithoutSave', 'openArchiveCar
|
||||
const archiveInfo = ref({
|
||||
id: null,
|
||||
num: null,
|
||||
post_in: null,
|
||||
post_in: timestampNow,
|
||||
})
|
||||
const archiveInfoRules = {
|
||||
id: [
|
||||
@@ -94,7 +95,7 @@ const onResetArchiveInfo = (only) => {
|
||||
archiveInfo.value = {
|
||||
id: null,
|
||||
num: null,
|
||||
post_in: null,
|
||||
post_in: timestampNow,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -218,6 +219,7 @@ watch(() => isCardInArchive.value, (val) => {
|
||||
<NFormItem size="large" label="Дата поступления карты в архив" path="post_in">
|
||||
<NDatePicker class="w-full"
|
||||
v-model:value="archiveInfo.post_in"
|
||||
:default-value="timestampNow"
|
||||
:disabled="archiveCardStore.isSetPreOpenCard"
|
||||
format="dd.MM.yyyy"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user