add modules folder based on s_menu

This commit is contained in:
2026-06-30 10:16:11 +07:00
parent 315b657ee3
commit a1aab09ac9
625 changed files with 192283 additions and 794 deletions

View File

@@ -0,0 +1,162 @@
const URL = "/one-api/mockup/masterdata/accounting/";
export async function getRegional(prm) {
try {
var resp = await axios.post(URL + "bankcoa/getRegional", prm);
if (resp.status !== 200) {
return {
status: "ERR",
message: resp.statusText,
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message,
};
}
}
export async function getBranch(prm) {
try {
var resp = await axios.post(URL + "bankcoa/getBranch", prm);
if (resp.status !== 200) {
return {
status: "ERR",
message: resp.statusText,
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message,
};
}
}
export async function search(prm) {
try {
var resp = await axios.post(URL + "bankcoa/search", prm);
if (resp.status !== 200) {
return {
status: "ERR",
message: resp.statusText,
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message,
};
}
}
export async function searchCoaBank(token, prm) {
try {
var resp = await axios.post(URL + 'bankcoa/searchCoaBank', {
token: token,
search: prm
});
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function searchCoaEDC(token, prm) {
try {
var resp = await axios.post(URL + 'bankcoa/searchCoaEDC', {
token: token,
search: prm
});
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function saveupdate(prm) {
try {
var resp = await axios.post(URL + 'bankcoa/saveupdate', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function deletebankcoa(prm) {
try {
var resp = await axios.post(URL + 'bankcoa/deletebankcoa', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function importBank(branchCode) {
try {
var resp = await axios.get(URL + `Mediajurnalauto/injectMapBankCab/${branchCode}`);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}