เพิ่มคำสั่งแต่งตั้ง เลื่อน ย้ายจากราชกิจจาฯ
This commit is contained in:
parent
db8046efdb
commit
fa13be0a3e
10 changed files with 217 additions and 117 deletions
|
|
@ -192,7 +192,9 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
field: "commandNo",
|
field: "commandNo",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.commandNo && row.commandYear
|
return row.commandNo && row.commandYear
|
||||||
? `${row.commandNo}/${Number(row.commandYear) + 543}`
|
? row.commandType !== "C-PM-47"
|
||||||
|
? `${row.commandNo}/${Number(row.commandYear) + 543}`
|
||||||
|
: `${row.commandNo}`
|
||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -968,7 +970,8 @@ onMounted(async () => {
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
||||||
flat
|
flat
|
||||||
:disable="
|
:disable="
|
||||||
props.row.commandId !== null && props.row.commandId !== ''
|
(props.row.commandId !== null && props.row.commandId !== '') ||
|
||||||
|
props.row.commandType === 'C-PM-47'
|
||||||
"
|
"
|
||||||
:color="props.row.commandId ? 'grey' : 'edit'"
|
:color="props.row.commandId ? 'grey' : 'edit'"
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,9 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
field: "commandNo",
|
field: "commandNo",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.commandNo && row.commandYear
|
return row.commandNo && row.commandYear
|
||||||
? `${row.commandNo}/${Number(row.commandYear) + 543}`
|
? row.commandType !== "C-PM-47"
|
||||||
|
? `${row.commandNo}/${Number(row.commandYear) + 543}`
|
||||||
|
: `${row.commandNo}`
|
||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -928,7 +930,8 @@ onMounted(async () => {
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
||||||
flat
|
flat
|
||||||
:disable="
|
:disable="
|
||||||
props.row.commandId !== null && props.row.commandId !== ''
|
(props.row.commandId !== null && props.row.commandId !== '') ||
|
||||||
|
props.row.commandType === 'C-PM-47'
|
||||||
"
|
"
|
||||||
:color="props.row.commandId ? 'grey' : 'edit'"
|
:color="props.row.commandId ? 'grey' : 'edit'"
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,7 @@ function sendToCommand() {
|
||||||
/** ฟังก์ชันเลือกประเภทคำสั่ง */
|
/** ฟังก์ชันเลือกประเภทคำสั่ง */
|
||||||
function filterSelectOrder() {
|
function filterSelectOrder() {
|
||||||
const data = rowsData.value;
|
const data = rowsData.value;
|
||||||
|
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
rows.value = data.filter((v: PersonData) => {
|
rows.value = data.filter((v: PersonData) => {
|
||||||
switch (commandType.value) {
|
switch (commandType.value) {
|
||||||
|
|
@ -289,6 +290,8 @@ function filterSelectOrder() {
|
||||||
case "C-PM-07":
|
case "C-PM-07":
|
||||||
return v.typeCommand === "MOVE";
|
return v.typeCommand === "MOVE";
|
||||||
|
|
||||||
|
case "C-PM-47":
|
||||||
|
return v.posTypeName === "บริหาร" || v.posTypeName === "อำนวยการ";
|
||||||
default:
|
default:
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
@ -329,7 +332,10 @@ watch(
|
||||||
const data = await storeCommand.getCommandTypes();
|
const data = await storeCommand.getCommandTypes();
|
||||||
commandMainOp.value = data.filter(
|
commandMainOp.value = data.filter(
|
||||||
(e: ListCommand) =>
|
(e: ListCommand) =>
|
||||||
e.code === "C-PM-05" || e.code === "C-PM-39" || e.code === "C-PM-07"
|
e.code === "C-PM-05" ||
|
||||||
|
e.code === "C-PM-39" ||
|
||||||
|
e.code === "C-PM-07" ||
|
||||||
|
e.code === "C-PM-47"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,10 @@ const props = defineProps({
|
||||||
const commandOp = ref<ListCommand[]>([]); // ประเภทคำสั่ง
|
const commandOp = ref<ListCommand[]>([]); // ประเภทคำสั่ง
|
||||||
const commandType = ref<string>(""); //ประเภทคำสั่ง
|
const commandType = ref<string>(""); //ประเภทคำสั่ง
|
||||||
const commandNo = ref<string>(""); //คำสั่งเลขที่
|
const commandNo = ref<string>(""); //คำสั่งเลขที่
|
||||||
|
const commandCode = ref<string>(""); //รหัสคำสั่ง
|
||||||
const commandYear = ref<number>(new Date().getFullYear()); //ปี
|
const commandYear = ref<number>(new Date().getFullYear()); //ปี
|
||||||
|
const commandVolume = ref<string>(""); //เล่มที่
|
||||||
|
const commandChapter = ref<string>(""); //ตอนที่
|
||||||
|
|
||||||
const rows = ref<DataListCommand[]>([]); // รายการคำสั่ง
|
const rows = ref<DataListCommand[]>([]); // รายการคำสั่ง
|
||||||
const selected = ref<DataOrder[]>([]); // id คำสั่งที่เลือก
|
const selected = ref<DataOrder[]>([]); // id คำสั่งที่เลือก
|
||||||
|
|
@ -189,7 +192,10 @@ function createCommand(isRedirect: boolean) {
|
||||||
|
|
||||||
const body = {
|
const body = {
|
||||||
commandYear: commandYear.value,
|
commandYear: commandYear.value,
|
||||||
commandNo: commandNo.value,
|
commandNo:
|
||||||
|
commandCode.value !== "C-PM-47"
|
||||||
|
? commandNo.value
|
||||||
|
: `${commandVolume.value}/${commandChapter.value}`,
|
||||||
commandTypeId: commandType.value,
|
commandTypeId: commandType.value,
|
||||||
persons: !props.notPerson ? data : [],
|
persons: !props.notPerson ? data : [],
|
||||||
};
|
};
|
||||||
|
|
@ -284,6 +290,8 @@ function clearValue() {
|
||||||
selectCreate.value = "NEW";
|
selectCreate.value = "NEW";
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
filter.value = "";
|
filter.value = "";
|
||||||
|
commandVolume.value = "";
|
||||||
|
commandChapter.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชันดึงข้อมูลคำสั่ง */
|
/** ฟังก์ชันดึงข้อมูลคำสั่ง */
|
||||||
|
|
@ -294,6 +302,7 @@ async function fetchCommandType() {
|
||||||
(v: ListCommand) => v.code == props.commandTypeCode
|
(v: ListCommand) => v.code == props.commandTypeCode
|
||||||
);
|
);
|
||||||
commandType.value = commandOp.value[0].id;
|
commandType.value = commandOp.value[0].id;
|
||||||
|
commandCode.value = commandOp.value[0].code;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -374,7 +383,7 @@ watch(
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div v-if="selectCreate == 'NEW'" class="row q-mt-sm q-col-gutter-sm">
|
<div v-if="selectCreate == 'NEW'" class="row q-mt-sm q-col-gutter-sm">
|
||||||
<div class="col-12">
|
<div class="col-12 q-col-gutter-sm">
|
||||||
<q-select
|
<q-select
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
v-model="commandType"
|
v-model="commandType"
|
||||||
|
|
@ -400,53 +409,78 @@ watch(
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
|
||||||
<q-input
|
|
||||||
class="inputgreen"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
v-model="commandNo"
|
|
||||||
:label="`${'คำสั่งเลขที่'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<label class="col-1 flex justify-center items-center text-bold"
|
|
||||||
>/</label
|
|
||||||
>
|
|
||||||
|
|
||||||
<div class="col-5">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<datepicker
|
<div class="col-6" v-if="commandCode !== 'C-PM-47'">
|
||||||
menu-class-name="modalfix"
|
<q-input
|
||||||
v-model="commandYear"
|
class="inputgreen"
|
||||||
:locale="'th'"
|
outlined
|
||||||
autoApply
|
dense
|
||||||
year-picker
|
v-model="commandNo"
|
||||||
:enableTimePicker="false"
|
:label="`${'คำสั่งเลขที่'}`"
|
||||||
class="inputgreen"
|
/>
|
||||||
>
|
</div>
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
<label
|
||||||
<template #year-overlay-value="{ value }">{{
|
class="col-1 flex justify-center items-center text-bold"
|
||||||
parseInt(value + 543)
|
v-if="commandCode !== 'C-PM-47'"
|
||||||
}}</template>
|
>/
|
||||||
<template #trigger>
|
</label>
|
||||||
<q-input
|
|
||||||
dense
|
<div class="col-4" v-if="commandCode === 'C-PM-47'">
|
||||||
outlined
|
<q-input
|
||||||
hide-bottom-space
|
class="inputgreen"
|
||||||
:model-value="commandYear == null ? null : commandYear + 543"
|
outlined
|
||||||
:label="`${'พ.ศ.'}`"
|
dense
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
v-model="commandVolume"
|
||||||
>
|
:label="`${'เล่มที่'}`"
|
||||||
<template v-slot:prepend>
|
/>
|
||||||
<q-icon
|
</div>
|
||||||
name="event"
|
<div class="col-4" v-if="commandCode === 'C-PM-47'">
|
||||||
class="cursor-pointer"
|
<q-input
|
||||||
style="color: var(--q-primary)"
|
class="inputgreen"
|
||||||
>
|
outlined
|
||||||
</q-icon>
|
dense
|
||||||
</template>
|
v-model="commandChapter"
|
||||||
</q-input>
|
:label="`${'ตอนที่'}`"
|
||||||
</template>
|
/>
|
||||||
</datepicker>
|
</div>
|
||||||
|
<div :class="commandCode === 'C-PM-47' ? 'col-4' : 'col-5'">
|
||||||
|
<datepicker
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
v-model="commandYear"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
year-picker
|
||||||
|
:enableTimePicker="false"
|
||||||
|
class="inputgreen"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
|
<template #year-overlay-value="{ value }">{{
|
||||||
|
parseInt(value + 543)
|
||||||
|
}}</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
hide-bottom-space
|
||||||
|
:model-value="
|
||||||
|
commandYear == null ? null : commandYear + 543
|
||||||
|
"
|
||||||
|
:label="`${'พ.ศ.'}`"
|
||||||
|
:rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import { updateCurrentPage } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import type { Pagination } from "@/modules/18_command/interface/index/Main";
|
import type { Pagination } from "@/modules/18_command/interface/index/Main";
|
||||||
|
|
||||||
import DialogFormCommand from "@/modules/18_command/components/Main/DialogFormCommand.vue";
|
import DialogFormCommand from "@/modules/18_command/components/Main/DialogFormCommand.vue";
|
||||||
|
|
@ -24,7 +23,6 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
messageError,
|
messageError,
|
||||||
date2Thai,
|
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
||||||
|
const commandCode = ref<string>(""); //รหัสคำสั่ง
|
||||||
// ฟอร์มข้อมูล
|
// ฟอร์มข้อมูล
|
||||||
let formData = reactive<FormDataDetail>({
|
let formData = reactive<FormDataDetail>({
|
||||||
issue: null, //คำสั่งเรื่อง
|
issue: null, //คำสั่งเรื่อง
|
||||||
|
|
@ -48,6 +49,8 @@ let formData = reactive<FormDataDetail>({
|
||||||
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
||||||
isBangkok: null, //คำสั่งสำนักปลัดกรุงเทพมหานคร
|
isBangkok: null, //คำสั่งสำนักปลัดกรุงเทพมหานคร
|
||||||
});
|
});
|
||||||
|
const commandVolume = ref<string>(""); //เล่มที่
|
||||||
|
const commandChapter = ref<string>(""); //ตอนที่
|
||||||
const modalPreview = ref<boolean>(false); //แสดงตัวอย่าง
|
const modalPreview = ref<boolean>(false); //แสดงตัวอย่าง
|
||||||
const isIdofficer = ref<boolean>(false); //เช็ค สกจ.
|
const isIdofficer = ref<boolean>(false); //เช็ค สกจ.
|
||||||
|
|
||||||
|
|
@ -73,6 +76,10 @@ async function onSubmit() {
|
||||||
await http
|
await http
|
||||||
.put(config.API.commandAction(commandId.value, "tab1"), {
|
.put(config.API.commandAction(commandId.value, "tab1"), {
|
||||||
...formData,
|
...formData,
|
||||||
|
commandNo:
|
||||||
|
commandCode.value === "C-PM-47"
|
||||||
|
? `${commandVolume.value}/${commandChapter.value}`
|
||||||
|
: formData.commandNo,
|
||||||
commandAffectDate: convertDateToAPI(formData.commandAffectDate),
|
commandAffectDate: convertDateToAPI(formData.commandAffectDate),
|
||||||
commandExcecuteDate: convertDateToAPI(formData.commandExcecuteDate),
|
commandExcecuteDate: convertDateToAPI(formData.commandExcecuteDate),
|
||||||
})
|
})
|
||||||
|
|
@ -106,6 +113,10 @@ onMounted(async () => {
|
||||||
formData.isBangkok = !isIdofficer.value
|
formData.isBangkok = !isIdofficer.value
|
||||||
? null
|
? null
|
||||||
: props.formCommandList.isBangkok;
|
: props.formCommandList.isBangkok;
|
||||||
|
commandCode.value = props.formCommandList.commandCode;
|
||||||
|
const [volume, chapter] = props.formCommandList.commandNo.split("/");
|
||||||
|
commandVolume.value = volume || "";
|
||||||
|
commandChapter.value = chapter || "";
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -126,62 +137,93 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-4 row">
|
<div :class="commandCode !== 'C-PM-47' ? 'col-4' : 'col-12'">
|
||||||
<div class="col-6">
|
<div class="col-12 row q-col-gutter-sm">
|
||||||
<q-input
|
<div class="col-6" v-if="commandCode !== 'C-PM-47'">
|
||||||
:class="store.classInput(!store.readonly)"
|
<q-input
|
||||||
:readonly="store.readonly"
|
:class="store.classInput(!store.readonly)"
|
||||||
outlined
|
:readonly="store.readonly"
|
||||||
dense
|
outlined
|
||||||
v-model="formData.commandNo"
|
dense
|
||||||
hide-bottom-space
|
v-model="formData.commandNo"
|
||||||
:label="`${'คำสั่งเลขที่'}`"
|
hide-bottom-space
|
||||||
@update:model-value="onCheckChangeData()"
|
:label="`${'คำสั่งเลขที่'}`"
|
||||||
/>
|
@update:model-value="onCheckChangeData()"
|
||||||
</div>
|
/>
|
||||||
<label class="col-1 flex justify-center items-center text-bold">
|
</div>
|
||||||
/
|
<label
|
||||||
</label>
|
class="col-1 flex justify-center items-center text-bold"
|
||||||
<div class="col-5">
|
v-if="commandCode !== 'C-PM-47'"
|
||||||
<datepicker
|
|
||||||
v-model="formData.commandYear"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
year-picker
|
|
||||||
:enableTimePicker="false"
|
|
||||||
:class="store.classInput(!store.readonly)"
|
|
||||||
:readonly="store.readonly"
|
|
||||||
@update:model-value="onCheckChangeData()"
|
|
||||||
>
|
>
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
/
|
||||||
<template #year-overlay-value="{ value }">{{
|
</label>
|
||||||
parseInt(value + 543)
|
<div class="col-4" v-if="commandCode === 'C-PM-47'">
|
||||||
}}</template>
|
<q-input
|
||||||
<template #trigger>
|
:class="store.classInput(!store.readonly)"
|
||||||
<q-input
|
:readonly="store.readonly"
|
||||||
dense
|
outlined
|
||||||
outlined
|
dense
|
||||||
hide-bottom-space
|
v-model="commandVolume"
|
||||||
:class="store.classInput(!store.readonly)"
|
hide-bottom-space
|
||||||
:readonly="store.readonly"
|
:label="`${'เล่มที่'}`"
|
||||||
:model-value="
|
@update:model-value="onCheckChangeData()"
|
||||||
formData.commandYear == null
|
/>
|
||||||
? null
|
</div>
|
||||||
: formData.commandYear + 543
|
|
||||||
"
|
<div class="col-4" v-if="commandCode === 'C-PM-47'">
|
||||||
:label="`${'พ.ศ.'}`"
|
<q-input
|
||||||
>
|
:class="store.classInput(!store.readonly)"
|
||||||
<template v-slot:prepend>
|
:readonly="store.readonly"
|
||||||
<q-icon
|
outlined
|
||||||
name="event"
|
dense
|
||||||
class="cursor-pointer"
|
v-model="commandChapter"
|
||||||
style="color: var(--q-primary)"
|
hide-bottom-space
|
||||||
>
|
:label="`${'ตอนที่'}`"
|
||||||
</q-icon>
|
@update:model-value="onCheckChangeData()"
|
||||||
</template>
|
/>
|
||||||
</q-input>
|
</div>
|
||||||
</template>
|
|
||||||
</datepicker>
|
<div :class="commandCode !== 'C-PM-47' ? 'col-5' : 'col-4'">
|
||||||
|
<datepicker
|
||||||
|
v-model="formData.commandYear"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
year-picker
|
||||||
|
:enableTimePicker="false"
|
||||||
|
:class="store.classInput(!store.readonly)"
|
||||||
|
:readonly="store.readonly"
|
||||||
|
@update:model-value="onCheckChangeData()"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
|
<template #year-overlay-value="{ value }">{{
|
||||||
|
parseInt(value + 543)
|
||||||
|
}}</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
hide-bottom-space
|
||||||
|
:class="store.classInput(!store.readonly)"
|
||||||
|
:readonly="store.readonly"
|
||||||
|
:model-value="
|
||||||
|
formData.commandYear == null
|
||||||
|
? null
|
||||||
|
: formData.commandYear + 543
|
||||||
|
"
|
||||||
|
:label="`${'พ.ศ.'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -278,7 +320,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- เนื้อหาคำสั่งส่วนต้น -->
|
<!-- เนื้อหาคำสั่งส่วนต้น -->
|
||||||
<div class="col-12">
|
<div class="col-12" v-if="commandCode !== 'C-PM-47'">
|
||||||
<q-input
|
<q-input
|
||||||
:class="store.classInput(!store.readonly)"
|
:class="store.classInput(!store.readonly)"
|
||||||
:readonly="store.readonly"
|
:readonly="store.readonly"
|
||||||
|
|
@ -293,7 +335,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- เนื้อหาคำสั่งส่วนกลาง -->
|
<!-- เนื้อหาคำสั่งส่วนกลาง -->
|
||||||
<div class="col-12">
|
<div class="col-12" v-if="commandCode !== 'C-PM-47'">
|
||||||
<q-input
|
<q-input
|
||||||
:class="store.classInput(!store.readonly)"
|
:class="store.classInput(!store.readonly)"
|
||||||
:readonly="store.readonly"
|
:readonly="store.readonly"
|
||||||
|
|
@ -310,7 +352,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- เนื้อหาคำสั่งส่วนท้าย -->
|
<!-- เนื้อหาคำสั่งส่วนท้าย -->
|
||||||
<div class="col-12">
|
<div class="col-12" v-if="commandCode !== 'C-PM-47'">
|
||||||
<q-input
|
<q-input
|
||||||
:class="store.classInput(!store.readonly)"
|
:class="store.classInput(!store.readonly)"
|
||||||
:readonly="store.readonly"
|
:readonly="store.readonly"
|
||||||
|
|
@ -324,7 +366,10 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 q-gutter-sm" v-if="isIdofficer">
|
<div
|
||||||
|
class="col-12 q-gutter-sm"
|
||||||
|
v-if="isIdofficer && commandCode !== 'C-PM-47'"
|
||||||
|
>
|
||||||
<q-radio
|
<q-radio
|
||||||
:disable="store.readonly"
|
:disable="store.readonly"
|
||||||
keep-color
|
keep-color
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ interface FormCommandList {
|
||||||
status: string;
|
status: string;
|
||||||
commandTypeName: string;
|
commandTypeName: string;
|
||||||
commandNo: string;
|
commandNo: string;
|
||||||
|
commandCode: string;
|
||||||
commandYear: Date | null;
|
commandYear: Date | null;
|
||||||
detailHeader: string;
|
detailHeader: string;
|
||||||
detailBody: string;
|
detailBody: string;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ interface DataListCommand {
|
||||||
id: string;
|
id: string;
|
||||||
status: string;
|
status: string;
|
||||||
issue?: string;
|
issue?: string;
|
||||||
|
commandCode?: string;
|
||||||
|
commandType?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DataCommandType {
|
interface DataCommandType {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,11 @@ export const useCommandListStore = defineStore("commandListStore", () => {
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "commandNo",
|
field: "commandNo",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return val ? `${val}/${row.commandYear + 543}` : "-";
|
return val
|
||||||
|
? row.commandType !== "C-PM-47"
|
||||||
|
? `${val}/${row.commandYear + 543}`
|
||||||
|
: `${val}`
|
||||||
|
: "-";
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ let formCommandList = reactive<FormCommandList>({
|
||||||
status: "",
|
status: "",
|
||||||
commandTypeName: "",
|
commandTypeName: "",
|
||||||
commandNo: "",
|
commandNo: "",
|
||||||
|
commandCode: "",
|
||||||
commandYear: null,
|
commandYear: null,
|
||||||
detailHeader: "",
|
detailHeader: "",
|
||||||
detailBody: "",
|
detailBody: "",
|
||||||
|
|
@ -77,7 +78,6 @@ async function fetchDataCommandList() {
|
||||||
.get(config.API.commandAction(commandId.value, "tab1"))
|
.get(config.API.commandAction(commandId.value, "tab1"))
|
||||||
.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.commandCode == "C-PM-10" ? true : false;
|
statusCheck.value = data.commandCode == "C-PM-10" ? true : false;
|
||||||
store.dataCommand = data;
|
store.dataCommand = data;
|
||||||
|
|
@ -124,6 +124,7 @@ onMounted(async () => {
|
||||||
<q-card class="q-mt-sm">
|
<q-card class="q-mt-sm">
|
||||||
<q-card-section style="padding: 0px">
|
<q-card-section style="padding: 0px">
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-tabs
|
<q-tabs
|
||||||
v-model="tabs"
|
v-model="tabs"
|
||||||
inline-label
|
inline-label
|
||||||
|
|
@ -136,7 +137,10 @@ onMounted(async () => {
|
||||||
:key="index"
|
:key="index"
|
||||||
:name="tab.name"
|
:name="tab.name"
|
||||||
:label="tab.label"
|
:label="tab.label"
|
||||||
:disable="statusCheck && tab.name == 'ListPersons'"
|
:disable="
|
||||||
|
(statusCheck && tab.name == 'ListPersons') ||
|
||||||
|
(commandCode === 'C-PM-47' && tab.name === 'Attached')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue