add modules folder based on s_menu
This commit is contained in:
156
test/vuex/acc-one-receive-surat-jalan/api/api.js
Normal file
156
test/vuex/acc-one-receive-surat-jalan/api/api.js
Normal file
@@ -0,0 +1,156 @@
|
||||
const URL = "/one-api/mockup/purchase/receivesuratjalan/ReceiveSuratJalan/";
|
||||
|
||||
export async function lookupEkpedisi(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + 'LookupEkspedisi', 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 lookupEkspedisiStaff(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + 'LookupEkspedisiStaff', 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 listingBranch(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + 'ListingBranch', 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 lookupWarehouse(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + 'LookupWarehouse', 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 lookupDetailSuratJalan(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + 'LookupDetailSuratJalan', 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 lookupSuratJalan(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + 'LookupSuratJalan', 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 saveReciveSJ(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + 'SaveReceiveSJ', 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// test input
|
||||
export async function testinput(params) {
|
||||
try {
|
||||
var response = await axios.post(URL + 'TestInput', 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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user