This commit is contained in:
qsh
2024-06-19 15:04:20 +08:00
parent ea7fae45e3
commit 8df1f7d25a
8 changed files with 421 additions and 10 deletions

View File

@@ -0,0 +1,137 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="900px">
<Descriptions
title="申请详情"
:data="orderInfo"
:schema="applySchema"
:columns="2"
labelWidth="130px"
/>
<Descriptions
title="审核详情"
:data="orderInfo"
:schema="orderInfo.state == 2 ? cancelSchema : auditSchema"
:columns="orderInfo.state == 2 ? 2 : 3"
labelWidth="100px"
/>
</Dialog>
</template>
<script name="DialogAfterSaleDetail" setup>
import { getAfterSaleDetail } from '@/api/clue/afterSale'
const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
const applySchema = [
{
field: 'name',
label: '线索名称',
span: 1
},
{
field: 'phone',
label: '联系方式',
span: 1
},
{
field: 'signUserName',
label: '登记人',
span: 1
},
{
field: 'dealDate',
label: '登记时间',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
span: 1
},
{
field: 'reason',
label: '售后原因',
span: 1
},
{
field: 'refundAmount',
label: '退款金额',
span: 1
},
{
field: 'isReturns',
label: '是否退货',
span: 1
},
{
field: 'solution',
label: '解决方案',
span: 1
},
{
field: 'applyUserName',
label: '申请人',
span: 1
},
{
field: 'applyTime',
label: '申请时间',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
span: 1
},
{
field: 'remark',
label: '备注',
span: 2,
isEditor: true
}
]
const auditSchema = [
{
field: 'stateName',
label: '审核状态',
span: 1
},
{
field: 'checkUserName',
label: '审核人',
span: 1
},
{
field: 'checkTime',
label: '审核时间',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
span: 1
},
{
field: 'checkRemark',
label: '备注',
span: 3,
isEditor: true
}
]
const cancelSchema = [
{
field: 'stateName',
label: '审核状态',
span: 1
},
{
field: 'revokeTime',
label: '撤销时间',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
span: 1
}
]
const orderInfo = ref({})
/** 打开弹窗 */
const open = async (id) => {
dialogVisible.value = true
dialogTitle.value = '售后申请详情'
try {
orderInfo.value = await getAfterSaleDetail({ id })
} catch (error) {
console.log(error)
}
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
</script>