fix
This commit is contained in:
parent
3736aa7e80
commit
cedcbb0eaa
8 changed files with 102 additions and 111 deletions
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
FormData,
|
FormData,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/Complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
||||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
|
|
@ -163,16 +163,17 @@ const visibleColumns = ref<string[]>([
|
||||||
"organization",
|
"organization",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** ดึงข้อมูล */
|
/** ดึงข้อมูล */
|
||||||
async function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.complaintbyGetId(id.value, mainStore.pathComplaints(route.name as string))
|
config.API.complaintbyGetId(
|
||||||
|
id.value,
|
||||||
|
mainStore.pathComplaints(route.name as string)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const dataList = res.data.result;
|
const dataList = res.data.result;
|
||||||
data.id = dataList.id;
|
data.id = dataList.id;
|
||||||
data.respondentType = dataList.respondentType;
|
data.respondentType = dataList.respondentType;
|
||||||
|
|
@ -194,8 +195,7 @@ async function getData() {
|
||||||
data.result = dataList.result;
|
data.result = dataList.result;
|
||||||
data.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
data.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
||||||
data.activeId = dataList.activeId;
|
data.activeId = dataList.activeId;
|
||||||
|
await mainStore.fetchDataRowsSend(dataList.persons);
|
||||||
mainStore.fetchDataRowsSend(dataList.persons);
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -214,8 +214,8 @@ async function onSubmit(data: any) {
|
||||||
|
|
||||||
http
|
http
|
||||||
.put(config.API.complaintbyId(id.value), data)
|
.put(config.API.complaintbyId(id.value), data)
|
||||||
.then((res) => {
|
.then(async () => {
|
||||||
getData();
|
await getData();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -233,31 +233,28 @@ function sentInvestigate() {
|
||||||
} else {
|
} else {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => sentConfirmNoPerson(),
|
() => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.complaintApprove(id.value), {
|
||||||
|
persons: [],
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
router.push(`/discipline/complaints`);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
},
|
||||||
"ยืนยันส่งไปสืบสวน",
|
"ยืนยันส่งไปสืบสวน",
|
||||||
"ต้องการยืนยันยืนยันส่งไปสืบสวนใช่หรือไม่?"
|
"ต้องการยืนยันยืนยันส่งไปสืบสวนใช่หรือไม่?"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ส่งไปสืบสวน */
|
|
||||||
function sentConfirmNoPerson() {
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.put(config.API.complaintApprove(id.value), {
|
|
||||||
persons: [],
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
router.push(`/discipline/complaints`);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ปิด dialog */
|
/** ปิด dialog */
|
||||||
function closePopup() {
|
function closePopup() {
|
||||||
modalPopup.value = false;
|
modalPopup.value = false;
|
||||||
|
|
@ -267,7 +264,21 @@ function closePopup() {
|
||||||
function endInvestigate() {
|
function endInvestigate() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => confirmEndInvestigate(),
|
() => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.complaintReject(id.value))
|
||||||
|
.then(async () => {
|
||||||
|
await getData();
|
||||||
|
success($q, "ยุติเรื่องสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
},
|
||||||
"ยืนยันยุติเรื่อง",
|
"ยืนยันยุติเรื่อง",
|
||||||
"ต้องการยืนยันยุติเรื่องใช่หรือไม่?"
|
"ต้องการยืนยันยุติเรื่องใช่หรือไม่?"
|
||||||
);
|
);
|
||||||
|
|
@ -277,58 +288,38 @@ function endInvestigate() {
|
||||||
function cancelInvestigate() {
|
function cancelInvestigate() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => confirmCancelInvestigate(),
|
() => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.complaintResume(id.value))
|
||||||
|
.then(async () => {
|
||||||
|
await getData();
|
||||||
|
success($q, "ยกเลิกยุติเรื่องสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
},
|
||||||
"ยืนยันยกเลิกการยุติเรื่อง",
|
"ยืนยันยกเลิกการยุติเรื่อง",
|
||||||
"ต้องการยืนยันยกเลิกการยุติเรื่องใช่หรือไม่?"
|
"ต้องการยืนยันยกเลิกการยุติเรื่องใช่หรือไม่?"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังชั่น ยุติเรื่อง*/
|
|
||||||
function confirmEndInvestigate() {
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.get(config.API.complaintReject(id.value))
|
|
||||||
.then((res) => {
|
|
||||||
success($q, "ยุติเรื่องสำเร็จ");
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
await getData();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังชั่น ยกเลิกการยุติเรื่อง*/
|
|
||||||
function confirmCancelInvestigate() {
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.get(config.API.complaintResume(id.value))
|
|
||||||
.then((res) => {
|
|
||||||
getData();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
success($q, "ยกเลิกยุติเรื่องสำเร็จ");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ดึงข้อมูล จาก component เเล้ว update
|
* ดึงข้อมูล จาก component เเล้ว update
|
||||||
* @param data person data
|
* @param data person data
|
||||||
*/
|
*/
|
||||||
function sendPersonToNext(data: ArrayPerson[]) {
|
function sendPersonToNext(data: ArrayPerson[]) {
|
||||||
const dataMapId = data.map((item: ArrayPerson) => item.id);
|
const dataMapId = data.map((item: ArrayPerson) => item.id);
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.complaintApprove(id.value), {
|
.put(config.API.complaintApprove(id.value), {
|
||||||
persons: dataMapId,
|
persons: dataMapId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
router.push(`/discipline/complaints`);
|
router.push(`/discipline/complaints`);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -340,8 +331,8 @@ function sendPersonToNext(data: ArrayPerson[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getData();
|
await getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/Complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
|
|
@ -133,8 +133,6 @@ function onSubmit() {
|
||||||
if (mainStore.rowsAdd) {
|
if (mainStore.rowsAdd) {
|
||||||
formData.persons = await mainStore.rowsAdd;
|
formData.persons = await mainStore.rowsAdd;
|
||||||
}
|
}
|
||||||
console.log("formData===>", formData);
|
|
||||||
|
|
||||||
await props.onSubmit(formData);
|
await props.onSubmit(formData);
|
||||||
isSave.value = false;
|
isSave.value = false;
|
||||||
});
|
});
|
||||||
|
|
@ -156,9 +154,9 @@ function confirmDelete(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.delete(config.API.complaintFileDelete(formData.id, id))
|
.delete(config.API.complaintFileDelete(formData.id, id))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
|
await props.getData();
|
||||||
success($q, `ลบไฟล์สำเร็จ`);
|
success($q, `ลบไฟล์สำเร็จ`);
|
||||||
props.getData();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -184,18 +182,19 @@ function upLoadFileDoc() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.complaintFileUpload(formData.id), Data)
|
.put(config.API.complaintFileUpload(formData.id), Data)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
|
await props.getData();
|
||||||
countNum.value = 2;
|
countNum.value = 2;
|
||||||
formData.documentFile = null;
|
formData.documentFile = null;
|
||||||
hideLoader();
|
|
||||||
success($q, "อัพโหลดไฟล์สำเร็จ");
|
success($q, "อัพโหลดไฟล์สำเร็จ");
|
||||||
props.getData();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.finally(async () => {});
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -216,8 +215,8 @@ async function getActive() {
|
||||||
.get(config.API.activeOrganization)
|
.get(config.API.activeOrganization)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
|
await getOc(data.activeId);
|
||||||
formData.activeId = data.activeId;
|
formData.activeId = data.activeId;
|
||||||
getOc(data.activeId);
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -226,7 +225,7 @@ async function getActive() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
getOc(formData.activeId);
|
await getOc(formData.activeId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -382,9 +381,9 @@ watch(props.data, async () => {
|
||||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
mainStore.rowsAdd = [];
|
mainStore.rowsAdd = [];
|
||||||
getListChannel();
|
|
||||||
|
|
||||||
getActive();
|
getActive();
|
||||||
|
getListChannel();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
|
||||||
import type { ArrayPersonAdd } from "../../interface/response/Investigate";
|
import type { ArrayPersonAdd } from "../../interface/response/investigate";
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/Complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
|
|
@ -153,9 +153,9 @@ async function getDataComplaint() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ดึงข้อมูลรายละเอียด */
|
/** ดึงข้อมูลรายละเอียด */
|
||||||
function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.investigateByGetId(
|
config.API.investigateByGetId(
|
||||||
id.value,
|
id.value,
|
||||||
|
|
@ -206,14 +206,12 @@ function getData() {
|
||||||
* @param id ระบุ บุคคล
|
* @param id ระบุ บุคคล
|
||||||
*/
|
*/
|
||||||
async function onSubmit(data: any) {
|
async function onSubmit(data: any) {
|
||||||
// put
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.investigateById(id.value), data)
|
.put(config.API.investigateById(id.value), data)
|
||||||
.then(async (res) => {
|
.then(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
// router.push(`/discipline/complaints`);
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -245,7 +243,7 @@ function sentConfirmNoPerson() {
|
||||||
.put(config.API.investigateApprove(id.value), {
|
.put(config.API.investigateApprove(id.value), {
|
||||||
persons: [],
|
persons: [],
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
getData();
|
getData();
|
||||||
router.push(`/discipline/investigatefacts`);
|
router.push(`/discipline/investigatefacts`);
|
||||||
})
|
})
|
||||||
|
|
@ -344,10 +342,11 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getData();
|
|
||||||
if (store.tabMenu == "complaints") {
|
if (store.tabMenu == "complaints") {
|
||||||
getDataComplaint();
|
await Promise.all([getData(), getDataComplaint()]);
|
||||||
|
} else {
|
||||||
|
getData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -424,18 +423,19 @@ onMounted(() => {
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<PopupSendToNext
|
|
||||||
:modal="modalPopup"
|
|
||||||
:close="closePopup"
|
|
||||||
title="ส่งไปสอบสวน"
|
|
||||||
:rows="mainStore.rowsSend.filter((item: ArrayPersonAdd)=> item.isSend == 'NEW')"
|
|
||||||
:columns="mainStore.columnsDirector"
|
|
||||||
:visible-columns="mainStore.visibleColumnsDirector"
|
|
||||||
@return-person="emitPerson"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<PopupSendToNext
|
||||||
|
:modal="modalPopup"
|
||||||
|
:close="closePopup"
|
||||||
|
title="ส่งไปสอบสวน"
|
||||||
|
:rows="mainStore.rowsSend.filter((item: ArrayPersonAdd)=> item.isSend == 'NEW')"
|
||||||
|
:columns="mainStore.columnsDirector"
|
||||||
|
:visible-columns="mainStore.visibleColumnsDirector"
|
||||||
|
@return-person="emitPerson"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.q-tab-panel {
|
.q-tab-panel {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { useInvestigateDisStore } from "@/modules/11_discipline/store/Investigat
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||||
|
|
||||||
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
||||||
|
|
@ -327,8 +327,8 @@ async function getActive() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.activeOrganization)
|
.get(config.API.activeOrganization)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
getOc(res.data.result.activeId);
|
await getOc(res.data.result.activeId);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -677,6 +677,7 @@ watch(props.data, async () => {
|
||||||
posTypeName: person.posTypeName,
|
posTypeName: person.posTypeName,
|
||||||
posLevelId: person.posLevelId,
|
posLevelId: person.posLevelId,
|
||||||
posLevelName: person.posLevelName,
|
posLevelName: person.posLevelName,
|
||||||
|
citizenId: person.idcard,
|
||||||
}));
|
}));
|
||||||
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||||
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
|
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
|
||||||
|
|
@ -1723,7 +1724,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- อัพโหลดไฟล์ -->
|
<!-- อัพโหลดไฟล์ -->
|
||||||
|
|
||||||
<DialogDuty
|
<DialogDuty
|
||||||
:modal="modalEditDirector"
|
:modal="modalEditDirector"
|
||||||
:close-popup="closeEditDirector"
|
:close-popup="closeEditDirector"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { dialogConfirm, dialogMessageNotify } = mixin;
|
const { dialogConfirm, dialogMessageNotify } = mixin;
|
||||||
|
|
||||||
const rows = ref<any[]>([]);
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -50,7 +49,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const modalCommand = ref<boolean>(false);
|
const modalCommand = ref<boolean>(false);
|
||||||
const emit = defineEmits(["returnPerson"]);
|
const emit = defineEmits(["returnPerson"]);
|
||||||
const selected = ref<any>([]);
|
const selected = ref<any[]>([]);
|
||||||
const inspectionResults = ref<string>("");
|
const inspectionResults = ref<string>("");
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const initialPagination = ref<any>({
|
const initialPagination = ref<any>({
|
||||||
|
|
@ -208,7 +207,7 @@ watch(
|
||||||
<DialogCreateCommand
|
<DialogCreateCommand
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
:command-type-code="'C-PM-32'"
|
:command-type-code="'C-PM-32'"
|
||||||
:persons="selected"
|
:persons="selected"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ interface ArrayPerson {
|
||||||
interface ArrayPersonAdd {
|
interface ArrayPersonAdd {
|
||||||
personId: string; //id อ้างอิง profile
|
personId: string; //id อ้างอิง profile
|
||||||
idcard: string; //เลขประจำตัวประชาชน
|
idcard: string; //เลขประจำตัวประชาชน
|
||||||
|
citizenId: string;
|
||||||
isSend: string; //สถานะการส่งคนไป
|
isSend: string; //สถานะการส่งคนไป
|
||||||
prefix: string; //คำนำหน้า
|
prefix: string; //คำนำหน้า
|
||||||
firstName: string; //ชื่อ
|
firstName: string; //ชื่อ
|
||||||
|
|
|
||||||
|
|
@ -394,7 +394,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
* จัดเก็บข้อมูลไว้ เพื่อใช้ใน POPUP
|
* จัดเก็บข้อมูลไว้ เพื่อใช้ใน POPUP
|
||||||
* @param data ข้อมูลรายการบุคคล
|
* @param data ข้อมูลรายการบุคคล
|
||||||
*/
|
*/
|
||||||
function fetchData(data: ArrayPersonAdd[]) {
|
async function fetchData(data: ArrayPersonAdd[]) {
|
||||||
const dataList: any = data.map((item: any) => ({
|
const dataList: any = data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
idcard: item.idcard,
|
idcard: item.idcard,
|
||||||
|
|
@ -436,7 +436,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
* จัดเก็บข้อมูลไว้ เพื่อใช้ใน POPUP
|
* จัดเก็บข้อมูลไว้ เพื่อใช้ใน POPUP
|
||||||
* @param data ข้อมูลรายการบุคคล
|
* @param data ข้อมูลรายการบุคคล
|
||||||
*/
|
*/
|
||||||
function fetchDataRowsSend(data: ArrayPersonAdd[]) {
|
async function fetchDataRowsSend(data: ArrayPersonAdd[]) {
|
||||||
const dataList: any = data.map((item: any) => ({
|
const dataList: any = data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
idcard: item.idcard,
|
idcard: item.idcard,
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ function createCommand(isRedirect: boolean) {
|
||||||
commandTypeId: commandType.value,
|
commandTypeId: commandType.value,
|
||||||
persons: data,
|
persons: data,
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.command + `/person`, body)
|
.post(config.API.command + `/person`, body)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue