first commit + add fe component vue accone

This commit is contained in:
2026-05-07 17:10:10 +07:00
parent fd8e4d694b
commit 38a182641a
327 changed files with 263946 additions and 0 deletions

View File

@@ -0,0 +1,227 @@
const URL = "/one-api/mockup/masterdata/accounting/";
export async function getGroup(prm) {
try {
var resp = await axios.post(URL + "mditem/get_group_filter", 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 + "mditem/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 getCategory(token, prm) {
try {
var resp = await axios.post(URL + "mditem/get_category", {
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 getGroupX(token, prm) {
try {
var resp = await axios.post(URL + "mditem/get_group", {
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 get_subgroup(prm) {
try {
var resp = await axios.post(URL + "mditem/get_subgroup", 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 get_fa_class(prm) {
try {
var resp = await axios.post(URL + "mditem/get_fa_class", 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 get_inventaris_gol(prm) {
try {
var resp = await axios.post(URL + "mditem/get_inventaris_gol", 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 get_unit(prm) {
try {
var resp = await axios.post(URL + "mditem/get_unit", 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 save_item(prm) {
try {
var resp = await axios.post(URL + "mditem/save_item", 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 update_item(prm) {
try {
var resp = await axios.post(URL + "mditem/update_item", 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 delete_item(prm) {
try {
var resp = await axios.post(URL + "mditem/delete_item", 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,
};
}
}