From 638974dfcaa22beb2a6c33dace44bda6a8443f82 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 26 Mar 2024 12:09:45 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=9C=E0=B8=B4=E0=B8=94=E0=B9=81=E0=B8=A5=E0=B8=B0?= =?UTF-8?q?=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DialogEmployeeRate.vue | 8 ++--- .../13_salary/views/salaryEmployeeRate.vue | 32 ++++++++++++------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/modules/13_salary/components/salaryEmployeeChart/DialogEmployeeRate.vue b/src/modules/13_salary/components/salaryEmployeeChart/DialogEmployeeRate.vue index 0a0aad81c..e981ae5f2 100644 --- a/src/modules/13_salary/components/salaryEmployeeChart/DialogEmployeeRate.vue +++ b/src/modules/13_salary/components/salaryEmployeeChart/DialogEmployeeRate.vue @@ -176,12 +176,12 @@ watch( dense outlined v-model="formData.salaryMonth" - label="อัตราค่าจ้าง/ชั้นวิ่ง (รายเดือน)" + label="อัตราค่าจ้าง/ขั้นวิ่ง (รายเดือน)" mask="###,###,###,###" reverse-fill-mask :rules="[ (val) => - !!val || `${'กรุณากรอกอัตราค่าจ้าง/ชั้นวิ่ง (รายเดือน)'}`, + !!val || `${'กรุณากรอกอัตราค่าจ้าง/ขั้นวิ่ง (รายเดือน)'}`, ]" lazy-rules hide-bottom-space @@ -193,14 +193,14 @@ watch( dense outlined v-model="formData.salaryDay" - label="อัตราค่าจ้าง/ชั้นวิ่ง (รายวัน)" + label="อัตราค่าจ้าง/ขั้นวิ่ง (รายวัน)" mask="###,###,###,###" reverse-fill-mask lazy-rules hide-bottom-space :rules="[ (val) => - !!val || `${'กรุณากรอกอัตราค่าจ้าง/ชั้นวิ่ง (รายวัน)'}`, + !!val || `${'กรุณากรอกอัตราค่าจ้าง/ขั้นวิ่ง (รายวัน)'}`, ]" /> diff --git a/src/modules/13_salary/views/salaryEmployeeRate.vue b/src/modules/13_salary/views/salaryEmployeeRate.vue index 232077275..6f8ddec54 100644 --- a/src/modules/13_salary/views/salaryEmployeeRate.vue +++ b/src/modules/13_salary/views/salaryEmployeeRate.vue @@ -36,7 +36,7 @@ const columns = ref([ name: "step", align: "left", label: "ลำดับขั้น", - sortable: true, + sortable: false, field: "step", headerStyle: "font-size: 14px", style: "font-size: 14px", @@ -44,20 +44,34 @@ const columns = ref([ { name: "salaryMonth", align: "left", - label: "อัตราค่าจ้าง/ชั้นวิ่ง (รายเดือน)", - sortable: true, + label: "อัตราค่าจ้าง/ขั้นวิ่ง (รายเดือน)", + sortable: false, field: "salaryMonth", headerStyle: "font-size: 14px", style: "font-size: 14px", + format: (val) => + val.toLocaleString("en", { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + }), }, { name: "salaryDay", align: "left", - label: "อัตราค่าจ้าง/ชั้นวิ่ง (รายวัน)", - sortable: true, + label: "อัตราค่าจ้าง/ขั้นวิ่ง (รายวัน)", + sortable: false, field: "salaryDay", headerStyle: "font-size: 14px", style: "font-size: 14px", + // sort: (a: number) => a.toLocaleString("en", { + // minimumFractionDigits: 2, + // maximumFractionDigits: 2, + // }), + format: (val) => + val.toLocaleString("en", { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + }), }, ]); const rows = ref([]); @@ -294,13 +308,7 @@ onMounted(() => {