รายการเงินเดือน => MessageNotif ย้ายขั้น
This commit is contained in:
parent
cd5647cb10
commit
2a815f4f40
3 changed files with 23 additions and 4 deletions
|
|
@ -14,8 +14,14 @@ import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsSt
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useSalaryListSDataStore();
|
const store = useSalaryListSDataStore();
|
||||||
const { dialogConfirm, success, messageError, showLoader, hideLoader } =
|
const {
|
||||||
useCounterMixin();
|
dialogConfirm,
|
||||||
|
success,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
dialogMessageNotify,
|
||||||
|
} = useCounterMixin();
|
||||||
|
|
||||||
/**porps*/
|
/**porps*/
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
|
|
@ -48,7 +54,15 @@ const typeRangeOps = computed(() => {
|
||||||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||||
function validateForm() {
|
function validateForm() {
|
||||||
if (typeRef.value.validate()) {
|
if (typeRef.value.validate()) {
|
||||||
onSubmit();
|
if (
|
||||||
|
store.roundMainCode === "APR" &&
|
||||||
|
store.remaining === 0 &&
|
||||||
|
type.value === "FULL"
|
||||||
|
) {
|
||||||
|
dialogMessageNotify($q, "ไม่สามารถย้ายขั้นได้เนื่องจากโควตาลงเหลือไม่พอ");
|
||||||
|
} else {
|
||||||
|
onSubmit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,7 @@ async function fetchDataQuota(id: string) {
|
||||||
.get(config.API.salaryListPeriodQuota(id))
|
.get(config.API.salaryListPeriodQuota(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
store.remaining = data.remaining;
|
||||||
itemsCard.value[0].total = data.total;
|
itemsCard.value[0].total = data.total;
|
||||||
itemsCard.value[1].total = data.fifteenPercent;
|
itemsCard.value[1].total = data.fifteenPercent;
|
||||||
itemsCard.value[2].total = data.chosen;
|
itemsCard.value[2].total = data.chosen;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
||||||
{ id: "", name: "กลุ่ม2" },
|
{ id: "", name: "กลุ่ม2" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const remaining = ref<number>(0);
|
||||||
|
|
||||||
const groupId = ref<string>("");
|
const groupId = ref<string>("");
|
||||||
const rootId = ref<string>("");
|
const rootId = ref<string>("");
|
||||||
const roundMainCode = ref<string>("");
|
const roundMainCode = ref<string>("");
|
||||||
|
|
@ -63,6 +65,8 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
||||||
rootId,
|
rootId,
|
||||||
roundCode,
|
roundCode,
|
||||||
groupOp,
|
groupOp,
|
||||||
roundMainCode
|
roundMainCode,
|
||||||
|
|
||||||
|
remaining,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue