Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m50s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m50s
This commit is contained in:
commit
6483f30d07
7 changed files with 17 additions and 5 deletions
|
|
@ -512,12 +512,14 @@ function onSubmit() {
|
||||||
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
||||||
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
||||||
posExecutiveName: selectedPos.value[0].posExecutiveName, //ชื่อตำแหน่ง
|
posExecutiveName: selectedPos.value[0].posExecutiveName, //ชื่อตำแหน่ง
|
||||||
|
posExecutiveId: selectedPos.value[0].posExecutiveId, //ชื่อตำแหน่ง
|
||||||
reportingDate: convertDateToAPI(datePos.value),
|
reportingDate: convertDateToAPI(datePos.value),
|
||||||
posmasterId: dataPosMaster.id,
|
posmasterId: dataPosMaster.id,
|
||||||
typeCommand: type.value,
|
typeCommand: type.value,
|
||||||
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร
|
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร
|
||||||
positionArea: selectedPos.value[0].positionArea, //ด้าน/สาขา
|
positionArea: selectedPos.value[0].positionArea, //ด้าน/สาขา
|
||||||
};
|
};
|
||||||
|
console.log(body);
|
||||||
|
|
||||||
await props.onSubmit?.(body);
|
await props.onSubmit?.(body);
|
||||||
close();
|
close();
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,9 @@ async function fetchDataTable(id: string, level: number = 0) {
|
||||||
(e) => e !== props.dataRow?.posmasterId
|
(e) => e !== props.dataRow?.posmasterId
|
||||||
);
|
);
|
||||||
|
|
||||||
positionNo.value = posMain.filter((e: DataPositionNo) => !newUse.includes(e.id));
|
positionNo.value = posMain.filter(
|
||||||
|
(e: DataPositionNo) => !newUse.includes(e.id)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
positionNo.value = posMain.filter(
|
positionNo.value = posMain.filter(
|
||||||
(e: DataPositionNo) => !positionUse.value.includes(e.id)
|
(e: DataPositionNo) => !positionUse.value.includes(e.id)
|
||||||
|
|
@ -241,6 +243,7 @@ async function onClickSubmit() {
|
||||||
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
||||||
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
||||||
posExecutiveName: selectedPos.value[0].posExecutiveName,
|
posExecutiveName: selectedPos.value[0].posExecutiveName,
|
||||||
|
posExecutiveId: selectedPos.value[0].posExecutiveId,
|
||||||
reportingDate: convertDateToAPI(datePos.value),
|
reportingDate: convertDateToAPI(datePos.value),
|
||||||
posmasterId: dataPosMaster.id,
|
posmasterId: dataPosMaster.id,
|
||||||
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร
|
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร
|
||||||
|
|
@ -290,7 +293,10 @@ watch(
|
||||||
if (modal.value) {
|
if (modal.value) {
|
||||||
await fetchPositionUes();
|
await fetchPositionUes();
|
||||||
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
||||||
await fetchPosFind(props?.dataRow?.node ?? 0, props?.dataRow?.nodeId ?? "");
|
await fetchPosFind(
|
||||||
|
props?.dataRow?.node ?? 0,
|
||||||
|
props?.dataRow?.nodeId ?? ""
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
expanded.value = [];
|
expanded.value = [];
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +351,7 @@ function onPosType() {
|
||||||
watch(
|
watch(
|
||||||
[isAll, isBlank, () => isPosition.value],
|
[isAll, isBlank, () => isPosition.value],
|
||||||
([newAll, newBlank, newPos], [oldAll, oldBlank, oldPos]) => {
|
([newAll, newBlank, newPos], [oldAll, oldBlank, oldPos]) => {
|
||||||
const shouldFetch = (newAll !== oldAll) || (newBlank !== oldBlank);
|
const shouldFetch = newAll !== oldAll || newBlank !== oldBlank;
|
||||||
const isSelectMode = newPos === "select" && oldPos !== "select";
|
const isSelectMode = newPos === "select" && oldPos !== "select";
|
||||||
|
|
||||||
if (shouldFetch || isSelectMode) {
|
if (shouldFetch || isSelectMode) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch, reactive, computed } from "vue";
|
import { ref, onMounted, watch, reactive, computed, type PropType } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -48,7 +48,7 @@ const {
|
||||||
/** รับค่ามาจากหน้าหลัก */
|
/** รับค่ามาจากหน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
statCard: {
|
statCard: {
|
||||||
type: Function,
|
type: Function as PropType<() => Promise<void>>,
|
||||||
default: () => console.log("getStat"),
|
default: () => console.log("getStat"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,7 @@ interface FormDataAppoint {
|
||||||
reportingDate: string;
|
reportingDate: string;
|
||||||
posmasterId: string;
|
posmasterId: string;
|
||||||
posExecutiveName?: string;
|
posExecutiveName?: string;
|
||||||
|
posExecutiveId?: string;
|
||||||
typeCommand: string;
|
typeCommand: string;
|
||||||
positionExecutiveField?: string;
|
positionExecutiveField?: string;
|
||||||
positionArea?: string;
|
positionArea?: string;
|
||||||
|
|
|
||||||
|
|
@ -382,6 +382,7 @@ async function onSave(data: FormDataAppoint) {
|
||||||
typeCommand: data.typeCommand,
|
typeCommand: data.typeCommand,
|
||||||
positionExecutiveField: data.positionExecutiveField,
|
positionExecutiveField: data.positionExecutiveField,
|
||||||
positionArea: data.positionArea,
|
positionArea: data.positionArea,
|
||||||
|
posExecutiveId: data.posExecutiveId,
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
|
||||||
|
|
@ -457,6 +457,7 @@ async function onSave(data: FormDataAppoint) {
|
||||||
typeCommand: data.typeCommand,
|
typeCommand: data.typeCommand,
|
||||||
positionExecutiveField: data.positionExecutiveField,
|
positionExecutiveField: data.positionExecutiveField,
|
||||||
positionArea: data.positionArea,
|
positionArea: data.positionArea,
|
||||||
|
posExecutiveId: data.posExecutiveId,
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,7 @@ async function onSaveSelectOrg(data: any) {
|
||||||
typeCommand: data.typeCommand,
|
typeCommand: data.typeCommand,
|
||||||
positionExecutiveField: data.positionExecutiveField,
|
positionExecutiveField: data.positionExecutiveField,
|
||||||
positionArea: data.positionArea,
|
positionArea: data.positionArea,
|
||||||
|
posExecutiveId: data.posExecutiveId,
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue