Flatten nested repos
This commit is contained in:
110
test/vuex/one-process-ref-delivery-sample-v6/api/sample.js
Normal file
110
test/vuex/one-process-ref-delivery-sample-v6/api/sample.js
Normal file
@@ -0,0 +1,110 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user