Files
2026-05-25 20:01:37 +07:00

123 lines
2.6 KiB
JavaScript

const URL = "/one-api/v1/masterdata/";
export async function search(prm) {
try {
var resp = await axios.post(URL + 'jparight/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 search_listing(prm) {
try {
var resp = await axios.post(URL + 'jparight/search_listing',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(prm) {
try {
var resp = await axios.post(URL + 'jparight/save',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 savejpagroup(prm) {
try {
var resp = await axios.post(URL + 'jparight/savejpagroup',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 savelistingjpagroup(prm) {
try {
var resp = await axios.post(URL + 'jparight/savelistingjpagroup',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 savealljpadetail(prm) {
try {
var resp = await axios.post(URL + 'jparight/savealljpadetail',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
};
}
}