ทะเบียนประวัติ ปรับ table
This commit is contained in:
parent
fb5017b0e2
commit
0a6feb0c9c
13 changed files with 143 additions and 116 deletions
|
|
@ -27,10 +27,10 @@
|
|||
v-if="col.name == 'date' || col.name == 'refCommandDate'"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
||||
{{ col.value == null ? "-" : date2Thai(col.value) }}
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
|
|
@ -275,10 +275,10 @@
|
|||
"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
||||
{{ col.value == null ? "-" : date2Thai(col.value) }}
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
|
|
@ -333,7 +333,7 @@ const date = ref<Date>(new Date());
|
|||
const detail = ref<string>();
|
||||
const reference = ref<string>();
|
||||
const refCommandNo = ref<string>();
|
||||
const refCommandDate = ref<Date | null|string>(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
|
||||
|
|
@ -567,7 +567,6 @@ const fetchData = async () => {
|
|||
.get(config.API.profileNopaidId(profileId.value))
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
console.log(data)
|
||||
rows.value = [];
|
||||
data.map((e: ResponseObject) => {
|
||||
rows.value.push({
|
||||
|
|
@ -575,9 +574,9 @@ const fetchData = async () => {
|
|||
date: new Date(e.date),
|
||||
detail: e.detail,
|
||||
reference: e.reference,
|
||||
refCommandNo: e.refCommandNo == ''?'-':e.refCommandNo,
|
||||
refCommandNo: e.refCommandNo,
|
||||
refCommandDate:
|
||||
e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
|
||||
e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||
createdFullName: e.createdFullName,
|
||||
createdAt: new Date(e.createdAt),
|
||||
});
|
||||
|
|
@ -686,7 +685,9 @@ const saveData = async () => {
|
|||
reference: reference.value,
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
refCommandDate.value == null
|
||||
? null
|
||||
: dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -714,7 +715,9 @@ const editData = async () => {
|
|||
reference: reference.value,
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
refCommandDate.value == null
|
||||
? null
|
||||
: dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue