mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +08:00
Error adding payment (#1091)
Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
parent
54a4612e7b
commit
ef92f37712
@ -777,8 +777,12 @@ export default {
|
||||
tenderTypeCode,
|
||||
currencyUuid: this.dayRate.currencyTo.uuid
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.type !== 'error') {
|
||||
this.addCollect()
|
||||
}
|
||||
})
|
||||
}
|
||||
this.addCollect()
|
||||
},
|
||||
updateServer(listPaymentsLocal) {
|
||||
const posUuid = this.currentPointOfSales.uuid
|
||||
|
@ -199,7 +199,7 @@ export default {
|
||||
return undefined
|
||||
})
|
||||
if (isEmptyValue(listPayments)) {
|
||||
createPayment({
|
||||
return createPayment({
|
||||
posUuid,
|
||||
orderUuid,
|
||||
invoiceUuid,
|
||||
@ -215,6 +215,10 @@ export default {
|
||||
.then(response => {
|
||||
const orderUuid = response.order_uuid
|
||||
dispatch('listPayments', { orderUuid })
|
||||
return {
|
||||
...response,
|
||||
type: 'Success'
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.warn(`ListPaymentsFromServer: ${error.message}. Code: ${error.code}.`)
|
||||
@ -223,9 +227,13 @@ export default {
|
||||
message: error.message,
|
||||
showClose: true
|
||||
})
|
||||
return {
|
||||
...error,
|
||||
type: 'error'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updatePayment({
|
||||
return updatePayment({
|
||||
paymentUuid: listPayments.uuid,
|
||||
bankUuid,
|
||||
referenceNo,
|
||||
@ -237,6 +245,10 @@ export default {
|
||||
.then(response => {
|
||||
const orderUuid = response.order_uuid
|
||||
dispatch('listPayments', { orderUuid })
|
||||
return {
|
||||
...response,
|
||||
type: 'Success'
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.warn(`ListPaymentsFromServer: ${error.message}. Code: ${error.code}.`)
|
||||
@ -245,6 +257,10 @@ export default {
|
||||
message: error.message,
|
||||
showClose: true
|
||||
})
|
||||
return {
|
||||
...error,
|
||||
type: 'error'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user