diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts index e9d5c6e4d..7254dc5f9 100644 --- a/src/api/05_placement/api.probation.ts +++ b/src/api/05_placement/api.probation.ts @@ -60,7 +60,7 @@ export default { - + summarySurveyDetail:(id:string) => `${evaluate}/survey?assign_id=${id}` diff --git a/src/api/07_insignia/api.insignia.ts b/src/api/07_insignia/api.insignia.ts index 4d996f36f..aa40e3a81 100644 --- a/src/api/07_insignia/api.insignia.ts +++ b/src/api/07_insignia/api.insignia.ts @@ -35,7 +35,8 @@ export default { insigniaSendToDirector: (roundId: string, ocId: string) => `${insignia}/request/officer/approve/${roundId}/${ocId}`, insigniaDirectorBackToEdit: (roundId: string, ocId: string) => `${insignia}/request/director/reject/${roundId}/${ocId}`, insigniaDirectorApproved: (roundId: string, ocId: string) => `${insignia}/request/director/approve/${roundId}/${ocId}`, - + insigniaRequestSendNote: (insigniaPeriodId: string) => `${insignia}/insignia/request/send/note/${insigniaPeriodId}`, + // uploadfile uploadfilereceice: (noteId: string) => `${insignia}/request/import/receice/${noteId}`, uploadfileinvoice: (noteId: string) => `${insignia}/request/import/invoice/${noteId}`, diff --git a/src/modules/05_placement/components/probation/SummarySurvey.vue b/src/modules/05_placement/components/probation/SummarySurvey.vue index d5b5867a1..8f1a2e4d9 100644 --- a/src/modules/05_placement/components/probation/SummarySurvey.vue +++ b/src/modules/05_placement/components/probation/SummarySurvey.vue @@ -32,8 +32,9 @@ const score2 = ref(0); const score3 = ref(0); const Allscore = ref(0); -const comment_1 = ref(""); -const comment_2 = ref(""); +const answer1 = ref(""); +const answer2 = ref(""); +const answer3 = ref(0); const result = ref(); const result_option = ref([ @@ -55,68 +56,47 @@ const cancel = () => { status.value = false; }; +const getSurveyData = async () => { + await http + .get(config.API.summarySurveyDetail(assignId.value)) + .then((res: any) => { + const data = res.data.data; + answer1.value = data.answer1, + answer2.value = data.answer2, + answer3.value = data.answer3 + status.value = false +}) + .catch((e) => { + console.log(e); + }); +}; +const save = () => { + const data = { + answer1: answer1.value, + answer2: answer2.value, + answer3: answer3.value, + }; + dialogConfirm($q, async () => { + await http + .post(config.API.summarySurveyDetail(assignId.value), data) + .then((res: any) => { + // console.log(res); + success($q, "บันทึกสำเร็จ"); + }) + .catch((e: any) => { + messageError($q, e); + }); + }); +}; onMounted(() => { - // fecthResult(assignId.value); + getSurveyData(); }); - -// const fecthResult = async (id: string) => { -// await http -// .get(config.API.createformReport(id)) -// .then((res: any) => { -// let data = res.data.data.evaluate; -// console.log(data); -// date_start.value = data.date_start; -// date_finish.value = data.date_finish; -// develop.value = Number(data.develop_complete); -// result.value = Number(data.pass_result); -// reson.value = data.reson; -// chairman_dated.value = data.chairman_dated; -// director1_dated.value = data.director1_dated; -// director2_dated.value = data.director2_dated; -// status.value = false; -// action.value = 'edit'; -// }) -// .catch((e) => { -// console.log(e); -// }); -// }; +
+ +
+ +
+ + +
diff --git a/src/modules/07_insignia/components/1_Proposals/addProposals.vue b/src/modules/07_insignia/components/1_Proposals/addProposals.vue index d6de134f3..21c008961 100644 --- a/src/modules/07_insignia/components/1_Proposals/addProposals.vue +++ b/src/modules/07_insignia/components/1_Proposals/addProposals.vue @@ -1,20 +1,11 @@ - + @@ -125,45 +61,22 @@ {{ parseInt(value + 543) }} - - + + @@ -178,14 +91,8 @@
- +
@@ -278,9 +185,7 @@ const updateYear = async (e: number) => { const editData = async (id: string) => { const formData = new FormData(); - const name = `รอบการเสนอพระราชทานเครื่องราชรอบที่ ${ - roundInsig.value.value - } ปี ${yearly.value + 543} `; + const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${roundInsig.value.value} ปี ${yearly.value + 543}`; formData.append("name", name); formData.append("year", yearly.value.toString()); formData.append("amount", datelast.value.toString()); @@ -299,7 +204,7 @@ const editData = async (id: string) => { showLoader(); await http .put(config.API.editRoundInsignia(id), formData) - .then(async () => {}) + .then(async () => { }) .catch((e) => { messageError($q, e); }) @@ -352,9 +257,8 @@ const updateDateRange = () => { const addData = async () => { const formData = new FormData(); - const name = `รอบการเสนอพระราชทานเครื่องราชรอบที่ ${ - roundInsig.value.value - } ปี ${yearly.value + 543} `; + const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${roundInsig.value.value + } ปี ${yearly.value + 543} `; console.log(name); formData.append("name", name); formData.append("year", yearly.value.toString()); @@ -376,7 +280,7 @@ const addData = async () => { showLoader(); await http .post(config.API.listRoundInsignia(), formData) - .then(async (res) => {}) + .then(async (res) => { }) .catch((e) => { messageError($q, e); }) diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 88b911d67..f8e181788 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -194,6 +194,9 @@ const props = defineProps({ roleUser: { type: String, }, + requestStatus: { + type: String, + } }); onMounted(async () => { @@ -522,113 +525,40 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
- - + +
ดาวน์โหลด - + เพิ่ม
- + - +
- +
@@ -764,44 +645,21 @@ const paginationLabel2 = (start: number, end: number, total: number) => { เพิ่มรายชื่อ - +
- + - +
@@ -858,39 +703,18 @@ const paginationLabel2 = (start: number, end: number, total: number) => { - แก้ไขเครื่องราชฯ ที่ยื่นขอ + แก้ไขเครื่องราชฯ ที่ยื่นขอ - +
- +
+ - + @@ -338,6 +369,7 @@ const directorApproved = async () => { border: 1px solid #FFA800; border-radius: 5px; } + .filter-card { background-color: #f1f1f1b0; } diff --git a/src/modules/07_insignia/components/4_Allocate/DialogForm.vue b/src/modules/07_insignia/components/4_Allocate/DialogForm.vue index d21dce968..c2189595d 100644 --- a/src/modules/07_insignia/components/4_Allocate/DialogForm.vue +++ b/src/modules/07_insignia/components/4_Allocate/DialogForm.vue @@ -95,7 +95,7 @@ const dataSave = async () => { - บันทึกผล + จัดสรรเครื่องราชฯ { map-options outlined v-model="Org" - :label="`เครื่องราชฯ`" + :label="`เลือกหน่วยงาน`" />
diff --git a/src/modules/07_insignia/components/4_Allocate/listAllocate.vue b/src/modules/07_insignia/components/4_Allocate/listAllocate.vue index 269bcc7fb..32691aadd 100644 --- a/src/modules/07_insignia/components/4_Allocate/listAllocate.vue +++ b/src/modules/07_insignia/components/4_Allocate/listAllocate.vue @@ -56,7 +56,10 @@ const fecthRound = async () => { .get(config.API.noteround()) .then((res) => { let data = res.data.result; - selectRoundOption.value = data; + selectRoundOption.value = data.map((e: any) => ({ + name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543), + id: e.id, + })); selectRound.value = data[0].id; // console.log(selectRound.value); }) @@ -259,7 +262,6 @@ const resetFilter = () => {
รอบ
-
{ @update:emit-value="selectorRound" > -
{ > บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์ @@ -529,7 +530,7 @@ const resetFilter = () => { > บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์ @@ -661,7 +662,7 @@ const resetFilter = () => { > บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์ diff --git a/src/modules/07_insignia/components/5_Borrow/DialogForm.vue b/src/modules/07_insignia/components/5_Borrow/DialogForm.vue new file mode 100644 index 000000000..63c087465 --- /dev/null +++ b/src/modules/07_insignia/components/5_Borrow/DialogForm.vue @@ -0,0 +1,458 @@ + + + \ No newline at end of file diff --git a/src/modules/07_insignia/components/5_Borrow/Main.vue b/src/modules/07_insignia/components/5_Borrow/Main.vue index 876a0b4fd..809d47e18 100644 --- a/src/modules/07_insignia/components/5_Borrow/Main.vue +++ b/src/modules/07_insignia/components/5_Borrow/Main.vue @@ -6,8 +6,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useResultDataStore } from "@/modules/07_insignia/storeResult"; -import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue"; -import fileUploadview from "@/modules/07_insignia/components/3_result/fileUpload.vue"; +import DialogForm from "@/modules/07_insignia/components/5_Borrow/DialogForm.vue"; import type { OptionData } from "@/modules/07_insignia/interface/index/Main"; import type { QTableProps, QInput } from "quasar"; @@ -29,6 +28,8 @@ const tab = ref(""); const selectRound = ref(); const selectRoundOption = ref([]); +const selectRoundAllOption = ref([]); + const modal = ref(false); const action = ref(""); const personId = ref(); @@ -45,7 +46,21 @@ const fecthRound = async () => { .get(config.API.noteround()) .then((res) => { let data = res.data.result; - selectRoundOption.value = data; + selectRoundAllOption.value = [{ + name: "ทั้งหมด", + id: "all", + }] + data.map((e: any) => { + selectRoundOption.value = [...selectRoundOption.value, { + name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543), + id: e.id, + }] + + selectRoundAllOption.value = [...selectRoundAllOption.value, { + name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543), + id: e.id, + }] + }); selectRound.value = data[0].id; // console.log(selectRound.value); }) @@ -101,11 +116,20 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + // { + // name: "status", + // align: "left", + // label: "สถานะ", + // field: "status", + // sortable: true, + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, { - name: "status", + name: "citizenId", align: "left", - label: "สถานะ", - field: "status", + label: "เลขบัตรประชาชน", + field: "citizenId", sortable: true, sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), @@ -245,7 +269,7 @@ const fecthlistInsignia = async () => { citizenId: e.citizenId, prefix: e.prefix, position: e.position, - status: DataStore.status(e.status), + // status: DataStore.status(e.status), name: e.fullName, type: e.requestInsignia, employeeType: DataStore.profileType(e.profileType), @@ -336,48 +360,13 @@ const resetFilter = () => {