ui รายการลาออก
This commit is contained in:
parent
d08dbd9528
commit
8d8ba07217
12 changed files with 1497 additions and 463 deletions
32
src/modules/06_retirement/store/Main.ts
Normal file
32
src/modules/06_retirement/store/Main.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { defineStore } from "pinia";
|
||||
|
||||
export const useRetirementDataStore = defineStore("retirement", () => {
|
||||
const statusText = (val: string) => {
|
||||
switch (val) {
|
||||
case "WAITTING":
|
||||
return "รอดำเนินการ";
|
||||
case "PENDING":
|
||||
return "เลือกตำแหน่งแล้ว";
|
||||
case "APPROVE":
|
||||
return "อนุมัติ";
|
||||
case "REJECT":
|
||||
return "ไม่อนุมัติ";
|
||||
case "REPORT":
|
||||
return "ส่งรายชื่อไปออกคำสั่ง";
|
||||
case "DONE":
|
||||
return "ออกคำสั่งเสร็จแล้ว";
|
||||
case "DONECANCEL":
|
||||
return "ยกเลิกการลาออก";
|
||||
case "CANCEL":
|
||||
return "ยกเลิกการลาออก";
|
||||
case "DONEREJECT":
|
||||
return "ออกคำสั่งยกเลิกลาออกเสร็จแล้ว";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
statusText,
|
||||
};
|
||||
});
|
||||
60
src/modules/06_retirement/store/resignMain.ts
Normal file
60
src/modules/06_retirement/store/resignMain.ts
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref, computed, reactive, watch } from "vue";
|
||||
|
||||
export const useDataStore = defineStore("resign", () => {
|
||||
const mainTabs = ref<string>("1");
|
||||
const baseOptionStatus = ref<any[]>([
|
||||
{
|
||||
name: "รอดำเนินการ",
|
||||
value: "WAITTING",
|
||||
group: "1",
|
||||
},
|
||||
{
|
||||
name: "ส่งรายชื่อไปออกคำสั่ง",
|
||||
value: "REPORT",
|
||||
group: "1",
|
||||
},
|
||||
{
|
||||
name: "ออกคำสั่งเสร็จแล้ว",
|
||||
value: "DONE",
|
||||
group: "1",
|
||||
},
|
||||
{
|
||||
name: "ยกเลิกการลาออก",
|
||||
value: "CANCEL",
|
||||
group: "2",
|
||||
},
|
||||
{
|
||||
name: "รอดำเนินการ",
|
||||
value: "DONECANCEL",
|
||||
group: "2",
|
||||
},
|
||||
{
|
||||
name: "ส่งรายชื่อไปออกคำสั่ง",
|
||||
value: "CANCEL",
|
||||
group: "2",
|
||||
},
|
||||
{
|
||||
name: "ออกคำสั่งยกเลิกลาออกเสร็จแล้ว",
|
||||
value: "DONEREJECT",
|
||||
group: "2",
|
||||
},
|
||||
]);
|
||||
|
||||
const formQurey = reactive({
|
||||
status: "WAITTING",
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
const optionStatus = computed(() => {
|
||||
return baseOptionStatus.value.filter(
|
||||
(option) => option.group === mainTabs.value
|
||||
);
|
||||
});
|
||||
|
||||
watch(mainTabs, (val) => {
|
||||
formQurey.status = val === "1" ? "WAITTING" : "DONECANCEL";
|
||||
});
|
||||
|
||||
return { mainTabs, formQurey, optionStatus };
|
||||
});
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { reactive } from "vue";
|
||||
import type { Questions } from "@/modules/06_retirement/interface/index/ExitInterviewQuestion";
|
||||
|
||||
export const useExitInterviewQuestionDataStore = defineStore(
|
||||
"exitInterviewQuestion",
|
||||
() => {
|
||||
const question = reactive<Questions[]>([
|
||||
{
|
||||
no: 1,
|
||||
desc: "เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร (เลือกได้มากกว่า 1 ข้อ)",
|
||||
score: 5,
|
||||
},
|
||||
]);
|
||||
|
||||
return {
|
||||
question,
|
||||
};
|
||||
}
|
||||
);
|
||||
19
src/modules/06_retirement/store/storeRetirement.ts
Normal file
19
src/modules/06_retirement/store/storeRetirement.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
export const useDataStoreRetirement = defineStore("retirementDatastore", () => {
|
||||
const taboption = ref<any>([
|
||||
{ name: "officer", id: "officer", label: "ขรก.กทม.สามัญ" },
|
||||
{ name: "employee", id: "employee", label: "ลูกจ้างประจำ" },
|
||||
]);
|
||||
const tab = ref<any>("officer");
|
||||
const type = ref<string>("officer");
|
||||
const clickTab = (role: string) => {
|
||||
type.value = role;
|
||||
};
|
||||
return {
|
||||
tab,
|
||||
type,
|
||||
clickTab,
|
||||
taboption,
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue