75 lines
1.8 KiB
JavaScript
75 lines
1.8 KiB
JavaScript
const URL = "/one-api/mockup/process/refreceivesample-v7/";
|
|
|
|
export async function selected(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'sample/selected_sample', 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 searchcourier(token,prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'sample/searchcourier',{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 save(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'sample/confirmdeliveryorder', 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 createorder(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'sample/createorder', 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
|
|
};
|
|
}
|
|
}
|