Files
FE_CPONE/fo/one-fo-supervisor-v1/api/delivery.js
2026-04-27 10:13:31 +07:00

77 lines
1.9 KiB
JavaScript

const URL = "/one-api/mockup/fo/supervisor/";
export async function save(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_delivery',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 lookup(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_delivery',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 savedeliveryadditionalverification(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_delivery_additional_verification',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 savedeliveryadditionalother(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_delivery_additional_other',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
};
}
}