updated file & format
This commit is contained in:
parent
e3665bb444
commit
055a5c35b7
2 changed files with 13 additions and 49 deletions
|
|
@ -8,8 +8,6 @@ import { useRoute } from "vue-router";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useCommandMainStore } from "@/modules/18_command/store/Main";
|
||||
import { usePlacementDataStore } from "@/modules/05_placement/store";
|
||||
// import http from "@/plugins/http";
|
||||
// import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
||||
|
|
@ -24,20 +22,10 @@ const mixin = useCounterMixin();
|
|||
const route = useRoute();
|
||||
const DataStore = usePlacementDataStore();
|
||||
const storeCommand = useCommandMainStore();
|
||||
const {
|
||||
showLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
hideLoader,
|
||||
date2Thai,
|
||||
dateText,
|
||||
} = mixin;
|
||||
const { dialogConfirm, dateText } = mixin;
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
/** props */
|
||||
const props = defineProps({
|
||||
fetchData: Function,
|
||||
rows: Array,
|
||||
|
|
@ -170,9 +158,7 @@ function filterSelector(val: string, update: Function) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันยืนยันการออกคำสั่ง
|
||||
*/
|
||||
/** ฟังก์ชั่นยืนยันและส่งคนไปสร้างคำสั่ง */
|
||||
function saveOrder() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -185,6 +171,7 @@ function saveOrder() {
|
|||
);
|
||||
}
|
||||
|
||||
/** ฟังก์ชั่นสำหรับ filter รายการข้อมูลคนตามประเภทคำสั่งที่เลือก */
|
||||
function filterSelectOrder() {
|
||||
const data = props.rows ? props.rows : [];
|
||||
selected.value = [];
|
||||
|
|
@ -209,14 +196,14 @@ function filterSelectOrder() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ปิด Modal และล้างค่าที่เลือก */
|
||||
function closeModal() {
|
||||
modal.value = false;
|
||||
commandType.value = "";
|
||||
}
|
||||
/**
|
||||
* เมื่อ props.modal เป็น true
|
||||
*
|
||||
* กำหนดให้ selected เป็นค่าว่าง
|
||||
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
||||
*/
|
||||
watch(
|
||||
() => modal.value,
|
||||
|
|
@ -247,6 +234,7 @@ watch(
|
|||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="modal">
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
|
|
@ -472,11 +460,10 @@ watch(
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<!-- dialog สร้างคำสั่ง -->
|
||||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="'C-PM-01'"
|
||||
:persons-id="selected.map((r) => r.id)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
|
|
@ -16,16 +16,8 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const stroeCommand = useCommandMainStore();
|
||||
const { statusText } = useTransferDataStore();
|
||||
const {
|
||||
showLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
hideLoader,
|
||||
date2Thai,
|
||||
} = mixin;
|
||||
const { dialogConfirm, date2Thai } = mixin;
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
/**
|
||||
|
|
@ -127,7 +119,7 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
/**
|
||||
* ฟังก์ชันยืนยันการออกคำสั่ง
|
||||
* ฟังก์ชั่นยืนยันและส่งคนไปสร้างคำสั่ง
|
||||
*/
|
||||
function saveOrder() {
|
||||
dialogConfirm(
|
||||
|
|
@ -140,20 +132,6 @@ function saveOrder() {
|
|||
|
||||
modalCommand.value = true;
|
||||
modal.value = false;
|
||||
// showLoader();
|
||||
// await http
|
||||
// .post(config.API.transferReport, body)
|
||||
// .then(async () => {
|
||||
// await props.fetchData?.();
|
||||
// await success($q, "ส่งไปออกคำสั่งสำเร็จ");
|
||||
// props.closeModal?.();
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
},
|
||||
"ยืนยันส่งไปออกคำสั่ง",
|
||||
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
|
||||
|
|
@ -162,7 +140,6 @@ function saveOrder() {
|
|||
|
||||
/**
|
||||
* เมื่อ props.modal เป็น true
|
||||
*
|
||||
* กำหนดให้ selected เป็นค่าว่าง
|
||||
*/
|
||||
watch(
|
||||
|
|
@ -174,6 +151,7 @@ watch(
|
|||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="modal">
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
|
|
@ -283,11 +261,10 @@ watch(
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<!-- dialog สร้างคำสั่ง -->
|
||||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="'C-PM-13'"
|
||||
command-type-code="C-PM-13"
|
||||
:persons-id="selected.map((r) => r.id)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue