รายการเลื่อน
This commit is contained in:
parent
3b02120606
commit
b76d93b734
7 changed files with 267 additions and 53 deletions
|
|
@ -147,41 +147,7 @@ const pagination = ref({
|
|||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
const rows = ref<any>([
|
||||
// {
|
||||
// date: new Date(),
|
||||
// amount: 20000,
|
||||
// positionSalaryAmount: 20000,
|
||||
// mouthSalaryAmount: 20000,
|
||||
// posNo: "1",
|
||||
// postionTypeName: "คำแหน่งประเภท",
|
||||
// positionLevelName: "ระดับ",
|
||||
// salaryRef: "เอกสารอ้างอิง",
|
||||
// refCommandNo: "เลขที่คำสั่ง",
|
||||
// },
|
||||
// {
|
||||
// date: new Date(),
|
||||
// amount: 20000,
|
||||
// positionSalaryAmount: 20000,
|
||||
// mouthSalaryAmount: 20000,
|
||||
// posNo: "1",
|
||||
// postionTypeName: "คำแหน่งประเภท",
|
||||
// positionLevelName: "ระดับ",
|
||||
// salaryRef: "เอกสารอ้างอิง",
|
||||
// refCommandNo: "เลขที่คำสั่ง",
|
||||
// },
|
||||
// {
|
||||
// date: new Date(),
|
||||
// amount: 20000,
|
||||
// positionSalaryAmount: 20000,
|
||||
// mouthSalaryAmount: 20000,
|
||||
// posNo: "1",
|
||||
// postionTypeName: "คำแหน่งประเภท",
|
||||
// positionLevelName: "ระดับ",
|
||||
// salaryRef: "เอกสารอ้างอิง",
|
||||
// refCommandNo: "เลขที่คำสั่ง",
|
||||
// },
|
||||
]);
|
||||
const rows = ref<any>([]);
|
||||
|
||||
const formDataSalary = reactive<FormSalaryNew>({
|
||||
date: null,
|
||||
|
|
@ -392,6 +358,35 @@ async function submit() {
|
|||
}
|
||||
}
|
||||
|
||||
function onSwapUp(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileSalarySwapNew("up", id))
|
||||
.then(() => {
|
||||
fetchListSalary();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
function onSwapDown(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileSalarySwapNew("down", id))
|
||||
.then(() => {
|
||||
fetchListSalary();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
const modalHistory = ref<boolean>(false);
|
||||
function onClikcHistory(id: string) {
|
||||
salaryId.value = id;
|
||||
|
|
@ -476,6 +471,7 @@ onMounted(() => {
|
|||
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
|
||||
:disable="props.rowIndex + 1 == 1"
|
||||
icon="mdi-arrow-up-bold"
|
||||
@click="onSwapUp(props.row.id)"
|
||||
>
|
||||
<!-- <q-tooltip>เลื่อนลำดับขึ้น</q-tooltip> -->
|
||||
</q-btn>
|
||||
|
|
@ -489,6 +485,7 @@ onMounted(() => {
|
|||
:color="rows.length == props.rowIndex + 1 ? 'grey' : 'red'"
|
||||
:disable="rows.length == props.rowIndex + 1"
|
||||
icon="mdi-arrow-down-bold"
|
||||
@click="onSwapDown(props.row.id)"
|
||||
>
|
||||
<!-- <q-tooltip>เลื่อนลำดับลง</q-tooltip> -->
|
||||
</q-btn>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue