From fbdfd4594df288ddd3cc6135a074b0a30ce8833e Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 7 Jun 2023 16:08:28 +0700 Subject: [PATCH 1/4] no message --- .../05_placement/components/DialogFooter.vue | 20 +--- .../05_placement/components/DialogHeader.vue | 3 +- .../components/PlacementTable.vue | 106 +++++++++++------- 3 files changed, 72 insertions(+), 57 deletions(-) diff --git a/src/modules/05_placement/components/DialogFooter.vue b/src/modules/05_placement/components/DialogFooter.vue index a99ee7515..3520adbd4 100644 --- a/src/modules/05_placement/components/DialogFooter.vue +++ b/src/modules/05_placement/components/DialogFooter.vue @@ -13,18 +13,7 @@ แก้ไขข้อมูล
- + { const checkSave = () => { props.validate(); props.save(); - // if (myForm.value !== null) { - // myForm.value.validate().then((success) => { - // if (success) { - // } - // }); - // } + }; diff --git a/src/modules/05_placement/components/DialogHeader.vue b/src/modules/05_placement/components/DialogHeader.vue index 93aa1f86e..f3af6c6c0 100644 --- a/src/modules/05_placement/components/DialogHeader.vue +++ b/src/modules/05_placement/components/DialogHeader.vue @@ -12,8 +12,8 @@ diff --git a/src/modules/05_placement/components/PlacementTable.vue b/src/modules/05_placement/components/PlacementTable.vue index 963a53664..7200e46e9 100644 --- a/src/modules/05_placement/components/PlacementTable.vue +++ b/src/modules/05_placement/components/PlacementTable.vue @@ -16,6 +16,7 @@ const filter = ref(""); const { placementData } = store; const editRow = ref(false); //เช็คมีการแก้ไขข้อมูล const modal = ref(false); //modal add detail +const modal_right = ref(false); //modal add detail const modalEdit = ref(false); //modal ที่แสดงใช้สำหรับแก้ไขหรือไม่ const position = ref(); const Name = ref(); @@ -26,7 +27,7 @@ const BMAOfficer = ref(); const Status = ref(); const checkList = ref(); - const $q = useQuasar(); // show dialog +const $q = useQuasar(); // show dialog const selectData = (props: TableName) => { if (editvisible.value == true) { @@ -42,13 +43,29 @@ const selectData = (props: TableName) => { BMAOfficer.value = props.BMAOfficer; Status.value = props.Status; checkList.value = props.checkList; - }else{ + } else { editRow.value = false; modalEdit.value = true; modal.value = true; edit.value = true; } }; +const editDetail = (props:TableName, action:string) => { + if (action === 'cancel') { + editRow.value = false; + modalEdit.value = false; + modal_right.value = true; + edit.value = true; + Name.value = props.Name; + + } else if(action === 'wait'){ + editRow.value = false; + modalEdit.value = true; + modal_right.value = true; + edit.value = true; + Name.value = props.Name; + } +}; placementData.mappingPosition.columns.length == 0 ? (visibleColumns.value = [ @@ -150,7 +167,7 @@ const rows = ref([ ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว BMAOfficer: true, Status: "บรรจุเเล้ว", - checkList:null + checkList: null, }, { position: 1, @@ -160,7 +177,7 @@ const rows = ref([ ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว BMAOfficer: true, Status: "ยังไม่บรรจุ", - checkList:null + checkList: null, }, { position: 1, @@ -170,7 +187,7 @@ const rows = ref([ ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว BMAOfficer: true, Status: "เตรียมบรรจุ", - checkList:null + checkList: null, }, { @@ -181,7 +198,7 @@ const rows = ref([ ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว BMAOfficer: true, Status: "เตรียมบรรจุ", - checkList:null + checkList: null, }, { @@ -192,7 +209,7 @@ const rows = ref([ ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว BMAOfficer: true, Status: "เตรียมบรรจุ", - checkList:null + checkList: null, }, { position: 1, @@ -202,7 +219,7 @@ const rows = ref([ ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว BMAOfficer: true, Status: "บรรจุเเล้ว", - checkList:null + checkList: null, }, ]); const clickCancel = async () => { @@ -217,9 +234,11 @@ const clickClose = async () => { ok: "ยืนยัน", persistent: true, }).onOk(async () => { + modal_right.value = false; modal.value = false; }); } else { + modal_right.value = false; modal.value = false; } }; @@ -271,15 +290,6 @@ const clickClose = async () => { class="text-h5" />
-
{{ col.value }} @@ -297,6 +307,7 @@ const clickClose = async () => { round size="14px" icon="mdi-account-alert" + @click="editDetail(props.row, 'wait')" /> { round size="14px" icon="mdi-account-remove" + @click="editDetail(props.row, 'cancel')" />
@@ -319,28 +331,46 @@ const clickClose = async () => {
+ + + + + + + text + + + + + + + + + + + + + text + + + + + - - - - - - - - text - - - - - - From dc9291fad9d34a5f5705b325b0652dd92d1ba875 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 7 Jun 2023 16:22:30 +0700 Subject: [PATCH 2/4] no message --- .../components/PlacementTable.vue | 116 ++++++++++-------- 1 file changed, 65 insertions(+), 51 deletions(-) diff --git a/src/modules/05_placement/components/PlacementTable.vue b/src/modules/05_placement/components/PlacementTable.vue index 7200e46e9..96be09380 100644 --- a/src/modules/05_placement/components/PlacementTable.vue +++ b/src/modules/05_placement/components/PlacementTable.vue @@ -26,9 +26,17 @@ const ReportingDate = ref(); const BMAOfficer = ref(); const Status = ref(); const checkList = ref(); - +const positionMasterUserNote = ref(); const $q = useQuasar(); // show dialog - +const clickEditRow = () => { + editRow.value = true; +}; +const getClass = (val: boolean) => { + return { + "full-width inputgreen cursor-pointer": val, + "full-width cursor-pointer": !val, + }; +}; const selectData = (props: TableName) => { if (editvisible.value == true) { editRow.value = false; @@ -50,15 +58,14 @@ const selectData = (props: TableName) => { edit.value = true; } }; -const editDetail = (props:TableName, action:string) => { - if (action === 'cancel') { +const editDetail = (props: TableName, action: string) => { + if (action === "cancel") { editRow.value = false; modalEdit.value = false; modal_right.value = true; edit.value = true; Name.value = props.Name; - - } else if(action === 'wait'){ + } else if (action === "wait") { editRow.value = false; modalEdit.value = true; modal_right.value = true; @@ -88,8 +95,6 @@ const columns = ref([ field: "position", headerStyle: "font-size: 14px", style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "Name", @@ -110,8 +115,6 @@ const columns = ref([ field: "ExamOrder", headerStyle: "font-size: 14px", style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "Unit", @@ -143,8 +146,6 @@ const columns = ref([ field: "BMAOfficer", headerStyle: "font-size: 14px", style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "Status", @@ -331,46 +332,59 @@ const clickClose = async () => { - - - - - - - text - - - - - - - - - - - - - text - - - - - + + + + + + + text + + + + + + + + + + + + +
+ + +
+
+ + +
+
+
From cde1e9c135dd15568f1fafb989ef32d01e320031 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 7 Jun 2023 20:41:35 +0700 Subject: [PATCH 3/4] 05 popup --- .../components/PlacementTable.vue | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/modules/05_placement/components/PlacementTable.vue b/src/modules/05_placement/components/PlacementTable.vue index 96be09380..19b3112cd 100644 --- a/src/modules/05_placement/components/PlacementTable.vue +++ b/src/modules/05_placement/components/PlacementTable.vue @@ -28,6 +28,7 @@ const Status = ref(); const checkList = ref(); const positionMasterUserNote = ref(); const $q = useQuasar(); // show dialog +const files = ref([]); const clickEditRow = () => { editRow.value = true; }; @@ -58,22 +59,27 @@ const selectData = (props: TableName) => { edit.value = true; } }; -const editDetail = (props: TableName, action: string) => { + +const getNumFile = ref(0); +const editDetail = (props: TableName, action: "cancel" | "wait") => { + if (action === "cancel") { + getNumFile.value = 0; editRow.value = false; modalEdit.value = false; modal_right.value = true; edit.value = true; Name.value = props.Name; } else if (action === "wait") { + getNumFile.value = 1; editRow.value = false; modalEdit.value = true; modal_right.value = true; edit.value = true; Name.value = props.Name; } -}; +}; placementData.mappingPosition.columns.length == 0 ? (visibleColumns.value = [ "position", @@ -243,6 +249,7 @@ const clickClose = async () => { modal.value = false; } }; +