first commit + add fe component vue accone
This commit is contained in:
181
test/vuex/acc-one-faktur-v4/api/data.js
Normal file
181
test/vuex/acc-one-faktur-v4/api/data.js
Normal file
@@ -0,0 +1,181 @@
|
||||
const URL = "/one-api/mockup/purchase/faktur/Fakturv4/";
|
||||
|
||||
export async function LookupStaff(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "LookupStaff", 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 LookupSupplier(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "LookupSupplier", 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 LookupPO(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "LookupPO", 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 LookupDetailPO(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "LookupDetailPO", params)
|
||||
if (response.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = response.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function LookupRO(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "LookupRO", 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 LookupItemRO(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + "LookupItemRO", 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 LookupFaktur(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "LookupListFaktur", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function LookupFakturDetail(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "LookupFakturDetail", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function LookupAttachment(params) {
|
||||
try {
|
||||
const resp = await axios.post(URL + "LookupAttachment", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
}
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
121
test/vuex/acc-one-faktur-v4/api/form.js
Normal file
121
test/vuex/acc-one-faktur-v4/api/form.js
Normal file
@@ -0,0 +1,121 @@
|
||||
const URL = "/one-api/mockup/purchase/faktur/Fakturv4/";
|
||||
|
||||
export async function CreateFaktur(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "CreateFaktur", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function UpdateFaktur(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "UpdateFaktur", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function DeleteFaktur(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "DeleteFaktur", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
}
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function ApproveFaktur(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + "ApproveFaktur", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
}
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function RejectFaktur(params) {
|
||||
try {
|
||||
let resp = await axios.post(URL + "RejectFaktur", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: resp.statusText
|
||||
}
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function VerifyFaktur(params) {
|
||||
try {
|
||||
let resp = await axios.post(URL + "VerifyFaktur", params)
|
||||
if (resp.status !== 200) {
|
||||
return {
|
||||
status: 'ERR',
|
||||
message: resp.statusText
|
||||
}
|
||||
}
|
||||
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user