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

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-05-05 17:40:21 +07:00
commit 46285f5d18

View file

@ -244,10 +244,16 @@ function close() {
expanded.value = []; expanded.value = [];
nodeLevel.value = 0; nodeLevel.value = 0;
nodeId.value = ""; nodeId.value = "";
positionData.value = [];
positionNo.value = [];
rowData.value = [];
} }
async function getDataTable(id: string, level: number = 0) { async function getDataTable(id: string, level: number = 0) {
showLoader(); showLoader();
positionData.value = [];
positionNo.value = [];
rowData.value = [];
const body = { const body = {
node: level, node: level,
nodeId: id, nodeId: id,
@ -261,7 +267,7 @@ async function getDataTable(id: string, level: number = 0) {
await http await http
.post(config.API.orgPosPlacement, body) .post(config.API.orgPosPlacement, body)
.then((res) => { .then(async (res) => {
const dataMain: PositionMain[] = []; const dataMain: PositionMain[] = [];
posMasterMain.value = res.data.result.data; posMasterMain.value = res.data.result.data;
@ -299,7 +305,6 @@ async function getDataTable(id: string, level: number = 0) {
positionNo.value = listPosNo; positionNo.value = listPosNo;
rowData.value = listPosNo; rowData.value = listPosNo;
// positionData.value = listPosNo;
if (props.dataRows?.posmasterId) { if (props.dataRows?.posmasterId) {
const newUse = positionUse.value.filter( const newUse = positionUse.value.filter(
@ -313,6 +318,7 @@ async function getDataTable(id: string, level: number = 0) {
(e: any) => !positionUse.value.includes(e.id) (e: any) => !positionUse.value.includes(e.id)
); );
} }
await onClickSelectPos(positionId.value);
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
@ -409,7 +415,6 @@ async function fetchPosFind(level: number, id: string) {
seletcId.value = props?.dataRows?.positionId; seletcId.value = props?.dataRows?.positionId;
datePos.value = props?.dataRows?.reportingDate; datePos.value = props?.dataRows?.reportingDate;
await getDataTable(nodeId.value, level); await getDataTable(nodeId.value, level);
await onClickSelectPos(positionId.value);
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);