แก้ issue จาก เทส
This commit is contained in:
parent
2a7051f5f6
commit
dd0bd13d6f
4 changed files with 8 additions and 14 deletions
|
|
@ -121,8 +121,6 @@
|
|||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="issuer"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ผู้มีอำนาจลงนาม'}`"
|
||||
@update:modelValue="clickEditRow"
|
||||
/>
|
||||
|
|
@ -188,7 +186,7 @@
|
|||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="
|
||||
refCommandDate == null ? null : date2Thai(refCommandDate)
|
||||
refCommandDate == null ? null : date2Thai(refCommandDate as Date)
|
||||
"
|
||||
hide-bottom-space
|
||||
:label="`${'เอกสารอ้างอิง (ลงวันที่)'}`"
|
||||
|
|
@ -304,7 +302,7 @@ const issuer = ref<string>();
|
|||
const detail = ref<string>();
|
||||
const issueDate = ref<Date>(new Date());
|
||||
const refCommandNo = ref<string>();
|
||||
const refCommandDate = ref<Date | null>(new Date());
|
||||
const refCommandDate = ref<Date | null|string>(new Date());
|
||||
const myForm = ref<any>(); //form data input
|
||||
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
||||
const modal = ref<boolean>(false); //modal add detail
|
||||
|
|
@ -502,9 +500,9 @@ const fetchData = async () => {
|
|||
issuer: e.issuer,
|
||||
detail: e.detail,
|
||||
issueDate: new Date(e.issueDate),
|
||||
refCommandNo: e.refCommandNo,
|
||||
refCommandNo: e.refCommandNo == '' ? '-':e.refCommandNo,
|
||||
refCommandDate:
|
||||
e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||
e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
|
||||
createdAt: new Date(e.createdAt),
|
||||
createdFullName: e.createdFullName,
|
||||
});
|
||||
|
|
@ -613,7 +611,7 @@ const saveData = async () => {
|
|||
issueDate: dateToISO(issueDate.value),
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value),
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -641,7 +639,7 @@ const editData = async () => {
|
|||
issueDate: dateToISO(issueDate.value),
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value),
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<div v-if="col.name == 'date'" class="table_ellipsis">
|
||||
{{ date2Thai(col.value) }}
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
|
|
|
|||
|
|
@ -87,16 +87,12 @@
|
|||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="topic"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกหัวข้อการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
:label="`${'หัวข้อการฝึกอบรม/ดูงาน'}`"
|
||||
@update:modelValue="clickEditRow"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ interface RequestItemsObject {
|
|||
detail: string;
|
||||
issueDate: Date;
|
||||
refCommandNo: string;
|
||||
refCommandDate: Date | null;
|
||||
refCommandDate: Date | null | string;
|
||||
createdFullName: string;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue