From 8783a54691b929b138d8da6506bae1d86640136d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 14 Sep 2023 09:27:01 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=20=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80=E0=B8=94?= =?UTF-8?q?=E0=B8=B7=E0=B8=AD=E0=B8=99=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/04_registry/components/Salary.vue | 26 +++++++++---------- .../04_registry/components/SalaryEmployee.vue | 18 ++++++------- .../components/SalaryEmployeeTemp.vue | 18 ++++++------- .../views/SalaryEmployee.vue | 18 ++++++------- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/modules/04_registry/components/Salary.vue b/src/modules/04_registry/components/Salary.vue index 0bd1a120c..43970819c 100644 --- a/src/modules/04_registry/components/Salary.vue +++ b/src/modules/04_registry/components/Salary.vue @@ -643,10 +643,10 @@ const { const route = useRoute(); const id = ref(""); const date = ref(new Date()); -const amount = ref(0); +const amount = ref(0); // const salary = ref(null); -const positionSalaryAmount = ref(0); -const mouthSalaryAmount = ref(0); +const positionSalaryAmount = ref(0); +const mouthSalaryAmount = ref(0); const ocId = ref(); const positionId = ref(); const positionLineId = ref(); @@ -1816,13 +1816,13 @@ const templateDetail = async () => { * กดบันทึกใน dialog */ const clickSave = async () => { - if (amount.value == 0) { - amount.value = null; - } else if (positionSalaryAmount.value == 0) { - positionSalaryAmount.value = null; - } else if (mouthSalaryAmount.value == 0) { - mouthSalaryAmount.value = null; - } + // if (amount.value == 0) { + // amount.value = null; + // } else if (positionSalaryAmount.value == 0) { + // positionSalaryAmount.value = null; + // } else if (mouthSalaryAmount.value == 0) { + // mouthSalaryAmount.value = null; + // } myForm.value.validate().then(async (result: boolean) => { if (result) { @@ -2018,9 +2018,9 @@ const addData = () => { edit.value = true; date.value = new Date(); date.value = new Date(); - amount.value = 0; - positionSalaryAmount.value = 0; - mouthSalaryAmount.value = 0; + amount.value = undefined; + positionSalaryAmount.value = undefined; + mouthSalaryAmount.value = undefined; ocId.value = ""; positionId.value = ""; posNoId.value = ""; diff --git a/src/modules/04_registry/components/SalaryEmployee.vue b/src/modules/04_registry/components/SalaryEmployee.vue index 398692a01..e59799e4d 100644 --- a/src/modules/04_registry/components/SalaryEmployee.vue +++ b/src/modules/04_registry/components/SalaryEmployee.vue @@ -617,9 +617,9 @@ const { const route = useRoute(); const id = ref(""); const date = ref(new Date()); -const amount = ref(null); -const positionSalaryAmount = ref(null); -const mouthSalaryAmount = ref(null); +const amount = ref(0); +const positionSalaryAmount = ref(0); +const mouthSalaryAmount = ref(0); const search = ref(""); const refCommandNo = ref(); const expanded = ref([]); @@ -1717,9 +1717,9 @@ const templateDetail = async () => { * กดบันทึกใน dialog */ const clickSave = async () => { - if (amount.value === 0) { - amount.value = null; - } + // if (amount.value === 0) { + // amount.value = null; + // } myForm.value.validate().then(async (result: boolean) => { if (result) { if (modalEdit.value) { @@ -1919,9 +1919,9 @@ const addData = () => { modal.value = true; edit.value = true; date.value = new Date(); - amount.value = 0; - positionSalaryAmount.value = null; - mouthSalaryAmount.value = null; + amount.value = undefined; + positionSalaryAmount.value = undefined; + mouthSalaryAmount.value = undefined; posNoId.value = ""; posNoEmployee.value = ""; diff --git a/src/modules/04_registry/components/SalaryEmployeeTemp.vue b/src/modules/04_registry/components/SalaryEmployeeTemp.vue index ab24a1127..5f0597691 100644 --- a/src/modules/04_registry/components/SalaryEmployeeTemp.vue +++ b/src/modules/04_registry/components/SalaryEmployeeTemp.vue @@ -592,9 +592,9 @@ const { const route = useRoute(); const id = ref(""); const date = ref(new Date()); -const amount = ref(null); -const positionSalaryAmount = ref(null); -const mouthSalaryAmount = ref(null); +const amount = ref(0); +const positionSalaryAmount = ref(0); +const mouthSalaryAmount = ref(0); const search = ref(""); const expanded = ref([]); const selected = ref(""); @@ -1746,9 +1746,9 @@ const templateDetail = async () => { * กดบันทึกใน dialog */ const clickSave = async () => { - if (amount.value == 0) { - amount.value = null; - } + // if (amount.value == 0) { + // amount.value = null; + // } myForm.value.validate().then(async (result: boolean) => { if (result) { if (modalEdit.value) { @@ -1948,9 +1948,9 @@ const addData = () => { modal.value = true; edit.value = true; date.value = new Date(); - amount.value = 0; - positionSalaryAmount.value = null; - mouthSalaryAmount.value = null; + amount.value = undefined; + positionSalaryAmount.value = undefined; + mouthSalaryAmount.value = undefined; posNoId.value = ""; posNoEmployee.value = ""; diff --git a/src/modules/08_registryEmployee/views/SalaryEmployee.vue b/src/modules/08_registryEmployee/views/SalaryEmployee.vue index f091f5739..9785c0430 100644 --- a/src/modules/08_registryEmployee/views/SalaryEmployee.vue +++ b/src/modules/08_registryEmployee/views/SalaryEmployee.vue @@ -625,9 +625,9 @@ const { const route = useRoute(); const id = ref(""); const date = ref(new Date()); -const amount = ref(null); -const positionSalaryAmount = ref(null); -const mouthSalaryAmount = ref(null); +const amount = ref(0); +const positionSalaryAmount = ref(0); +const mouthSalaryAmount = ref(0); const search = ref(""); const refCommandNo = ref(); const expanded = ref([]); @@ -1712,9 +1712,9 @@ const templateDetail = async () => { */ const clickSave = async () => { // dialogConfirm($q, () => SaveData()); - if (amount.value == 0) { - amount.value = null; - } + // if (amount.value == 0) { + // amount.value = null; + // } await myForm.value.validate().then(async (result: boolean) => { if (result && agencyId.value) { if (modalEdit.value) { @@ -1918,9 +1918,9 @@ const addData = () => { modal.value = true; edit.value = true; date.value = new Date(); - amount.value = 0; - positionSalaryAmount.value = null; - mouthSalaryAmount.value = null; + amount.value = undefined; + positionSalaryAmount.value = undefined; + mouthSalaryAmount.value = undefined; posNoId.value = ""; posNoEmployee.value = "";