Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m50s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-05-22 09:53:44 +07:00
commit 6483f30d07
7 changed files with 17 additions and 5 deletions

View file

@ -512,12 +512,14 @@ function onSubmit() {
posLevelId: selectedPos.value[0].posLevelId, //
posLevelName: selectedPos.value[0].posLevelName, //
posExecutiveName: selectedPos.value[0].posExecutiveName, //
posExecutiveId: selectedPos.value[0].posExecutiveId, //
reportingDate: convertDateToAPI(datePos.value),
posmasterId: dataPosMaster.id,
typeCommand: type.value,
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //
positionArea: selectedPos.value[0].positionArea, ///
};
console.log(body);
await props.onSubmit?.(body);
close();

View file

@ -165,7 +165,9 @@ async function fetchDataTable(id: string, level: number = 0) {
(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 {
positionNo.value = posMain.filter(
(e: DataPositionNo) => !positionUse.value.includes(e.id)
@ -241,6 +243,7 @@ async function onClickSubmit() {
posLevelId: selectedPos.value[0].posLevelId, //
posLevelName: selectedPos.value[0].posLevelName, //
posExecutiveName: selectedPos.value[0].posExecutiveName,
posExecutiveId: selectedPos.value[0].posExecutiveId,
reportingDate: convertDateToAPI(datePos.value),
posmasterId: dataPosMaster.id,
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //
@ -290,7 +293,10 @@ watch(
if (modal.value) {
await fetchPositionUes();
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 {
expanded.value = [];
}
@ -345,7 +351,7 @@ function onPosType() {
watch(
[isAll, isBlank, () => isPosition.value],
([newAll, newBlank, newPos], [oldAll, oldBlank, oldPos]) => {
const shouldFetch = (newAll !== oldAll) || (newBlank !== oldBlank);
const shouldFetch = newAll !== oldAll || newBlank !== oldBlank;
const isSelectMode = newPos === "select" && oldPos !== "select";
if (shouldFetch || isSelectMode) {

View file

@ -1,5 +1,5 @@
<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 http from "@/plugins/http";
@ -48,7 +48,7 @@ const {
/** รับค่ามาจากหน้าหลัก */
const props = defineProps({
statCard: {
type: Function,
type: Function as PropType<() => Promise<void>>,
default: () => console.log("getStat"),
},
});

View file

@ -152,6 +152,7 @@ interface FormDataAppoint {
reportingDate: string;
posmasterId: string;
posExecutiveName?: string;
posExecutiveId?: string;
typeCommand: string;
positionExecutiveField?: string;
positionArea?: string;

View file

@ -382,6 +382,7 @@ async function onSave(data: FormDataAppoint) {
typeCommand: data.typeCommand,
positionExecutiveField: data.positionExecutiveField,
positionArea: data.positionArea,
posExecutiveId: data.posExecutiveId,
};
showLoader();

View file

@ -457,6 +457,7 @@ async function onSave(data: FormDataAppoint) {
typeCommand: data.typeCommand,
positionExecutiveField: data.positionExecutiveField,
positionArea: data.positionArea,
posExecutiveId: data.posExecutiveId,
};
showLoader();

View file

@ -286,6 +286,7 @@ async function onSaveSelectOrg(data: any) {
typeCommand: data.typeCommand,
positionExecutiveField: data.positionExecutiveField,
positionArea: data.positionArea,
posExecutiveId: data.posExecutiveId,
};
showLoader();