refactor: by value visa
This commit is contained in:
parent
c70cfb0602
commit
2e1e82b2bc
2 changed files with 182 additions and 139 deletions
|
|
@ -3007,13 +3007,21 @@ const emptyCreateDialog = ref(false);
|
||||||
outlined
|
outlined
|
||||||
title="customerEmployee.form.group.visa"
|
title="customerEmployee.form.group.visa"
|
||||||
:readonly="!isEdit"
|
:readonly="!isEdit"
|
||||||
v-model:visa-type="meta.type"
|
v-model:arrival-at="meta.arrivalAt"
|
||||||
v-model:visa-number="meta.number"
|
v-model:arrival-tm-no="meta.arrivalTMNo"
|
||||||
|
v-model:arrival-tm="meta.arrivalTM"
|
||||||
|
v-model:mrz="meta.mrz"
|
||||||
|
v-model:entry-count="meta.entryCount"
|
||||||
|
v-model:issue-place="meta.issuePlace"
|
||||||
|
v-model:issue-country="meta.issueCountry"
|
||||||
|
v-model:issueDate="meta.issueDate"
|
||||||
|
v-model:type="meta.type"
|
||||||
|
v-model:expire-date="meta.expireDate"
|
||||||
v-model:visa-issue-date="meta.issueDate"
|
v-model:visa-issue-date="meta.issueDate"
|
||||||
v-model:visa-expiry-date="meta.expireDate"
|
v-model:visa-expiry-date="meta.expireDate"
|
||||||
v-model:visa-issuing-place="meta.issuePlace"
|
v-model:remark="meta.remark"
|
||||||
v-model:entry-count="meta.entryCount"
|
v-model:worker-type="meta.workerType"
|
||||||
v-model:issue-country="meta.issueCountry"
|
v-model:number="meta.number"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<NoticeJobEmployment v-if="mode === 'noticeJobEmployment'" />
|
<NoticeJobEmployment v-if="mode === 'noticeJobEmployment'" />
|
||||||
|
|
@ -4703,15 +4711,23 @@ const emptyCreateDialog = ref(false);
|
||||||
ocr
|
ocr
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
title="customerEmployee.form.group.visa"
|
:title="$t('customerEmployee.form.group.visa')"
|
||||||
:readonly="!isEdit"
|
:readonly="!isEdit"
|
||||||
v-model:visa-type="meta.type"
|
v-model:arrival-at="meta.arrivalAt"
|
||||||
v-model:visa-number="meta.number"
|
v-model:arrival-tm-no="meta.arrivalTMNo"
|
||||||
|
v-model:arrival-tm="meta.arrivalTM"
|
||||||
|
v-model:mrz="meta.mrz"
|
||||||
|
v-model:entry-count="meta.entryCount"
|
||||||
|
v-model:issue-place="meta.issuePlace"
|
||||||
|
v-model:issue-country="meta.issueCountry"
|
||||||
|
v-model:issueDate="meta.issueDate"
|
||||||
|
v-model:type="meta.type"
|
||||||
|
v-model:expire-date="meta.expireDate"
|
||||||
v-model:visa-issue-date="meta.issueDate"
|
v-model:visa-issue-date="meta.issueDate"
|
||||||
v-model:visa-expiry-date="meta.expireDate"
|
v-model:visa-expiry-date="meta.expireDate"
|
||||||
v-model:visa-issuing-place="meta.issuePlace"
|
v-model:remark="meta.remark"
|
||||||
v-model:entry-count="meta.entryCount"
|
v-model:worker-type="meta.workerType"
|
||||||
v-model:issue-country="meta.issueCountry"
|
v-model:number="meta.number"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<NoticeJobEmployment v-if="mode === 'noticeJobEmployment'" />
|
<NoticeJobEmployment v-if="mode === 'noticeJobEmployment'" />
|
||||||
|
|
@ -4733,129 +4749,139 @@ const emptyCreateDialog = ref(false);
|
||||||
{{ $t('customerEmployee.form.group.passport') }}
|
{{ $t('customerEmployee.form.group.passport') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FormEmployeePassport
|
<template
|
||||||
v-for="(
|
v-for="(
|
||||||
value, index
|
value, index
|
||||||
) in currentFromDataEmployee.employeePassport"
|
) in currentFromDataEmployee.employeePassport"
|
||||||
prefix-id="drawer-info-employee"
|
|
||||||
:key="index"
|
|
||||||
id="form-passport"
|
|
||||||
hide-title
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
separator
|
|
||||||
:title="$t('customerEmployee.form.group.passport')"
|
|
||||||
:readonly="employeeFormState.currentIndexPassport !== index"
|
|
||||||
:full-name="employeeFormState.currentIndexPassport !== index"
|
|
||||||
v-model:birth-country="value.birthCountry"
|
|
||||||
v-model:previous-passportRef="value.previousPassportRef"
|
|
||||||
v-model:issue-place="value.issuePlace"
|
|
||||||
v-model:issue-country="value.issueCountry"
|
|
||||||
v-model:issue-date="value.issueDate"
|
|
||||||
v-model:type="value.type"
|
|
||||||
v-model:expire-date="value.expireDate"
|
|
||||||
v-model:birth-date="value.birthDate"
|
|
||||||
v-model:worker-status="value.workerStatus"
|
|
||||||
v-model:nationality="value.nationality"
|
|
||||||
v-model:gender="value.gender"
|
|
||||||
v-model:last-name-en="value.lastNameEN"
|
|
||||||
v-model:last-name="value.lastName"
|
|
||||||
v-model:middle-name-en="value.middleNameEN"
|
|
||||||
v-model:middle-name="value.middleName"
|
|
||||||
v-model:first-name-en="value.firstNameEN"
|
|
||||||
v-model:first-name="value.firstName"
|
|
||||||
v-model:name-prefix="value.namePrefix"
|
|
||||||
v-model:passport-number="value.number"
|
|
||||||
>
|
>
|
||||||
<template v-slot:expiryDate>
|
<FormEmployeePassport
|
||||||
{{ $t('general.expirationDate') }} :
|
v-if="value !== undefined"
|
||||||
{{ dateFormat(value.expireDate) }}
|
prefix-id="drawer-info-employee"
|
||||||
<ExpirationDate
|
id="form-passport"
|
||||||
v-if="value.id !== undefined"
|
hide-title
|
||||||
:expiration-date="value.expireDate"
|
dense
|
||||||
/>
|
outlined
|
||||||
</template>
|
separator
|
||||||
|
:title="$t('customerEmployee.form.group.passport')"
|
||||||
|
:readonly="employeeFormState.currentIndexPassport !== index"
|
||||||
|
:full-name="
|
||||||
|
employeeFormState.currentIndexPassport !== index
|
||||||
|
"
|
||||||
|
v-model:birth-country="value.birthCountry"
|
||||||
|
v-model:previous-passportRef="value.previousPassportRef"
|
||||||
|
v-model:issue-place="value.issuePlace"
|
||||||
|
v-model:issue-country="value.issueCountry"
|
||||||
|
v-model:issue-date="value.issueDate"
|
||||||
|
v-model:type="value.type"
|
||||||
|
v-model:expire-date="value.expireDate"
|
||||||
|
v-model:birth-date="value.birthDate"
|
||||||
|
v-model:worker-status="value.workerStatus"
|
||||||
|
v-model:nationality="value.nationality"
|
||||||
|
v-model:gender="value.gender"
|
||||||
|
v-model:last-name-en="value.lastNameEN"
|
||||||
|
v-model:last-name="value.lastName"
|
||||||
|
v-model:middle-name-en="value.middleNameEN"
|
||||||
|
v-model:middle-name="value.middleName"
|
||||||
|
v-model:first-name-en="value.firstNameEN"
|
||||||
|
v-model:first-name="value.firstName"
|
||||||
|
v-model:name-prefix="value.namePrefix"
|
||||||
|
v-model:passport-number="value.number"
|
||||||
|
>
|
||||||
|
<template v-slot:expiryDate>
|
||||||
|
{{ $t('general.expirationDate') }} :
|
||||||
|
{{ dateFormat(value.expireDate) }}
|
||||||
|
<ExpirationDate
|
||||||
|
v-if="value.id !== undefined"
|
||||||
|
:expiration-date="value.expireDate"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:button>
|
<template v-slot:button>
|
||||||
<div class="surface-1 row rounded" style="min-height: 35px">
|
<div
|
||||||
<UndoButton
|
class="surface-1 row rounded"
|
||||||
v-if="
|
style="min-height: 35px"
|
||||||
employeeFormState.isEmployeeEdit &&
|
>
|
||||||
!(employeeFormState.currentIndexPassport === -1) &&
|
<UndoButton
|
||||||
employeeFormState.currentIndexPassport === index
|
v-if="
|
||||||
"
|
employeeFormState.isEmployeeEdit &&
|
||||||
id="btn-info-basic-undo"
|
|
||||||
icon-only
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
employeeFormStore.resetFormDataEmployee();
|
|
||||||
employeeFormState.isEmployeeEdit = false;
|
|
||||||
employeeFormState.dialogType = 'info';
|
|
||||||
employeeFormState.currentIndexPassport = -1;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
type="button"
|
|
||||||
/>
|
|
||||||
<SaveButton
|
|
||||||
v-if="
|
|
||||||
(employeeFormState.isEmployeeEdit ||
|
|
||||||
value.id === undefined) &&
|
|
||||||
!(employeeFormState.currentIndexPassport === -1) &&
|
|
||||||
employeeFormState.currentIndexPassport === index
|
|
||||||
"
|
|
||||||
id="btn-info-basic-save"
|
|
||||||
icon-only
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
employeeFormState.currentIndexPassport = index;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
type="submit"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<EditButton
|
|
||||||
v-if="
|
|
||||||
employeeFormState.currentIndexPassport === -1 ||
|
|
||||||
(!employeeFormState.isEmployeeEdit &&
|
|
||||||
value.id !== undefined &&
|
|
||||||
employeeFormState.currentIndexPassport === index)
|
|
||||||
"
|
|
||||||
id="btn-info-basic-edit"
|
|
||||||
icon-only
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
employeeFormState.currentIndexPassport = index;
|
|
||||||
employeeFormState.isEmployeeEdit = true;
|
|
||||||
employeeFormState.dialogType = 'edit';
|
|
||||||
}
|
|
||||||
"
|
|
||||||
type="button"
|
|
||||||
/>
|
|
||||||
<DeleteButton
|
|
||||||
v-if="
|
|
||||||
employeeFormState.currentIndexPassport === -1 ||
|
|
||||||
(!employeeFormState.isEmployeeEdit &&
|
|
||||||
value.id !== undefined &&
|
|
||||||
!(employeeFormState.currentIndexPassport === -1) &&
|
!(employeeFormState.currentIndexPassport === -1) &&
|
||||||
employeeFormState.currentIndexPassport === index)
|
employeeFormState.currentIndexPassport === index
|
||||||
"
|
"
|
||||||
id="btn-info-basic-delete"
|
id="btn-info-basic-undo"
|
||||||
icon-only
|
icon-only
|
||||||
@click.stop="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
employeeFormState.currentIndexPassport = index;
|
employeeFormStore.resetFormDataEmployee();
|
||||||
deleteEmployeeById({ type: 'passport' });
|
employeeFormState.isEmployeeEdit = false;
|
||||||
}
|
employeeFormState.dialogType = 'info';
|
||||||
"
|
employeeFormState.currentIndexPassport = -1;
|
||||||
type="button"
|
}
|
||||||
:disabled="
|
"
|
||||||
!(employeeFormState.currentIndex === -1) &&
|
type="button"
|
||||||
!(employeeFormState.currentIndex === index)
|
/>
|
||||||
"
|
<SaveButton
|
||||||
/>
|
v-if="
|
||||||
</div>
|
(employeeFormState.isEmployeeEdit ||
|
||||||
</template>
|
value.id === undefined) &&
|
||||||
</FormEmployeePassport>
|
!(employeeFormState.currentIndexPassport === -1) &&
|
||||||
|
employeeFormState.currentIndexPassport === index
|
||||||
|
"
|
||||||
|
id="btn-info-basic-save"
|
||||||
|
icon-only
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
employeeFormState.currentIndexPassport = index;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
type="submit"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<EditButton
|
||||||
|
v-if="
|
||||||
|
employeeFormState.currentIndexPassport === -1 ||
|
||||||
|
(!employeeFormState.isEmployeeEdit &&
|
||||||
|
value.id !== undefined &&
|
||||||
|
employeeFormState.currentIndexPassport === index)
|
||||||
|
"
|
||||||
|
id="btn-info-basic-edit"
|
||||||
|
icon-only
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
employeeFormState.currentIndexPassport = index;
|
||||||
|
employeeFormState.isEmployeeEdit = true;
|
||||||
|
employeeFormState.dialogType = 'edit';
|
||||||
|
}
|
||||||
|
"
|
||||||
|
type="button"
|
||||||
|
/>
|
||||||
|
<DeleteButton
|
||||||
|
v-if="
|
||||||
|
employeeFormState.currentIndexPassport === -1 ||
|
||||||
|
(!employeeFormState.isEmployeeEdit &&
|
||||||
|
value.id !== undefined &&
|
||||||
|
!(
|
||||||
|
employeeFormState.currentIndexPassport === -1
|
||||||
|
) &&
|
||||||
|
employeeFormState.currentIndexPassport === index)
|
||||||
|
"
|
||||||
|
id="btn-info-basic-delete"
|
||||||
|
icon-only
|
||||||
|
@click.stop="
|
||||||
|
() => {
|
||||||
|
employeeFormState.currentIndexPassport = index;
|
||||||
|
deleteEmployeeById({ type: 'passport' });
|
||||||
|
}
|
||||||
|
"
|
||||||
|
type="button"
|
||||||
|
:disabled="
|
||||||
|
!(employeeFormState.currentIndex === -1) &&
|
||||||
|
!(employeeFormState.currentIndex === index)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</FormEmployeePassport>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -4866,15 +4892,24 @@ const emptyCreateDialog = ref(false);
|
||||||
id="form-visa"
|
id="form-visa"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
title="customerEmployee.form.group.visa"
|
:title="$t('customerEmployee.form.group.visa')"
|
||||||
:readonly="employeeFormState.currentIndexVisa !== index"
|
:readonly="employeeFormState.currentIndexVisa !== index"
|
||||||
v-model:visa-type="value.type"
|
:hide-title="index !== 0"
|
||||||
v-model:visa-number="value.number"
|
v-model:arrival-at="value.arrivalAt"
|
||||||
|
v-model:arrival-tm-no="value.arrivalTMNo"
|
||||||
|
v-model:arrival-tm="value.arrivalTM"
|
||||||
|
v-model:mrz="value.mrz"
|
||||||
|
v-model:entry-count="value.entryCount"
|
||||||
|
v-model:issue-place="value.issuePlace"
|
||||||
|
v-model:issue-country="value.issueCountry"
|
||||||
|
v-model:issueDate="value.issueDate"
|
||||||
|
v-model:type="value.type"
|
||||||
|
v-model:expire-date="value.expireDate"
|
||||||
v-model:visa-issue-date="value.issueDate"
|
v-model:visa-issue-date="value.issueDate"
|
||||||
v-model:visa-expiry-date="value.expireDate"
|
v-model:visa-expiry-date="value.expireDate"
|
||||||
v-model:visa-issuing-place="value.issuePlace"
|
v-model:remark="value.remark"
|
||||||
v-model:entry-count="value.entryCount"
|
v-model:worker-type="value.workerType"
|
||||||
v-model:issue-country="value.issueCountry"
|
v-model:number="value.number"
|
||||||
>
|
>
|
||||||
<template v-slot:expiryDate>
|
<template v-slot:expiryDate>
|
||||||
{{ $t('general.expirationDate') }} :
|
{{ $t('general.expirationDate') }} :
|
||||||
|
|
|
||||||
|
|
@ -2330,13 +2330,21 @@ async function getInvoiceCodeFullPay() {
|
||||||
outlined
|
outlined
|
||||||
title="customerEmployee.form.group.visa"
|
title="customerEmployee.form.group.visa"
|
||||||
:readonly="!isEdit"
|
:readonly="!isEdit"
|
||||||
v-model:visa-type="meta.type"
|
v-model:arrival-at="meta.arrivalAt"
|
||||||
v-model:visa-number="meta.number"
|
v-model:arrival-tm-no="meta.arrivalTMNo"
|
||||||
|
v-model:arrival-tm="meta.arrivalTM"
|
||||||
|
v-model:mrz="meta.mrz"
|
||||||
|
v-model:entry-count="meta.entryCount"
|
||||||
|
v-model:issue-place="meta.issuePlace"
|
||||||
|
v-model:issue-country="meta.issueCountry"
|
||||||
|
v-model:issueDate="meta.issueDate"
|
||||||
|
v-model:type="meta.type"
|
||||||
|
v-model:expire-date="meta.expireDate"
|
||||||
v-model:visa-issue-date="meta.issueDate"
|
v-model:visa-issue-date="meta.issueDate"
|
||||||
v-model:visa-expiry-date="meta.expireDate"
|
v-model:visa-expiry-date="meta.expireDate"
|
||||||
v-model:visa-issuing-place="meta.issuePlace"
|
v-model:remark="meta.remark"
|
||||||
v-model:entry-count="meta.entryCount"
|
v-model:worker-type="meta.workerType"
|
||||||
v-model:issue-country="meta.issueCountry"
|
v-model:number="meta.number"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<NoticeJobEmployment v-if="mode === 'noticeJobEmployment'" />
|
<NoticeJobEmployment v-if="mode === 'noticeJobEmployment'" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue