97 lines
2.0 KiB
JavaScript
97 lines
2.0 KiB
JavaScript
const URL = "/one-api/mockup/masterdata/one-conclusion/";
|
|
|
|
export async function searchdetail(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + "conclusion/searchdetail", 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 adddetail(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + "conclusion/adddetail", 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 deletedetail(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + "conclusion/deletedetail", 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 saveeditflag(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + "conclusion/saveeditflag", 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 editdetail(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + "conclusion/editdetail", 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,
|
|
};
|
|
}
|
|
}
|