fix
This commit is contained in:
parent
3736aa7e80
commit
cedcbb0eaa
8 changed files with 102 additions and 111 deletions
|
|
@ -9,13 +9,13 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||
|
||||
import type { ArrayPersonAdd } from "../../interface/response/Investigate";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||
import type { ArrayPersonAdd } from "../../interface/response/investigate";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type {
|
||||
FormData as FormDataComplaint,
|
||||
ArrayPerson,
|
||||
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 FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
|
|
@ -153,9 +153,9 @@ async function getDataComplaint() {
|
|||
}
|
||||
|
||||
/** ดึงข้อมูลรายละเอียด */
|
||||
function getData() {
|
||||
async function getData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(
|
||||
config.API.investigateByGetId(
|
||||
id.value,
|
||||
|
|
@ -206,14 +206,12 @@ function getData() {
|
|||
* @param id ระบุ บุคคล
|
||||
*/
|
||||
async function onSubmit(data: any) {
|
||||
// put
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.investigateById(id.value), data)
|
||||
.then(async (res) => {
|
||||
.then(async () => {
|
||||
await getData();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// router.push(`/discipline/complaints`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -245,7 +243,7 @@ function sentConfirmNoPerson() {
|
|||
.put(config.API.investigateApprove(id.value), {
|
||||
persons: [],
|
||||
})
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
getData();
|
||||
router.push(`/discipline/investigatefacts`);
|
||||
})
|
||||
|
|
@ -344,10 +342,11 @@ watch(
|
|||
);
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
getData();
|
||||
onMounted(async () => {
|
||||
if (store.tabMenu == "complaints") {
|
||||
getDataComplaint();
|
||||
await Promise.all([getData(), getDataComplaint()]);
|
||||
} else {
|
||||
getData();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -424,18 +423,19 @@ onMounted(() => {
|
|||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</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>
|
||||
|
||||
<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>
|
||||
|
||||
<style scoped>
|
||||
.q-tab-panel {
|
||||
padding: 0;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { useInvestigateDisStore } from "@/modules/11_discipline/store/Investigat
|
|||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
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 CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
||||
|
|
@ -327,8 +327,8 @@ async function getActive() {
|
|||
showLoader();
|
||||
await http
|
||||
.get(config.API.activeOrganization)
|
||||
.then((res) => {
|
||||
getOc(res.data.result.activeId);
|
||||
.then(async (res) => {
|
||||
await getOc(res.data.result.activeId);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -677,6 +677,7 @@ watch(props.data, async () => {
|
|||
posTypeName: person.posTypeName,
|
||||
posLevelId: person.posLevelId,
|
||||
posLevelName: person.posLevelName,
|
||||
citizenId: person.idcard,
|
||||
}));
|
||||
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
|
||||
|
|
@ -1723,7 +1724,6 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
|
||||
<DialogDuty
|
||||
:modal="modalEditDirector"
|
||||
:close-popup="closeEditDirector"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue