Files
FE_CPONE/test/vuex/one-fo-verification-simple-barcode/api/done.js
2026-04-27 10:13:31 +07:00

101 lines
2.3 KiB
JavaScript

const URL = "/one-api/mockup/fo/verification/";
export async function search(prm) {
try {
var resp = await axios.post(URL + 'done/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 getalmaries(token) {
try {
var resp = await axios.post(URL + 'done/getalmaries',{token:token});
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 getracks(prm) {
try {
var resp = await axios.post(URL + 'done/getracks',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 + 'done/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 checkbarcode(prm) {
try {
var resp = await axios.post(URL + 'done/checkbarcode',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
};
}
}