add modules folder based on s_menu
This commit is contained in:
162
test/vuex/acc-one-approve-po-jasa/api/api.js
Normal file
162
test/vuex/acc-one-approve-po-jasa/api/api.js
Normal file
@@ -0,0 +1,162 @@
|
||||
const URL = "/one-api/mockup/purchase/order/PurchaseOrderService/";
|
||||
const URLRO = "/one-api/mockup/receive-item-po/ReceiveOrderService/";
|
||||
|
||||
export async function getDaftarCabang(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "getDaftarCabang", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getDaftarSupplier(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "getDaftarSupplier", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getDaftarPOJasa(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "getDaftarPOJasa", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getDataKontrakPOJasa(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "getDataKontrakPOJasa", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.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: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateApprovalPO(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "updateApprovalPO", params);
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: response.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function generatePOItemReceive(params) {
|
||||
try {
|
||||
const response = await axios.post(URLRO + "generatePOItemReceive", 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 getDaftarAttachment(params) {
|
||||
try {
|
||||
const response = await axios.post(URL + "getDaftarAttachment", 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