Merge branch 'nice_dev' into develop
This commit is contained in:
commit
40a771e8f0
3 changed files with 23 additions and 4 deletions
|
|
@ -14,8 +14,14 @@ import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsSt
|
|||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const store = useSalaryListSDataStore();
|
||||
const { dialogConfirm, success, messageError, showLoader, hideLoader } =
|
||||
useCounterMixin();
|
||||
const {
|
||||
dialogConfirm,
|
||||
success,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogMessageNotify,
|
||||
} = useCounterMixin();
|
||||
|
||||
/**porps*/
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
|
|
@ -48,7 +54,15 @@ const typeRangeOps = computed(() => {
|
|||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||
function validateForm() {
|
||||
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))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
store.remaining = data.remaining;
|
||||
itemsCard.value[0].total = data.total;
|
||||
itemsCard.value[1].total = data.fifteenPercent;
|
||||
itemsCard.value[2].total = data.chosen;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
{ id: "", name: "กลุ่ม2" },
|
||||
]);
|
||||
|
||||
const remaining = ref<number>(0);
|
||||
|
||||
const groupId = ref<string>("");
|
||||
const rootId = ref<string>("");
|
||||
const roundMainCode = ref<string>("");
|
||||
|
|
@ -63,6 +65,8 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
rootId,
|
||||
roundCode,
|
||||
groupOp,
|
||||
roundMainCode
|
||||
roundMainCode,
|
||||
|
||||
remaining,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue