salary
qsh 3 months ago
parent ea7fae45e3
commit 8df1f7d25a
  1. 9
      src/api/clue/afterSale.js
  2. 9
      src/api/clue/payment.js
  3. 29
      src/views/Clue/Order/Comp/AfterSales.vue
  4. 137
      src/views/Clue/Order/Comp/DialogAfterSaleDetail.vue
  5. 87
      src/views/Clue/Order/Comp/DialogBatchAudit.vue
  6. 127
      src/views/Clue/Order/Comp/DialogFeebackDetail.vue
  7. 27
      src/views/Clue/Order/Comp/Reback.vue
  8. 4
      src/views/Home/Index.vue

@ -20,7 +20,16 @@ export const auditAfterSale = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-after-sale/check', data })
}
export const batchAuditAfterSale = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-after-sale/batch/check', data })
}
// 撤销
export const cancelApplyAfterSale = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-after-sale/revoke', params: data })
}
// 查询详情
export const getAfterSaleDetail = async (params) => {
return await request.get({ url: '/admin-api/crm/sign-after-sale/get', params })
}

@ -20,7 +20,16 @@ export const auditPayment = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-pay-record/check', data })
}
export const batchAuditPayment = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-pay-record/batch/check', data })
}
// 撤销
export const cancelApplyPayment = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-pay-record/revoke', params: data })
}
// 查询详情
export const getPaymentDetail = async (params) => {
return await request.get({ url: '/admin-api/crm/sign-pay-record/get', params })
}

@ -64,7 +64,13 @@
</el-form-item>
</el-form>
<el-table :data="tableList" border>
<el-table
v-loading="loading"
:data="tableList"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
<el-table-column prop="signId" label="成交单号" min-width="150px" />
<el-table-column prop="name" label="线索名称" min-width="200px" />
<el-table-column prop="phone" label="联系方式" min-width="150px" />
@ -112,6 +118,8 @@
@pagination="getList"
/>
<DialogAfterSaleAudit ref="afterSaleAuditDialog" @success="getList" />
<DialogAfterSaleDetail ref="afterSaleDetailDialog" />
<DialogBatchAudit ref="batchAuditDialog" @success="getList" />
</div>
</template>
@ -121,6 +129,8 @@ import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { useUserStore } from '@/store/modules/user'
import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
import DialogAfterSaleDetail from './DialogAfterSaleDetail.vue'
import DialogBatchAudit from './DialogBatchAudit.vue'
const afterSaleAuditDialog = ref()
@ -177,12 +187,23 @@ async function getList() {
}
}
function batchAudit(row) {
afterSaleAuditDialog.value.open(row)
const batchIds = ref([])
function handleSelectionChange(val) {
batchIds.value = val
}
const batchAuditDialog = ref()
function batchAudit() {
if (batchIds.value.length) {
batchAuditDialog.value.open('aftersale', batchIds.value)
} else {
message.info('请选择表格中需要审核的数据')
}
}
const afterSaleDetailDialog = ref()
function handleDetail(id) {
console.log(id)
afterSaleDetailDialog.value.open(id)
}
async function handleCancel(id) {
try {

@ -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>

@ -0,0 +1,87 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="600px">
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
<el-form-item label="状态" prop="state">
<el-radio-group v-model="formData.state">
<el-radio :label="3"> 通过 </el-radio>
<el-radio :label="4"> 驳回 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<Editor v-model:modelValue="formData.remark" />
</el-form-item>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script name="DialogAfterSaleAudit" setup>
import { batchAuditAfterSale } from '@/api/clue/afterSale'
import { batchAuditPayment } from '@/api/clue/payment'
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formData = ref({
state: 3,
remark: ''
})
const formRef = ref() // Ref
const formType = ref('aftersale')
const titleMap = {
aftersale: '批量售后审核',
feeback: '批量回款审核'
}
/** 打开弹窗 */
const open = (type, ids) => {
dialogVisible.value = true
formType.value = type
dialogTitle.value = titleMap[type] || '批量审核'
resetForm(ids)
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef.value) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
if (formType.value == 'aftersale') {
await batchAuditAfterSale(formData.value)
message.success('审核完成!')
} else if (formType.value == 'feeback') {
await batchAuditPayment(formData.value)
message.success('审核完成!')
} else {
return
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = (ids) => {
formData.value = {
payIds: ids,
saleIds: ids,
state: 3,
remark: ''
}
formRef.value?.resetFields()
}
</script>

@ -0,0 +1,127 @@
<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="DialogFeebackDetail" setup>
import { getPaymentDetail } from '@/api/clue/payment'
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: 'money',
label: '回款金额',
span: 1
},
{
field: 'isPayoff',
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 getPaymentDetail({ id })
} catch (error) {
console.log(error)
}
}
defineExpose({ open }) // open
</script>

@ -64,7 +64,13 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" border>
<el-table
v-loading="loading"
:data="tableList"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
<el-table-column prop="signId" label="成交单号" min-width="150px" />
<el-table-column prop="name" label="线索名称" min-width="200px" />
<el-table-column prop="phone" label="联系方式" min-width="150px" />
@ -111,6 +117,8 @@
/>
<DialogFeebackAudit ref="feebackDialog" @success="getList" />
<DialogFeebackDetail ref="feebackDetailDialog" />
<DialogBatchAudit ref="batchAuditDialog" @success="getList" />
</div>
</template>
@ -120,6 +128,8 @@ import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { useUserStore } from '@/store/modules/user'
import DialogFeebackAudit from './DialogFeebackAudit.vue'
import DialogFeebackDetail from './DialogFeebackDetail.vue'
import DialogBatchAudit from './DialogBatchAudit.vue'
const userStore = useUserStore()
const message = useMessage() //
@ -176,12 +186,23 @@ async function getList() {
}
}
const batchIds = ref([])
function handleSelectionChange(val) {
batchIds.value = val
}
const batchAuditDialog = ref()
function batchAudit() {
console.log(123)
if (batchIds.value.length) {
batchAuditDialog.value.open('aftersale', batchIds.value)
} else {
message.info('请选择表格中需要审核的数据')
}
}
const feebackDetailDialog = ref()
function handleDetail(id) {
console.log(id)
feebackDetailDialog.value.open(id)
}
async function handleCancel(id) {
try {

@ -203,7 +203,7 @@ const getMonthlySaleRate = async () => {
)
set(lineOptionsData, 'series', [
{
name: t('analysis.estimate'),
name: '个人成交率',
smooth: true,
type: 'line',
data: data.map((v) => v.estimate),
@ -211,7 +211,7 @@ const getMonthlySaleRate = async () => {
animationEasing: 'cubicInOut'
},
{
name: t('analysis.actual'),
name: '平均成交率',
smooth: true,
type: 'line',
itemStyle: {},

Loading…
Cancel
Save