Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-10-22 17:42:16 +07:00
commit 67b5756a73
5 changed files with 57 additions and 49 deletions

View file

@ -227,27 +227,27 @@ async function fileDownload(no: number, type: string, fileName: string) {
}
/** ฟังก์ชันยืนยันการส่งคำร้องไปยัง สกจ.*/
function confirmMessage() {
dialogConfirm(
$q,
async () => {
showLoader();
await http
.get(config.API.transferConfirmId(transferId.value))
.then(async () => {
await getData();
success($q, "ส่งคำร้องข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
hideLoader();
});
},
"ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
"ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที"
);
async function onUpdateStatus() {
// dialogConfirm(
// $q,
// async () => {
showLoader();
await http
.get(config.API.transferConfirmId(transferId.value))
.then(async () => {
await getData();
// success($q, "");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
hideLoader();
});
// },
// " ?",
// " "
// );
}
/** ฟังก์ชันยืนยันการบันทึกการแก้ไขข้อมูล*/
@ -697,6 +697,7 @@ onMounted(async () => {
v-model:is-check-data="isCheckData"
:id="transferId"
:sys-name="'PLACEMENT_TRANSFER'"
:onUpdateStatus="onUpdateStatus"
/>
</div>
</template>

View file

@ -54,11 +54,13 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "fullName",
align: "left",
label: "ชื่อ-นามสกุล",
field: "fullName",
field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`,
sortable: true,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -116,10 +118,7 @@ async function fetchData() {
.get(config.API.commandAction(commandId.value, "tab3"))
.then(async (res) => {
const data = await res.data.result;
rows.value = data.map((e: DataPerson) => ({
...e,
fullName: `${e.prefix}${e.firstName} ${e.lastName}`,
}));
rows.value = data;
isChangeData.value = false;
})