Files
FE_CPONE/test/vuex/one-futurelog/api/info.js
2026-04-27 10:13:31 +07:00

249 lines
6.0 KiB
JavaScript

const URL = "/one-api/tools/futureorderlog/";
export async function save(prm) {
try {
var resp = await axios.post(URL + 'log/addnewinstrument', 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 saveall(prm) {
try {
var resp = await axios.post(URL + 'log/saveallinstrument', 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 xdelete(token,controlid,instrumentid) {
try {
var resp = await axios.post(URL + 'log/deleteinstrument', { controlid: controlid, instrumentid:instrumentid ,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 searchinstrument(prm) {
try {
var resp = await axios.post(URL + 'log/searchinstrument',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 searchcity(prm) {
try {
var resp = await axios.post(URL + 'log/searchcity',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 searchdistrict(prm) {
try {
var resp = await axios.post(URL + 'log/searchdistrict',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 searchkelurahan(prm) {
try {
var resp = await axios.post(URL + 'log/searchkelurahan',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 searchcompany(prm) {
try {
var resp = await axios.post(URL + 'log/searchcompany',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 searchmou(prm) {
try {
var resp = await axios.post(URL + 'log/searchmou',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 searchdoctor(prm) {
try {
var resp = await axios.post(URL + 'log/searchdoctor',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() {
try {
var resp = await axios.post(URL + 'show/future_order');
let data = resp;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function lookupkuota(prm) {
try {
var resp = await axios.post(URL + 'log/lookupkuota', 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 lookupbyid(prm) {
try {
var resp = await axios.post(URL + 'log/lookupcontrolbyid', 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 selectaddressdoctor(prm) {
try {
var resp = await axios.post(URL + 'log/selectaddressdoctor',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
};
}
}