no message

This commit is contained in:
setthawutttty 2024-02-13 17:26:10 +07:00
parent ea91acf18a
commit 9693c689e6
8 changed files with 42 additions and 39 deletions

View file

@ -202,7 +202,7 @@
lazy-rules
:borderless="!edit"
:model-value="
refCommandDate == null ? null : date2Thai(refCommandDate)
refCommandDate == null ? null : date2Thai(refCommandDate as Date)
"
hide-bottom-space
:label="`${'เอกสารอ้างอิง (ลงวันที่)'}`"
@ -372,7 +372,7 @@ const OpsFilter = ref<DisciplineOps>({
const detail = ref<string>();
const unStigma = ref<string>();
const refCommandNo = ref<string>();
const refCommandDate = ref<Date | null>(new Date());
const refCommandDate = ref<Date | null|string>(new Date());
const date = ref<Date>(new Date());
const myForm = ref<any>(); //form data input
const edit = ref<boolean>(false); // dialog
@ -602,16 +602,17 @@ const fetchData = async () => {
.get(config.API.profileDisId(profileId.value))
.then((res) => {
let data = res.data.result;
console.log(data)
rows.value = [];
data.map((e: ResponseObject) => {
rows.value.push({
id: e.id,
level: e.level,
detail: e.detail,
unStigma: e.unStigma,
unStigma: e.unStigma == '' ? '-':e.unStigma,
refCommandNo: e.refCommandNo,
refCommandDate:
e.refCommandDate == null ? null : new Date(e.refCommandDate),
e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
date: new Date(e.date),
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
@ -656,7 +657,7 @@ const getData = () => {
detail.value = row.detail;
unStigma.value = row.unStigma;
refCommandNo.value = row.refCommandNo;
refCommandDate.value = row.refCommandDate;
refCommandDate.value = row.refCommandDate == '-' ? '':row.refCommandDate as Date;
date.value = row.date;
id.value = row.id;
};
@ -722,7 +723,7 @@ const saveData = async () => {
unStigma: unStigma.value,
refCommandNo: refCommandNo.value,
refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value),
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
date: dateToISO(date.value),
})
.then((res) => {
@ -751,7 +752,7 @@ const editData = async () => {
unStigma: unStigma.value,
refCommandNo: refCommandNo.value,
refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value),
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
date: dateToISO(date.value),
})
.then((res) => {
@ -834,7 +835,7 @@ const selectData = async (props: DataProps) => {
detail.value = props.row.detail;
unStigma.value = props.row.unStigma;
refCommandNo.value = props.row.refCommandNo;
refCommandDate.value = props.row.refCommandDate;
refCommandDate.value = props.row.refCommandDate == '-' ? '':props.row.refCommandDate;
date.value = props.row.date;
id.value = props.row.id;
await checkRowPage();