@@ -496,15 +488,6 @@ const getClass = (val: boolean) => {
{{ title.fullname }}
-
@@ -599,18 +582,14 @@ const getClass = (val: boolean) => {
@update:model-value="changeCardID"
lazy-rules
:rules="[
- (val:string) => !!val || `${'กรุณากรอก เลขประจำตัวประชาชน'}`,
- (val:string) =>
- val.length >= 13 ||
- `${'กรุณากรอกเลขประจำตัวประชาชนให้ครบ'}`,
- ]"
+ (val:string) => !!val || `${'กรุณากรอก เลขประจำตัวประชาชน'}`,
+ (val:string) => val.length >= 13 || `${'กรุณากรอกเลขประจำตัวประชาชนให้ครบ'}`,]"
:readonly="!edit"
:borderless="!edit"
label="เลขประจำตัวประชาชน"
maxlength="13"
mask="#############"
/>
-
{
:label="`${'คำนำหน้าชื่อ'}`"
use-input
input-debounce="0"
- @filter="(inputValue:any,
- doneFn:Function) => filterSelector(inputValue, doneFn,'prefixOps'
- ) "
+ @filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'prefixOps' ) "
/>
-
{
use-input
input-debounce="0"
:rules="[(val:string) => !!val || `${'กรุณาเลือก เพศ'}`]"
- @filter="(inputValue:any,
- doneFn:Function) => filterSelector(inputValue, doneFn,'genderOps'
- ) "
+ @filter="(inputValue:any,doneFn:Function) => filterSelector(inputValue, doneFn,'genderOps') "
/>
@@ -774,9 +748,7 @@ const getClass = (val: boolean) => {
use-input
input-debounce="0"
:rules="[(val:string) => !!val || `${'กรุณาเลือก สถานภาพ'}`]"
- @filter="(inputValue:any,
- doneFn:Function) => filterSelector(inputValue, doneFn,'statusOps'
- ) "
+ @filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'statusOps' ) "
/>
@@ -897,10 +869,7 @@ const getClass = (val: boolean) => {
:label="`${'ประเภทการจ้าง'}`"
use-input
input-debounce="0"
- @filter="(inputValue:any,
- doneFn:Function) => filterSelector(inputValue, doneFn,'employeeTypeOps'
- ) "
- />
+ @filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'employeeTypeOps' ) " />
{
:label="`${'ประเภทลูกจ้าง'}`"
use-input
input-debounce="0"
- @filter="(inputValue:any,
- doneFn:Function) => filterSelector(inputValue, doneFn,'employeeClassOps'
- ) "
- />
+ @filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'employeeClassOps' ) " />
@@ -1009,19 +975,6 @@ const getClass = (val: boolean) => {
/>
-
("");
const $q = useQuasar();
const router = useRouter();
+const rows2 = ref([]);
+const modal = ref(false);
+const modalupload = ref(false);
+const modalTree = ref(false);
+const myForm = ref();
+const personal = ref([]);
+const personalId = ref("");
+const filterKeyword = ref("");
+const filterKeyword2 = ref("");
+const filterRef = ref(null);
+const files = ref();
+const listRecevice = ref([]);
+const filters = ref([]);
+const rows = ref([]);
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
const transferStore = useTransferDataStore();
const { statusText } = transferStore;
const {
showLoader,
hideLoader,
- dialogMessage,
success,
messageError,
date2Thai,
dialogRemove,
} = mixin;
-const selected = ref([]);
-
-const modal = ref(false);
const popup = () => {
const row = filters.value.filter(
(r: ResponseRow) =>
@@ -48,12 +57,7 @@ const popup = () => {
rows2.value = row;
modal.value = true;
};
-
-const modalupload = ref(false);
-
-const modalTree = ref(false);
-const personal = ref([]);
-const personalId = ref("");
+//คอลัม
const visibleColumns = ref([
"no",
"citizenId",
@@ -63,51 +67,7 @@ const visibleColumns = ref([
"dateText",
"statusText",
]);
-
-const visibleColumns2 = ref([
- "no",
- "citizenId",
- "fullname",
- "organizationName",
- "birthday",
- "dateText",
- "statusText",
-]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
-const filterKeyword = ref("");
-const filterKeyword2 = ref("");
-const filterRef = ref(null);
-const files = ref();
-const nameFile = ref("");
-const fileUpload = ref([]);
-const fileDocDataUpload = ref([]);
-const listRecevice = ref([]);
-const filters = ref([]);
-const rows = ref([
- // {
- // personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
- // citizenId: "1234444332222",
- // fullname: "นางสาวอย พชช",
- // organizationName: "นักจัดการงานทั่วไป",
- // orgName: "กลุ่มงานช่วยนักบริหาร",
- // organizationShortName: "สกจ.",
- // positionNumber: "กก. 1",
- // positionPath: "นักจัดการงานทั่วไป",
- // birthday: dateText(new Date("1989-09-03")),
- // },
-]);
-const rows2 = ref([
- // {
- // personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
- // citizenId: "1234444332222",
- // fullname: "นางสาวอย พชช",
- // organizationName: "นักจัดการงานทั่วไป",
- // orgName: "กลุ่มงานช่วยนักบริหาร",
- // organizationShortName: "สกจ.",
- // positionNumber: "กก. 1",
- // positionPath: "นักจัดการงานทั่วไป",
- // birthday: dateText(new Date("1989-09-03")),
- // },
-]);
+// หัวตาราง
const columns = ref([
{
name: "no",
@@ -186,91 +146,8 @@ const columns = ref([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
-const columns2 = ref([
- {
- name: "no",
- align: "left",
- label: "ลำดับ",
- sortable: false,
- field: "no",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
- },
- {
- name: "citizenId",
- align: "left",
- label: "เลขประจำตัวประชาชน",
- sortable: true,
- field: "citizenId",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
- },
- {
- name: "fullname",
- align: "left",
- label: "ชื่อ-นามสกุล",
- sortable: true,
- field: "fullname",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
- },
- {
- name: "organizationName",
- align: "left",
- label: "หน่วยงานที่รับโอน",
- sortable: true,
- field: "organizationName",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
- },
- {
- name: "birthday",
- align: "left",
- label: "วัน/เดือน/ปี เกิด",
- sortable: true,
- field: "birthday",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
- },
- {
- name: "dateText",
- align: "left",
- label: "วันที่ดำเนินการ",
- sortable: true,
- field: "dateText",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
- sortOrder: "da",
- },
- {
- name: "statusText",
- align: "left",
- label: "สถานะ",
- sortable: true,
- field: "statusText",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
- },
-]);
-onMounted(() => {
- fecthlistRecevice();
-});
-const myForm = ref();
+ //save file
const SaveData = async () => {
myForm.value.validate().then((result: boolean) => {
if (result) {
@@ -299,7 +176,6 @@ const fecthlistRecevice = async () => {
.then((res: any) => {
const response = res.data.result;
listRecevice.value = response;
- // console.log(response);
let list: ResponseRow[] = [];
response.map((e: ResponseData) => {
list.push({
@@ -337,76 +213,42 @@ const fecthlistRecevice = async () => {
});
};
-// const fileUploadDoc = async (val: any) => {
-// nameFile.value = val[0].name;
-// fileUpload.value = val;
-// };
-
-// const addUpload = async () => {
-// if (fileUpload.value.length > 0) {
-// const blob = fileUpload.value.slice(0, fileUpload.value[0].size);
-// const newFile = new File(blob, nameFile.value, {
-// type: fileUpload.value[0].type,
-// });
-// const formData = new FormData();
-// formData.append("", newFile);
-// showLoader();
-// await http
-// .put(config.API.receiveFile(personalId.value), formData)
-// .then(() => {
-// success($q, "บันทึกข้อมูลสำเร็จ");
-// })
-// .catch((e) => {
-// messageError($q, e);
-// })
-// .finally(async () => {
-// hideLoader();
-// });
-// }
-// };
-
+// รีเซ็ตค่าในฟิลเตอร์
const resetFilter = () => {
filterKeyword.value = "";
filterKeyword2.value = "";
filterRef.value.focus();
};
-
-const checkSelected = computed(() => {
- if (selected.value.length === 0) {
- return true;
- }
-});
-
+// ไปหน้าเพิ่มข้อมูล
const add = () => {
router.push(`/receive/add`);
};
-
+// ปิดโมเดล
const clickClose = () => {
modal.value = false;
+ filterKeyword2.value = "";
};
+// ปิดโมเดลอัปเดตไฟล์
const clickCloseUpload = () => {
modalupload.value = false;
files.value = null
};
-
+// ปิดโมเดลโครงสร้าง
const openModalTree = (id: string) => {
personalId.value = id;
- console.log(personalId.value);
-
personal.value = listRecevice.value.filter((e: any) => e.id === id);
modalTree.value = true;
};
-
+// เปิดโมเดลไฟล์
const openUpload = (id: string) => {
personalId.value = id;
modalupload.value = true;
- console.log(personalId.value);
};
-
+// ยินยันลบ
const openDelete = (id: string) => {
dialogRemove($q, async () => await fetchDataDelete(id));
};
-
+// ลบข้อมูล
const fetchDataDelete = async (id: string) => {
showLoader();
await http
@@ -423,41 +265,22 @@ const fetchDataDelete = async (id: string) => {
});
};
+// เปิดโมเดล โครงสร้าง
const closeModalTree = async () => {
await fecthlistRecevice();
modalTree.value = false;
};
+// ไปหน้ารายละเอียด
const nextPage = (row: any) => {
router.push({
path: `/receive/${row.personalId}`,
});
};
-const saveOrder = async () => {
- const id = selected.value.map((r: any) => r.personalId);
- const body = {
- id,
- };
-
- showLoader();
- await http
- .post(config.API.receiveReport, body)
- .then((res: any) => {
- // const data = res.data.result;
- // console.log(data);
- success($q, "ส่งไปออกคำสั่งรับโอนสำเร็จ");
- clickClose();
- })
- .catch((e) => {
- messageError($q, e);
- })
- .finally(async () => {
- await fecthlistRecevice();
- hideLoader();
-
- });
-};
+onMounted(() => {
+ fecthlistRecevice();
+});
รายการรับโอน
@@ -469,65 +292,26 @@ const saveOrder = async () => {
เพิ่มข้อมูล
-
-
+
ส่งไปออกคำสั่งรับโอน
-
-
+
-
+
-
-
+
-
+
@@ -541,53 +325,22 @@ const saveOrder = async () => {
{{ props.rowIndex + 1 }}
-
+
{{ props.row.citizenId }}
-
+
{{ props.row.fullname }}
-
-
+
+
- {{
- props.row.orgName !== null ? props.row.orgName : "-"
- }}
- {{
- props.row.organizationShortName !== null
- ? `(${props.row.organizationShortName})`
- : ""
- }}
+ {{ props.row.orgName !== null ? props.row.orgName : "-" }}
+ {{ props.row.organizationShortName !== null ? `(${props.row.organizationShortName})` : "" }}
- {{
- props.row.positionPath !== null
- ? props.row.positionPath
- : "-"
- }}
- {{
- props.row.positionNumber !== null
- ? `(${props.row.positionNumber})`
- : ""
- }}
+ {{ props.row.positionPath !== null ? props.row.positionPath : "-" }}
+ {{ props.row.positionNumber !== null ? `(${props.row.positionNumber})` : "" }}
@@ -597,119 +350,46 @@ const saveOrder = async () => {
-
+
{{ props.row.birthday }}
-
+
{{ props.row.dateText }}
-
+
{{ props.row.statusText }}
-
-
+
+
-
-
-
+
+
+
เลือกหน่วยงานที่รับโอน
-
-
-
+
+
+
อัปโหลดเอกสาร
-
-
+
+
ลบข้อมูล
@@ -728,166 +408,14 @@ const saveOrder = async () => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ props.rowIndex + 1 }}
-
-
- {{ props.row.citizenId }}
-
-
- {{ props.row.fullname }}
-
-
-
-
-
- {{ props.row.orgName !== null ? props.row.orgName : "-" }}
- {{
- props.row.organizationShortName !== null
- ? `(${props.row.organizationShortName})`
- : ""
- }}
-
-
- {{
- props.row.positionPath !== null
- ? props.row.positionPath
- : "-"
- }}
- {{
- props.row.positionNumber !== null
- ? `(${props.row.positionNumber})`
- : ""
- }}
-
-
-
-
-
-
- {{ props.row.birthday }}
-
-
- {{ props.row.dateText }}
-
-
- {{ props.row.statusText }}
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -895,19 +423,10 @@ const saveOrder = async () => {
-
+
-
@@ -916,13 +435,7 @@ const saveOrder = async () => {
-
+
บันทึก
@@ -935,6 +448,5 @@ const saveOrder = async () => {
:personal="personal"
:personalId="personalId"
/>
-
diff --git a/src/modules/05_placement/components/Receive/receiveModal.vue b/src/modules/05_placement/components/Receive/receiveModal.vue
index 77ee4f06c..cc3bc1734 100644
--- a/src/modules/05_placement/components/Receive/receiveModal.vue
+++ b/src/modules/05_placement/components/Receive/receiveModal.vue
@@ -1,9 +1,10 @@
@@ -480,10 +413,6 @@ function findByPerson(element: any): any {
{{ prop.node.organizationName }}
-
-
-
@@ -719,55 +647,6 @@ function findByPerson(element: any): any {
map-options
/>
-
-
-
-
-
-
@@ -801,6 +680,5 @@ function findByPerson(element: any): any {
background: #a3d3fb48 !important;
font-weight: 600;
border: 1px solid rgba(175, 185, 196, 0.217);
- /* box-shadow: 1px 1px 7px 1px rgba(41, 95, 255, 0.15) !important; */
}