Merge branch 'nice' into develop
This commit is contained in:
commit
b36856f0dd
3 changed files with 14 additions and 14 deletions
|
|
@ -358,7 +358,6 @@ export const useTransferDataStore = defineStore("transferDataStore", () => {
|
|||
value: "ออกคำสั่งเสร็จแล้ว",
|
||||
},
|
||||
]);
|
||||
const statusOp = ref<DataOptions[]>([]);
|
||||
const statusMainOp = ref<DataOptions[]>([
|
||||
{ id: "WAITTING", name: "รอดำเนินการ" },
|
||||
{ id: "PENDING", name: "เลือกตำแหน่งแล้ว" },
|
||||
|
|
@ -367,6 +366,7 @@ export const useTransferDataStore = defineStore("transferDataStore", () => {
|
|||
{ id: "REPORT", name: "ส่งรายชื่อไปออกคำสั่ง" },
|
||||
{ id: "DONE", name: "ออกคำสั่งเสร็จแล้ว" },
|
||||
]);
|
||||
const statusOp = ref<DataOptions[]>(statusMainOp.value);
|
||||
|
||||
const statusText = (val: string) => {
|
||||
switch (val) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||
|
||||
import type { DataOption } from "@/modules/06_retirement/interface/index/Main";
|
||||
import type { ResponseData } from "@/modules/06_retirement/interface/response/out";
|
||||
|
||||
import DialogSendToCommand from "@/modules/06_retirement/components/06_dismissOrder/DialogSendToCommand.vue";
|
||||
|
|
@ -46,7 +47,6 @@ const visibleColumns = ref<string[]>([
|
|||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const rows = ref<ResponseData[]>([]);
|
||||
|
|
@ -157,11 +157,12 @@ async function getData() {
|
|||
showLoader();
|
||||
await http
|
||||
.get(config.API.retirementOut + `/officer?status=${status.value}`)
|
||||
.then((res: any) => {
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
rows.value = data;
|
||||
rowsData.value = data;
|
||||
filters.value = data;
|
||||
onSearch();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -223,7 +224,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
dense
|
||||
label="สถานะ"
|
||||
:options="store.statusOp.filter((item:any)=> item.id !== 'PENDING')"
|
||||
:options="store.statusOp.filter((item:DataOption)=> item.id !== 'PENDING')"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
|
|
@ -232,7 +233,7 @@ onMounted(async () => {
|
|||
use-input
|
||||
hide-selected
|
||||
bg-color="white"
|
||||
@filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) "
|
||||
@filter="(inputValue:string,doneFn:Function) => filterOption(inputValue, doneFn) "
|
||||
@update:model-value="(value:string)=>{(status = value),getData()}"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
|
|
@ -270,7 +271,6 @@ onMounted(async () => {
|
|||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter="onSearch"
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||
|
||||
import type { DataOption } from "@/modules/06_retirement/interface/index/Main";
|
||||
import type { ResponseData } from "@/modules/06_retirement/interface/response/out";
|
||||
|
||||
import DialogSendToCommand from "@/modules/06_retirement/components/06_dismissOrder/DialogSendToCommandEmp.vue";
|
||||
|
|
@ -46,7 +47,6 @@ const visibleColumns = ref<string[]>([
|
|||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const rows = ref<ResponseData[]>([]);
|
||||
|
|
@ -157,18 +157,19 @@ async function getData() {
|
|||
showLoader();
|
||||
await http
|
||||
.get(config.API.retirementOut + `/employee?status=${status.value}`)
|
||||
.then((res: any) => {
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
rows.value = data;
|
||||
rowsData.value = data;
|
||||
filters.value = data;
|
||||
hideLoader();
|
||||
onSearch();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
async function clickDelete(id: string) {
|
||||
|
|
@ -225,7 +226,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
dense
|
||||
label="สถานะ"
|
||||
:options="store.statusOp.filter((item:any)=> item.id !== 'PENDING')"
|
||||
:options="store.statusOp.filter((item:DataOption)=> item.id !== 'PENDING')"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
|
|
@ -234,7 +235,7 @@ onMounted(async () => {
|
|||
use-input
|
||||
hide-selected
|
||||
bg-color="white"
|
||||
@filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) "
|
||||
@filter="(inputValue:string,doneFn:Function) => filterOption(inputValue, doneFn) "
|
||||
@update:model-value="(value:string)=>{(status = value),getData()}"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
|
|
@ -272,7 +273,6 @@ onMounted(async () => {
|
|||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter="onSearch"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue