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

85 lines
1.9 KiB
JavaScript

const URL = "/one-api/klinik/setting/";
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
};
}
}