first commit + add fe component vue accone
This commit is contained in:
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