Merge branch 'develop'
This commit is contained in:
commit
d23f705c94
7 changed files with 204 additions and 35 deletions
|
|
@ -61,6 +61,9 @@ export default {
|
||||||
dataUserCertificateByType: (emType: string, type: string) =>
|
dataUserCertificateByType: (emType: string, type: string) =>
|
||||||
`${org}/profile${emType}/${type}/user`,
|
`${org}/profile${emType}/${type}/user`,
|
||||||
|
|
||||||
|
dataUserEvaByType: (type: string) =>
|
||||||
|
`${org}/profile/${type}/user`,
|
||||||
|
|
||||||
dataUserOther: `${profileOrg}/other/user`,
|
dataUserOther: `${profileOrg}/other/user`,
|
||||||
dataUserOtherByType: (type: string) => `${org}/profile${type}/other/user`,
|
dataUserOtherByType: (type: string) => `${org}/profile${type}/other/user`,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@ interface ProfileData {
|
||||||
citizenId?: string;
|
citizenId?: string;
|
||||||
salary?: number|null;
|
salary?: number|null;
|
||||||
birthDate?: string;
|
birthDate?: string;
|
||||||
|
org?: string;
|
||||||
|
dateStart?: string;
|
||||||
|
dateRetireLaw?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface InformationData {
|
interface InformationData {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useDataStore } from "@/stores/data";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
FormRef,
|
FormRef,
|
||||||
|
|
@ -17,6 +18,7 @@ import type {
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
const dataPerson = useDataStore();
|
||||||
const {
|
const {
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
messageError,
|
messageError,
|
||||||
|
|
@ -24,12 +26,13 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
success,
|
success,
|
||||||
|
findOrgName,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const currentYear = new Date().getFullYear();
|
||||||
const evaluateId = ref<string>(route.params.id as string);
|
const evaluateId = ref<string>(route.params.id as string);
|
||||||
const profile = ref<any>();
|
let profile = ref<any>();
|
||||||
|
|
||||||
/** form ผู้เซ็นเอกสาร*/
|
/** form ผู้เซ็นเอกสาร*/
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
|
|
@ -228,16 +231,45 @@ async function onClickDowloadFile(
|
||||||
{ certificates: certificates },
|
{ certificates: certificates },
|
||||||
{ salaries: salaries },
|
{ salaries: salaries },
|
||||||
{ trainings: trainings },
|
{ trainings: trainings },
|
||||||
{ fullName: profile.value == null ? "" : profile.value.fullName },
|
|
||||||
{ position: profile.value == null ? "" : profile.value.position },
|
|
||||||
{ positionLevel: profile.value == null ? "" : profile.value.positionLevel },
|
|
||||||
{ posNo: profile.value == null ? "" : profile.value.posNo },
|
|
||||||
{ oc: profile.value == null ? "" : profile.value.oc },
|
|
||||||
{
|
{
|
||||||
birthDate:
|
fullName: dataPerson.formData.firstName
|
||||||
profile.value == null ? "" : date2Thai(profile.value.birthDate),
|
? `${dataPerson.formData.prefix}${dataPerson.formData.firstName} ${dataPerson.formData.lastName}`
|
||||||
|
: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
position: dataPerson.formData.position
|
||||||
|
? dataPerson.formData.position
|
||||||
|
: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
positionLevel: dataPerson.formData.posLevelName
|
||||||
|
? dataPerson.formData.posLevelName
|
||||||
|
: "",
|
||||||
|
},
|
||||||
|
{ posNo: dataPerson.formData.posNo ? dataPerson.formData.posNo : "" },
|
||||||
|
{ org: dataPerson.formData ? dataPerson.formData.org : "" },
|
||||||
|
{
|
||||||
|
birthDate: dataPerson.formData.birthDate
|
||||||
|
? date2Thai(new Date(dataPerson.formData.birthDate))
|
||||||
|
: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
govAge: profile.value.government
|
||||||
|
? `${
|
||||||
|
profile.value.government.govAge.day !== 0
|
||||||
|
? `${profile.value.government.govAge.day} วัน`
|
||||||
|
: ""
|
||||||
|
} ${
|
||||||
|
profile.value.government.govAge.month !== 0
|
||||||
|
? `${profile.value.government.govAge.month} เดือน`
|
||||||
|
: ""
|
||||||
|
} ${
|
||||||
|
profile.value.government.govAge.year !== 0
|
||||||
|
? `${profile.value.government.govAge.year} ปี`
|
||||||
|
: ""
|
||||||
|
}`
|
||||||
|
: ``,
|
||||||
},
|
},
|
||||||
{ govAge: profile.value == null ? "" : profile.value.govAge },
|
|
||||||
{
|
{
|
||||||
positionLevelNew:
|
positionLevelNew:
|
||||||
profile.value == null
|
profile.value == null
|
||||||
|
|
@ -246,9 +278,34 @@ async function onClickDowloadFile(
|
||||||
? "ชำนาญการ"
|
? "ชำนาญการ"
|
||||||
: "ชำนาญการพิเศษ",
|
: "ชำนาญการพิเศษ",
|
||||||
},
|
},
|
||||||
tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "-" } : null,
|
|
||||||
|
tp === "EV1_005"
|
||||||
|
? { salary: dataPerson.formData.salary ? dataPerson.formData.salary : "" }
|
||||||
|
: null,
|
||||||
|
|
||||||
|
tp === "EV1_006" ? { lastTwoYear: (currentYear - 2).toString() } : null,
|
||||||
|
tp === "EV1_006" ? { lastOneYear: (currentYear - 1).toString() } : null,
|
||||||
|
tp === "EV1_006" ? { currentYear: currentYear.toString() } : null,
|
||||||
|
tp === "EV1_006" ? { commanderFullname: formData.commanderFullname } : null,
|
||||||
|
tp === "EV1_006" ? { commanderPosition: formData.commanderPosition } : null,
|
||||||
|
tp === "EV1_006" ? { commanderOrg: "" } : null,
|
||||||
|
tp === "EV1_006"
|
||||||
|
? { commanderAboveFullname: formData.commanderAboveFullname }
|
||||||
|
: null,
|
||||||
|
tp === "EV1_006"
|
||||||
|
? { commanderAbovePosition: formData.commanderAbovePosition }
|
||||||
|
: null,
|
||||||
|
tp === "EV1_006" ? { commanderAboveOrg: "" } : null,
|
||||||
|
|
||||||
tp === "EV1_007" ? { positionName: "-" } : null,
|
tp === "EV1_007" ? { positionName: "-" } : null,
|
||||||
tp === "EV1_007" ? { positionLeaveName: "-" } : null
|
tp === "EV1_007" ? { positionLeaveName: "-" } : null,
|
||||||
|
|
||||||
|
tp === "EV1_009" ? { dateStart: dataPerson.formData.dateStart } : null,
|
||||||
|
tp === "EV1_009"
|
||||||
|
? { dateRetireLaw: dataPerson.formData.dateRetireLaw }
|
||||||
|
: null,
|
||||||
|
|
||||||
|
tp === "EV1_010" ? { subject: formData.subject } : null
|
||||||
);
|
);
|
||||||
const body = {
|
const body = {
|
||||||
template: tp,
|
template: tp,
|
||||||
|
|
@ -349,16 +406,49 @@ function getData() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDetail(type: any) {
|
||||||
|
http.get(config.API.dataUserEvaByType(type)).then((res) => {
|
||||||
|
profile.value = {
|
||||||
|
...profile.value, // รักษาข้อมูลเดิมที่เก็บไว้ก่อนหน้านี้
|
||||||
|
[type === "salary"
|
||||||
|
? "salaries"
|
||||||
|
: type === "certificate"
|
||||||
|
? "certificates"
|
||||||
|
: type === "training"
|
||||||
|
? "trainings"
|
||||||
|
: type]: res.data.result, // เก็บข้อมูลตามประเภท (type)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const keyObject = ref<string[]>([
|
||||||
|
"educations",
|
||||||
|
"certificate",
|
||||||
|
"salary",
|
||||||
|
"training",
|
||||||
|
"assessments",
|
||||||
|
"government",
|
||||||
|
]);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
showLoader();
|
||||||
downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล");
|
Promise.all([getData(), ...keyObject.value.map(getDetail)])
|
||||||
downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน");
|
.then(() => {})
|
||||||
downloadFile(
|
.catch((e) => {
|
||||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)"
|
hideLoader();
|
||||||
);
|
messageError($q, e);
|
||||||
downloadFile("4-แบบประเมินคุณลักษณะบุคคล");
|
})
|
||||||
downloadFile("5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)");
|
.finally(() => {
|
||||||
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)");
|
hideLoader();
|
||||||
|
});
|
||||||
|
|
||||||
|
[
|
||||||
|
"1-แบบพิจารณาคุณสมบัติบุคคล",
|
||||||
|
"2-แบบแสดงรายละเอียดการเสนอผลงาน",
|
||||||
|
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
||||||
|
"4-แบบประเมินคุณลักษณะบุคคล",
|
||||||
|
"5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||||
|
"6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
||||||
|
].forEach((fileName) => downloadFile(fileName));
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -391,6 +481,7 @@ onMounted(() => {
|
||||||
class="text-weight-medium bg-grey-1 col-12 q-py-sm q-px-md"
|
class="text-weight-medium bg-grey-1 col-12 q-py-sm q-px-md"
|
||||||
>
|
>
|
||||||
ผลงาน
|
ผลงาน
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm">
|
||||||
|
|
|
||||||
|
|
@ -29,22 +29,38 @@ const modalHistory = ref<boolean>(false);
|
||||||
/** ตัวแปรข้อมูล */
|
/** ตัวแปรข้อมูล */
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
"commandName",
|
||||||
"agency",
|
"agency",
|
||||||
"dateStart",
|
"dateStart",
|
||||||
"dateEnd",
|
"dateEnd",
|
||||||
"commandNo",
|
"commandNo",
|
||||||
"document",
|
"document",
|
||||||
|
"lastUpdateFullName",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
]);
|
]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "commandName",
|
||||||
|
align: "left",
|
||||||
|
label: "ประเภทคำสั่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "agency",
|
name: "agency",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "หน่วยงานที่ให้ช่วยราชการ",
|
label: "หน่วยงานที่ให้ช่วยราชการ/ส่งตัวกลับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "agency",
|
field: "agency",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateStart",
|
name: "dateStart",
|
||||||
|
|
@ -55,6 +71,8 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
format: (v) => date2Thai(v),
|
format: (v) => date2Thai(v),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateEnd",
|
name: "dateEnd",
|
||||||
|
|
@ -65,6 +83,8 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
format: (v) => date2Thai(v),
|
format: (v) => date2Thai(v),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandNo",
|
name: "commandNo",
|
||||||
|
|
@ -74,6 +94,8 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "commandNo",
|
field: "commandNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "document",
|
name: "document",
|
||||||
|
|
@ -83,6 +105,19 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "document",
|
field: "document",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lastUpdateFullName",
|
||||||
|
align: "left",
|
||||||
|
label: "ผู้ดำเนินการ",
|
||||||
|
sortable: true,
|
||||||
|
field: "lastUpdateFullName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
|
|
@ -102,6 +137,7 @@ const pagination = ref({
|
||||||
});
|
});
|
||||||
|
|
||||||
const visibleColumnsHistory = ref<string[]>([
|
const visibleColumnsHistory = ref<string[]>([
|
||||||
|
"commandName",
|
||||||
"agency",
|
"agency",
|
||||||
"dateStart",
|
"dateStart",
|
||||||
"dateEnd",
|
"dateEnd",
|
||||||
|
|
@ -111,14 +147,28 @@ const visibleColumnsHistory = ref<string[]>([
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
]);
|
]);
|
||||||
const columnsHistory = ref<QTableProps["columns"]>([
|
const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "commandName",
|
||||||
|
align: "left",
|
||||||
|
label: "ประเภทคำสั่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "agency",
|
name: "agency",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "หน่วยงานที่ให้ช่วยราชการ",
|
label: "หน่วยงานที่ให้ช่วยราชการ/ส่งตัวกลับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "agency",
|
field: "agency",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateStart",
|
name: "dateStart",
|
||||||
|
|
@ -129,6 +179,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
format: (v) => date2Thai(v),
|
format: (v) => date2Thai(v),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateEnd",
|
name: "dateEnd",
|
||||||
|
|
@ -139,6 +191,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
format: (v) => date2Thai(v),
|
format: (v) => date2Thai(v),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandNo",
|
name: "commandNo",
|
||||||
|
|
@ -148,6 +202,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
field: "commandNo",
|
field: "commandNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "document",
|
name: "document",
|
||||||
|
|
@ -157,6 +213,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
field: "document",
|
field: "document",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdateFullName",
|
name: "lastUpdateFullName",
|
||||||
|
|
@ -166,6 +224,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
field: "lastUpdateFullName",
|
field: "lastUpdateFullName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
|
|
@ -173,9 +233,11 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
label: "วันที่แก้ไข",
|
label: "วันที่แก้ไข",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "lastUpdatedAt",
|
field: "lastUpdatedAt",
|
||||||
|
format: (v) => date2Thai(v, false, true),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => date2Thai(v, false, true),
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -316,6 +378,7 @@ onMounted(async () => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -331,17 +394,20 @@ onMounted(async () => {
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="props.row.isUpload"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
color="green"
|
color="green"
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-file-document-outline"
|
icon="mdi-file-document-outline"
|
||||||
v-if="props.row.isUpload"
|
|
||||||
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
|
||||||
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -198,11 +198,11 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandCode",
|
name: "commandName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทคำสั่ง",
|
label: "ประเภทคำสั่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "commandCode",
|
field: "commandName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -301,7 +301,7 @@ const baseVisibleColumns = ref<string[]>([
|
||||||
"positionExecutive",
|
"positionExecutive",
|
||||||
"amount",
|
"amount",
|
||||||
"commandNo",
|
"commandNo",
|
||||||
"commandCode",
|
"commandName",
|
||||||
"commandDateSign",
|
"commandDateSign",
|
||||||
"organization",
|
"organization",
|
||||||
"remark",
|
"remark",
|
||||||
|
|
|
||||||
|
|
@ -182,11 +182,11 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandCode",
|
name: "commandName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทคำสั่ง",
|
label: "ประเภทคำสั่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "commandCode",
|
field: "commandName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -316,7 +316,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"positionSalaryAmount",
|
"positionSalaryAmount",
|
||||||
"mouthSalaryAmount",
|
"mouthSalaryAmount",
|
||||||
"commandNo",
|
"commandNo",
|
||||||
"commandCode",
|
"commandName",
|
||||||
"commandDateSign",
|
"commandDateSign",
|
||||||
"organization",
|
"organization",
|
||||||
"remark",
|
"remark",
|
||||||
|
|
@ -349,7 +349,7 @@ const visibleColumnsHistory = ref<string[]>([
|
||||||
"positionSalaryAmount",
|
"positionSalaryAmount",
|
||||||
"mouthSalaryAmount",
|
"mouthSalaryAmount",
|
||||||
"commandNo",
|
"commandNo",
|
||||||
"commandCode",
|
"commandName",
|
||||||
"commandDateSign",
|
"commandDateSign",
|
||||||
"organization",
|
"organization",
|
||||||
"remark",
|
"remark",
|
||||||
|
|
@ -509,11 +509,11 @@ const baseColumnsHistory = ref<QTableColumn[]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandCode",
|
name: "commandName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทคำสั่ง",
|
label: "ประเภทคำสั่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "commandCode",
|
field: "commandName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ export const useDataStore = defineStore("dataMain", () => {
|
||||||
const storeRegistry = useRegistryInFormationStore();
|
const storeRegistry = useRegistryInFormationStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, showLoader, hideLoader, findPosMasterNo } = mixin;
|
const { messageError, showLoader, hideLoader, findPosMasterNo,findOrgName } = mixin;
|
||||||
// ref() คือการประกาศ state เหมือน vuex
|
// ref() คือการประกาศ state เหมือน vuex
|
||||||
const formData = reactive<ProfileData>({
|
const formData = reactive<ProfileData>({
|
||||||
profileId: "",
|
profileId: "",
|
||||||
|
|
@ -28,6 +28,9 @@ export const useDataStore = defineStore("dataMain", () => {
|
||||||
salary: null,
|
salary: null,
|
||||||
birthDate: '',
|
birthDate: '',
|
||||||
posNo: "",
|
posNo: "",
|
||||||
|
org: "",
|
||||||
|
dateStart: "",
|
||||||
|
dateRetireLaw: "",
|
||||||
});
|
});
|
||||||
const count = ref<number>(0);
|
const count = ref<number>(0);
|
||||||
const loader = ref<boolean>(false);
|
const loader = ref<boolean>(false);
|
||||||
|
|
@ -110,7 +113,10 @@ export const useDataStore = defineStore("dataMain", () => {
|
||||||
formData.posTypeName = data.posTypeName;
|
formData.posTypeName = data.posTypeName;
|
||||||
formData.posExecutiveName = data.posExecutiveName;
|
formData.posExecutiveName = data.posExecutiveName;
|
||||||
formData.posLevelName = data.posLevelName;
|
formData.posLevelName = data.posLevelName;
|
||||||
|
formData.dateStart = data.dateStart;
|
||||||
|
formData.dateRetireLaw = data.dateRetireLaw;
|
||||||
formData.posNo = findPosMasterNo(data);
|
formData.posNo = findPosMasterNo(data);
|
||||||
|
formData.org = findOrgName(data);
|
||||||
storeRegistry.profileId = data.profileId;
|
storeRegistry.profileId = data.profileId;
|
||||||
storeRegistry.citizenId = data.citizenId;
|
storeRegistry.citizenId = data.citizenId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue