110 lines
2.8 KiB
JavaScript
110 lines
2.8 KiB
JavaScript
const URL = "/one-api/mockup/process/refdeliverysamplev6/";
|
|
|
|
export async function selected(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'refdeliverysamplev6/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 selectedbybarcode(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'refdeliverysamplev6/selected_samplebybarcode', 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 lookupbyname(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'refdeliverysamplev6/lookupsamplebyname', 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 + 'refdeliverysamplev6/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 + 'refdeliverysamplev6/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 tolak_all(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'refdeliverysamplev6/tolak_all', 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
|
|
};
|
|
}
|
|
} |