Merge branch 'develop' into dev-tee

This commit is contained in:
setthawutttty 2023-08-10 09:50:56 +07:00
commit 19125c2f9e
2 changed files with 35 additions and 33 deletions

View file

@ -371,7 +371,7 @@ const columns = ref<QTableProps["columns"]>([
]);
const rows = ref<ResponseData[]>([]);
const rows2 = ref<ResponseData[]>([]);
const selected = ref([]);
const selected = ref<ResponseData[]>([]);
const orderId = ref<string>(route.params.orderid.toString());
onMounted(async () => {
@ -410,6 +410,7 @@ const getData = async (id: string) => {
});
// console.log("list", list);
rows.value = list;
selected.value = rows.value;
})
.catch((e) => {
messageError($q, e);
@ -570,7 +571,7 @@ const putSalary = async (salary: any) => {
modalData.value = {
salaryAmount: Number(salary.salaryAmount),
positionSalaryAmount: Number(salary.positionSalaryAmount),
mouthSalaryAmount: Number(salary.mouthSalaryAmount),
monthSalaryAmount: Number(salary.mouthSalaryAmount),
};
$q.dialog({
title: "ยืนยันการบันทึกข้อมูล",
@ -621,7 +622,9 @@ const fetchaddlist = async (id: string) => {
sequence: r.sequence !== null ? r.sequence : 0,
refRecordId: r.refRecordId,
}));
rows2.value = list.filter((e: any) => e.selectStatus === false);
rows2.value = list;
selected.value = rows.value;
// rows2.value = list.filter((e: any) => e.selectStatus === false);
})
.catch((e) => {
messageError($q, e);
@ -673,33 +676,32 @@ const click = (e: any) => {
};
const save = () => {
$q.dialog({
title: "ยืนยันการบันทึกข้อมูล",
message: "ต้องการยืนยันการบันทึกข้อมูลนี้ใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
}).onOk(async () => {
success($q, "บันทึกข้อมูลสำเร็จ");
next();
});
// if (selected.value.length > 0) {
// next();
// } else {
// dialogMessage(
// $q,
// "",
// "",
// "warning",
// undefined,
// "orange",
// undefined,
// undefined,
// true
// );
// }
if (selected.value.length > 0) {
$q.dialog({
title: "ยืนยันการบันทึกข้อมูล",
message: "ต้องการยืนยันการบันทึกข้อมูลนี้ใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
}).onOk(async () => {
success($q, "บันทึกข้อมูลสำเร็จ");
next();
});
} else {
dialogMessage(
$q,
"ข้อความแจ้งเตือน",
"กรุณาเลือกรายชื่อ",
"warning",
undefined,
"orange",
undefined,
undefined,
true
);
}
};
const selectData = (row: any) => {};

View file

@ -573,8 +573,8 @@ const save = () => {
await putOrderData();
await postfileOrder();
await postfileTailer();
// await fetchAttachment(orderId.value);
// await fecthstatusOrder(orderId.value);
await fetchAttachment(orderId.value);
await fecthstatusOrder(orderId.value);
})
.onCancel(() => {})
.onDismiss(() => {});
@ -606,7 +606,7 @@ const postfileOrder = async () => {
const postfileTailer = async () => {
const formData = new FormData();
formData.append("File", fileTailer.value);
await http.post(config.API.attachmentOrderId(orderId.value), formData);
await http.post(config.API.attachmentFileId(orderId.value), formData);
};
const clickExecute = async (id: string) => {
$q.dialog({