เพิ่มเช็ค

This commit is contained in:
setthawutttty 2024-10-30 15:20:47 +07:00
parent 072d6087f7
commit be5a4bcd53
2 changed files with 23 additions and 6 deletions

View file

@ -23,6 +23,21 @@ interface FormDataDetail {
isBangkok: string | null; //คำสั่งสำนักปลัดกรุงเทพมหานคร isBangkok: string | null; //คำสั่งสำนักปลัดกรุงเทพมหานคร
} }
interface FormCommandList {
id: string;
status: string;
commandTypeName: string;
commandNo: string;
commandYear: Date | null;
detailHeader: string;
detailBody: string;
detailFooter: string;
issue: string | null;
commandAffectDate: Date | null;
commandExcecuteDate: Date | null;
commandSysId: string;
isAttachment: boolean;
}
interface ListCommandSalaryType { interface ListCommandSalaryType {
id: string; id: string;
createdAt: Date | null; createdAt: Date | null;
@ -54,4 +69,5 @@ export type {
FormDataDetail, FormDataDetail,
ListCommandSalaryType, ListCommandSalaryType,
PersonInfo, PersonInfo,
FormCommandList
}; };

View file

@ -9,7 +9,7 @@ import { useCommandDetail } from "@/modules/18_command/store/DetailStore";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import type { ItemTabs } from "@/modules/18_command/interface/index/Main"; import type { ItemTabs } from "@/modules/18_command/interface/index/Main";
import type { FormDataDetail } from "@/modules/18_command/interface/request/Main"; import type { FormCommandList } from "@/modules/18_command/interface/request/Main";
import Main from "@/modules/18_command/components/Step/0_Main.vue"; // import Main from "@/modules/18_command/components/Step/0_Main.vue"; //
import Detail from "@/modules/18_command/components/Step/1_Detail.vue"; // import Detail from "@/modules/18_command/components/Step/1_Detail.vue"; //
@ -41,7 +41,8 @@ const tabsManu = ref<ItemTabs[]>([
{ label: "พรีวิวคำสั่ง", name: "Attached" }, { label: "พรีวิวคำสั่ง", name: "Attached" },
]); ]);
let formCommandList = reactive<FormDataDetail>({ const statusCheck = ref<boolean>(false)
let formCommandList = reactive<FormCommandList>({
id: "", id: "",
status: "", status: "",
commandTypeName: "", commandTypeName: "",
@ -78,6 +79,7 @@ async function fetchDataCommandList() {
.then(async (res) => { .then(async (res) => {
const data = await res.data.result; const data = await res.data.result;
formCommandList = data; formCommandList = data;
statusCheck.value = data.commandSysId == 'PROBATION'? true:false;
store.dataCommand = data; store.dataCommand = data;
isChangeData.value = false; // isChangeData.value = false; //
}) })
@ -130,13 +132,13 @@ onMounted(async () => {
> >
<q-tab <q-tab
v-for="(tab, index) in tabsManu" v-for="(tab, index) in tabsManu"
:key="index" :key="tab.id"
:name="tab.name" :name="tab.name"
:label="tab.label" :label="tab.label"
:disable="statusCheck && tab.name == 'ListPersons'"
/> />
</q-tabs> </q-tabs>
<q-separator /> <q-separator />
<q-tab-panels v-model="tabs" animated> <q-tab-panels v-model="tabs" animated>
<q-tab-panel style="padding: 0px" name="Main"> <q-tab-panel style="padding: 0px" name="Main">
<q-card> <q-card>
@ -157,8 +159,7 @@ onMounted(async () => {
/> />
</q-card> </q-card>
</q-tab-panel> </q-tab-panel>
<q-tab-panel class="bg-grey-2" style="padding: 0px" name="ListPersons" >
<q-tab-panel class="bg-grey-2" style="padding: 0px" name="ListPersons">
<ListPersons <ListPersons
v-model:is-change-data="isChangeData" v-model:is-change-data="isChangeData"
:on-check-change-data="onCheckChangeData" :on-check-change-data="onCheckChangeData"