diff --git a/src/views/moneyManage/refundDetail/refundService.vue b/src/views/moneyManage/refundDetail/refundService.vue index 53234fd..3ddd680 100644 --- a/src/views/moneyManage/refundDetail/refundService.vue +++ b/src/views/moneyManage/refundDetail/refundService.vue @@ -234,6 +234,7 @@ import { pa } from 'element-plus/es/locales.mjs' import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import RefundRecallBackground from '@/assets/images/refund-recall.png' import { isNumber } from 'lodash' +import { re } from 'mathjs' const dateRange = ref([]) const searchForm = ref({ @@ -357,7 +358,6 @@ const submitEdit = async function () { ElMessage.error('无此权限') return } - try { console.log(editRow.value) let params = { @@ -372,8 +372,21 @@ const submitEdit = async function () { newRefundFree: editForm.value.partRefundFree } - if (editForm.value.goodsName == '金币充值') { - params.partRefundGold = editForm.value.partRefundGold + console.log(editRow.value.goodsName); + + if (editRow.value.goodsName != '金币充值') { + params.newRefundGold = '' + params.newRefundFree = '' + } + if(editRow.value.goodsName == '金币充值'){ + if(editForm.value.partRefundGold>editRow.value.gold){ + ElMessage.error('退款金币数不能大于原金币数') + return + } + if(editForm.value.partRefundFree>editRow.value.free){ + ElMessage.error('退款免费金币数不能大于原免费金币数') + return + } } const result = await API({ url: '/Money/update',