Merge branch 'develop'
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 12s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 12s
This commit is contained in:
commit
543c28e162
7 changed files with 47 additions and 20 deletions
|
|
@ -42,6 +42,15 @@ defineProps<{
|
||||||
|
|
||||||
const modal = defineModel('modal', { default: false });
|
const modal = defineModel('modal', { default: false });
|
||||||
const currentTab = defineModel<string>('currentTab');
|
const currentTab = defineModel<string>('currentTab');
|
||||||
|
|
||||||
|
async function onValidationError(ref: any) {
|
||||||
|
const el = ref.$el as Element;
|
||||||
|
el.scrollIntoView({
|
||||||
|
behavior: 'smooth',
|
||||||
|
block: 'center',
|
||||||
|
inline: 'nearest',
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-dialog
|
<q-dialog
|
||||||
|
|
@ -60,6 +69,7 @@ const currentTab = defineModel<string>('currentTab');
|
||||||
@submit.prevent
|
@submit.prevent
|
||||||
@validation-success="submit"
|
@validation-success="submit"
|
||||||
class="column full-height"
|
class="column full-height"
|
||||||
|
@validation-error="onValidationError"
|
||||||
>
|
>
|
||||||
<!-- header -->
|
<!-- header -->
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,15 @@ function reset() {
|
||||||
myForm.value.resetValidation();
|
myForm.value.resetValidation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function onValidationError(ref: any) {
|
||||||
|
const el = ref.$el as Element;
|
||||||
|
el.scrollIntoView({
|
||||||
|
behavior: 'smooth',
|
||||||
|
block: 'center',
|
||||||
|
inline: 'nearest',
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-drawer
|
<q-drawer
|
||||||
|
|
@ -66,6 +75,7 @@ function reset() {
|
||||||
greedy
|
greedy
|
||||||
@submit.prevent
|
@submit.prevent
|
||||||
@validation-success="submit"
|
@validation-success="submit"
|
||||||
|
@validation-error="onValidationError"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="column justify-between full-height"
|
class="column justify-between full-height"
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,15 @@ function update(value: boolean) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function onValidationError(ref: any) {
|
||||||
|
const el = ref.$el as Element;
|
||||||
|
el.scrollIntoView({
|
||||||
|
behavior: 'smooth',
|
||||||
|
block: 'center',
|
||||||
|
inline: 'nearest',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const state = defineModel({ default: false });
|
const state = defineModel({ default: false });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -41,6 +50,7 @@ const state = defineModel({ default: false });
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<q-form
|
<q-form
|
||||||
|
@validation-error="onValidationError"
|
||||||
@submit.prevent="(e) => $emit('submit', e)"
|
@submit.prevent="(e) => $emit('submit', e)"
|
||||||
@reset="$emit('reset')"
|
@reset="$emit('reset')"
|
||||||
greedy
|
greedy
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,11 @@ onMounted(async () => {
|
||||||
:option="selectOptions"
|
:option="selectOptions"
|
||||||
:hide-selected="false"
|
:hide-selected="false"
|
||||||
:fill-input="false"
|
:fill-input="false"
|
||||||
:rules="[(v: string) => !!v || $t('form.error.required')]"
|
:rules="[
|
||||||
|
(v: string) => {
|
||||||
|
return !!v?.length || $t('form.error.required');
|
||||||
|
},
|
||||||
|
]"
|
||||||
@filter="filter"
|
@filter="filter"
|
||||||
>
|
>
|
||||||
<template #before-options v-if="creatable">
|
<template #before-options v-if="creatable">
|
||||||
|
|
|
||||||
|
|
@ -116,8 +116,8 @@ async function scrollTo(id: string) {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<main
|
<main
|
||||||
class="full-height q-gutter-sm"
|
class="full-height q-gutter-sm no-wrap"
|
||||||
:class="{ 'row reverse': $q.screen.gt.xs, column: $q.screen.xs }"
|
:class="{ column: !toc && $q.screen.lt.md, 'row reverse': $q.screen.gt.sm }"
|
||||||
>
|
>
|
||||||
<section
|
<section
|
||||||
v-if="toc"
|
v-if="toc"
|
||||||
|
|
@ -168,7 +168,7 @@ async function scrollTo(id: string) {
|
||||||
</q-list>
|
</q-list>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section v-if="!toc && $q.screen.xs">
|
<section v-if="!toc && $q.screen.lt.md">
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
class="full-width text-capitalize"
|
class="full-width text-capitalize"
|
||||||
|
|
@ -181,7 +181,7 @@ async function scrollTo(id: string) {
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section
|
<section
|
||||||
v-if="content || (!toc && $q.screen.xs)"
|
v-if="$q.screen.gt.xs || (!toc && $q.screen.xs)"
|
||||||
ref="wrapper"
|
ref="wrapper"
|
||||||
class="markdown col scroll full-height rounded"
|
class="markdown col scroll full-height rounded"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -555,7 +555,6 @@ async function triggerChangeStatus(id: string, status: string) {
|
||||||
async function assignFormData(idEdit: string) {
|
async function assignFormData(idEdit: string) {
|
||||||
if (!userData.value) return;
|
if (!userData.value) return;
|
||||||
const foundUser = userData.value.result.find((user) => user.id === idEdit);
|
const foundUser = userData.value.result.find((user) => user.id === idEdit);
|
||||||
console.log(foundUser);
|
|
||||||
|
|
||||||
if (foundUser) {
|
if (foundUser) {
|
||||||
currentUser.value = foundUser;
|
currentUser.value = foundUser;
|
||||||
|
|
@ -600,8 +599,8 @@ async function assignFormData(idEdit: string) {
|
||||||
responsibleArea: foundUser.responsibleArea,
|
responsibleArea: foundUser.responsibleArea,
|
||||||
status: foundUser.status,
|
status: foundUser.status,
|
||||||
selectedImage: foundUser.selectedImage,
|
selectedImage: foundUser.selectedImage,
|
||||||
contactName: foundUser.contactName,
|
contactName: foundUser.contactName || '',
|
||||||
contactTel: foundUser.contactTel,
|
contactTel: foundUser.contactTel || '',
|
||||||
licenseExpireDate:
|
licenseExpireDate:
|
||||||
(foundUser.licenseExpireDate &&
|
(foundUser.licenseExpireDate &&
|
||||||
new Date(foundUser.licenseExpireDate)) ||
|
new Date(foundUser.licenseExpireDate)) ||
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,6 @@ const selectedWorkerItem = computed(() => {
|
||||||
})),
|
})),
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
const workerList = ref<Employee[]>([]);
|
|
||||||
const firstCodePayment = ref('');
|
const firstCodePayment = ref('');
|
||||||
const selectedProductGroup = ref('');
|
const selectedProductGroup = ref('');
|
||||||
const selectedInstallmentNo = ref<number[]>([]);
|
const selectedInstallmentNo = ref<number[]>([]);
|
||||||
|
|
@ -1059,12 +1058,7 @@ watch(
|
||||||
() => quotationFormData.value.customerBranchId,
|
() => quotationFormData.value.customerBranchId,
|
||||||
async (v) => {
|
async (v) => {
|
||||||
if (!v) return;
|
if (!v) return;
|
||||||
|
selectedWorker.value = [];
|
||||||
const retEmp = await customerStore.fetchBranchEmployee(v, {
|
|
||||||
passport: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (retEmp) workerList.value = retEmp.data.result;
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue