fix: employee branch code
This commit is contained in:
parent
ce5345eb02
commit
56736155e5
1 changed files with 26 additions and 40 deletions
|
|
@ -160,6 +160,8 @@ onMounted(() => {
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template v-slot:option="scope">
|
<template v-slot:option="scope">
|
||||||
|
<!-- {{ console.log(scope.opt) }} -->
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-if="scope.opt"
|
v-if="scope.opt"
|
||||||
v-bind="scope.itemProps"
|
v-bind="scope.itemProps"
|
||||||
|
|
@ -170,58 +172,42 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="q-mt-sm">
|
<div class="q-mt-sm">
|
||||||
<div>
|
<div>
|
||||||
{{ scope.opt.code }} {{ $t('general.name') }}:
|
<span v-if="scope.opt.customer.customerType">
|
||||||
|
{{ `${scope.opt.code} ${$t('general.name')}` }}:
|
||||||
<template v-if="scope.opt.customer.customerType === 'CORP'">
|
|
||||||
{{
|
{{
|
||||||
$i18n.locale === 'eng'
|
scope.opt.customer.customerType === 'CORP'
|
||||||
? scope.opt.registerName
|
? scope.opt.customerName
|
||||||
: scope.opt.registerNameEN
|
: $i18n.locale === 'eng'
|
||||||
|
? `${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` ||
|
||||||
|
'-'
|
||||||
|
: `${scope.opt.firstName} ${scope.opt.lastName}` || '-'
|
||||||
}}
|
}}
|
||||||
</template>
|
</span>
|
||||||
<template v-else>
|
|
||||||
{{
|
|
||||||
$i18n.locale === 'eng'
|
|
||||||
? scope.opt.customer.firstNameEN ||
|
|
||||||
'-' + ' ' + scope.opt.customer.lastNameEN ||
|
|
||||||
''
|
|
||||||
: scope.opt.customer.firstName ||
|
|
||||||
'-' + ' ' + scope.opt.customer.lastName ||
|
|
||||||
''
|
|
||||||
}}
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-caption app-text-muted-2 q-mb-xs">
|
<div class="text-caption app-text-muted-2 q-mb-xs">
|
||||||
<div v-if="scope.opt.customer" class="col column">
|
<span v-if="scope.opt.customer" class="col column">
|
||||||
<span>
|
{{ $t('customerEmployee.form.employerSelect.branchName') }}:
|
||||||
{{ $t('customerEmployee.form.employerSelect.branchName') }}:
|
{{
|
||||||
{{
|
scope.opt.customer.customerType === 'CORP'
|
||||||
$i18n.locale === 'eng'
|
? $i18n.locale === 'eng'
|
||||||
? scope.opt.registerNameEN
|
? scope.opt.registerNameEN
|
||||||
: scope.opt.registerName
|
: scope.opt.registerName
|
||||||
}}
|
: $i18n.locale === 'eng'
|
||||||
</span>
|
? `${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` ||
|
||||||
<span>
|
'-'
|
||||||
{{ $t('customerEmployee.form.employerSelect.branchName') }}:
|
: `${scope.opt.firstName} ${scope.opt.lastName}` || '-'
|
||||||
{{
|
}}
|
||||||
$i18n.locale === 'eng'
|
</span>
|
||||||
? scope.opt.customer.firstNameEN ||
|
<span v-if="scope.opt.province" class="col">
|
||||||
'-' + ' ' + scope.opt.customer.lastNameEN
|
|
||||||
: scope.opt.customer.firstName ||
|
|
||||||
'-' + ' ' + scope.opt.customer.lastName
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div v-if="scope.opt.province" class="col">
|
|
||||||
{{ $t('general.address') }}
|
{{ $t('general.address') }}
|
||||||
{{
|
{{
|
||||||
$i18n.locale === 'eng'
|
$i18n.locale === 'eng'
|
||||||
? `${scope.opt.addressEN || ''} ${scope.opt.subDistrict.nameEN || ''} ${scope.opt.district.nameEN || ''} ${scope.opt.province.nameEN || ''}`
|
? `${scope.opt.addressEN || ''}, ${scope.opt.mooEN && `${$t('form.moo')} ${scope.opt.mooEN},`} ${scope.opt.soiEN && `${$t('form.soi')} ${scope.opt.soiEN},`} ${scope.opt.streetEN && `${scope.opt.streetEN} Rd,`} ${scope.opt.subDistrict.nameEN || ''}, ${scope.opt.district.nameEN || ''}, ${scope.opt.province.nameEN || ''}`
|
||||||
: `${scope.opt.address || ''} ${scope.opt.subDistrict.name || ''} ${scope.opt.district.name || ''} ${scope.opt.province.name || ''}`
|
: `${scope.opt.address || ''}, ${scope.opt.moo && `${$t('form.moo')} ${scope.opt.moo},`} ${scope.opt.soi && `${$t('form.soi')} ${scope.opt.soi},`} ${scope.opt.street && `${$t('form.street')} ${scope.opt.street},`} ${scope.opt.subDistrict.name || ''}, ${scope.opt.district.name || ''}, ${scope.opt.province.name || ''}`
|
||||||
}}
|
}}
|
||||||
{{ scope.opt.subDistrict?.zipCode || '' }}
|
{{ scope.opt.subDistrict?.zipCode || '' }}
|
||||||
</div>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue