ตำแหน่ง/เงินเดือน
This commit is contained in:
parent
7623a1e762
commit
3b0f85fea1
5 changed files with 75 additions and 29 deletions
|
|
@ -204,4 +204,8 @@ export default {
|
||||||
|
|
||||||
registryNew,
|
registryNew,
|
||||||
registryNewId: (id: string) => `${registryNew}${id}`,
|
registryNewId: (id: string) => `${registryNew}${id}`,
|
||||||
|
|
||||||
|
/**ปรับรายการเงินเดือนขึ้น-ลง*/
|
||||||
|
salarySwap: (dierction: string, id: string) =>
|
||||||
|
`${profile}salary/swap/${dierction}/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import type {
|
||||||
} from "@/modules/02_organizationalNew/interface/index/Main";
|
} from "@/modules/02_organizationalNew/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
OptionType,
|
OptionType,
|
||||||
OptionExecutive,
|
|
||||||
OptionLevel,
|
OptionLevel,
|
||||||
SelectPerson,
|
SelectPerson,
|
||||||
TypePos,
|
TypePos,
|
||||||
|
|
@ -49,11 +48,11 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
require: true,
|
require: true,
|
||||||
},
|
},
|
||||||
dataDetailPos: { type: Object, require: true },
|
|
||||||
fetchDataTable: {
|
fetchDataTable: {
|
||||||
type: Function,
|
type: Function,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
dataDetailPos: { type: Object, require: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
/>
|
/>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="modalEdit == true"
|
v-if="modalEdit == true && props.name === 'salary'"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="blue"
|
color="blue"
|
||||||
|
|
@ -115,6 +115,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
"update:editvisible",
|
"update:editvisible",
|
||||||
|
|
|
||||||
|
|
@ -364,6 +364,7 @@
|
||||||
v-model:previous="previous"
|
v-model:previous="previous"
|
||||||
v-model:modalEdit="modalEdit"
|
v-model:modalEdit="modalEdit"
|
||||||
:coppy="coppyForm"
|
:coppy="coppyForm"
|
||||||
|
:name="'salary'"
|
||||||
/>
|
/>
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
@ -420,6 +421,7 @@ import { useQuasar } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
RequestItemsObject,
|
RequestItemsObject,
|
||||||
DataProps,
|
DataProps,
|
||||||
|
RequestItemsHistory,
|
||||||
} from "@/modules/04_registry/interface/request/Salary";
|
} from "@/modules/04_registry/interface/request/Salary";
|
||||||
import type { ResponseObject } from "@/modules/04_registry/interface/response/Salary";
|
import type { ResponseObject } from "@/modules/04_registry/interface/response/Salary";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -789,7 +791,7 @@ const rowIndex = ref<number>(0); //indexข้อมูลเดิมที่
|
||||||
const previous = ref<boolean>(); //แสดงปุ่มดูข้อมูลก่อนหน้า
|
const previous = ref<boolean>(); //แสดงปุ่มดูข้อมูลก่อนหน้า
|
||||||
const next = ref<boolean>(); //แสดงปุ่มดูข้อมูลต่อไป
|
const next = ref<boolean>(); //แสดงปุ่มดูข้อมูลต่อไป
|
||||||
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
||||||
const rowsHistory = ref<RequestItemsObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistory[]>([]); //select data history
|
||||||
const tittleHistory = ref<string>("ประวัติแก้ไขตำแหน่ง/เงินเดือน"); //
|
const tittleHistory = ref<string>("ประวัติแก้ไขตำแหน่ง/เงินเดือน"); //
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
|
|
@ -1415,6 +1417,8 @@ const fetchData = async () => {
|
||||||
agencyName: e.agencyName ?? "-",
|
agencyName: e.agencyName ?? "-",
|
||||||
cLevel: e.cLevel ?? "-",
|
cLevel: e.cLevel ?? "-",
|
||||||
createdAt: new Date(e.createdAt),
|
createdAt: new Date(e.createdAt),
|
||||||
|
postionTypeName: e.postionTypeName ?? "-",
|
||||||
|
positionLevelName: e.positionLevelName ?? "-",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
@ -1671,7 +1675,7 @@ const selectData = async (props: DataProps) => {
|
||||||
rowIndex.value = props.rowIndex;
|
rowIndex.value = props.rowIndex;
|
||||||
id.value = props.row.id;
|
id.value = props.row.id;
|
||||||
|
|
||||||
console.log(props.row);
|
// console.log(props.row);
|
||||||
|
|
||||||
// date.value = props.row.date;
|
// date.value = props.row.date;
|
||||||
// amount.value = props.row.amount;
|
// amount.value = props.row.amount;
|
||||||
|
|
@ -1699,8 +1703,8 @@ const selectData = async (props: DataProps) => {
|
||||||
formDataSalary.posNo = props.row.posNo ?? "-";
|
formDataSalary.posNo = props.row.posNo ?? "-";
|
||||||
formDataSalary.templatePos = "";
|
formDataSalary.templatePos = "";
|
||||||
formDataSalary.position = props.row.positionName ?? "-";
|
formDataSalary.position = props.row.positionName ?? "-";
|
||||||
formDataSalary.typePosition = props.row.positionType ?? "-";
|
formDataSalary.typePosition = props.row.postionTypeName ?? "-";
|
||||||
formDataSalary.levelPosition = props.row.positionLevel ?? "-";
|
formDataSalary.levelPosition = props.row.positionLevelName ?? "-";
|
||||||
formDataSalary.salary = props.row.amount ?? 0;
|
formDataSalary.salary = props.row.amount ?? 0;
|
||||||
formDataSalary.salaryPos = props.row.positionSalaryAmount ?? 0;
|
formDataSalary.salaryPos = props.row.positionSalaryAmount ?? 0;
|
||||||
formDataSalary.templateDoc = "";
|
formDataSalary.templateDoc = "";
|
||||||
|
|
@ -2031,33 +2035,25 @@ watch(
|
||||||
*/
|
*/
|
||||||
async function onClicksortPos(value: any, up: boolean = true) {
|
async function onClicksortPos(value: any, up: boolean = true) {
|
||||||
if (up) {
|
if (up) {
|
||||||
await swapUp(value.row.personalId);
|
await swapSalary("up", value.row.id);
|
||||||
} else {
|
} else {
|
||||||
await swapDown(value.row.personalId);
|
await swapSalary("down", value.row.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ปรับรายการเงินเดือนขึ้น */
|
/** ปรับรายการเงินเดือนขึ้น */
|
||||||
async function swapUp(id: string) {
|
async function swapSalary(dierction: string, id: string) {
|
||||||
// await http
|
await http
|
||||||
// .put(config.API.swapUpOrder(id))
|
.post(config.API.salarySwap(dierction, id))
|
||||||
// .catch((e) => {
|
.then(() => {
|
||||||
// messageError($q, e);
|
fetchData();
|
||||||
// })
|
})
|
||||||
// .finally(async () => {
|
.catch((e) => {
|
||||||
// hideLoader();
|
messageError($q, e);
|
||||||
// });
|
})
|
||||||
}
|
.finally(async () => {
|
||||||
/** ปรับรายการเงินเดือนชื่อลง */
|
hideLoader();
|
||||||
async function swapDown(id: string) {
|
});
|
||||||
// await http
|
|
||||||
// .put(config.API.swapDownOrder(id))
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePos(val: string) {
|
function updatePos(val: string) {
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,48 @@ interface RequestItemsObject {
|
||||||
salaryStatus: string | null;
|
salaryStatus: string | null;
|
||||||
createdFullName: string;
|
createdFullName: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
|
postionTypeName: string;
|
||||||
|
positionLevelName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RequestItemsHistory {
|
||||||
|
id: string;
|
||||||
|
date: Date;
|
||||||
|
amount: number;
|
||||||
|
positionSalaryAmount: number;
|
||||||
|
mouthSalaryAmount: number;
|
||||||
|
oc: string;
|
||||||
|
ocId: string;
|
||||||
|
position: string;
|
||||||
|
positionName: string;
|
||||||
|
positionId: string;
|
||||||
|
posNo: string;
|
||||||
|
posNoId: string;
|
||||||
|
positionLine: string;
|
||||||
|
positionLineName: string;
|
||||||
|
positionLineId: string;
|
||||||
|
positionPathSide: string;
|
||||||
|
positionPathSideId: string;
|
||||||
|
positionPathSideName: string;
|
||||||
|
positionType: string;
|
||||||
|
positionTypeId: string;
|
||||||
|
positionLevel: string;
|
||||||
|
positionLevelId: string;
|
||||||
|
positionExecutive: string;
|
||||||
|
positionExecutiveName: string;
|
||||||
|
positionExecutiveId: string;
|
||||||
|
positionExecutiveSide: string;
|
||||||
|
positionExecutiveSideId: string;
|
||||||
|
salaryClass: string;
|
||||||
|
salaryRef: string;
|
||||||
|
refCommandNo: string;
|
||||||
|
orgName: string;
|
||||||
|
agencyName: string;
|
||||||
|
cLevel: string;
|
||||||
|
// refCommandDate: Date | null;
|
||||||
|
salaryStatus: string | null;
|
||||||
|
createdFullName: string;
|
||||||
|
createdAt: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface RequestItemsEmployee {
|
interface RequestItemsEmployee {
|
||||||
|
|
@ -96,4 +138,5 @@ export type {
|
||||||
DataProps,
|
DataProps,
|
||||||
RequestItemsEmployee,
|
RequestItemsEmployee,
|
||||||
DataPropsEmployee,
|
DataPropsEmployee,
|
||||||
|
RequestItemsHistory
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue