ตำแหน่ง/ค่าจ้าง ทะเบียนลูกจ้าง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-13 14:06:44 +07:00
parent 421b410a03
commit 577b04b1a5

View file

@ -536,6 +536,7 @@
</q-form>
</q-card>
</q-dialog>
<HistoryTable
:rows="rowsHistory"
:columns="columnsHistory"
@ -619,6 +620,7 @@ const {
showLoader,
hideLoader,
dialogConfirm,
dialogMessageNotify,
} = mixin;
const route = useRoute();
const id = ref<string>("");
@ -1498,6 +1500,8 @@ const fetchData = async () => {
.get(config.API.profileSalaryEmployeeId(profileId.value))
.then((res) => {
const data = res.data.result;
console.log(data);
rows.value = [];
data.map((e: ResponseObjectEmployee) => {
rows.value.push({
@ -1711,12 +1715,14 @@ const clickSave = () => {
};
const SaveData = async () => {
await myForm.value.validate().then(async (result: boolean) => {
if (result) {
if (result && agencyId.value) {
if (modalEdit.value) {
await editData();
} else {
await saveData();
}
} else if (agencyId.value == "") {
dialogMessageNotify($q, "กรุณาเลือกหน่วยงาน");
}
});
};
@ -1761,6 +1767,8 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
console.log(agencyId.value);
showLoader();
await http
.put(config.API.profileSalaryEmployeeId(id.value), {
@ -1970,7 +1978,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
.get(config.API.profileSalaryHisId(row.id))
.then((res) => {
const data = res.data.result;
// console.log("clickHistory", data);
console.log("clickHistory", data);
rowsHistory.value = [];
data.map((e: ResponseObjectEmployee) => {
rowsHistory.value.push({