form ยื่นใบลา
This commit is contained in:
parent
d69ca225a4
commit
14388119e9
15 changed files with 863 additions and 268 deletions
|
|
@ -628,7 +628,63 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
return "-"
|
||||
}
|
||||
}
|
||||
|
||||
const dialogConfirm = (
|
||||
q: any,
|
||||
ok?: Function,
|
||||
title?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
desc?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
cancel?: Function
|
||||
) => {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
componentProps: {
|
||||
title: title && title != null ? title : "ยืนยันการบันทึก",
|
||||
message:
|
||||
desc && desc != null
|
||||
? desc
|
||||
: "ต้องการยืนยันการบันทึกข้อมูลนี้ใช่หรือไม่?",
|
||||
icon: "info",
|
||||
color: "public",
|
||||
textOk: "ตกลง",
|
||||
onlycancel: false,
|
||||
},
|
||||
})
|
||||
.onOk(() => {
|
||||
if (ok) ok();
|
||||
})
|
||||
.onCancel(() => {
|
||||
if (cancel) cancel();
|
||||
});
|
||||
};
|
||||
|
||||
const dialogRemove = (
|
||||
q: any,
|
||||
ok?: Function,
|
||||
title?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
desc?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
cancel?: Function
|
||||
) => {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
componentProps: {
|
||||
title: title && title != null ? title : "ยืนยันการลบข้อมูล",
|
||||
message:
|
||||
desc && desc != null
|
||||
? desc
|
||||
: "ต้องการยืนยันการลบข้อมูลนี้ใช่หรือไม่?",
|
||||
icon: "delete",
|
||||
color: "red",
|
||||
textOk: "ตกลง",
|
||||
onlycancel: false,
|
||||
},
|
||||
})
|
||||
.onOk(() => {
|
||||
if (ok) ok();
|
||||
})
|
||||
.onCancel(() => {
|
||||
if (cancel) cancel();
|
||||
});
|
||||
};
|
||||
return {
|
||||
calAge,
|
||||
date2Thai,
|
||||
|
|
@ -658,5 +714,8 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
statusLeave,
|
||||
modalWarning,
|
||||
fails,
|
||||
dialogConfirm,
|
||||
dialogRemove
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue