mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +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,
|
tenderTypeCode,
|
||||||
currencyUuid: this.dayRate.currencyTo.uuid
|
currencyUuid: this.dayRate.currencyTo.uuid
|
||||||
})
|
})
|
||||||
|
.then((response) => {
|
||||||
|
if (response.type !== 'error') {
|
||||||
|
this.addCollect()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.addCollect()
|
|
||||||
},
|
},
|
||||||
updateServer(listPaymentsLocal) {
|
updateServer(listPaymentsLocal) {
|
||||||
const posUuid = this.currentPointOfSales.uuid
|
const posUuid = this.currentPointOfSales.uuid
|
||||||
|
@ -199,7 +199,7 @@ export default {
|
|||||||
return undefined
|
return undefined
|
||||||
})
|
})
|
||||||
if (isEmptyValue(listPayments)) {
|
if (isEmptyValue(listPayments)) {
|
||||||
createPayment({
|
return createPayment({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid,
|
orderUuid,
|
||||||
invoiceUuid,
|
invoiceUuid,
|
||||||
@ -215,6 +215,10 @@ export default {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
const orderUuid = response.order_uuid
|
const orderUuid = response.order_uuid
|
||||||
dispatch('listPayments', { orderUuid })
|
dispatch('listPayments', { orderUuid })
|
||||||
|
return {
|
||||||
|
...response,
|
||||||
|
type: 'Success'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.warn(`ListPaymentsFromServer: ${error.message}. Code: ${error.code}.`)
|
console.warn(`ListPaymentsFromServer: ${error.message}. Code: ${error.code}.`)
|
||||||
@ -223,9 +227,13 @@ export default {
|
|||||||
message: error.message,
|
message: error.message,
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
})
|
||||||
|
return {
|
||||||
|
...error,
|
||||||
|
type: 'error'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
updatePayment({
|
return updatePayment({
|
||||||
paymentUuid: listPayments.uuid,
|
paymentUuid: listPayments.uuid,
|
||||||
bankUuid,
|
bankUuid,
|
||||||
referenceNo,
|
referenceNo,
|
||||||
@ -237,6 +245,10 @@ export default {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
const orderUuid = response.order_uuid
|
const orderUuid = response.order_uuid
|
||||||
dispatch('listPayments', { orderUuid })
|
dispatch('listPayments', { orderUuid })
|
||||||
|
return {
|
||||||
|
...response,
|
||||||
|
type: 'Success'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.warn(`ListPaymentsFromServer: ${error.message}. Code: ${error.code}.`)
|
console.warn(`ListPaymentsFromServer: ${error.message}. Code: ${error.code}.`)
|
||||||
@ -245,6 +257,10 @@ export default {
|
|||||||
message: error.message,
|
message: error.message,
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
})
|
||||||
|
return {
|
||||||
|
...error,
|
||||||
|
type: 'error'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user