Files
FE_CPONE/test/vuex/one-receive-reference-distribution-courier/api/receivereferencedelivery.js
2026-04-27 10:13:31 +07:00

136 lines
3.1 KiB
JavaScript

const URL = "/one-api/mockup/receivereference/";
export async function search(prm) {
try {
var resp = await axios.post(URL + 'distibutioncourier/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 getcompanycouriers(prm) {
try {
var resp = await axios.post(URL + 'distibutioncourier/getcompanycouriers', 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 doaction(prm) {
try {
var resp = await axios.post(URL + 'distibutioncourier/doaction', 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 getdoctoraddress(prm) {
try {
var resp = await axios.post(URL + 'distibutioncourier/getdoctoraddress', 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 getordersamples(prm) {
try {
var resp = await axios.post(URL + 'distibutioncourier/getordersamples', 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 + 'distibutioncourier/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 deletetrx(prm) {
try {
var resp = await axios.post(URL + 'distibutioncourier/deletetrx', 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
};
}
}