const URL = "/one-api/v1/masterdata/"; export async function search(prm) { try { var resp = await axios.post(URL + 'test_v3/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(prm) { try { var resp = await axios.post(URL + 'test_v3/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 getsubgroup(prm) { try { var resp = await axios.post(URL + 'test_v3/getsubgroup',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 getsubsubgroup(prm) { try { var resp = await axios.post(URL + 'test_v3/getsubsubgroup',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 + 'test_v3/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 newtest(prm) { try { var resp = await axios.post(URL + 'test_v3/newtest',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 + 'test_v3/deletetest',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 getaddress(prm) { try { var resp = await axios.post(URL + 'test_v3/getaddress',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 searchsample(token,prm) { try { var resp = await axios.post(URL + 'test_v3/searchsample',{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 getsubarea(token,prm) { try { var resp = await axios.post(URL + 'test_v3/getsubarea',{id:prm.M_CityID,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 savenewaddress(prm) { try { var resp = await axios.post(URL + 'test_v3/savenewaddress',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 saveeditaddress(prm) { try { var resp = await axios.post(URL + 'test_v3/saveeditaddress',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 deleteaddress(prm) { try { var resp = await axios.post(URL + 'test_v3/deleteaddress',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 check_exist_code(prm) { try { var resp = await axios.post(URL + 'test_v3/check_exist_code',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 }; } }