diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts
index 7ea4e0ae7..f0588c167 100644
--- a/src/api/05_placement/api.placement.ts
+++ b/src/api/05_placement/api.placement.ts
@@ -93,6 +93,7 @@ export default {
`${order}/order/attachment/file/${orderId}`,
orderReady: (id: string) => `${order}/order/ready/${id}`,
attachmentOrder: (orderId: string) => `${order}/order/attachment/${orderId}`,
+ searchOrderprofile: () => `${order}/order/search/profile/command`,
//receive ระบบรับโอน
receiveData: () => `${receive}`,
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue
index dc1117652..226e087e0 100644
--- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue
+++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue
@@ -1330,7 +1330,7 @@ const putformData = () => {
- ผู้บังคับบัญชาผู้มอบหมายงาน {{ commander.name }}
+ ผู้บังคับบัญชาผู้มอบหมายงาน
{
.then(async (res) => {
let data = res.data.result;
if (data.length !== 0) {
- await fecthInsigniaType();
selectRoundAllOption.value = [
{
name: "ทั้งหมด",
@@ -63,6 +62,9 @@ const fecthRound = async () => {
selectRound.value = data[0].id;
yearRound.value = data[0].year;
roundYear.value = data[0].year;
+ if (roundYear.value !== "") {
+ await fecthInsigniaType();
+ }
}
})
.catch((err) => {
@@ -381,7 +383,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
flat
bordered
class="col-12 q-my-md q-mt-sm rounded-borders"
- v-if="loadView == tr"
+ v-if="loadView == true"
>
{
{
diff --git a/src/modules/10_order/components/PopupHistory.vue b/src/modules/10_order/components/PopupHistory.vue
index 866f5adf3..400a1dd5d 100644
--- a/src/modules/10_order/components/PopupHistory.vue
+++ b/src/modules/10_order/components/PopupHistory.vue
@@ -21,15 +21,11 @@ const props = defineProps({
const OrderTypeOption = ref([]);
const modal = ref(false);
const employeeClass = ref("");
-const typeKeyword = ref("");
-const Keyword = ref("");
-const positionKeyword = ref("");
const reportType = ref("");
const reportYear = ref();
const reportNo = ref("");
-const positionOps = ref([]);
const columns = ref([
{
name: "no",
@@ -85,100 +81,52 @@ const clickOpenpopup = () => {
let currentDate = new Date();
let currentYear = currentDate.getFullYear();
reportYear.value = currentYear;
+ rows.value = [];
+ reportNo.value = "";
}
};
-
-// const fecthPositionOfficer = async () => {
-// await http
-// .get(config.API.listPositionPathHistory)
-// .then((res) => {
-// let data = res.data.result.items;
-// console.log(data);
-// positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name }));
-// options.value = positionOps.value;
-// })
-// .catch((err) => {
-// messageError($q, err);
-// });
-// };
-// const fetchPositionPerm = async () => {
-// await http
-// .get(config.API.listPositionEmployeePositionHistory)
-// .then((res) => {
-// let data = res.data.result.items;
-// positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name }));
-// options.value = positionOps.value;
-// })
-// .catch((err) => {
-// messageError($q, err);
-// });
-// };
-
-const clickSearch = async (type: string) => {
+const clickSearch = async () => {
await myForm.value!.validate().then((result: boolean) => {
if (result) {
- console.log(reportType.value);
- console.log(reportYear.value);
- console.log(reportNo.value);
- // showLoader();
- // let body = {};
- // if (typeKeyword.value === "no") {
- // Object.assign(body, {
- // posNo: Keyword.value,
- // });
- // } else if (typeKeyword.value === "position") {
- // Object.assign(body, {
- // positionId: positionKeyword.value,
- // });
- // }
- // http
- // .post(config.API.profileHistory(type), body)
- // .then((res) => {
- // let data = res.data.result;
- // if (data.length !== 0) {
- // rows.value = data.map((e: any) => ({
- // id: e.id,
- // citizenId: e.citizenId,
- // name: e.firstName + " " + e.lastName,
- // posNo: e.posNo,
- // position: e.position,
- // date: date2Thai(e.date),
- // }));
- // } else {
- // notifyError($q, "ไม่มีข้อมูลที่ต้องการค้นหา");
- // rows.value = [];
- // }
- // })
- // .catch((err) => {
- // messageError($q, err);
- // rows.value = [];
- // })
- // .finally(() => {
- // hideLoader();
- // });
+ let body = {
+ commandTypeId: reportType.value,
+ year: reportYear.value,
+ posno: reportNo.value,
+ };
+ // console.log(body);
+ showLoader();
+ http
+ .post(config.API.searchOrderprofile(), body)
+ .then((res) => {
+ let data = res.data.result;
+ console.log(data);
+
+ if (data.length !== 0) {
+ rows.value = data.map((e: any) => ({
+ id: e.id,
+ citizenId: e.citizenId,
+ name: e.fullName,
+ posNo: e.posNo,
+ position: e.position,
+ }));
+ } else {
+ notifyError($q, "ไม่มีข้อมูลที่ต้องการค้นหา");
+ rows.value = [];
+ }
+ })
+ .catch((err) => {
+ messageError($q, err);
+ rows.value = [];
+ })
+ .finally(() => {
+ hideLoader();
+ });
}
});
};
-// const options = ref([]);
-// const filterFn = (val: string, update: any) => {
-// if (val === "") {
-// update(() => {
-// options.value = OrderTypeOption.value;
-// });
-// return;
-// } else {
-// update(() => {
-// options.value = OrderTypeOption.value.filter(
-// (e: any) => e.name.search(val) !== -1
-// );
-// });
-// }
-// console.log(options.value);
-// };
const clickRedirect = (id: string) => {
router.push(`/registry/${id}`);
};
-
const paging = ref(true);
const pagination = ref({
sortBy: "citizenId",
@@ -302,7 +250,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
icon="mdi-magnify"
label="ค้นหา"
class="q-px-md"
- @click="clickSearch(employeeClass)"
+ @click="clickSearch"
/>