refactor: header Format numbers
This commit is contained in:
parent
6a5ab0ffc1
commit
408b7b3441
1 changed files with 17 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import DatePicker from 'src/components/shared/DatePicker.vue';
|
||||
import { formatNumberDecimal } from 'stores/utils';
|
||||
|
||||
const citizenId = defineModel<string | undefined>('citizenId', {
|
||||
required: true,
|
||||
|
|
@ -20,7 +21,9 @@ const registerName = defineModel<string | undefined>('registerName', {
|
|||
const registerNameEN = defineModel<string>('registerNameEN');
|
||||
|
||||
const registerDate = defineModel<Date | null>('registerDate');
|
||||
const authorizedCapital = defineModel<string>('authorizedCapital');
|
||||
const authorizedCapital = defineModel<string>('authorizedCapital', {
|
||||
default: '0',
|
||||
});
|
||||
|
||||
defineProps<{
|
||||
index: string;
|
||||
|
|
@ -57,7 +60,7 @@ defineProps<{
|
|||
for="input-branch-code"
|
||||
:label="$t('customer.form.branchCode')"
|
||||
:readonly="readonly"
|
||||
:model-value="`${branchCode}${index}`"
|
||||
:model-value="branchCode"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
|
|
@ -113,12 +116,22 @@ defineProps<{
|
|||
lazy-rules="ondemand"
|
||||
dense
|
||||
outlined
|
||||
type="text"
|
||||
:readonly="readonly"
|
||||
hide-bottom-space
|
||||
class="col-12 col-md-2"
|
||||
class="col-12 col-md-3"
|
||||
:label="$t('customer.form.authorizedCapital')"
|
||||
for="input-authorized-capital"
|
||||
v-model="authorizedCapital"
|
||||
:model-value="
|
||||
!readonly
|
||||
? authorizedCapital
|
||||
: formatNumberDecimal(+authorizedCapital, 2)
|
||||
"
|
||||
@update:model-value="
|
||||
(v) => {
|
||||
authorizedCapital = `${v}`;
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
||||
<DatePicker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue