refactor: handle due date
This commit is contained in:
parent
529c742a61
commit
4cdc462ded
2 changed files with 11 additions and 3 deletions
|
|
@ -1438,6 +1438,9 @@ watch(
|
|||
:readonly
|
||||
:actor="quotationFormState.createdBy?.($i18n.locale) || ''"
|
||||
:quotation-no="(quotationFull && quotationFull.code) || ''"
|
||||
:quotation-status="
|
||||
quotationFormState.source?.quotationStatus === 'Expired'
|
||||
"
|
||||
v-model:urgent="quotationFormData.urgent"
|
||||
v-model:work-name="quotationFormData.workName"
|
||||
v-model:contactor="quotationFormData.contactName"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import DatePicker from 'src/components/shared/DatePicker.vue';
|
|||
defineProps<{
|
||||
readonly: boolean;
|
||||
quotationNo?: string;
|
||||
quotationStatus?: boolean;
|
||||
}>();
|
||||
|
||||
const actor = defineModel<string>('actor', { required: false });
|
||||
|
|
@ -30,9 +31,13 @@ const createdAt = defineModel<Date | string>('createdAt');
|
|||
:label="$t('quotation.dueDate')"
|
||||
:readonly
|
||||
v-model="dueDate"
|
||||
:disabled-dates="
|
||||
(date: Date) => date.getTime() < Date.now() - 24 * 60 * 60 * 1000
|
||||
"
|
||||
:rules="[
|
||||
(value) => {
|
||||
if (!!quotationStatus && dueDate === Date.now()) return 'ddddd';
|
||||
return true;
|
||||
},
|
||||
]"
|
||||
:disabled-dates="(date: Date) => date.getTime() < Date.now()"
|
||||
class="col-6 col-md-2"
|
||||
/>
|
||||
<q-input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue