add modules folder based on s_menu
This commit is contained in:
81
test/vuex/acc-one-supplier-payment-approved-v4/api/api.js
Normal file
81
test/vuex/acc-one-supplier-payment-approved-v4/api/api.js
Normal file
@@ -0,0 +1,81 @@
|
||||
const URL = "/one-api/mockup/supplierpaymentapprovedv3/billv2/";
|
||||
|
||||
export async function search(params) {
|
||||
try {
|
||||
const response = await axios.post(URL + "search", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
const data = response.data
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchDetail(params) {
|
||||
try {
|
||||
const response = await axios.post(URL + "searchDetail", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
const data = response.data
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getUserApproveLevel(params) {
|
||||
try {
|
||||
const response = await axios.post(URL + "getUserApproveLevel", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
const data = response.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateStatusPayment(params) {
|
||||
try {
|
||||
const response = await axios.post(URL + "updateStatusPayment", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
const data = response.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user