|
@@ -48,6 +48,7 @@ import requests from "@common/requests";
|
|
|
import useShowToast from '@hooks/useToast'
|
|
|
|
|
|
const { toastSuccess, toastFail, toastText } = useShowToast()
|
|
|
+const emit = defineEmits()
|
|
|
const props = defineProps({
|
|
|
info: {
|
|
|
type: Object,
|
|
@@ -72,6 +73,7 @@ function deletePaymentCollection(row) {
|
|
|
}).then(() => {
|
|
|
requests.post(DELETE_SALES_ORDER_PAYMENT_RECORDS, { paymentId: row.id }).then(() => {
|
|
|
toastSuccess('操作成功')
|
|
|
+ emit('changePaymentCollection', props.info.id)
|
|
|
processingData(props.info.id)
|
|
|
}).catch((err) => {
|
|
|
toastFail(err.msg ? err.msg : '删除失败')
|
|
@@ -93,12 +95,13 @@ function addEditReceipt() {
|
|
|
[rowId ? 'paymentId' : 'orderId']: rowId ? rowId : props.info.id,
|
|
|
money: val,
|
|
|
}
|
|
|
- if ((+totalMoney + val) > orderAmount) {
|
|
|
+ if ((+totalMoney + +val) > orderAmount) {
|
|
|
toastText('回款金额不能大于订单金额')
|
|
|
return
|
|
|
}
|
|
|
requests.post(url, formVal).then(() => {
|
|
|
toastSuccess('操作成功')
|
|
|
+ emit('changePaymentCollection', props.info.id)
|
|
|
processingData(props.info.id)
|
|
|
showDialog.value = false
|
|
|
})
|