const URL = "/one-api/mockup/masterdata/"; export async function search(token, code,name) { try { var resp = await axios.post(URL + 'normalvaluev3/search', { token:token, code: code, 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 searchmethode(token,prm) { try { var resp = await axios.post(URL + 'normalvaluev3/searchmethode',{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 getsexreg(token) { try { var resp = await axios.post(URL + 'normalvaluev3/getsexreg',{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 save(prm) { try { var resp = await axios.post(URL + 'normalvaluev3/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 newnormalvalue(prm) { try { var resp = await axios.post(URL + 'normalvaluev3/newnormalvalue',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 + 'normalvaluev3/deletenilainormal',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 + 'normalvaluev3/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 getnilainormal(prm) { try { var resp = await axios.post(URL + 'normalvaluev3/getnilainormal',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 + 'normalvaluev3/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 + 'normalvaluev3/getmou',{id:prm.Nat_TestID,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 savenewnilainormal(prm) { try { var resp = await axios.post(URL + 'normalvaluev3/savenewnilainormal',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 savenewnilaiabnormal(prm) { try { var resp = await axios.post(URL + 'normalvaluev3/savenewnilaiabnormal',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 saveeditnilainormal(prm) { try { var resp = await axios.post(URL + 'normalvaluev3/saveeditnilainormal',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 savenormalvaluelang(prm) { try { var resp = await axios.post(URL + 'normalvaluev3/savenormalvaluelang', 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 deletenilainormal(prm) { try { var resp = await axios.post(URL + 'normalvaluev3/deletenilainormal',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 + 'normalvaluev3/searchtest',{token:token,search:tes,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 }; } }