From 7cd60a8f8d48624f76939968664fb10176bf0261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Tue, 20 Oct 2026 16:46:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=94=AE=E5=90=8E=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=86=85=E5=BC=B9=E7=AA=97=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=E8=B7=B3=E8=BD=AC=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 审核改为列表内弹窗(通过/拒绝、拒绝原因必填、审核备注选填),提交后原地刷新列表 --- .../admin/src/pages/order/afterSale/index.vue | 75 +++++++++++++++++-- 1 file changed, 69 insertions(+), 6 deletions(-) diff --git a/frontend/admin/src/pages/order/afterSale/index.vue b/frontend/admin/src/pages/order/afterSale/index.vue index 55c797560..f76377a4a 100644 --- a/frontend/admin/src/pages/order/afterSale/index.vue +++ b/frontend/admin/src/pages/order/afterSale/index.vue @@ -171,6 +171,40 @@ + + + + + + 审核通过 + 审核拒绝 + + + + + + + + + + + @@ -178,7 +212,7 @@ import { onMounted, ref } from 'vue'; import { useRouter } from 'vue-router'; import { ElMessage } from 'element-plus'; -import { afterSaleList, remarkAfterSale } from '@/api/afterSale'; +import { afterSaleList, auditAfterSale, remarkAfterSale } from '@/api/afterSale'; import { orderCenterFilterOptions } from '@/api/orderCenter'; import setting from '@/setting'; @@ -205,6 +239,9 @@ const loading = ref(false); const statusTab = ref(''); const remarkModal = ref(false); const remarkForm = ref({ id: 0, remark: '' }); +const auditModal = ref(false); +const auditId = ref(0); +const auditForm = ref({ result: 'pass', reject_reason: '', audit_remark: '' }); // 售后状态选项(与后端 STATUS_TEXT_MAP 对齐) const statusOptions = [ { key: 'pending_audit', label: '待审核' }, @@ -335,13 +372,39 @@ function viewDetail(row) { } /** - * 跳转详情页并定位审核区块 + * 打开审核弹窗 */ function goAudit(row) { - router.push({ - path: routePre + '/order/afterSale/detail/' + row.id, - query: { action: 'audit' }, - }); + auditId.value = row.id; + auditForm.value = { result: 'pass', reject_reason: '', audit_remark: '' }; + auditModal.value = true; +} + +/** + * 重置审核表单 + */ +function resetAuditForm() { + auditId.value = 0; + auditForm.value = { result: 'pass', reject_reason: '', audit_remark: '' }; +} + +/** + * 提交审核 + */ +function submitAudit() { + if (auditForm.value.result === 'reject' && !auditForm.value.reject_reason) { + ElMessage.warning('请填写拒绝原因'); + return; + } + auditAfterSale(auditId.value, auditForm.value) + .then((res) => { + ElMessage.success(res.msg); + auditModal.value = false; + getList(); + }) + .catch((res) => { + ElMessage.error(res.msg); + }); } /**