Merge branch 'develop' into working
This commit is contained in:
commit
3f0ddc0ef6
4 changed files with 32 additions and 5 deletions
|
|
@ -219,6 +219,7 @@ watch(
|
|||
if (props.modal === true) {
|
||||
if (actionType.value === "ADD") {
|
||||
console.log(props.dataNode);
|
||||
console.log(level.value);
|
||||
|
||||
if (props.dataNode) {
|
||||
formData.orgCode =
|
||||
|
|
@ -351,7 +352,9 @@ function selectOrgLevele(val: string, status: boolean = true) {
|
|||
<div class="col-2">
|
||||
<q-input
|
||||
:readonly="
|
||||
(actionType === 'ADD' && props?.dataNode?.orgLevel !== 0) ||
|
||||
(actionType === 'ADD' &&
|
||||
props?.dataNode?.orgLevel !== 0 &&
|
||||
level !== 0) ||
|
||||
(actionType === 'EDIT' && props?.dataNode?.orgLevel > 1)
|
||||
"
|
||||
mask="##"
|
||||
|
|
|
|||
|
|
@ -364,6 +364,7 @@ function onSubmit() {
|
|||
posDictExecutiveField: e.positionExecutiveField, //ด้านทางการบริหาร
|
||||
posDictArea: e.positionArea, //ด้าน/สาขา
|
||||
isSpecial: e.isSpecial,
|
||||
positionIsSelected: e.positionIsSelected,
|
||||
}));
|
||||
const body = {
|
||||
posMasterNoPrefix: formData.prefixNo, //*Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ)
|
||||
|
|
@ -524,7 +525,6 @@ watch(
|
|||
() => {
|
||||
if (props.modal === true) {
|
||||
fetchType();
|
||||
// fetchLevel();
|
||||
fetchExecutive();
|
||||
|
||||
if (props.actionType === "ADD") {
|
||||
|
|
@ -535,6 +535,7 @@ watch(
|
|||
formData.prefixNo = "";
|
||||
formData.positionNo = "";
|
||||
formData.suffixNo = "";
|
||||
formData.reason = "";
|
||||
} else {
|
||||
props.rowId && fetchPosition(props.rowId);
|
||||
}
|
||||
|
|
@ -543,6 +544,8 @@ watch(
|
|||
);
|
||||
|
||||
async function addPosition(data: RowDetailPositions) {
|
||||
console.log(data);
|
||||
|
||||
const isIdExist = await rows.value.some(
|
||||
(item: any) =>
|
||||
item.posExecutiveId == data.posExecutiveId &&
|
||||
|
|
@ -557,7 +560,6 @@ async function addPosition(data: RowDetailPositions) {
|
|||
|
||||
if (!isIdExist) {
|
||||
rows.value = [...rows.value, data];
|
||||
// rows.value.push(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -603,6 +605,7 @@ async function clearFormPositionSelect() {
|
|||
|
||||
function close() {
|
||||
props.close?.();
|
||||
clearFormPositionSelect();
|
||||
isPosition.value = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { ref, onMounted, reactive,watch } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
@ -14,6 +14,10 @@ import { useKPIDataStore } from "@/modules/14_KPI/store/KPIStore";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import type {
|
||||
NewPagination,
|
||||
} from "@/modules/14_KPI/interface/index/Main";
|
||||
|
||||
const store = useKPIDataStore();
|
||||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
|
|
@ -117,6 +121,22 @@ function fetchNewList() {
|
|||
fetchList();
|
||||
}
|
||||
|
||||
/**
|
||||
* function updatePagination
|
||||
* @param newPagination ข้อมูล Pagination ใหม่
|
||||
*/
|
||||
function updatePagination(newPagination: NewPagination) {
|
||||
formQuery.page = 1;
|
||||
formQuery.pageSize = newPagination.rowsPerPage;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => formQuery.pageSize,
|
||||
() => {
|
||||
fetchNewList();
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
fetchList();
|
||||
});
|
||||
|
|
@ -188,6 +208,7 @@ onMounted(() => {
|
|||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
@update:pagination="updatePagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ watch(
|
|||
<q-card style="min-width: 80vw">
|
||||
<DialogHeader
|
||||
:tittle="
|
||||
props.actionType === 'ADD' ? 'เพิ่มอัตรากำลัง' : 'แก้ไขอัตรากำลัง'
|
||||
props.actionType === 'ADD' ? 'เพิ่มอัตรากำลัง' : 'แก้ไขอัตรากำลัง111'
|
||||
"
|
||||
:close="close"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue