Merge pull request #1470 from Frappet/fix/commandYear
fix(command):queryParams.year :newDate().getFullYear()
This commit is contained in:
commit
5840d78dff
12 changed files with 21 additions and 22 deletions
|
|
@ -1154,7 +1154,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
<label class="col-1 flex justify-center items-center">/</label>
|
||||
<div class="col-5">
|
||||
<!-- :rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]" -->
|
||||
<!-- :rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']" -->
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formData.commandYear"
|
||||
|
|
@ -1178,7 +1178,7 @@ onMounted(async () => {
|
|||
? null
|
||||
: formData.commandYear + 543
|
||||
"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
label="ปี พ.ศ."
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -1118,7 +1118,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
<label class="col-1 flex justify-center items-center">/</label>
|
||||
<div class="col-5">
|
||||
<!-- :rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]" -->
|
||||
<!-- :rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']" -->
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formData.commandYear"
|
||||
|
|
@ -1142,7 +1142,7 @@ onMounted(async () => {
|
|||
? null
|
||||
: formData.commandYear + 543
|
||||
"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
label="ปี พ.ศ."
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -253,8 +253,8 @@ function classInput(val: boolean) {
|
|||
? null
|
||||
: formData.commandYear + 543
|
||||
"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
:rules="isAddPosition ? [(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`] : []"
|
||||
label="ปี พ.ศ."
|
||||
:rules="isAddPosition ? [(val:string) => !!val || 'กรุณากรอกปี พ.ศ.'] : []"
|
||||
clearable
|
||||
@clear="formData.commandYear = null"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1112,7 +1112,7 @@ onMounted(async () => {
|
|||
? null
|
||||
: formData.commandYear + 543
|
||||
"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
label="ปี พ.ศ."
|
||||
clearable
|
||||
@clear="formData.commandYear = null"
|
||||
@update:model-value="onUpdateData"
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
hide-bottom-space
|
||||
:model-value="year === null ? 'ทั้งหมด' : Number(year) + 543"
|
||||
:label="`${'ปีพ.ศ.'}`"
|
||||
:label="`${'ปี พ.ศ.'}`"
|
||||
>
|
||||
</q-input>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ onMounted(async () => {
|
|||
:model-value="
|
||||
fiscalyear === null ? 'ทั้งหมด' : Number(fiscalyear) + 543
|
||||
"
|
||||
:label="`${'ปีพ.ศ.'}`"
|
||||
:label="`${'ปี พ.ศ.'}`"
|
||||
>
|
||||
</q-input>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ onMounted(async () => {
|
|||
dense
|
||||
borderless
|
||||
:model-value="Number(year) + 543"
|
||||
:label="`${'ปีพ.ศ.'}`"
|
||||
:label="`${'ปี พ.ศ.'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -438,8 +438,8 @@ watch(
|
|||
:model-value="
|
||||
commandYear == null ? null : commandYear + 543
|
||||
"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
||||
label="ปี พ.ศ."
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -478,8 +478,8 @@ watch(
|
|||
outlined
|
||||
hide-bottom-space
|
||||
:model-value="commandYear == null ? null : commandYear + 543"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
||||
label="ปี พ.ศ."
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -431,8 +431,8 @@ watch(modal, async () => {
|
|||
:model-value="
|
||||
commandYear == null ? null : commandYear + 543
|
||||
"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
||||
label="ปี พ.ศ."
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -182,8 +182,8 @@ watch(modal, () => {
|
|||
:model-value="
|
||||
commandYear == null ? null : commandYear + 543
|
||||
"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
||||
label="ปี พ.ศ."
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ onMounted(async () => {
|
|||
? null
|
||||
: formData.commandYear + 543
|
||||
"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
label="ปี พ.ศ."
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { checkPermission } from "@/utils/permissions";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useCommandListStore } from "@/modules/18_command/store/ListStore";
|
||||
import { usePagination } from "@/composables/usePagination";
|
||||
import { calculateFiscalYear } from "@/utils/function";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ const tabsManu = ref<ItemTabs[]>([
|
|||
]);
|
||||
//ฟอร์มช้อมูลการค้นหา
|
||||
const queryParams = reactive<FormQuery>({
|
||||
year: calculateFiscalYear(new Date()), //ปีงบประมาณ
|
||||
year: new Date().getFullYear(), //พ.ศ.
|
||||
keyword: "", //คำค้นหา
|
||||
commandTypeId: "",
|
||||
});
|
||||
|
|
@ -126,7 +125,7 @@ onMounted(async () => {
|
|||
:model-value="
|
||||
queryParams.year == null ? null : queryParams.year + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
label="ปี พ.ศ."
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue