fix: tips
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m47s

This commit is contained in:
sexygoat
2026-05-06 11:13:51 +08:00
parent 8832150562
commit 304a5de1d6
3 changed files with 17 additions and 72 deletions

View File

@@ -68,7 +68,7 @@ export class RefundService extends BaseService {
}
/**
* 退回退款申请
* 驳回申请
* @param id 退款申请ID
* @param data 退回请求参数
*/

View File

@@ -102,38 +102,6 @@
</template>
</ElDialog>
<!-- 退回对话框 -->
<ElDialog
v-model="returnDialogVisible"
title="退回退款申请"
width="500px"
@closed="handleReturnDialogClosed"
>
<ElForm ref="returnFormRef" :model="returnForm" :rules="returnRules" label-width="120px">
<ElFormItem label="退款单号">
<span>{{ refund?.refund_no }}</span>
</ElFormItem>
<ElFormItem label="退回备注">
<ElInput
v-model="returnForm.remark"
type="textarea"
:rows="3"
maxlength="500"
show-word-limit
placeholder="请输入退回备注"
/>
</ElFormItem>
</ElForm>
<template #footer>
<div class="dialog-footer">
<ElButton @click="returnDialogVisible = false">取消</ElButton>
<ElButton type="warning" @click="handleReturnRefund" :loading="returnLoading">
确认退回
</ElButton>
</div>
</template>
</ElDialog>
<!-- 重新提交对话框 -->
<ElDialog
v-model="resubmitDialogVisible"
@@ -206,7 +174,6 @@
RefundStatus,
ApproveRefundRequest,
RejectRefundRequest,
ReturnRefundRequest,
ResubmitRefundRequest
} from '@/types/api'
import { formatDateTime } from '@/utils/business/format'
@@ -224,24 +191,20 @@
const approveDialogVisible = ref(false)
const rejectDialogVisible = ref(false)
const returnDialogVisible = ref(false)
const resubmitDialogVisible = ref(false)
const approveLoading = ref(false)
const rejectLoading = ref(false)
const returnLoading = ref(false)
const resubmitLoading = ref(false)
const approveFormRef = ref()
const rejectFormRef = ref()
const returnFormRef = ref()
const resubmitFormRef = ref()
const approveRules = ref()
const rejectRules = ref({
reject_reason: [{ required: true, message: '请输入拒绝原因', trigger: 'blur' }]
})
const returnRules = ref()
const resubmitRules = ref()
const approveForm = reactive<ApproveRefundRequest>({
@@ -253,10 +216,6 @@
reject_reason: ''
})
const returnForm = reactive<ReturnRefundRequest>({
remark: ''
})
const resubmitForm = reactive<{
requested_refund_amount?: number
actual_received_amount?: number
@@ -426,11 +385,6 @@
rejectForm.reject_reason = ''
}
const handleReturnDialogClosed = () => {
returnFormRef.value?.resetFields()
returnForm.remark = ''
}
const handleResubmitDialogClosed = () => {
resubmitFormRef.value?.resetFields()
resubmitForm.requested_refund_amount = undefined
@@ -485,26 +439,6 @@
})
}
const handleReturnRefund = async () => {
if (!returnFormRef.value || !refund.value) return
await returnFormRef.value.validate(async (valid) => {
if (valid) {
returnLoading.value = true
try {
await RefundService.returnRefund(refund.value.id, returnForm)
ElMessage.success('退回成功')
returnDialogVisible.value = false
await fetchRefundDetail(refund.value.id)
} catch (error) {
console.error(error)
} finally {
returnLoading.value = false
}
}
})
}
const handleResubmitRefund = async () => {
if (!resubmitFormRef.value || !refund.value) return

View File

@@ -136,11 +136,11 @@
<!-- 退回对话框 -->
<ElDialog
v-model="returnDialogVisible"
title="退回退款申请"
width="500px"
title="驳回申请"
width="30%"
@closed="handleReturnDialogClosed"
>
<ElForm ref="returnFormRef" :model="returnForm" :rules="returnRules" label-width="120px">
<ElForm ref="returnFormRef" :model="returnForm" :rules="returnRules" label-width="80">
<ElFormItem label="退款单号">
<span>{{ currentRefund?.refund_no }}</span>
</ElFormItem>
@@ -155,6 +155,9 @@
/>
</ElFormItem>
</ElForm>
<div class="return-dialog-tip">
驳回后该订单不可再申请退款若还需申请退款点击审核拒绝
</div>
<template #footer>
<div class="dialog-footer">
<ElButton @click="returnDialogVisible = false">取消</ElButton>
@@ -878,10 +881,10 @@
type: 'danger'
})
}
//
//
if (hasAuth('refund:return')) {
actions.push({
label: '回',
label: '回',
handler: () => handleShowReturn(row),
type: 'primary'
})
@@ -904,5 +907,13 @@
<style scoped lang="scss">
.refund-page {
height: 100%;
.return-dialog-tip {
margin-top: 8px;
font-size: 12px;
line-height: 1.6;
color: var(--el-color-primary);
text-align: center;
}
}
</style>