diff --git a/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue b/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue index 9209b125c..d74a64938 100644 --- a/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue +++ b/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue @@ -21,6 +21,7 @@ import DialogHeader from "@/components/DialogHeader.vue"; import http from "@/plugins/http"; import config from "@/app.config"; +const type = ref(""); const rows = ref([]) const $q = useQuasar(); const selected = ref([]); @@ -53,8 +54,6 @@ const props = defineProps({ getData: Function, rows2: Array, filterKeyword2: String, - - type: String, }); const checkSelected = computed(() => { @@ -65,7 +64,7 @@ const checkSelected = computed(() => { //popup ยืนยันส่งัว const saveOrder = () => { - if (props.type) { + if (type.value) { dialogConfirm( $q, () => Ordersave(), @@ -85,7 +84,7 @@ const Ordersave = async () => { console.log(body); showLoader(); await http - .put(config.API.reportresult(props.type as string), body) + .put(config.API.reportresult(type.value as string), body) .then((res: any) => { success($q, "ส่งไปออกคำสั่งสำเร็จ"); props.closeModal?.(); @@ -141,6 +140,7 @@ const fecthTypeOption = async () => { watchEffect(() => { if (props.Modal === true) { selected.value = []; + type.value = '' // console.log(props.data.status) rows.value = props.data.persons.filter((item: any) => item.status !== 'REPORT'); } @@ -162,8 +162,7 @@ onMounted(async () => { (route.params.id as string); -const type = ref(""); + /** * บันทึกข้อมูลที่เเก้ไข @@ -46,7 +46,6 @@ function closeModal() { modal.value = false; } -function getData() {} /** ยืนยัน ส่งไปออกคำสั่ง */ function sentIssue() { @@ -335,8 +334,7 @@ watch( :visibleColumns="mainStore.visibleColumnsDirector" :data="dataResult" v-model:filterKeyword2="filterKeyword" - :getData="getData" - v-model:type="type" + :getData="fetchDetailResult" /> diff --git a/src/modules/11_discipline/store/ResultStore.ts b/src/modules/11_discipline/store/ResultStore.ts index d9f389d04..9b5343e87 100644 --- a/src/modules/11_discipline/store/ResultStore.ts +++ b/src/modules/11_discipline/store/ResultStore.ts @@ -99,7 +99,7 @@ export const useDisciplineResultStore = defineStore( { name: "title", align: "left", - label: "เรื่อง", + label: "เรื่องร้องเรียน", sortable: true, field: "title", headerStyle: "font-size: 14px",