60 lines
1.4 KiB
JavaScript
60 lines
1.4 KiB
JavaScript
const URL = "/one-api/mockup/supplierpaymentcashierv5/";
|
|
|
|
export async function search(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'bill/search', prm);
|
|
if (resp.status != 200) {
|
|
return {
|
|
status: "ERR",
|
|
message: resp.statusText
|
|
};
|
|
}
|
|
let data = resp.data;
|
|
return data;
|
|
} catch (e) {
|
|
return {
|
|
status: "ERR",
|
|
message: e.message
|
|
};
|
|
}
|
|
}
|
|
|
|
export async function selectpaymenttype(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + 'payment/selectpaymenttype',prm);
|
|
if (resp.status != 200) {
|
|
return {
|
|
status: "ERR",
|
|
message: resp.statusText
|
|
};
|
|
}
|
|
let data = resp.data;
|
|
return data;
|
|
} catch(e) {
|
|
return {
|
|
status: "ERR",
|
|
message: e.message
|
|
};
|
|
}
|
|
}
|
|
|
|
export async function pay(prm) {
|
|
try {
|
|
// var resp = await axios.post(URL + 'payment/paymulti',prm);
|
|
var resp = await axios.post(URL + 'PaymentV2/payinvoicemulti',prm);
|
|
if (resp.status != 200) {
|
|
return {
|
|
status: "ERR",
|
|
message: resp.statusText
|
|
};
|
|
}
|
|
let data = resp.data;
|
|
return data;
|
|
} catch(e) {
|
|
return {
|
|
status: "ERR",
|
|
message: e.message
|
|
};
|
|
}
|
|
}
|