Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m40s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m40s
This commit is contained in:
commit
1da74091a2
25 changed files with 152 additions and 58 deletions
|
|
@ -7,6 +7,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -282,12 +283,12 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
|
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
isPosition: e.isPosition,
|
isPosition: e.isPosition,
|
||||||
posMasterNo:
|
posMasterNo: formatPosmasterNo(
|
||||||
e.orgShortname +
|
e.orgShortname,
|
||||||
(e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") +
|
e.posMasterNoPrefix,
|
||||||
" " +
|
e.posMasterNo.toString(),
|
||||||
e.posMasterNo +
|
e.posMasterNoSuffix
|
||||||
(e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""),
|
),
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -263,12 +264,12 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
|
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
isPosition: e.isPosition,
|
isPosition: e.isPosition,
|
||||||
posMasterNo:
|
posMasterNo: formatPosmasterNo(
|
||||||
e.orgShortname +
|
e.orgShortname,
|
||||||
(e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") +
|
e.posMasterNoPrefix,
|
||||||
" " +
|
e.posMasterNo.toString(),
|
||||||
e.posMasterNo +
|
e.posMasterNoSuffix
|
||||||
(e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""),
|
),
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ const modal = defineModel<boolean>("modal", { required: true });
|
||||||
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
||||||
const totalPage = defineModel<number>("totalPage", { required: true });
|
const totalPage = defineModel<number>("totalPage", { required: true });
|
||||||
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
||||||
const columns = defineModel<QTableProps[]>("columns", {});
|
const columns = defineModel<QTableProps['columns']>("columns", {});
|
||||||
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataTree: {
|
fetchDataTree: {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import { checkPermission } from "@/utils/permissions";
|
||||||
import { updateCurrentPage } from "@/utils/function";
|
import { updateCurrentPage } from "@/utils/function";
|
||||||
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -205,6 +206,14 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posMasterNo",
|
field: "posMasterNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return formatPosmasterNo(
|
||||||
|
row.orgShortname,
|
||||||
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNoMain,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
|
},
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1124,7 +1133,7 @@ watch(
|
||||||
<DialogMovePos
|
<DialogMovePos
|
||||||
v-model:modal="modalDialogMMove"
|
v-model:modal="modalDialogMMove"
|
||||||
v-model:nodeTree="nodeTree"
|
v-model:nodeTree="nodeTree"
|
||||||
v-model:columns="columns as QTableProps[]"
|
v-model:columns="columns"
|
||||||
v-model:rows="posMaster"
|
v-model:rows="posMaster"
|
||||||
v-model:totalPage="totalPage"
|
v-model:totalPage="totalPage"
|
||||||
v-model:reqMaster="reqMaster"
|
v-model:reqMaster="reqMaster"
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,11 @@ export const useOrganizational = defineStore("organizationalStore", () => {
|
||||||
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
|
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
|
||||||
posExecutiveName: e.posExecutiveName,
|
posExecutiveName: e.posExecutiveName,
|
||||||
isSit: e.isSit,
|
isSit: e.isSit,
|
||||||
|
orgShortname: e.orgShortname,
|
||||||
|
posMasterNoPrefix: e.posMasterNoPrefix,
|
||||||
|
posMasterNoSuffix: e.posMasterNoSuffix,
|
||||||
|
posMasterNoMain: e.posMasterNo,
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return newPosMaster || [];
|
return newPosMaster || [];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { PositionMaim } from "@/modules/05_placement/interface/response/SelectOrg";
|
import type { PositionMaim } from "@/modules/05_placement/interface/response/SelectOrg";
|
||||||
import type { DataPositionNo } from "@/modules/05_placement/interface/index/SelectOrg";
|
import type { DataPositionNo } from "@/modules/05_placement/interface/index/SelectOrg";
|
||||||
|
|
@ -12,12 +12,13 @@ export const useSelectOrgStore = defineStore("selectorg", () => {
|
||||||
const listPosNo: DataPositionNo[] = data.map((e: PositionMaim) => ({
|
const listPosNo: DataPositionNo[] = data.map((e: PositionMaim) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
isPosition: e.isPosition,
|
isPosition: e.isPosition,
|
||||||
posMasterNo:
|
posMasterNo: formatPosmasterNo(
|
||||||
e.orgShortname +
|
e.orgShortname,
|
||||||
(e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") +
|
e.posMasterNoPrefix,
|
||||||
" " +
|
e.posMasterNo.toString(),
|
||||||
e.posMasterNo +
|
e.posMasterNoSuffix
|
||||||
(e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""),
|
),
|
||||||
|
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return findPosMasterNoOld(row);
|
return row.positionNumberOld ?? "-";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -74,7 +75,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posMasterNo",
|
field: "posMasterNo",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return `${row.orgShortname} ${row.posMasterNo}`;
|
return formatPosmasterNo(
|
||||||
|
row.orgShortname,
|
||||||
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo.toString(),
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const id = ref<string>(route.params.id as string); // id รายการป
|
||||||
const isLoadView = ref<boolean>(false); //แสดง view
|
const isLoadView = ref<boolean>(false); //แสดง view
|
||||||
const modalHistory = ref<boolean>(false); //แสดง popup ประวัติการประเมิน
|
const modalHistory = ref<boolean>(false); //แสดง popup ประวัติการประเมิน
|
||||||
// ข้อมูลผู้เซ็นเอกสาร
|
// ข้อมูลผู้เซ็นเอกสาร
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive({
|
||||||
elementaryFullName: "", //ชื่อผู้บังคับบัญชาชั้นต้น
|
elementaryFullName: "", //ชื่อผู้บังคับบัญชาชั้นต้น
|
||||||
elementaryPosition: "", //ตำแหน่งผู้บังคับบัญชาชั้นต้น
|
elementaryPosition: "", //ตำแหน่งผู้บังคับบัญชาชั้นต้น
|
||||||
abovelevelFullname: "", //ชื่อผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ
|
abovelevelFullname: "", //ชื่อผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||||
const dataList: EvaluateList[] = data.map(
|
const dataList: EvaluateList[] = data.map(
|
||||||
(data: EvaluateRes) =>
|
(data: EvaluateRes) =>
|
||||||
({
|
({
|
||||||
|
...data,
|
||||||
id: data.id,
|
id: data.id,
|
||||||
citizenId: data.citizenId,
|
citizenId: data.citizenId,
|
||||||
fullName: data.fullName,
|
fullName: data.fullName,
|
||||||
|
|
@ -133,7 +134,7 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขที่ตำแหน่ง",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionNumber",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ !col.value ? "-" : col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||||
import { usePagination } from "@/composables/usePagination";
|
import { usePagination } from "@/composables/usePagination";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
|
@ -72,9 +73,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.orgShortName && row.posMasterNo
|
return formatPosmasterNo(
|
||||||
? `${row.orgShortName} ${row.posMasterNo}`
|
row.orgShortName,
|
||||||
: "-";
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import DialogMoveLevel from "@/modules/13_salary/components/04_salaryLists/Dialo
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -87,9 +88,12 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.orgShortName && row.posMasterNo
|
return formatPosmasterNo(
|
||||||
? `${row.orgShortName} ${row.posMasterNo}`
|
row.orgShortName,
|
||||||
: "-";
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import DialogInfo from "@/modules/13_salary/components/DialogInfoMain.vue";
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -98,9 +99,12 @@ const columns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.orgShortName && row.posMasterNo
|
return formatPosmasterNo(
|
||||||
? `${row.orgShortName} ${row.posMasterNo}`
|
row.orgShortName,
|
||||||
: "-";
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
||||||
import { usePagination } from "@/composables/usePagination";
|
import { usePagination } from "@/composables/usePagination";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
|
@ -71,9 +72,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.orgShortName && row.posMasterNo
|
return formatPosmasterNo(
|
||||||
? `${row.orgShortName} ${row.posMasterNo}`
|
row.orgShortName,
|
||||||
: "-";
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
|
@ -84,6 +85,14 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
field: "orgShortName",
|
field: "orgShortName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return formatPosmasterNo(
|
||||||
|
row.orgShortName,
|
||||||
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -98,9 +99,12 @@ const columns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.orgShortName && row.posMasterNo
|
return formatPosmasterNo(
|
||||||
? `${row.orgShortName} ${row.posMasterNo}`
|
row.orgShortName,
|
||||||
: "-";
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -135,11 +136,12 @@ async function fetchTable() {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
const list = data.map((e: PosMaster) => ({
|
const list = data.map((e: PosMaster) => ({
|
||||||
...e,
|
...e,
|
||||||
posMasterNo:
|
posMasterNo: formatPosmasterNo(
|
||||||
(e.orgShortname !== null ? e.orgShortname : "") +
|
e.orgShortname,
|
||||||
(e.posMasterNoPrefix ? e.posMasterNoPrefix : "") +
|
e.posMasterNoPrefix,
|
||||||
(e.posMasterNo !== null ? e.posMasterNo : "") +
|
e.posMasterNo.toString(),
|
||||||
(e.posMasterNoSuffix !== null ? e.posMasterNoPrefix : ""),
|
e.posMasterNoSuffix ?? ""
|
||||||
|
),
|
||||||
}));
|
}));
|
||||||
rows.value = list;
|
rows.value = list;
|
||||||
})
|
})
|
||||||
|
|
@ -157,7 +159,7 @@ function updatePagination(newPagination: NewPagination) {
|
||||||
reqMaster.page = 1;
|
reqMaster.page = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
funcion ค้นหาข้อมูลใน Table
|
funcion ค้นหาข้อมูลใน Table
|
||||||
*/
|
*/
|
||||||
async function filterKeyword() {
|
async function filterKeyword() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { updateCurrentPage } from "@/utils/function";
|
import { updateCurrentPage, formatPosmasterNo } from "@/utils/function";
|
||||||
import genreport from "@/plugins/genreportxlsx";
|
import genreport from "@/plugins/genreportxlsx";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -145,6 +145,13 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "ตำแหน่งเลขที่",
|
label: "ตำแหน่งเลขที่",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posMasterNo",
|
field: "posMasterNo",
|
||||||
|
format: (val: any, row: any) =>
|
||||||
|
formatPosmasterNo(
|
||||||
|
row.orgShortname,
|
||||||
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNoMain,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,10 @@ export const usePositionEmp = defineStore("positionEmpStore", () => {
|
||||||
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
|
posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName,
|
||||||
posExecutiveName: e.posExecutiveName,
|
posExecutiveName: e.posExecutiveName,
|
||||||
isSit: e.isSit,
|
isSit: e.isSit,
|
||||||
|
orgShortname: e.orgShortname,
|
||||||
|
posMasterNoPrefix: e.posMasterNoPrefix,
|
||||||
|
posMasterNoMain: e.posMasterNo,
|
||||||
|
posMasterNoSuffix: e.posMasterNoSuffix,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return newPosMaster;
|
return newPosMaster;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { storeToRefs } from "pinia";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -71,8 +72,18 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "posMasterNo",
|
field: "posMasterNo",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.isSit
|
return row.isSit
|
||||||
? `${row.orgShortname} ${row.posMasterNo}(นั่งทับตำแหน่ง)`
|
? formatPosmasterNo(
|
||||||
: `${row.orgShortname} ${row.posMasterNo}`;
|
row.orgShortname,
|
||||||
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
) + " (นั่งทับตำแหน่ง)"
|
||||||
|
: formatPosmasterNo(
|
||||||
|
row.orgShortname,
|
||||||
|
row.posMasterNoPrefix,
|
||||||
|
row.posMasterNo,
|
||||||
|
row.posMasterNoSuffix
|
||||||
|
);
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
@ -207,7 +218,7 @@ async function fetchDataTree() {
|
||||||
function onSelectedOrgTree(data: OrgTree) {
|
function onSelectedOrgTree(data: OrgTree) {
|
||||||
orgTreeId.value = data.orgTreeId;
|
orgTreeId.value = data.orgTreeId;
|
||||||
orgLevel.value = data.orgLevel;
|
orgLevel.value = data.orgLevel;
|
||||||
fetchDataTable();
|
onSearchDataTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const modal = defineModel<boolean>("modal", { required: true });
|
||||||
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
||||||
const totalPage = defineModel<number>("totalPage", { required: true });
|
const totalPage = defineModel<number>("totalPage", { required: true });
|
||||||
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
||||||
const columns = defineModel<QTableProps[]>("columns", {});
|
const columns = defineModel<QTableProps["columns"]>("columns", {});
|
||||||
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataTree: {
|
fetchDataTree: {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { usePositionEmp } from "@/modules/20_positionTemp/store/organizational";
|
import { usePositionEmp } from "@/modules/20_positionTemp/store/organizational";
|
||||||
|
import { formatPosmasterNo } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -135,11 +136,12 @@ async function fetchTable() {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
const list = data.map((e: PosMaster) => ({
|
const list = data.map((e: PosMaster) => ({
|
||||||
...e,
|
...e,
|
||||||
posMasterNo:
|
posMasterNo: formatPosmasterNo(
|
||||||
(e.orgShortname !== null ? e.orgShortname : "") +
|
e.orgShortname,
|
||||||
(e.posMasterNoPrefix ? e.posMasterNoPrefix : "") +
|
e.posMasterNoPrefix,
|
||||||
(e.posMasterNo !== null ? e.posMasterNo : "") +
|
e.posMasterNo.toString(),
|
||||||
(e.posMasterNoSuffix !== null ? e.posMasterNoPrefix : ""),
|
e.posMasterNoSuffix ?? ""
|
||||||
|
),
|
||||||
}));
|
}));
|
||||||
rows.value = list;
|
rows.value = list;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -719,7 +719,7 @@ watch(
|
||||||
<DialogMovePos
|
<DialogMovePos
|
||||||
v-model:modal="modalDialogMMove"
|
v-model:modal="modalDialogMMove"
|
||||||
v-model:nodeTree="nodeTree"
|
v-model:nodeTree="nodeTree"
|
||||||
v-model:columns="columns as QTableProps[]"
|
v-model:columns="columns"
|
||||||
v-model:rows="posMaster"
|
v-model:rows="posMaster"
|
||||||
v-model:totalPage="totalPage"
|
v-model:totalPage="totalPage"
|
||||||
v-model:reqMaster="reqMaster"
|
v-model:reqMaster="reqMaster"
|
||||||
|
|
|
||||||
|
|
@ -94,3 +94,18 @@ export function validateFileSize(
|
||||||
|
|
||||||
return `ขนาดไฟล์ไม่เกิน ${maxSizeMB}MB`;
|
return `ขนาดไฟล์ไม่เกิน ${maxSizeMB}MB`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function formatPosmasterNo(
|
||||||
|
orgShortname: string,
|
||||||
|
posMasterNoPrefix: string,
|
||||||
|
posMasterNo: string,
|
||||||
|
posMasterNoSuffix: string
|
||||||
|
) {
|
||||||
|
if (!orgShortname || !posMasterNo) return "";
|
||||||
|
|
||||||
|
const prefix = posMasterNoPrefix ? `${posMasterNoPrefix} ` : "";
|
||||||
|
|
||||||
|
const suffix = posMasterNoSuffix ? ` ${posMasterNoSuffix}` : "";
|
||||||
|
|
||||||
|
return `${orgShortname} ${prefix}${posMasterNo}${suffix}`.trim();
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue