Merge branch 'develop' into dev-tee
This commit is contained in:
commit
91935f9f6f
6 changed files with 29 additions and 2 deletions
20
src/modules/06_retirement/components/CurrencyInput.vue
Normal file
20
src/modules/06_retirement/components/CurrencyInput.vue
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<template>
|
||||
<input ref="inputRef" type="text" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useCurrencyInput } from "vue-currency-input";
|
||||
|
||||
export default {
|
||||
name: "CurrencyInput",
|
||||
props: {
|
||||
modelValue: Number,
|
||||
options: Object,
|
||||
},
|
||||
setup(props) {
|
||||
const { inputRef } = useCurrencyInput(props.options);
|
||||
|
||||
return { inputRef };
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -271,11 +271,13 @@
|
|||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="salary"
|
||||
@update:model-value="salary.toLocaleString('en-US')"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เงินเดือน'}`"
|
||||
type="number"
|
||||
/>
|
||||
<CurrencyInput v-model="salary" :options="{ currency: 'EUR' }" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
@ -364,6 +366,7 @@ import { onMounted, ref } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import CurrencyInput from "@/modules/06_retirement/components/CurrencyInput.vue";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -477,6 +480,7 @@ const getData = async () => {
|
|||
responseData.value.positionTypeOld = data.positionTypeOld ?? "";
|
||||
responseData.value.reason = data.reason ?? "";
|
||||
responseData.value.salary = data.salary !== null ? data.salary : 0;
|
||||
|
||||
responseData.value.status = data.status ?? "";
|
||||
responseData.value.avataPath = data.avataPath ?? "";
|
||||
responseData.value.fullname = `${data.firstName ?? "-"} ${
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ const updateDateRange = () => {
|
|||
console.log(1)
|
||||
} else if (roundInsig.value.value == 2) {
|
||||
dateStart.value = new Date(new Date().getFullYear(), 3, 29);
|
||||
dateEnd.value = new Date(new Date().getFullYear() + 1, 6, 28);
|
||||
dateEnd.value = new Date(new Date().getFullYear(), 4, 29);
|
||||
console.log(2)
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ const updateDateRange = () => {
|
|||
console.log(1)
|
||||
} else if (roundCoin.value.value == 2) {
|
||||
dateStart.value = new Date(new Date().getFullYear(), 3, 29);
|
||||
dateEnd.value = new Date(new Date().getFullYear() + 1, 6, 28);
|
||||
dateEnd.value = new Date(new Date().getFullYear(), 4, 29);
|
||||
console.log(2)
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue