filter ==> คำสั่งและต้นแบบ
This commit is contained in:
parent
c4bcb0b755
commit
55ea7f7c5b
2 changed files with 6 additions and 32 deletions
|
|
@ -247,7 +247,6 @@ async function fetchDataCommandTypeId(id: string) {
|
||||||
*/
|
*/
|
||||||
function filterSelector(val: string, update: Function) {
|
function filterSelector(val: string, update: Function) {
|
||||||
update(() => {
|
update(() => {
|
||||||
category.value = val ? "" : category.value;
|
|
||||||
categoryOP.value = dataCategory.value.filter(
|
categoryOP.value = dataCategory.value.filter(
|
||||||
(v: DateOption) => v.name.indexOf(val) > -1
|
(v: DateOption) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
|
|
@ -281,13 +280,11 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
clearable
|
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
@clear="(keyword = ''), searchByStatus()"
|
|
||||||
@keydown.enter.prevent="searchByStatus()"
|
@keydown.enter.prevent="searchByStatus()"
|
||||||
>
|
>
|
||||||
<template v-slot:append v-if="keyword === ''">
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -475,6 +472,8 @@ onMounted(async () => {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
use-input
|
use-input
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
outlined
|
outlined
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกหมวดหมู่'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกหมวดหมู่'}`]"
|
||||||
|
|
@ -505,11 +504,7 @@ onMounted(async () => {
|
||||||
label="บัญชีแนบท้าย"
|
label="บัญชีแนบท้าย"
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
<q-checkbox v-model="isSalary" label="แก้ไขเงินเดือน" size="sm" />
|
||||||
v-model="isSalary"
|
|
||||||
label="แก้ไขเงินเดือน"
|
|
||||||
size="sm"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
|
||||||
|
|
@ -6,20 +6,17 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/modules/05_command/stores/main";
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
CommandSysType,
|
CommandSysType,
|
||||||
ListTemplateSalary,
|
ListTemplateSalary,
|
||||||
ActiveOptions,
|
|
||||||
} from "@/modules/05_command/interface/index/Main";
|
} from "@/modules/05_command/interface/index/Main";
|
||||||
|
|
||||||
import Header from "@/components/DialogHeader.vue";
|
import Header from "@/components/DialogHeader.vue";
|
||||||
import { options } from "@fullcalendar/core/preact";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useDataStore();
|
|
||||||
const {
|
const {
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
success,
|
success,
|
||||||
|
|
@ -42,16 +39,6 @@ const filter = ref<string>(""); // ตัวแปร ฟิลเตอร์
|
||||||
const listOrder = ref<CommandSysType[]>([]);
|
const listOrder = ref<CommandSysType[]>([]);
|
||||||
const activeOrderId = ref<string>(""); // ตัวแปรเก็บ id เพื่อเอาไป = class
|
const activeOrderId = ref<string>(""); // ตัวแปรเก็บ id เพื่อเอาไป = class
|
||||||
const isActive = ref<boolean>(true); // สถานะการใช้งาน
|
const isActive = ref<boolean>(true); // สถานะการใช้งาน
|
||||||
const isActiveOption = ref<ActiveOptions[]>([
|
|
||||||
{
|
|
||||||
value: true,
|
|
||||||
label: "ใช้งาน",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: false,
|
|
||||||
label: "ไม่ได้ใช้งาน",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const dataForm = reactive<ListTemplateSalary>({
|
const dataForm = reactive<ListTemplateSalary>({
|
||||||
id: "",
|
id: "",
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -139,7 +126,6 @@ function closeDialog() {
|
||||||
dataForm.id = "";
|
dataForm.id = "";
|
||||||
dataForm.name = "";
|
dataForm.name = "";
|
||||||
dataForm.isActive = false;
|
dataForm.isActive = false;
|
||||||
|
|
||||||
isEdit.value = false;
|
isEdit.value = false;
|
||||||
dialogForm.value = false;
|
dialogForm.value = false;
|
||||||
}
|
}
|
||||||
|
|
@ -323,20 +309,13 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
|
||||||
outlined
|
outlined
|
||||||
v-model="filter"
|
v-model="filter"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
@keydown.enter="(pagination.page = 1), fetchSalaryList()"
|
@keydown.enter="(pagination.page = 1), fetchSalaryList()"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" v-if="filter == ''" />
|
<q-icon name="search" />
|
||||||
<q-icon
|
|
||||||
name="clear"
|
|
||||||
v-else
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="filter = ''"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue