Initial import
This commit is contained in:
115
one-ui/masterdata/one-md-nonlab-template-v3/api/detail.js
Normal file
115
one-ui/masterdata/one-md-nonlab-template-v3/api/detail.js
Normal file
@@ -0,0 +1,115 @@
|
||||
const URL = "/one-api/cpone/masterdata/";
|
||||
|
||||
export async function getunits(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/getunits", 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 searchdetail(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/searchdetail", 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 adddetail(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/adddetail", 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 + "nonlabtemplatev3/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 saveeditflag(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/saveeditflag", 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 editdetail(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/editdetail", 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,
|
||||
};
|
||||
}
|
||||
}
|
||||
77
one-ui/masterdata/one-md-nonlab-template-v3/api/nonlab.js
Normal file
77
one-ui/masterdata/one-md-nonlab-template-v3/api/nonlab.js
Normal file
@@ -0,0 +1,77 @@
|
||||
const URL = "/one-api/cpone/masterdata/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/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 addnonlab(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/addnonlab", 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 editnonlab(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/editnonlab", 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 deletenonlab(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/deletenonlab", 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,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
const URL = "/one-api/cpone/masterdata/";
|
||||
|
||||
export async function lookuptest(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/lookuptest", 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 saveedittestmap(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "nonlabtemplatev3/saveedittestmap", 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,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user