ทะเบียน
This commit is contained in:
parent
6acdb4722e
commit
619f36212a
11 changed files with 257 additions and 74 deletions
|
|
@ -331,7 +331,7 @@
|
|||
/>
|
||||
</div> -->
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
<!-- <q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
|
|
@ -343,6 +343,15 @@
|
|||
@update:modelValue="clickEditRow"
|
||||
type="number"
|
||||
hide-bottom-space
|
||||
/> -->
|
||||
<CurrencyInput
|
||||
v-model="amount"
|
||||
:edit="edit"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกค่าจ้าง'}`]"
|
||||
:options="{
|
||||
currency: 'THB',
|
||||
}"
|
||||
:label="`${'ค่าจ้าง'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
|
|
@ -581,6 +590,7 @@ import HistoryTable from "@/components/TableHistory.vue";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type { QTableProps } from "quasar";
|
||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
|
||||
const props = defineProps({
|
||||
statusEdit: {
|
||||
|
|
@ -602,6 +612,7 @@ const {
|
|||
dialogMessage,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
|
|
@ -939,7 +950,7 @@ profileData.salary.columns.length == 0
|
|||
"mouthSalaryAmount",
|
||||
"oc",
|
||||
"positionEmployeePosition",
|
||||
"posNo",
|
||||
"posNoEmployee",
|
||||
"positionEmployeePositionSide",
|
||||
"positionEmployeeLevel",
|
||||
"positionEmployeeGroup",
|
||||
|
|
@ -1016,11 +1027,11 @@ const columns = ref<QTableProps["columns"]>([
|
|||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "posNo",
|
||||
name: "posNoEmployee",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
sortable: true,
|
||||
field: "posNo",
|
||||
field: "posNoEmployee",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
|
|
@ -1481,9 +1492,9 @@ const fetchData = async () => {
|
|||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
console.log(data);
|
||||
rows.value = [];
|
||||
data.map((e: ResponseObjectEmployee) => {
|
||||
data.map((e: any) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
date: new Date(e.date),
|
||||
|
|
@ -1493,16 +1504,35 @@ const fetchData = async () => {
|
|||
oc: e.oc,
|
||||
ocId: e.ocId,
|
||||
posNo: e.posNo,
|
||||
posNoId: e.posNoId,
|
||||
posNoId:
|
||||
e.posNoId !== "00000000-0000-0000-0000-000000000000"
|
||||
? e.posNoId
|
||||
: "",
|
||||
posNoEmployee: e.posNoEmployee,
|
||||
positionEmployeeGroup: e.positionEmployeeGroup,
|
||||
positionEmployeeGroupId: e.positionEmployeeGroupId,
|
||||
positionEmployeeGroupId:
|
||||
e.positionEmployeeGroupId !==
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
? e.positionEmployeeGroupId
|
||||
: "",
|
||||
positionEmployeeLevel: e.positionEmployeeLevel,
|
||||
positionEmployeeLevelId: e.positionEmployeeLevelId,
|
||||
positionEmployeeLevelId:
|
||||
e.positionEmployeeLevelId !==
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
? e.positionEmployeeLevelId
|
||||
: "",
|
||||
positionEmployeePosition: e.positionEmployeePosition,
|
||||
positionEmployeePositionId: e.positionEmployeePositionId,
|
||||
positionEmployeePositionId:
|
||||
e.positionEmployeePositionId !==
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
? e.positionEmployeePositionId
|
||||
: "",
|
||||
positionEmployeePositionSide: e.positionEmployeePositionSide,
|
||||
positionEmployeePositionSideId: e.positionEmployeePositionSideId,
|
||||
positionEmployeePositionSideId:
|
||||
e.positionEmployeePositionSideId !==
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
? e.positionEmployeePositionSideId
|
||||
: "",
|
||||
salaryClass: e.salaryClass,
|
||||
salaryRef: e.salaryRef,
|
||||
refCommandNo: e.refCommandNo,
|
||||
|
|
@ -1687,12 +1717,29 @@ const templateDetail = async () => {
|
|||
* กดบันทึกใน dialog
|
||||
*/
|
||||
const clickSave = async () => {
|
||||
if (amount.value === 0) {
|
||||
amount.value = null;
|
||||
}
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
if (modalEdit.value) {
|
||||
await editData();
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await editData();
|
||||
},
|
||||
"ยืนยันการแก้ไขข้อมูล",
|
||||
"ต้องการยืนยันการแก้ไขข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
} else {
|
||||
await saveData();
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await saveData();
|
||||
},
|
||||
"ยืนยันการเพิ่มข้อมูล",
|
||||
"ต้องการยืนยันการเพิ่มข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1872,7 +1919,7 @@ const addData = () => {
|
|||
modal.value = true;
|
||||
edit.value = true;
|
||||
date.value = new Date();
|
||||
amount.value = null;
|
||||
amount.value = 0;
|
||||
positionSalaryAmount.value = null;
|
||||
mouthSalaryAmount.value = null;
|
||||
|
||||
|
|
@ -1944,7 +1991,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
|
|||
modalHistory.value = true;
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileSalaryHisId(row.id))
|
||||
.get(config.API.profileSalaryEmployeeHisId(row.id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log("clickHistory", data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue