หมายเหตุ

This commit is contained in:
setthawutttty 2024-03-01 09:34:06 +07:00
parent 6516bbf382
commit 2cfd9672d0

View file

@ -457,6 +457,15 @@
</template>
</datepicker>
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
v-model="note"
label="หมายเหตุ"
dense
outlined
:class="getClass(edit)"
/>
</div>
</div>
</q-card-section>
<q-separator />
@ -576,6 +585,8 @@ const Ops = ref<InsigniaOps>({
const OpsFilter = ref<InsigniaOps>({
insigniaOptions: [],
});
const note = ref<string>()
const insigniaType = ref<string>();
const year = ref<number|null>(0);
const no = ref<string>();
@ -623,6 +634,7 @@ profileData.insignia.columns.length == 0
"dateAnnounce",
"refCommandNo",
"refCommandDate",
"note",
"createdAt",
])
: (visibleColumns.value = profileData.insignia.columns);
@ -770,7 +782,20 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "note",
align: "left",
label: "หมายเหตุ",
sortable: true,
field: "note",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const columnsHistory = ref<QTableProps["columns"]>([
{
name: "year",
@ -1021,7 +1046,6 @@ const fetchData = async () => {
.get(config.API.profileInsignId(profileId.value))
.then((res) => {
let data = res.data.result;
console.log(data);
rows.value = [];
data.map((e: any) => {
rows.value.push({
@ -1042,9 +1066,9 @@ const fetchData = async () => {
refCommandDate: e.refCommandDate,
createdFullName: e.createdFullName,
createdAt: e.createdAt,
note: e.note,
});
});
console.log(data)
})
.catch((e) => {
messageError($q, e);
@ -1185,6 +1209,7 @@ const saveData = async () => {
refCommandDate.value == null
? null
: dateToISO(refCommandDate.value as Date),
note:note.value
})
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
@ -1225,6 +1250,7 @@ const editData = async () => {
refCommandDate.value == null
? null
: dateToISO(refCommandDate.value as Date),
note:note.value
})
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
@ -1297,7 +1323,6 @@ const clickClose = async () => {
* @param props props ใน row เลอก
*/
const selectData = async (props: DataProps) => {
console.log(props.row);
modalEdit.value = true;
modal.value = true;
edit.value = false;