|
|
|
@ -115,7 +115,8 @@ |
|
|
|
style="margin-top: 1vh;"></el-pagination> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
<el-dialog v-model="showEdit" title="退款" class="editDialog" overflow draggable style="width: 40vw; background-color: #F3FAFE !important;"> |
|
|
|
<el-dialog v-model="showEdit" title="退款" class="editDialog" overflow draggable |
|
|
|
style="width: 40vw; background-color: #F3FAFE !important;"> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div class="left"> |
|
|
|
<div class="add-item"> |
|
|
|
@ -287,10 +288,6 @@ const getRefund = async function () { |
|
|
|
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 |
|
|
|
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' |
|
|
|
|
|
|
|
// if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) { |
|
|
|
// ElMessage.error('精网号必须为数字') |
|
|
|
// return |
|
|
|
// } |
|
|
|
if (searchForm.value.jwcode) { |
|
|
|
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); |
|
|
|
if (!isPositiveInteger) { |
|
|
|
@ -298,6 +295,11 @@ const getRefund = async function () { |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
// 增加精网号长度限制,防止后端400错误 |
|
|
|
if (searchForm.value.jwcode.length > 8) { |
|
|
|
ElMessage.error('精网号长度不能超过8位') |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const params = { |
|
|
|
pageNum: pagination.value.pageNum, |
|
|
|
@ -375,8 +377,8 @@ const submitEdit = async function () { |
|
|
|
jwcode: editRow.value.jwcode, |
|
|
|
paymentAmount: editRow.value.paymentAmount, |
|
|
|
paymentCurrency: editRow.value.paymentCurrency, |
|
|
|
newRefundGold: (editForm.value.partRefundGold*100), |
|
|
|
newRefundFree: (editForm.value.partRefundFree)*100 |
|
|
|
newRefundGold: (editForm.value.partRefundGold * 100), |
|
|
|
newRefundFree: (editForm.value.partRefundFree) * 100 |
|
|
|
|
|
|
|
} |
|
|
|
console.log(editRow.value.goodsName); |
|
|
|
@ -385,12 +387,12 @@ const submitEdit = async function () { |
|
|
|
params.newRefundGold = '' |
|
|
|
params.newRefundFree = '' |
|
|
|
} |
|
|
|
if(editRow.value.goodsName == '金币充值'){ |
|
|
|
if(editForm.value.partRefundGold>editRow.value.gold){ |
|
|
|
if (editRow.value.goodsName == '金币充值') { |
|
|
|
if (editForm.value.partRefundGold > editRow.value.gold) { |
|
|
|
ElMessage.error('退款金币数不能大于原金币数') |
|
|
|
return |
|
|
|
} |
|
|
|
if(editForm.value.partRefundFree>editRow.value.free){ |
|
|
|
if (editForm.value.partRefundFree > editRow.value.free) { |
|
|
|
ElMessage.error('退款免费金币数不能大于原免费金币数') |
|
|
|
return |
|
|
|
} |
|
|
|
|