ปรับบรรจุ แต่งตั้ง

This commit is contained in:
Warunee Tamkoo 2024-05-01 10:07:45 +07:00
parent 0973093813
commit 6a4568ec36
2 changed files with 30 additions and 22 deletions

View file

@ -139,8 +139,6 @@ function updateSelected(data: TreeMain) {
const isAll = ref<boolean>(false);
const isBlank = ref<boolean>(false);
async function fetchDataTable(id: string, level: number = 0) {
console.log(props.dataRow);
showLoader();
const body = {
node: level,
@ -196,9 +194,6 @@ async function fetchPosFind(level: number, id: string) {
.post(config.API.orgPosFind, body)
.then((res) => {
const data = res.data.result;
console.log(props?.dataRow);
expanded.value = data;
nodeId.value = id;
positionId.value = props?.dataRow?.posmasterId;
@ -224,7 +219,6 @@ async function onClickSubmit() {
} else {
dialogConfirm($q, async () => {
showLoader();
const body = {
personalId: props?.dataRow?.personalId,
node: dataPosMaster.node,
@ -239,6 +233,7 @@ async function onClickSubmit() {
posLevelId: selectedPos.value[0].posLevelId, //
posLevelName: selectedPos.value[0].posLevelName, //
reportingDate: datePos.value,
posmasterId: dataPosMaster.id,
typeCommand: props.typeCommand,
};
@ -277,8 +272,6 @@ watch(
() => modal.value,
async () => {
if (modal.value) {
console.log(props?.dataRow);
await fetchOrganizationActive();
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
await fetchPosFind(props?.dataRow?.node, props?.dataRow?.nodeId);
@ -319,22 +312,18 @@ function filterNodeFn(data: any, id: string) {
watch(
() => isAll.value,
(value, oldVal) => {
console.log("value", value);
console.log("oldVal", oldVal);
isAll.value = value;
fetchDataTable(nodeId.value, nodeLevel.value);
if (value !== oldVal) {
fetchDataTable(nodeId.value, nodeLevel.value);
}
}
);
watch(
() => isBlank.value,
(value, oldVal) => {
console.log("isBlank value", value);
console.log("isBlank oldVal", oldVal);
isBlank.value = value;
fetchDataTable(nodeId.value, nodeLevel.value);
if (value !== oldVal) {
fetchDataTable(nodeId.value, nodeLevel.value);
}
}
);
</script>