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