salary
qsh 5 months ago
parent 2017baaf03
commit ea7fae45e3
  1. 4
      src/components/Form/src/Form.vue
  2. 2
      src/components/Search/src/Search.vue
  3. 19
      src/views/Clue/Order/Comp/AfterSales.vue
  4. 4
      src/views/Clue/Order/Comp/DialogAfterSale.vue
  5. 135
      src/views/Clue/Order/Comp/DialogAfterSaleAudit.vue
  6. 125
      src/views/Clue/Order/Comp/DialogFeebackAudit.vue
  7. 24
      src/views/Clue/Order/Comp/OrderList.vue
  8. 16
      src/views/Clue/Order/Comp/Reback.vue

@ -51,7 +51,8 @@ export default defineComponent({
// label // label
labelWidth: propTypes.oneOfType([String, Number]).def('auto'), labelWidth: propTypes.oneOfType([String, Number]).def('auto'),
// loading add by // loading add by
vLoading: propTypes.bool.def(false) vLoading: propTypes.bool.def(false),
inlineBlock: propTypes.bool.def(false)
}, },
emits: ['register'], emits: ['register'],
setup(props, { slots, expose, emit }) { setup(props, { slots, expose, emit }) {
@ -289,6 +290,7 @@ export default defineComponent({
model={props.isCustom ? props.model : formModel} model={props.isCustom ? props.model : formModel}
class={prefixCls} class={prefixCls}
v-loading={props.vLoading} v-loading={props.vLoading}
style={props.inlineBlock ? 'display: inline' : ''}
> >
{{ {{
// //

@ -38,6 +38,7 @@ const props = defineProps({
// //
expandField: propTypes.string.def(''), expandField: propTypes.string.def(''),
inline: propTypes.bool.def(true), inline: propTypes.bool.def(true),
inlineBlock: propTypes.bool.def(false),
model: { model: {
type: Object as PropType<Recordable>, type: Object as PropType<Recordable>,
default: () => ({}) default: () => ({})
@ -154,6 +155,7 @@ initSearch()
<!-- update by 芋艿class="-mb-15px" 用于降低和 ContentWrap 组件的底部距离避免空隙过大 --> <!-- update by 芋艿class="-mb-15px" 用于降低和 ContentWrap 组件的底部距离避免空隙过大 -->
<Form <Form
:inline="inline" :inline="inline"
:inlineBlock="inlineBlock"
:is-col="isCol" :is-col="isCol"
:is-custom="false" :is-custom="false"
isSearch isSearch

@ -29,6 +29,8 @@
<el-date-picker <el-date-picker
v-model="searchForm.dealDate" v-model="searchForm.dealDate"
type="daterange" type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
range-separator="-" range-separator="-"
start-placeholder="登记日期" start-placeholder="登记日期"
end-placeholder="登记日期" end-placeholder="登记日期"
@ -48,6 +50,8 @@
<el-date-picker <el-date-picker
v-model="searchForm.applyTime" v-model="searchForm.applyTime"
type="daterange" type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
range-separator="-" range-separator="-"
start-placeholder="申请日期" start-placeholder="申请日期"
end-placeholder="申请日期" end-placeholder="申请日期"
@ -94,7 +98,7 @@
text text
v-if="row.state == 1" v-if="row.state == 1"
v-hasPermi="['clue:order:after-sale-audit']" v-hasPermi="['clue:order:after-sale-audit']"
@click="handleAudit(row.id)" @click="handleAudit(row)"
> >
审核 审核
</el-button> </el-button>
@ -107,6 +111,7 @@
:total="total" :total="total"
@pagination="getList" @pagination="getList"
/> />
<DialogAfterSaleAudit ref="afterSaleAuditDialog" @success="getList" />
</div> </div>
</template> </template>
@ -115,6 +120,10 @@ import * as AfterSaleApi from '@/api/clue/afterSale'
import { getSimpleUserList as getUserOption } from '@/api/system/user' import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
const afterSaleAuditDialog = ref()
const userStore = useUserStore() const userStore = useUserStore()
const message = useMessage() // const message = useMessage() //
@ -168,8 +177,8 @@ async function getList() {
} }
} }
function batchAudit() { function batchAudit(row) {
console.log(123) afterSaleAuditDialog.value.open(row)
} }
function handleDetail(id) { function handleDetail(id) {
@ -188,8 +197,8 @@ async function handleCancel(id) {
console.log(err) console.log(err)
} }
} }
function handleAudit(id) { function handleAudit(row) {
console.log(id) afterSaleAuditDialog.value.open(row)
} }
function getOptions() { function getOptions() {

@ -14,8 +14,8 @@
新增售后 新增售后
</el-button> </el-button>
<el-form v-if="!showAdd" :model="form" ref="formRef" :rules="rules" label-width="80px"> <el-form v-if="!showAdd" :model="form" ref="formRef" :rules="rules" label-width="80px">
<el-form-item label="退款原因" prop="reason"> <el-form-item label="售后原因" prop="reason">
<el-input v-model="form.reason" placeholder="请输入退款原因" /> <el-input v-model="form.reason" placeholder="请输入售后原因" />
</el-form-item> </el-form-item>
<el-form-item label="退款金额" prop="refundAmount"> <el-form-item label="退款金额" prop="refundAmount">
<el-input-number <el-input-number

@ -0,0 +1,135 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<Descriptions :data="orderInfo" :schema="schema" :columns="2" labelWidth="130px" />
<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 { auditAfterSale } from '@/api/clue/afterSale'
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const schema = [
{
field: 'name',
label: '线索名称',
span: 1
},
{
field: 'phone',
label: '联系方式',
span: 1
},
{
field: 'signUserName',
label: '登记人',
span: 1
},
{
field: 'dealDate',
label: '登记时间',
span: 1
},
{
field: 'reason',
label: '售后原因',
span: 1
},
{
field: 'solution',
label: '解决方案',
span: 1
},
{
field: 'refundAmount',
label: '退款金额',
span: 1
},
{
field: 'isReturns',
label: '是否退货',
span: 1
},
{
field: 'applyUserName',
label: '申请人',
span: 1
},
{
field: 'applyTime',
label: '申请时间',
span: 1
},
{
field: 'remark',
label: '备注',
span: 2,
isEditor: true
}
]
const formLoading = ref(false) // 12
const formData = ref({
state: 3,
remark: ''
})
const formRef = ref() // Ref
const orderInfo = ref({})
/** 打开弹窗 */
const open = async (row) => {
dialogVisible.value = true
dialogTitle.value = '售后审核'
resetForm(row.id)
//
orderInfo.value = { ...row }
}
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 {
await auditAfterSale(formData.value)
message.success('审核完成!')
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = (signId) => {
formData.value = {
saleId: signId,
state: 3,
remark: ''
}
formRef.value?.resetFields()
}
</script>

@ -0,0 +1,125 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<Descriptions :data="orderInfo" :schema="schema" :columns="2" labelWidth="130px" />
<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="DialogFeebackAudit" setup>
import { auditPayment } from '@/api/clue/payment'
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const schema = [
{
field: 'name',
label: '线索名称',
span: 1
},
{
field: 'phone',
label: '联系方式',
span: 1
},
{
field: 'signUserName',
label: '登记人',
span: 1
},
{
field: 'dealDate',
label: '登记时间',
span: 1
},
{
field: 'money',
label: '回款金额',
span: 1
},
{
field: 'isPayoff',
label: '是否结清',
span: 1
},
{
field: 'applyUserName',
label: '申请人',
span: 1
},
{
field: 'applyTime',
label: '申请时间',
span: 1
},
{
field: 'remark',
label: '备注',
span: 2,
isEditor: true
}
]
const formLoading = ref(false) // 12
const formData = ref({
state: 3,
remark: ''
})
const formRef = ref() // Ref
const orderInfo = ref({})
/** 打开弹窗 */
const open = async (row) => {
dialogVisible.value = true
dialogTitle.value = '回款审核'
resetForm(row.id)
//
orderInfo.value = { ...row }
}
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 {
await auditPayment(formData.value)
message.success('审核完成!')
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = (signId) => {
formData.value = {
payId: signId,
state: 3,
remark: ''
}
formRef.value?.resetFields()
}
</script>

@ -2,9 +2,15 @@
<div> <div>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<div> <div>
<el-form :model="searchForm" ref="moreSearchRef" inline label-width="0"> <el-form
:model="searchForm"
ref="moreSearchRef"
inline
label-width="0"
style="display: inline"
>
<template v-if="appStore.getAppInfo?.instanceType == 1"> <template v-if="appStore.getAppInfo?.instanceType == 1">
<el-form-item> <el-form-item style="margin-bottom: 10px">
<el-select <el-select
v-model="searchForm.signSchool" v-model="searchForm.signSchool"
placeholder="选择驾校" placeholder="选择驾校"
@ -20,7 +26,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item style="margin-bottom: 10px">
<el-select <el-select
v-model="searchForm.signPlace" v-model="searchForm.signPlace"
placeholder="选择场地" placeholder="选择场地"
@ -37,7 +43,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item style="margin-bottom: 10px">
<el-select <el-select
v-model="searchForm.signClass" v-model="searchForm.signClass"
:disabled="!searchForm.signPlace" :disabled="!searchForm.signPlace"
@ -87,7 +93,13 @@
</el-form-item> </el-form-item>
</template> </template>
</el-form> </el-form>
<Search v-if="!loading" ref="searchRef" :schema="allSchemas.searchSchema" labelWidth="0"> <Search
v-if="!loading"
ref="searchRef"
:schema="allSchemas.searchSchema"
inlineBlock
labelWidth="0"
>
<template #actionMore> <template #actionMore>
<el-button @click="getTableList" v-hasPermi="['clue:order:search']"> 搜索 </el-button> <el-button @click="getTableList" v-hasPermi="['clue:order:search']"> 搜索 </el-button>
<el-button @click="resetQuery" v-hasPermi="['clue:order:reset']"> 重置 </el-button> <el-button @click="resetQuery" v-hasPermi="['clue:order:reset']"> 重置 </el-button>
@ -97,7 +109,7 @@
<!-- 列表 --> <!-- 列表 -->
<SSTable <SSTable
v-if="!loading" v-if="!loading"
class="mt-20px" class="mt-10px"
v-model:tableObject="tableObject" v-model:tableObject="tableObject"
:tableColumns="allSchemas.tableColumns" :tableColumns="allSchemas.tableColumns"
@get-list="getTableList" @get-list="getTableList"

@ -29,6 +29,8 @@
<el-date-picker <el-date-picker
v-model="searchForm.dealDate" v-model="searchForm.dealDate"
type="daterange" type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
range-separator="-" range-separator="-"
start-placeholder="登记日期" start-placeholder="登记日期"
end-placeholder="登记日期" end-placeholder="登记日期"
@ -48,6 +50,8 @@
<el-date-picker <el-date-picker
v-model="searchForm.applyTime" v-model="searchForm.applyTime"
type="daterange" type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
range-separator="-" range-separator="-"
start-placeholder="申请日期" start-placeholder="申请日期"
end-placeholder="申请日期" end-placeholder="申请日期"
@ -92,7 +96,7 @@
text text
v-if="row.state == 1" v-if="row.state == 1"
v-hasPermi="['clue:order:return-audit']" v-hasPermi="['clue:order:return-audit']"
@click="handleAudit(row.id)" @click="handleAudit(row)"
> >
审核 审核
</el-button> </el-button>
@ -105,6 +109,8 @@
:total="total" :total="total"
@pagination="getList" @pagination="getList"
/> />
<DialogFeebackAudit ref="feebackDialog" @success="getList" />
</div> </div>
</template> </template>
@ -113,9 +119,13 @@ import * as FeebackApi from '@/api/clue/payment'
import { getSimpleUserList as getUserOption } from '@/api/system/user' import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import DialogFeebackAudit from './DialogFeebackAudit.vue'
const userStore = useUserStore() const userStore = useUserStore()
const message = useMessage() // const message = useMessage() //
const feebackDialog = ref()
const currentUserId = userStore.getUser.id const currentUserId = userStore.getUser.id
const searchForm = ref({ const searchForm = ref({
@ -186,8 +196,8 @@ async function handleCancel(id) {
console.log(err) console.log(err)
} }
} }
function handleAudit(id) { function handleAudit(row) {
console.log(id) feebackDialog.value.open(row)
} }
function getOptions() { function getOptions() {

Loading…
Cancel
Save