add modules folder based on s_menu
This commit is contained in:
81
test/vuex/acc-one-po-asset/api/api.js
Normal file
81
test/vuex/acc-one-po-asset/api/api.js
Normal file
@@ -0,0 +1,81 @@
|
||||
const URL = "/one-api/mockup/purchase/order/PurchaseOrderAset/";
|
||||
|
||||
export async function getListSupplier(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "getListSupplier", params)
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: responsep.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getListCabang(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "getListCabang", params)
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: responsep.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchRequestAset(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "searchRequestAset", params)
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: responsep.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getUserApproveLevel(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "getUserApproveLevel", params)
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: responsep.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user