diff --git a/src/modules/05_placement/components/pass/Table.vue b/src/modules/05_placement/components/pass/Table.vue index 53398fdf6..ea1d93edd 100644 --- a/src/modules/05_placement/components/pass/Table.vue +++ b/src/modules/05_placement/components/pass/Table.vue @@ -21,42 +21,45 @@ const { placementData } = store; const editRow = ref(false); //เช็คมีการแก้ไขข้อมูล const modal = ref(false); //modal add detail const modal_right = ref(false); //modal add detail + +const modalwaitInfo = ref(false); //modal add detail const modalEdit = ref(false); //modal ที่แสดงใช้สำหรับแก้ไขหรือไม่ const Name = ref(); const positionMasterUserNote = ref(); const $q = useQuasar(); // show dialog const files = ref([]); const appointModal = ref(false); +const isNewModel = ref(false); //modal add detail const appoint = ref({ - Code: '', - UnitName: '', - PositionNo: '', - PositionType: '', - PositionManage: '', - PositionTypeManage: '', - PositionLine: '', - Major: '', - PositionLevel: '' + Code: "", + UnitName: "", + PositionNo: "", + PositionType: "", + PositionManage: "", + PositionTypeManage: "", + PositionLine: "", + Major: "", + PositionLevel: "", }); - const saveAppoint = () => { console.log("save appoint===>", appoint.value); -} +}; const savePostpone = () => { - const dataPost = { note: positionMasterUserNote.value, files: files } + const dataPost = { note: positionMasterUserNote.value, files: files }; console.log("save postpone===>", dataPost); - positionMasterUserNote.value = ''; + positionMasterUserNote.value = ""; modal_right.value = false; -} + isNewModel.value = false; +}; const saveDisclaim = () => { - const dataPost = { note: positionMasterUserNote.value } + const dataPost = { note: positionMasterUserNote.value }; console.log("save disclaim===>", dataPost); - positionMasterUserNote.value = ''; + positionMasterUserNote.value = ""; modal_right.value = false; -} +}; const clickEditRow = () => { editRow.value = true; @@ -68,7 +71,7 @@ const getClass = (val: boolean) => { }; }; const selectData = (props: TableName) => { - itemtest.value = props + itemtest.value = props; if (editvisible.value == true) { editRow.value = false; modalEdit.value = true; @@ -83,8 +86,12 @@ const selectData = (props: TableName) => { }; const getNumFile = ref(0); -const editDetail = (props: TableName, action: "cancel" | "wait") => { - +const editDetail = ( + props: TableName, + action: "cancel" | "wait" | "waitInfo", + id:Number +) => { + let dataProp = { ...props }; if (action === "cancel") { getNumFile.value = 0; editRow.value = false; @@ -98,21 +105,39 @@ const editDetail = (props: TableName, action: "cancel" | "wait") => { modalEdit.value = true; modal_right.value = true; edit.value = true; + isNewModel.value = true; + const GetId = (dataProp:any) =>{ + if(dataProp.value == id){ + dataProp.value.push({ + isNewModel:isNewModel.value + }) + } + } + GetId(dataProp); + console.log(dataProp) + Name.value = props.fullName; + } else if (action === "waitInfo") { + getNumFile.value = 1; + editRow.value = false; + modalEdit.value = true; + modalwaitInfo.value = true; + edit.value = true; + isNewModel.value = true; Name.value = props.fullName; } - }; + placementData.mappingPosition.columns.length == 0 ? (visibleColumns.value = [ - "position", - "Name", - "ExamOrder", - "Unit", - "ReportingDate", - "BMAOfficer", - "Status", - "checkList", - ]) + "position", + "Name", + "ExamOrder", + "Unit", + "ReportingDate", + "BMAOfficer", + "Status", + "checkList", + ]) : (visibleColumns.value = placementData.mappingPosition.columns); const columns = ref([ { @@ -203,7 +228,8 @@ const rows = ref([ BMAOfficer: true, Status: "สละสิทธิ์", checkList: null, - address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + address: + "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", university: "มหาวิทยาลัยบูรพา", degree: "การศึกษาบัณฑิต", major: "เทคโนโลยีการศึกษา", @@ -211,15 +237,15 @@ const rows = ref([ number: 3, examCount: 5, scoreResult: { - scoreAFull: 200, - scoreA: 133, - scoreBFull: 200, - scoreB: 149, - scoreCFull: 100, - scoreC: 0, - scoreSumFull: 500, - scoreSum: 282, - examResult: "ผ่าน" + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน", }, }, { @@ -236,7 +262,8 @@ const rows = ref([ BMAOfficer: false, Status: "ยังไม่บรรจุ", checkList: null, - address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + address: + "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", university: "มหาวิทยาลัยบูรพา", degree: "การศึกษาบัณฑิต", major: "เทคโนโลยีการศึกษา", @@ -244,15 +271,15 @@ const rows = ref([ number: 3, examCount: 5, scoreResult: { - scoreAFull: 200, - scoreA: 133, - scoreBFull: 200, - scoreB: 149, - scoreCFull: 100, - scoreC: 0, - scoreSumFull: 500, - scoreSum: 282, - examResult: "ผ่าน" + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน", }, }, { @@ -269,7 +296,8 @@ const rows = ref([ BMAOfficer: true, Status: "ยังไม่บรรจุ", checkList: null, - address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + address: + "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", university: "มหาวิทยาลัยบูรพา", degree: "การศึกษาบัณฑิต", major: "เทคโนโลยีการศึกษา", @@ -277,15 +305,15 @@ const rows = ref([ number: 3, examCount: 5, scoreResult: { - scoreAFull: 200, - scoreA: 133, - scoreBFull: 200, - scoreB: 149, - scoreCFull: 100, - scoreC: 0, - scoreSumFull: 500, - scoreSum: 282, - examResult: "ผ่าน" + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน", }, }, @@ -303,7 +331,8 @@ const rows = ref([ BMAOfficer: true, Status: "เตรียมบรรจุ", checkList: null, - address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + address: + "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", university: "มหาวิทยาลัยบูรพา", degree: "การศึกษาบัณฑิต", major: "เทคโนโลยีการศึกษา", @@ -311,15 +340,15 @@ const rows = ref([ number: 3, examCount: 5, scoreResult: { - scoreAFull: 200, - scoreA: 133, - scoreBFull: 200, - scoreB: 149, - scoreCFull: 100, - scoreC: 0, - scoreSumFull: 500, - scoreSum: 282, - examResult: "ผ่าน" + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน", }, }, @@ -337,7 +366,8 @@ const rows = ref([ BMAOfficer: true, Status: "เตรียมบรรจุ", checkList: null, - address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + address: + "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", university: "มหาวิทยาลัยบูรพา", degree: "การศึกษาบัณฑิต", major: "เทคโนโลยีการศึกษา", @@ -345,15 +375,15 @@ const rows = ref([ number: 3, examCount: 5, scoreResult: { - scoreAFull: 200, - scoreA: 133, - scoreBFull: 200, - scoreB: 149, - scoreCFull: 100, - scoreC: 0, - scoreSumFull: 500, - scoreSum: 282, - examResult: "ผ่าน" + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน", }, }, { @@ -370,7 +400,8 @@ const rows = ref([ BMAOfficer: true, Status: "เตรียมบรรจุ", checkList: null, - address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + address: + "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", university: "มหาวิทยาลัยบูรพา", degree: "การศึกษาบัณฑิต", major: "เทคโนโลยีการศึกษา", @@ -378,15 +409,15 @@ const rows = ref([ number: 3, examCount: 5, scoreResult: { - scoreAFull: 200, - scoreA: 133, - scoreBFull: 200, - scoreB: 149, - scoreCFull: 100, - scoreC: 0, - scoreSumFull: 500, - scoreSum: 282, - examResult: "ผ่าน" + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน", }, }, { @@ -403,7 +434,8 @@ const rows = ref([ BMAOfficer: true, Status: "บรรจุเเล้ว", checkList: null, - address: "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + address: + "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", university: "มหาวิทยาลัยบูรพา", degree: "การศึกษาบัณฑิต", major: "เทคโนโลยีการศึกษา", @@ -411,15 +443,49 @@ const rows = ref([ number: 3, examCount: 5, scoreResult: { - scoreAFull: 200, - scoreA: 133, - scoreBFull: 200, - scoreB: 149, - scoreCFull: 100, - scoreC: 0, - scoreSumFull: 500, - scoreSum: 282, - examResult: "ผ่าน" + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน", + }, + }, + { + profileID: "401650002245", + position: 7, + fullName: "นายอภินัน บอบู่", + dateOfBirth: "17 ก.พ. 2535", + gender: "ชาย", + ExamOrder: 7, + unitId: "", + UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)", + Unit: "นักทรัพยากรบุคคล (กบห.4)", + ReportingDate: "2023-05-30", //วันที่รายงานตัว + BMAOfficer: true, + Status: "ขอผ่อนผัน", + checkList: null, + address: + "200/88 ซอยศาลายา3 ถนนพุทธมณฑลสาย4 แขวงศาลายา เขตพุทธมณฑล อำเภอพุทธมณฑล จังหวัดนครปฐม 73170", + university: "มหาวิทยาลัยบูรพา", + degree: "การศึกษาบัณฑิต", + major: "เทคโนโลยีการศึกษา", + remark: "-", + number: 3, + examCount: 5, + scoreResult: { + scoreAFull: 200, + scoreA: 133, + scoreBFull: 200, + scoreB: 149, + scoreCFull: 100, + scoreC: 0, + scoreSumFull: 500, + scoreSum: 282, + examResult: "ผ่าน", }, }, ]); @@ -431,7 +497,7 @@ const clickCancel = async () => { }; const openAppointModal = (value: any) => { - appointModal.value = true + appointModal.value = true; editRow.value = true; }; @@ -445,180 +511,368 @@ const clickClose = async () => { persistent: true, }).onOk(async () => { modal_right.value = false; + modalwaitInfo.value = false; modal.value = false; appointModal.value = false; }); } else { modal_right.value = false; + modalwaitInfo.value = false; modal.value = false; appointModal.value = false; } }; const save = () => { - console.log("rows===>", rows.value) -} - + console.log("rows===>", rows.value); +}; \ No newline at end of file +