caolin 3 months ago
commit fb6b341242
  1. 1
      src/hooks/web/useCrudSchemas.ts
  2. 2
      src/views/Clue/Order/Comp/AfterSales.vue
  3. 33
      src/views/Clue/Order/Comp/DialogAfterSale.vue
  4. 10
      src/views/Clue/Order/Comp/DialogAfterSaleAudit.vue
  5. 10
      src/views/Clue/Order/Comp/DialogAfterSaleDetail.vue
  6. 1
      src/views/Clue/Order/Comp/MallSettle.vue
  7. 1
      src/views/Clue/Order/Comp/SchoolSettle.vue
  8. 22
      src/views/Clue/Pool/Comp/DialogClue.vue
  9. 47
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  10. 15
      src/views/Clue/Set/Comp/FieldClue.vue
  11. 15
      src/views/Clue/Set/Comp/FieldOrder.vue

@ -229,6 +229,7 @@ const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): For
value: defaultValue, value: defaultValue,
...schemaItem.form, ...schemaItem.form,
field: schemaItem.field, field: schemaItem.field,
isRequired: schemaItem.isRequired,
label: schemaItem.form?.label || schemaItem.label label: schemaItem.form?.label || schemaItem.label
} }

@ -76,6 +76,8 @@
<el-table-column prop="phone" label="联系方式" min-width="150px" /> <el-table-column prop="phone" label="联系方式" min-width="150px" />
<el-table-column prop="reason" label="售后原因" min-width="150px" /> <el-table-column prop="reason" label="售后原因" min-width="150px" />
<el-table-column prop="refundAmount" label="退款金额" min-width="90px" /> <el-table-column prop="refundAmount" label="退款金额" min-width="90px" />
<el-table-column prop="percentageDeductAmount" label="提成扣款" min-width="90px" />
<el-table-column prop="isCompanyReceipts" label="是否公司收款" min-width="120px" />
<el-table-column prop="isReturns" label="是否退货" min-width="90px" /> <el-table-column prop="isReturns" label="是否退货" min-width="90px" />
<el-table-column prop="solution" label="解决方案" min-width="150px" /> <el-table-column prop="solution" label="解决方案" min-width="150px" />
<el-table-column prop="signUserName" label="登记人" min-width="90px" /> <el-table-column prop="signUserName" label="登记人" min-width="90px" />

@ -4,6 +4,7 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column prop="reason" label="售后原因" /> <el-table-column prop="reason" label="售后原因" />
<el-table-column prop="refundAmount" label="退款金额" /> <el-table-column prop="refundAmount" label="退款金额" />
<el-table-column prop="percentageDeductAmount" label="提成扣款" />
<el-table-column prop="isReturns" label="是否退货" /> <el-table-column prop="isReturns" label="是否退货" />
<el-table-column prop="applyTime" label="申请日期" width="180px" /> <el-table-column prop="applyTime" label="申请日期" width="180px" />
<el-table-column prop="stateName" label="审核状态" /> <el-table-column prop="stateName" label="审核状态" />
@ -13,10 +14,16 @@
<el-button v-show="showAdd" class="mb-10px" type="primary" @click="handleAdd"> <el-button v-show="showAdd" class="mb-10px" type="primary" @click="handleAdd">
新增售后 新增售后
</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="auto">
<el-row :gutter="20">
<el-col :span="24" :offset="0">
<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-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12" :offset="0">
<el-form-item label="退款金额" prop="refundAmount"> <el-form-item label="退款金额" prop="refundAmount">
<el-input-number <el-input-number
v-model="form.refundAmount" v-model="form.refundAmount"
@ -25,12 +32,28 @@
placeholder="请输入金额" placeholder="请输入金额"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="提成扣款金额" prop="percentageDeductAmount">
<el-input-number
v-model="form.percentageDeductAmount"
:min="0"
:controls="false"
placeholder="请输入金额"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24" :offset="0">
<el-form-item label="是否退货" prop="isReturns"> <el-form-item label="是否退货" prop="isReturns">
<el-radio-group v-model="form.isReturns"> <el-radio-group v-model="form.isReturns">
<el-radio :label="true"> 退货 </el-radio> <el-radio :label="true"> 退货 </el-radio>
<el-radio :label="false"> 不退货 </el-radio> <el-radio :label="false"> 不退货 </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="24" :offset="0">
<el-form-item label="解决方案" prop="solution"> <el-form-item label="解决方案" prop="solution">
<el-input <el-input
type="textarea" type="textarea"
@ -39,9 +62,13 @@
placeholder="请输入退款原因" placeholder="请输入退款原因"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="24" :offset="0">
<el-form-item label="备注"> <el-form-item label="备注">
<Editor v-model:modelValue="form.remark" /> <Editor v-model:modelValue="form.remark" />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-form-item> <el-form-item>
<el-button :disabled="formLoading" type="primary" @click="onSubmit">保存</el-button> <el-button :disabled="formLoading" type="primary" @click="onSubmit">保存</el-button>
<el-button @click="showAdd = true">取消</el-button> <el-button @click="showAdd = true">取消</el-button>
@ -72,7 +99,8 @@ function open(signId) {
const showAdd = ref(true) const showAdd = ref(true)
const form = ref({}) const form = ref({})
const rules = { const rules = {
refundAmount: { required: true, message: '回款金额不可为空', trigger: 'blur' }, percentageDeductAmount: { required: true, message: '提成扣款金额不可为空', trigger: 'blur' },
refundAmount: { required: true, message: '退款金额不可为空', trigger: 'blur' },
reason: { required: true, message: '售后原因不可为空', trigger: 'blur' }, reason: { required: true, message: '售后原因不可为空', trigger: 'blur' },
solution: { required: true, message: '解决方案不可为空', trigger: 'blur' } solution: { required: true, message: '解决方案不可为空', trigger: 'blur' }
} }
@ -91,6 +119,7 @@ function handleAdd() {
solution: undefined, solution: undefined,
refundAmount: undefined, refundAmount: undefined,
isReturns: false, isReturns: false,
percentageDeductAmount: undefined,
remark: undefined remark: undefined
} }
} }

@ -63,6 +63,16 @@ const schema = [
label: '退款金额', label: '退款金额',
span: 1 span: 1
}, },
{
field: 'percentageDeductAmount',
label: '提成扣款',
span: 1
},
{
field: 'isCompanyReceipts',
label: '是否公司收款',
span: 1
},
{ {
field: 'isReturns', field: 'isReturns',
label: '是否退货', label: '是否退货',

@ -54,6 +54,16 @@ const applySchema = [
label: '退款金额', label: '退款金额',
span: 1 span: 1
}, },
{
field: 'percentageDeductAmount',
label: '提成扣款',
span: 1
},
{
field: 'isCompanyReceipts',
label: '是否公司收款',
span: 1
},
{ {
field: 'isReturns', field: 'isReturns',
label: '是否退货', label: '是否退货',

@ -136,6 +136,7 @@
/> />
<el-table-column prop="settlementUserName" label="结算人" min-width="90px" /> <el-table-column prop="settlementUserName" label="结算人" min-width="90px" />
<el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" /> <el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" />
<el-table-column prop="isCommissioned" label="提成状态" width="90px" fixed="right" />
<el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" /> <el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" />
<el-table-column label="结算备注" width="90px"> <el-table-column label="结算备注" width="90px">
<template #default="scope"> <template #default="scope">

@ -142,6 +142,7 @@
/> />
<el-table-column prop="settlementUserName" label="结算人" min-width="90px" /> <el-table-column prop="settlementUserName" label="结算人" min-width="90px" />
<el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" /> <el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" />
<el-table-column prop="isCommissioned" label="提成状态" width="90px" fixed="right" />
<el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" /> <el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" />
<el-table-column label="结算备注" width="90px"> <el-table-column label="结算备注" width="90px">
<template #default="scope"> <template #default="scope">

@ -200,6 +200,20 @@ const formSchema = computed(() => {
] ]
}) })
const rules = computed(() => {
let ruleObj = {}
props.schema.map((it) => {
if (it.isRequired) {
Reflect.set(ruleObj, it.field, {
required: true,
message: `${it.label}不可为空`,
trigger: 'blur, change'
})
}
})
return ruleObj
})
const dateAfterToday = (t) => { const dateAfterToday = (t) => {
return t.getTime() > Date.now() return t.getTime() > Date.now()
} }
@ -210,14 +224,6 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formRef = ref() // Ref const formRef = ref() // Ref
const rules = {
name: { required: true, message: '线索名称不可为空', trigger: 'blur' },
phone: { required: true, message: '联系方式不可为空', trigger: 'blur' },
source: { required: true, message: '线索来源不可为空', trigger: 'change' },
intentionState: { required: true, message: '意向状态不可为空', trigger: 'change' },
consultTime: { required: true, message: '咨询日期不可为空', trigger: 'change' }
}
const tabName = ref('info') const tabName = ref('info')
const followList = ref([]) const followList = ref([])

@ -329,6 +329,7 @@ import { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class' import { getClassTypeList } from '@/api/school/class'
import { getSimpleProductList } from '@/api/mall/product' import { getSimpleProductList } from '@/api/mall/product'
import { getConfigByConfigKey } from '@/api/system/set' import { getConfigByConfigKey } from '@/api/system/set'
import { getSimpleFieldList } from '@/api/clue/orderField'
// import { getSimpleWarehouseList } from '@/api/mall/warehouse' // import { getSimpleWarehouseList } from '@/api/mall/warehouse'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
@ -338,11 +339,6 @@ import { useAppStore } from '@/store/modules/app'
const show = ref(false) const show = ref(false)
const form = ref({}) const form = ref({})
const rules = ref({
dealDate: { required: true, message: '成交日期不可为空', trigger: 'change' },
payAmount: { required: true, message: '支付金额不可为空', trigger: 'change,blur' },
signPrice: { required: true, message: '支付金额不可为空', trigger: 'change,blur' }
})
const schoolRules = { const schoolRules = {
signSchool: { required: true, message: '成交驾校不可为空', trigger: 'change' }, signSchool: { required: true, message: '成交驾校不可为空', trigger: 'change' },
@ -402,11 +398,29 @@ const showSchema = computed(() => {
return [...list, ...arr] return [...list, ...arr]
}) })
// const rules = computed(() => {
// let ruleObj = {}
// props.schema.map((it) => {
// if (it.isRequired) {
// Reflect.set(ruleObj, it.field, {
// required: true,
// message: `${it.label}`,
// trigger: 'blur, change'
// })
// }
// })
// if (appStore.getAppInfo?.instanceType == 1) {
// ruleObj = { ...ruleObj, ...schoolRules }
// }
// return ruleObj
// })
const extraPayOptions = getDictOptions('other_pay_type') const extraPayOptions = getDictOptions('other_pay_type')
async function open(id) { async function open(id) {
try { try {
resetForm(id) resetForm(id)
getDiyFields()
const data = await ClueApi.getClue(id) const data = await ClueApi.getClue(id)
info.value = { ...data, ...data.diyParams } info.value = { ...data, ...data.diyParams }
show.value = true show.value = true
@ -416,6 +430,26 @@ async function open(id) {
} }
defineExpose({ open }) // open defineExpose({ open }) // open
const rules = ref([])
function getDiyFields() {
getSimpleFieldList().then((data) => {
let ruleObj = {}
data.map((it) => {
if (it.isRequired) {
Reflect.set(ruleObj, it.field, {
required: true,
message: `${it.label}不可为空`,
trigger: 'blur, change'
})
}
})
if (appStore.getAppInfo?.instanceType == 1) {
ruleObj = { ...ruleObj, ...schoolRules }
}
rules.value = ruleObj
})
}
async function resetForm(id) { async function resetForm(id) {
const data = await getConfigByConfigKey({ configKey: 'companyCollectionConfig' }) const data = await getConfigByConfigKey({ configKey: 'companyCollectionConfig' })
form.value = { form.value = {
@ -553,9 +587,6 @@ function handleRemove(type, index) {
} }
onMounted(() => { onMounted(() => {
if (appStore.getAppInfo?.instanceType == 1) {
rules.value = { ...rules.value, ...schoolRules }
}
getOptions() getOptions()
}) })
</script> </script>

@ -5,11 +5,16 @@
<el-table :data="tableList" :row-class-name="setRowClass" @row-click="handleRowClick"> <el-table :data="tableList" :row-class-name="setRowClass" @row-click="handleRowClick">
<el-table-column prop="label" label="名称" /> <el-table-column prop="label" label="名称" />
<el-table-column prop="field" label="属性编码" /> <el-table-column prop="field" label="属性编码" />
<el-table-column prop="component" label="类型" width="200px"> <el-table-column prop="component" label="类型">
<template #default="{ row }"> <template #default="{ row }">
{{ typeOptions.find((it) => it.value == row.component).label }} {{ typeOptions.find((it) => it.value == row.component).label }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否必填" width="80">
<template #default="{ row }">
{{ row.isRequired ? '必填' : '非必填' }}
</template>
</el-table-column>
<el-table-column label="启用状态" width="100"> <el-table-column label="启用状态" width="100">
<template #default="{ row }"> <template #default="{ row }">
<el-switch <el-switch
@ -43,6 +48,12 @@
</template> </template>
<el-input v-model="form.field" placeholder="请输入属性编码" /> <el-input v-model="form.field" placeholder="请输入属性编码" />
</el-form-item> </el-form-item>
<el-form-item label="是否必填" prop="isRequired">
<el-radio-group v-model="form.isRequired">
<el-radio :label="true"> 必填 </el-radio>
<el-radio :label="false"> 非必填 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="属性类型" prop="component"> <el-form-item label="属性类型" prop="component">
<el-select <el-select
v-model="form.component" v-model="form.component"
@ -118,6 +129,7 @@ const form = ref({
component: undefined, component: undefined,
options: [], options: [],
status: 0, status: 0,
isRequired: false,
isCustom: true, isCustom: true,
isForm: true, isForm: true,
isSearch: true, isSearch: true,
@ -157,6 +169,7 @@ function handleInsert() {
component: undefined, component: undefined,
options: [], options: [],
status: 0, status: 0,
isRequired: false,
isCustom: true, isCustom: true,
isForm: true, isForm: true,
isSearch: true, isSearch: true,

@ -5,11 +5,16 @@
<el-table :data="tableList" :row-class-name="setRowClass" @row-click="handleRowClick"> <el-table :data="tableList" :row-class-name="setRowClass" @row-click="handleRowClick">
<el-table-column prop="label" label="名称" /> <el-table-column prop="label" label="名称" />
<el-table-column prop="field" label="属性编码" /> <el-table-column prop="field" label="属性编码" />
<el-table-column prop="component" label="类型" width="200px"> <el-table-column prop="component" label="类型">
<template #default="{ row }"> <template #default="{ row }">
{{ typeOptions.find((it) => it.value == row.component).label }} {{ typeOptions.find((it) => it.value == row.component).label }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否必填" width="80">
<template #default="{ row }">
{{ row.isRequired ? '必填' : '非必填' }}
</template>
</el-table-column>
<el-table-column label="启用状态" width="100"> <el-table-column label="启用状态" width="100">
<template #default="{ row }"> <template #default="{ row }">
<el-switch <el-switch
@ -43,6 +48,12 @@
</template> </template>
<el-input v-model="form.field" placeholder="请输入属性编码" /> <el-input v-model="form.field" placeholder="请输入属性编码" />
</el-form-item> </el-form-item>
<el-form-item label="是否必填" prop="isRequired">
<el-radio-group v-model="form.isRequired">
<el-radio :label="true"> 必填 </el-radio>
<el-radio :label="false"> 非必填 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="属性类型" prop="component"> <el-form-item label="属性类型" prop="component">
<el-select <el-select
v-model="form.component" v-model="form.component"
@ -118,6 +129,7 @@ const form = ref({
component: undefined, component: undefined,
options: [], options: [],
status: 0, status: 0,
isRequired: false,
isCustom: true, isCustom: true,
isForm: true, isForm: true,
isSearch: true, isSearch: true,
@ -157,6 +169,7 @@ function handleInsert() {
component: undefined, component: undefined,
options: [], options: [],
status: 0, status: 0,
isRequired: false,
isCustom: true, isCustom: true,
isForm: true, isForm: true,
isSearch: true, isSearch: true,

Loading…
Cancel
Save