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