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