รายการเลื่อนเงินเดือนลูกจ้างประจำ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-03-19 13:30:19 +07:00
parent ee6603eaae
commit 90960dd551
12 changed files with 138 additions and 121 deletions

View file

@ -14,14 +14,8 @@ import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/Salar
/** use*/
const $q = useQuasar();
const store = useSalaryEmployeeListSDataStore();
const {
dialogConfirm,
success,
messageError,
showLoader,
hideLoader,
dialogMessageNotify,
} = useCounterMixin();
const { dialogConfirm, success, messageError, showLoader, hideLoader } =
useCounterMixin();
/**porps*/
const modal = defineModel<boolean>("modal", { required: true });
@ -41,32 +35,29 @@ const isChange = ref<boolean>(false); // มีการแก้ไขข้อ
const isReserve = ref<boolean>(false); //
const typeRangeOps = computed(() => {
return store.roundMainCode == "OCT"
return store.roundMainCode === "OCT"
? [
{ id: "NONE", name: "ไม่ได้เลื่อน" },
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
{ id: "FULLHAFT", name: "1.5 ขั้น" },
]
: [
: store.roundMainCode === "APR"
? [
{ id: "NONE", name: "ไม่ได้เลื่อน" },
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
]
: [
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
];
});
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
function validateForm() {
if (typeRef.value.validate()) {
// if (
// store.roundMainCode === "APR" &&
// store.remaining === 0 &&
// type.value === "FULL"
// ) {
// dialogMessageNotify($q, "");
// } else {
onSubmit();
// }
}
}
@ -86,7 +77,7 @@ function onSubmit() {
isReserve: isReserve.value,
};
http
.post(config.API.salaryPeriod() + `/change/type`, body)
.post(config.API.salaryPeriodEmp() + `/change/type`, body)
.then(() => {
success($q, "บันทึกข้อมูลสำเร็จ");
props.fetchData?.();
@ -104,7 +95,7 @@ function onSubmit() {
watch(
() => modal.value,
() => {
type.value = props.typeLevel == 'PENDING' ? "" : props.typeLevel;
type.value = props.typeLevel == "PENDING" ? "" : props.typeLevel;
isReserve.value = props.isReserve;
isChange.value = false;
}