reefactor:handle address
This commit is contained in:
parent
7b3b506d2e
commit
6b51b0ed05
1 changed files with 31 additions and 8 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import { dateFormat } from 'src/utils/datetime';
|
||||
|
||||
// NOTE: Import stores
|
||||
import { formatAddress } from 'src/utils/address';
|
||||
|
||||
// NOTE Import Types
|
||||
import { Branch } from 'src/stores/branch/types';
|
||||
|
|
@ -57,12 +58,23 @@ function titleMode(mode: View): string {
|
|||
<section class="detail-customer-info">
|
||||
<article>
|
||||
<b>บริษัท {{ branch.name }}</b>
|
||||
<span>
|
||||
{{ !branch.moo ? '' : `หมู่.${branch.moo}` }} ต.{{
|
||||
branch.subDistrict?.name
|
||||
|
||||
<span v-if="branch.province && branch.district && branch.subDistrict">
|
||||
{{
|
||||
formatAddress({
|
||||
address: branch.address,
|
||||
addressEN: branch.addressEN,
|
||||
moo: branch.moo,
|
||||
mooEN: branch.mooEN,
|
||||
soi: branch.soi,
|
||||
soiEN: branch.soiEN,
|
||||
street: branch.street,
|
||||
streetEN: branch.streetEN,
|
||||
province: branch.province,
|
||||
district: branch.district,
|
||||
subDistrict: branch.subDistrict,
|
||||
})
|
||||
}}
|
||||
อ.{{ branch.district?.name }} จ.{{ branch.province?.name }}
|
||||
{{ branch.subDistrict?.zipCode }}
|
||||
</span>
|
||||
<span>เลขประจำตัวผู้เสียภาษี {{ branch.taxNo }}</span>
|
||||
<span>เบอร์โทร {{ branch.telephoneNo }}</span>
|
||||
|
|
@ -71,10 +83,21 @@ function titleMode(mode: View): string {
|
|||
<article>
|
||||
<b>ลูกค้า</b>
|
||||
<span>
|
||||
ต.{{ customer.subDistrict?.name }} อ.{{
|
||||
customer.district?.name
|
||||
{{
|
||||
formatAddress({
|
||||
address: customer.address,
|
||||
addressEN: customer.addressEN,
|
||||
moo: customer.moo,
|
||||
mooEN: customer.mooEN,
|
||||
soi: customer.soi,
|
||||
soiEN: customer.soiEN,
|
||||
street: customer.street,
|
||||
streetEN: customer.streetEN,
|
||||
province: customer.province,
|
||||
district: customer.district,
|
||||
subDistrict: customer.subDistrict,
|
||||
})
|
||||
}}
|
||||
จ.{{ customer.province?.name }} {{ customer.subDistrict?.zipCode }}
|
||||
</span>
|
||||
<span>เลขประจำตัวผู้เสียภาษี {{ customer.citizenId }}</span>
|
||||
<span>เบอร์โทร {{ customer.telephoneNo }}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue