add modules folder based on s_menu
This commit is contained in:
115
test/vuex/acc-one-listing-pr/api/api.js
Normal file
115
test/vuex/acc-one-listing-pr/api/api.js
Normal file
@@ -0,0 +1,115 @@
|
||||
const URL = "/one-api/mockup/purchase/listing/PurchaseRequestListing/";
|
||||
|
||||
export async function listing_regional(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'listing_regional', params)
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.message
|
||||
}
|
||||
}
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function listing_branch(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'listing_branch', params)
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.message
|
||||
}
|
||||
}
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// export async function listing_purchase_req(params) {
|
||||
// try {
|
||||
// var resp = await axios.post(URL + 'listing_pr', params)
|
||||
// if (resp.status != 200) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: resp.message
|
||||
// }
|
||||
// }
|
||||
// let data = resp.data
|
||||
// return data
|
||||
// } catch (error) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: error.message
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
export async function listing_purchase_req(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'list_purchaserequest', params)
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.message
|
||||
}
|
||||
}
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function add_flag_status(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'insertstatus', params)
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.message
|
||||
}
|
||||
}
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function edit_flag_status(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'changestatus', params)
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.message
|
||||
}
|
||||
}
|
||||
let data = resp.data
|
||||
return data
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user