ปรับวินัย
This commit is contained in:
parent
f67c32209e
commit
cd307bc0a8
5 changed files with 272 additions and 59 deletions
|
|
@ -116,7 +116,7 @@ function validateForm() {
|
|||
}
|
||||
}
|
||||
if (hasError.every((result) => result === true)) {
|
||||
countNum.value = 1
|
||||
countNum.value = 1;
|
||||
onSubmit();
|
||||
}
|
||||
}
|
||||
|
|
@ -140,9 +140,7 @@ function onSubmit() {
|
|||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {
|
||||
|
||||
});
|
||||
.finally(async () => {});
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
|
|
@ -161,21 +159,21 @@ watch(
|
|||
() => props.data,
|
||||
async () => {
|
||||
if (countNum.value === 1) {
|
||||
respondentType.value = props.data.respondentType;
|
||||
formData.oc = props.data.resultOc;
|
||||
formData.disciplineType = props.data.resultDisciplineType;
|
||||
formData.titleType = props.data.resultTitleType;
|
||||
formData.disciplineDisciplinary_DocResults =
|
||||
props.data.disciplineDisciplinary_DocResults;
|
||||
formData.year = props.data.resultYear ?? 0;
|
||||
mainStore.rowsAdd = props.data.persons;
|
||||
await fetchDatadetail();
|
||||
await fetchOrganization();
|
||||
}else if(countNum.value === 2){
|
||||
formData.disciplineDisciplinary_DocResults =
|
||||
props.data.disciplineDisciplinary_DocResults;
|
||||
respondentType.value = props.data.respondentType;
|
||||
formData.oc = props.data.resultOc;
|
||||
formData.disciplineType = props.data.resultDisciplineType;
|
||||
formData.titleType = props.data.resultTitleType;
|
||||
formData.disciplineDisciplinary_DocResults =
|
||||
props.data.disciplineDisciplinary_DocResults;
|
||||
formData.year = props.data.resultYear ?? 0;
|
||||
mainStore.rowsAdd = props.data.persons;
|
||||
await fetchDatadetail();
|
||||
await fetchOrganization();
|
||||
} else if (countNum.value === 2) {
|
||||
formData.disciplineDisciplinary_DocResults =
|
||||
props.data.disciplineDisciplinary_DocResults;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function inputEdit(val: boolean) {
|
||||
|
|
@ -203,7 +201,7 @@ function uploadFile() {
|
|||
.put(config.API.upLoadFileResult(id.value), Data)
|
||||
.then((res) => {
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
countNum.value = 2
|
||||
countNum.value = 2;
|
||||
props.fetchData();
|
||||
// router.push(`/discipline/complaints`);
|
||||
})
|
||||
|
|
@ -261,7 +259,6 @@ function onclickViewinfo(id: string) {
|
|||
function updatemodalPersonal(modal: boolean) {
|
||||
modalPersonal.value = modal;
|
||||
}
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<div class="row q-col-gutter-sm">
|
||||
|
|
@ -369,22 +366,21 @@ function updatemodalPersonal(modal: boolean) {
|
|||
col.label
|
||||
}}</span>
|
||||
</q-th>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<td>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="info"
|
||||
icon="info"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="info"
|
||||
icon="info"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
</td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
|
|
@ -402,11 +398,9 @@ function updatemodalPersonal(modal: boolean) {
|
|||
>
|
||||
{{ props.row.organization }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="col.name === 'salary'"
|
||||
>
|
||||
<div v-else-if="col.name === 'salary'">
|
||||
{{ props.row.salary.toLocaleString() }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
|
|
@ -494,6 +488,13 @@ function updatemodalPersonal(modal: boolean) {
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="formData.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="formData.year = 0"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue