refactor: add visa report date
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
c3989768ed
commit
04765a656a
6 changed files with 31 additions and 14 deletions
|
|
@ -37,11 +37,13 @@ const expireDate = defineModel<Date>('expireDate');
|
|||
const remark = defineModel<string>('remark');
|
||||
const workerType = defineModel<string>('workerType');
|
||||
const number = defineModel<string>('number');
|
||||
const reportDate = defineModel<Date | null | string>('reportDate');
|
||||
|
||||
const calculatedVisaDate = computed(() => {
|
||||
if (!issueDate.value) return undefined;
|
||||
return calculate90DayNext(issueDate.value);
|
||||
});
|
||||
//
|
||||
// const calculatedVisaDate = computed(() => {
|
||||
// if (!issueDate.value) return undefined;
|
||||
// return calculate90DayNext(issueDate.value);
|
||||
// });
|
||||
|
||||
defineProps<{
|
||||
title?: string;
|
||||
|
|
@ -138,6 +140,10 @@ watch(
|
|||
);
|
||||
},
|
||||
);
|
||||
//
|
||||
// watch([() => issueDate.value], () => {
|
||||
// reportDate.value = calculate90DayNext(issueDate.value);
|
||||
// });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -371,10 +377,12 @@ watch(
|
|||
<DatePicker
|
||||
:id="`${prefixId}-date-picker-visa-issuance`"
|
||||
:readonly
|
||||
:disabled="!readonly"
|
||||
:label="$t('customerEmployee.form.visa90Day')"
|
||||
:model-value="calculatedVisaDate"
|
||||
v-model="reportDate"
|
||||
clearable
|
||||
:rules="[
|
||||
(val) => (val && val.length > 0) || $t('form.error.required'),
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue