const URL = "/one-api/v1/masterdata/"; export async function search(token, name) { try { var resp = await axios.post(URL + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 + 'testcalculationv2/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 }; } }