feature: po pay downpayment
This commit is contained in:
@@ -210,6 +210,7 @@ export default {
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
|
||||
async lookup_banks(context) {
|
||||
context.commit("bill/update_get_data_status", 1, {
|
||||
root: true
|
||||
@@ -243,6 +244,7 @@ export default {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
async lookup_accounts(context) {
|
||||
context.commit("update_lookup_status", 1)
|
||||
try {
|
||||
@@ -264,6 +266,7 @@ export default {
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
|
||||
async searchcard(context, prm) {
|
||||
context.commit("update_lookup_status", 1)
|
||||
try {
|
||||
@@ -282,6 +285,7 @@ export default {
|
||||
context.commit("update_lookup_status", 3)
|
||||
}
|
||||
},
|
||||
|
||||
async pay(context, prm) {
|
||||
context.commit("update_lookup_status", 1)
|
||||
try {
|
||||
@@ -312,6 +316,38 @@ export default {
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
|
||||
async payDownpayment(context, prm) {
|
||||
context.commit("update_lookup_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.payDownpayment(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_lookup_status", 3)
|
||||
context.commit("update_lookup_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_lookup_status", 2)
|
||||
context.commit("update_lookup_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records.types,
|
||||
total: resp.data.total
|
||||
}
|
||||
let xnumber = resp.data.records.data.numberx
|
||||
let id = resp.data.records.data.idx
|
||||
context.commit("update_disable_btn_pay", 'Y')
|
||||
context.commit("update_idx", id)
|
||||
context.commit("update_total_payment", 0)
|
||||
context.commit("update_paynumber", "Payment Instruction nomor <span style='color:red'>" + xnumber + "</span> telah berhasil")
|
||||
context.commit("update_dialog_pay_success", true)
|
||||
context.commit("update_in_saving", false)
|
||||
context.commit("update_xbayar", 0)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_lookup_status", 3)
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
|
||||
async editpay(context, prm) {
|
||||
context.commit("update_lookup_status", 1)
|
||||
try {
|
||||
@@ -342,6 +378,7 @@ export default {
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
|
||||
async edit_note(context, prm) {
|
||||
context.commit("update_lookup_status", 1)
|
||||
try {
|
||||
@@ -363,6 +400,7 @@ export default {
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
|
||||
async delete_note(context, prm) {
|
||||
context.commit("update_lookup_status", 1)
|
||||
try {
|
||||
@@ -384,6 +422,7 @@ export default {
|
||||
context.commit("update_lookup_error_message", e.message)
|
||||
}
|
||||
},
|
||||
|
||||
async selectpaymenttype(context,payload) {
|
||||
context.commit("bill/update_get_data_status", 1, {
|
||||
root: true
|
||||
@@ -421,6 +460,7 @@ export default {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
async selectpaymenttypeold(context) {
|
||||
context.commit("bill/update_get_data_status", 1, {
|
||||
root: true
|
||||
@@ -456,6 +496,7 @@ export default {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
async selectcard(context) {
|
||||
context.commit("bill/update_get_data_status", 1, {
|
||||
root: true
|
||||
@@ -488,6 +529,7 @@ export default {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
async selectedc(context) {
|
||||
context.commit("bill/update_get_data_status", 1, {
|
||||
root: true
|
||||
@@ -522,4 +564,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user