Files
FE_CPONE/test/vuex/one-fo-klinik-setting-v3/api/setting.js
2026-04-27 10:13:31 +07:00

104 lines
2.4 KiB
JavaScript

const URL = "/one-api/klinik/settingv3/";
export async function searchmou(token, companyid, search) {
try {
var resp = await axios.post(URL + 'searchmou', {
token: token,
companyid: companyid,
search: search
});
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 savesetting(prm) {
try {
var resp = await axios.post(URL + 'savesetting', 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(token, search) {
try {
var resp = await axios.post(URL + 'searchcompany', {
token: token,
search: search
});
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 get_data(prm) {
try {
var resp = await axios.post(URL + 'get_data', 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 getLocationList(prm) {
try {
var resp = await axios.post(URL + 'getLocationList', 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
};
}
}