const URL = "/one-api/mockup/masterdata/"; export async function search(token, name) { try { var resp = await axios.post(URL + 'testcalculationnew/search', { token:token, nama: name }); 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 getsexreg(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/getsexreg',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 + 'testcalculationnew/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 newtestcalculation(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/newtestcalculation',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(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/delete',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 sendorder(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/sendorder',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 getdetail(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/getdetail',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 getnumberx(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/getnumber',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 deletenumberx(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/deletenumber',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,prm) { try { var resp = await axios.post(URL + 'testcalculationnew/searchcompany',{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 getmou(token,prm) { try { var resp = await axios.post(URL + 'testcalculationnew/getmou',{id:prm.M_CompanyID,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 savenewdetail(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/savenewdetail',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 saveeditdetail(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/saveeditdetail',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 deletedetail(prm) { try { var resp = await axios.post(URL + 'testcalculationnew/deletedetail',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 searchtest(token,tes,mouid) { try { var resp = await axios.post(URL + 'testcalculationnew/searchtest',{token:token,search:tes}); 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 searchtestheader(token,tes,mouid) { try { var resp = await axios.post(URL + 'testcalculationnew/searchtestheader',{token:token,search:tes}); 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 searchtestfavorit(token,mouid) { try { var resp = await axios.post(URL + 'testcalculationnew/searchtestfavorit',{token:token,mouid:mouid}); if (resp.status != 200) { return { status: "ERR", message: resp.statusText }; } let data = resp.data; return data; } catch(e) { return { status: "ERR", message: e.message }; } }