This commit is contained in:
setthawutttty 2024-03-01 09:36:42 +07:00
parent 1915009f0e
commit 7090a5d6ef

View file

@ -79,7 +79,7 @@
:error="yearInputCheck"
error-message="กรุณากรอก ปี ที่ยื่นขอพระราชทานเครื่องราชฯ"
/>
<datepicker
v-else
menu-class-name="modalfix"
@ -459,11 +459,13 @@
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
v-model="note"
label="หมายเหตุ"
dense
outlined
:class="getClass(edit)"
v-model="note"
label="หมายเหตุ"
dense
:outlined="edit"
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
/>
</div>
</div>
@ -586,9 +588,9 @@ const OpsFilter = ref<InsigniaOps>({
insigniaOptions: [],
});
const note = ref<string>()
const note = ref<string>();
const insigniaType = ref<string>();
const year = ref<number|null>(0);
const year = ref<number | null>(0);
const no = ref<string>();
const issue = ref<string>();
const volumeNo = ref<string>();
@ -795,7 +797,6 @@ const columns = ref<QTableProps["columns"]>([
},
]);
const columnsHistory = ref<QTableProps["columns"]>([
{
name: "year",
@ -1107,7 +1108,7 @@ const getData = () => {
const row = rows.value[rowIndex.value];
insigniaId.value = row.insigniaId;
insigniaType.value = row.insigniaType;
year.value = row.year == null ? null:row.year;
year.value = row.year == null ? null : row.year;
no.value = row.no;
issue.value = row.issue;
volumeNo.value = row.volumeNo;
@ -1119,7 +1120,8 @@ const getData = () => {
refCommandNo.value = row.refCommandNo;
refCommandDate.value = row.refCommandDate;
id.value = row.id;
yearInput.value = row.year !== 0 ? (Number(row.year) + 543).toLocaleString():'';
yearInput.value =
row.year !== 0 ? (Number(row.year) + 543).toLocaleString() : "";
receiveDateInput.value = row.receiveDate
? convertDateDisplay(row.receiveDate)
: "";
@ -1209,7 +1211,7 @@ const saveData = async () => {
refCommandDate.value == null
? null
: dateToISO(refCommandDate.value as Date),
note:note.value
note: note.value,
})
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
@ -1250,7 +1252,7 @@ const editData = async () => {
refCommandDate.value == null
? null
: dateToISO(refCommandDate.value as Date),
note:note.value
note: note.value,
})
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
@ -1330,7 +1332,7 @@ const selectData = async (props: DataProps) => {
rowIndex.value = props.rowIndex;
insigniaId.value = props.row.insigniaId;
insigniaType.value = props.row.insigniaType;
year.value = props.row.year == 0 ? 0:props.row.year;
year.value = props.row.year == 0 ? 0 : props.row.year;
no.value = props.row.no;
issue.value = props.row.issue;
volumeNo.value = props.row.volumeNo;
@ -1345,7 +1347,8 @@ const selectData = async (props: DataProps) => {
props.row.refCommandDate == "-" ? null : props.row.refCommandDate;
id.value = props.row.id;
yearInput.value = props.row.year !== 0 ? (Number(props.row.year) + 543).toLocaleString():'';
yearInput.value =
props.row.year !== 0 ? (Number(props.row.year) + 543).toLocaleString() : "";
receiveDateInput.value = convertDateDisplay(props.row.receiveDate);
dateAnnounceInput.value = props.row.dateAnnounce
? convertDateDisplay(props.row.dateAnnounce as Date)
@ -1492,8 +1495,7 @@ watch(
} else {
dateAnnounceInput.value = "";
}
}
else if (value.length === 0) {
} else if (value.length === 0) {
dateAnnounce.value = null;
}
}
@ -1508,8 +1510,7 @@ watch(
} else {
refCommandDateInput.value = "";
}
}
else if (value.length === 0) {
} else if (value.length === 0) {
refCommandDate.value = null;
}
}
@ -1538,8 +1539,7 @@ watch(
const dateVal = Number(value) - 543;
yearInputCheck.value = false;
year.value = dateVal;
}
else if (value.length === 0) {
} else if (value.length === 0) {
year.value = 0;
}
}