แก้ไขเงินเดือนออกคำสั่ง step2
This commit is contained in:
parent
62f728f975
commit
d0352db7b9
1 changed files with 18 additions and 50 deletions
|
|
@ -221,7 +221,7 @@ const saveModal = () => {
|
|||
};
|
||||
const personalId = ref<string>("");
|
||||
const selectModal = (e: any) => {
|
||||
console.log(e);
|
||||
// console.log(e);
|
||||
titleName.value = e.name;
|
||||
personalId.value = e.personalId;
|
||||
modalOpenClose(e.personalId);
|
||||
|
|
@ -229,15 +229,15 @@ const selectModal = (e: any) => {
|
|||
|
||||
const modalOpenClose = async (personalId: string) => {
|
||||
modal.value = !modal.value;
|
||||
if (!modal.value) {
|
||||
if (modal.value) {
|
||||
await fetchSalary(personalId);
|
||||
} else {
|
||||
titleName.value = "";
|
||||
}
|
||||
if (modal.value == true) {
|
||||
await fetchSalary(personalId);
|
||||
}
|
||||
myForm.value?.reset();
|
||||
};
|
||||
const fetchSalary = async (personalId: string) => {
|
||||
console.log(personalId);
|
||||
// console.log(personalId);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.salaryOrder(personalId))
|
||||
|
|
@ -251,10 +251,10 @@ const fetchSalary = async (personalId: string) => {
|
|||
mouthSalaryAmount:
|
||||
data.monthSalaryAmount !== 0 ? data.salaryAmount : null,
|
||||
};
|
||||
console.log("data", modalData.value);
|
||||
// console.log("data", modalData.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
// console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -263,11 +263,12 @@ const fetchSalary = async (personalId: string) => {
|
|||
};
|
||||
|
||||
const putSalary = async (salary: any) => {
|
||||
modalData.value = {
|
||||
salaryAmount: Number(salary.salaryAmount),
|
||||
positionSalaryAmount: Number(salary.positionSalaryAmount),
|
||||
monthSalaryAmount: Number(salary.mouthSalaryAmount),
|
||||
};
|
||||
// modalData.value = {
|
||||
// salaryAmount: Number(salary.salaryAmount),
|
||||
// positionSalaryAmount: Number(salary.positionSalaryAmount),
|
||||
// monthSalaryAmount: Number(salary.mouthSalaryAmount),
|
||||
// };
|
||||
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -585,16 +586,6 @@ const getClass = (val: boolean) => {
|
|||
<div class="col-xs-12">
|
||||
<div class="col-12 row q-py-sm items-center q-col-gutter-sm">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<!-- <q-input
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model.number="modalData.salaryAmount"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
type="text"
|
||||
hide-bottom-space
|
||||
/> -->
|
||||
<CurruncyInput
|
||||
:edit="true"
|
||||
:dense="true"
|
||||
|
|
@ -606,18 +597,6 @@ const getClass = (val: boolean) => {
|
|||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<!-- <q-input
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="modalData.positionSalaryAmount"
|
||||
:label="`${'เงินประจำตำแหน่ง'}`"
|
||||
type="number"
|
||||
hide-bottom-space
|
||||
/> -->
|
||||
<!-- :rules="[
|
||||
(val) => !!val || `${'กรุณากรอกเงินประจำตำแหน่ง'}`,
|
||||
]" -->
|
||||
<CurruncyInput
|
||||
:edit="true"
|
||||
:dense="true"
|
||||
|
|
@ -628,22 +607,10 @@ const getClass = (val: boolean) => {
|
|||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<!-- <q-input
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="modalData.mouthSalaryAmount"
|
||||
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||
type="number"
|
||||
hide-bottom-space
|
||||
/> -->
|
||||
<!-- :rules="[
|
||||
(val) => !!val || `${'กรุณากรอกเงินค่าตอบแทนรายเดือน'}`,
|
||||
]" -->
|
||||
<CurruncyInput
|
||||
:edit="true"
|
||||
:dense="true"
|
||||
v-model="modalData.positionSalaryAmount"
|
||||
v-model="modalData.mouthSalaryAmount"
|
||||
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
|
@ -661,8 +628,9 @@ const getClass = (val: boolean) => {
|
|||
color="public"
|
||||
@click="saveModal"
|
||||
class="q-px-md"
|
||||
><!-- icon="mdi-content-save-outline"
|
||||
<q-tooltip>บันทึก</q-tooltip> -->
|
||||
>
|
||||
<!-- icon="mdi-content-save-outline" -->
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue