sc
This commit is contained in:
@@ -4,9 +4,9 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
# VITE_BASE_URL='http://47.98.161.246:48080'
|
VITE_BASE_URL='http://47.98.161.246:48080'
|
||||||
# VITE_BASE_URL='http://114.215.207.150:48080'
|
# VITE_BASE_URL='http://114.215.207.150:48080'
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
# VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
# 高德地图key密钥
|
# 高德地图key密钥
|
||||||
# 1寻驾
|
# 1寻驾
|
||||||
|
|||||||
@@ -58,21 +58,21 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: '首页',
|
title: '首页',
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/index',
|
|
||||||
component: () => import('@/views/Basic/Menu/index.vue'),
|
|
||||||
name: 'Home',
|
|
||||||
meta: {
|
|
||||||
title: '首页',
|
|
||||||
icon: 'ep:home-filled',
|
|
||||||
noTagsView: true,
|
|
||||||
affix: true
|
|
||||||
// hidden: true
|
|
||||||
}
|
}
|
||||||
}
|
// ,children: [
|
||||||
]
|
// {
|
||||||
|
// path: '/index',
|
||||||
|
// component: () => import('@/views/Basic/Menu/index.vue'),
|
||||||
|
// name: 'Home',
|
||||||
|
// meta: {
|
||||||
|
// title: '首页',
|
||||||
|
// icon: 'ep:home-filled',
|
||||||
|
// noTagsView: true,
|
||||||
|
// affix: true
|
||||||
|
// // hidden: true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/swagger',
|
path: '/swagger',
|
||||||
@@ -175,6 +175,17 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
permission: 'clue:receiveInput:index'
|
permission: 'clue:receiveInput:index'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/clue-enroll/:id',
|
||||||
|
name: 'ClueEnroll',
|
||||||
|
component: () => import('@/views/Clue/Pool/ClueEnroll.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '学员报名登记',
|
||||||
|
hidden: true,
|
||||||
|
noTagsView: true,
|
||||||
|
permission: 'clue:pool:enroll'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: () => import('@/views/Login/Login.vue'),
|
component: () => import('@/views/Login/Login.vue'),
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.signUser"
|
v-model="searchForm.followUser"
|
||||||
placeholder="跟进人"
|
placeholder="跟进人"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="searchForm.dealDate"
|
v-model="searchForm.remarkDate"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="searchForm.createDate"
|
v-model="searchForm.signDate"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.signUser"
|
v-model="searchForm.isSign"
|
||||||
placeholder="报名状态"
|
placeholder="报名状态"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.signUser"
|
v-model="searchForm.isEnroll"
|
||||||
placeholder="登记状态"
|
placeholder="登记状态"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
@@ -82,18 +82,28 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableList" border show-summary>
|
<el-table v-loading="loading" :data="tableList" border>
|
||||||
<el-table-column prop="name" label="学员姓名" width="90px" />
|
<el-table-column prop="name" label="学员姓名" width="90px" />
|
||||||
<el-table-column prop="phone" label="联系方式" width="120px" />
|
<el-table-column prop="phone" label="联系方式" width="110px" />
|
||||||
<el-table-column prop="signUserName" label="跟进人" width="90" />
|
<el-table-column prop="followUserName" label="跟进人" width="90" />
|
||||||
<el-table-column prop="dealDate" label="报备日期" width="120px" :formatter="dateFormatter" />
|
<el-table-column prop="remarkDate" label="报备日期" width="100px" />
|
||||||
<el-table-column prop="signSchool" label="报备人" width="90px" />
|
<el-table-column prop="remarkUserName" label="报备人" width="90px" />
|
||||||
<el-table-column prop="signPlace" label="报备内容" min-width="150px" />
|
<el-table-column prop="remarkContent" label="报备内容" min-width="150px" />
|
||||||
<el-table-column prop="dealDate" label="报名日期" width="120px" :formatter="dateFormatter" />
|
<el-table-column prop="signDate" label="报名日期" width="100px" />
|
||||||
<el-table-column prop="signSchool" label="接待人" width="90px" />
|
<el-table-column prop="enterUserName" label="接待人" width="90px" />
|
||||||
<el-table-column prop="signPlace" label="报名信息" min-width="150px" />
|
<el-table-column prop="signInfo" label="报名信息" min-width="150px" />
|
||||||
<el-table-column prop="isCommissioned" label="报名状态" width="90px" fixed="right" />
|
<el-table-column prop="isSign" label="报名状态" width="85px" fixed="right">
|
||||||
<el-table-column prop="settlementState" label="登记状态" width="90px" fixed="right" />
|
<template #default="{ row }">
|
||||||
|
<el-tag type="success" v-if="row.isSign">已报名</el-tag>
|
||||||
|
<el-tag type="info" v-else>未报名</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="isEnroll" label="登记状态" width="85px" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag type="success" v-if="row.isEnroll">已登记</el-tag>
|
||||||
|
<el-tag type="info" v-else>未登记</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<Pagination
|
<Pagination
|
||||||
v-model:limit="searchForm.pageSize"
|
v-model:limit="searchForm.pageSize"
|
||||||
@@ -106,8 +116,8 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||||
// import { removeNullField } from '@/utils/index'
|
import { getClueRemarkPage } from '@/api/clue/clueRemark'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { removeNullField } from '@/utils/index'
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOptions()
|
getOptions()
|
||||||
@@ -149,9 +159,9 @@ const total = ref(0)
|
|||||||
async function getList() {
|
async function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
// const data = await SettleApi.getSchoolSettlePage(removeNullField(searchForm.value))
|
const data = await getClueRemarkPage(removeNullField(searchForm.value))
|
||||||
// tableList.value = data.list
|
tableList.value = data.list
|
||||||
// total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
553
src/views/Clue/Pool/ClueEnroll.vue
Normal file
553
src/views/Clue/Pool/ClueEnroll.vue
Normal file
@@ -0,0 +1,553 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height: 100vh; overflow-y: auto">
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<Descriptions
|
||||||
|
:title="`线索信息-${info.name}`"
|
||||||
|
:data="info"
|
||||||
|
:schema="showSchema"
|
||||||
|
:columns="2"
|
||||||
|
labelWidth="130px"
|
||||||
|
:defaultShow="false"
|
||||||
|
/>
|
||||||
|
<el-form
|
||||||
|
:model="form"
|
||||||
|
ref="formRef"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="85px"
|
||||||
|
class="mt-20px pl-10px pr-10px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="学员姓名" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入学员姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="联系方式" prop="phone">
|
||||||
|
<el-input v-model="form.phone" placeholder="请输入联系方式" maxlength="11" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="成交驾校" prop="signSchool">
|
||||||
|
<el-select
|
||||||
|
v-model="form.signSchool"
|
||||||
|
placeholder="选择驾校"
|
||||||
|
filterable
|
||||||
|
@change="changeSchool"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in schoolOptions"
|
||||||
|
:key="item.schoolId"
|
||||||
|
:label="item.schoolName"
|
||||||
|
:value="item.schoolId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="成交场地" prop="signPlace">
|
||||||
|
<el-select
|
||||||
|
v-model="form.signPlace"
|
||||||
|
placeholder="选择场地"
|
||||||
|
filterable
|
||||||
|
:disabled="!form.signSchool"
|
||||||
|
@change="changePlace"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in placeOptions"
|
||||||
|
:key="item.placeId"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.placeId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="成交班型" prop="signClass">
|
||||||
|
<el-select
|
||||||
|
v-model="form.signClass"
|
||||||
|
:disabled="!form.signPlace"
|
||||||
|
placeholder="选择班型"
|
||||||
|
filterable
|
||||||
|
@change="changeClass"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in classOptions"
|
||||||
|
:key="item.typeId"
|
||||||
|
:label="item.typeName"
|
||||||
|
:value="item.typeId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="成交日期" prop="dealDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.dealDate"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="成交价" prop="signPrice">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.signPrice"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
:controls="false"
|
||||||
|
@change="signPriceChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="是否全款">
|
||||||
|
<el-radio-group v-model="form.isPayoff">
|
||||||
|
<el-radio :label="true" :value="true"> 全款 </el-radio>
|
||||||
|
<el-radio :label="false" :value="false"> 非全款 </el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="支付金额" prop="payAmount">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.payAmount"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
:controls="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="公司收款" prop="isCompanyReceipts">
|
||||||
|
<el-radio-group v-model="form.isCompanyReceipts">
|
||||||
|
<el-radio :label="true" :value="true">是</el-radio>
|
||||||
|
<el-radio :label="false" :value="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="8" :sm="24" :xs="24" v-if="form.signClass">
|
||||||
|
<el-form-item label="利润">
|
||||||
|
<div style="color: blue; font-weight: bold; font-size: 16px">{{ profitNum }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
:xl="6"
|
||||||
|
:lg="6"
|
||||||
|
:md="8"
|
||||||
|
:sm="24"
|
||||||
|
:xs="24"
|
||||||
|
v-for="fieldItem in diyFieldList"
|
||||||
|
:key="fieldItem.clueParamId"
|
||||||
|
>
|
||||||
|
<el-form-item :label="fieldItem.label" :prop="fieldItem.field">
|
||||||
|
<component :is="componentMap[fieldItem.component]" v-model="form[fieldItem.field]">
|
||||||
|
<template v-if="fieldItem.component == 'Select'">
|
||||||
|
<el-option
|
||||||
|
v-for="item in fieldItem.options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="fieldItem.component == 'Radio'">
|
||||||
|
<el-radio
|
||||||
|
v-for="item in fieldItem.options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="fieldItem.component == 'Checkbox'">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="item in fieldItem.options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</component>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" :offset="0" class="mb-18px">
|
||||||
|
<el-divider direction="horizontal" content-position="left">
|
||||||
|
其他费用<span v-if="extraTotalPrice">,应收:{{ extraTotalPrice }}</span>
|
||||||
|
</el-divider>
|
||||||
|
<el-button
|
||||||
|
class="mb-5px"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="form.extraPay.push({ extraPayType: undefined, extraPayMoney: 0 })"
|
||||||
|
>
|
||||||
|
添加其他费用
|
||||||
|
</el-button>
|
||||||
|
<el-table :data="form.extraPay" border size="small">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column prop="extraPayType" label="费用类型" width="200px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-select
|
||||||
|
v-model="row.extraPayType"
|
||||||
|
size="small"
|
||||||
|
placeholder="其他费用类型"
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in extraPayOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="extraPayMoney" label="费用金额" width="180px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number v-model="row.extraPayMoney" size="small" :controls="false" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="remark" label="备注">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input v-model="row.remark" size="small" placeholder="备注信息" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="60px">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
<Icon
|
||||||
|
icon="ep:remove-filled"
|
||||||
|
class="text-red-500"
|
||||||
|
@click="handleRemove('extraPay', $index)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" :offset="0" class="mb-18px">
|
||||||
|
<el-divider direction="horizontal" content-position="left"> 额外支出 </el-divider>
|
||||||
|
<el-button
|
||||||
|
class="mb-5px"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
form.extraPay.push({
|
||||||
|
extraPayType: undefined,
|
||||||
|
extraPayMoney: 0,
|
||||||
|
dictType: 'extra_pay_type',
|
||||||
|
editabled: true
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
添加额外支出
|
||||||
|
</el-button>
|
||||||
|
<el-table :data="form.extraPay" border size="small">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column prop="extraPayType" label="费用类型" width="200px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-select
|
||||||
|
v-if="row.editabled"
|
||||||
|
v-model="row.extraPayType"
|
||||||
|
size="small"
|
||||||
|
placeholder="其他费用类型"
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in extraPayOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.extraPayName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="extraPayMoney" label="费用金额" width="180px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-if="row.editabled"
|
||||||
|
v-model="row.extraPayMoney"
|
||||||
|
size="small"
|
||||||
|
:controls="false"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="remark" label="备注">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input
|
||||||
|
v-if="row.editabled"
|
||||||
|
v-model="row.remark"
|
||||||
|
size="small"
|
||||||
|
placeholder="备注信息"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="60px">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<Icon
|
||||||
|
icon="ep:remove-filled"
|
||||||
|
class="text-red-500"
|
||||||
|
v-if="row.editabled"
|
||||||
|
@click="handleRemove('extraPay', $index)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" :offset="0">
|
||||||
|
<el-form-item label="备注" label-width="50px">
|
||||||
|
<Editor v-model:modelValue="form.remark" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-button v-if="!remarkInfo.isEnroll" type="primary" @click="handleSave">提 交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import * as ClueApi from '@/api/clue'
|
||||||
|
import { createSign, getSignProfit } from '@/api/clue/sign'
|
||||||
|
import { getClueRemarkByRemarkId } from '@/api/clue/clueRemark'
|
||||||
|
import { getDiyFieldList } from '@/api/clue/orderField'
|
||||||
|
import { getPlaceList } from '@/api/school/place'
|
||||||
|
import { getClassTypeList } from '@/api/school/class'
|
||||||
|
import { getConfigByConfigKey } from '@/api/system/set'
|
||||||
|
import { getSimpleFieldList as getClueField } from '@/api/clue/clueField'
|
||||||
|
import { getSimpleFieldList } from '@/api/clue/orderField'
|
||||||
|
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
import { getDictOptions } from '@/utils/dict'
|
||||||
|
import { componentMap } from '@/components/Form/src/componentMap'
|
||||||
|
|
||||||
|
const form = ref({})
|
||||||
|
|
||||||
|
const schoolRules = {
|
||||||
|
name: { required: true, message: '学员姓名不可为空', trigger: 'blur' },
|
||||||
|
phone: { required: true, message: '联系方式不可为空', trigger: 'blur' },
|
||||||
|
signSchool: { required: true, message: '成交驾校不可为空', trigger: 'change' },
|
||||||
|
signPlace: { required: true, message: '成交场地不可为空', trigger: 'change' },
|
||||||
|
signClass: { required: true, message: '成交班型不可为空', trigger: 'change' }
|
||||||
|
}
|
||||||
|
|
||||||
|
const info = ref({})
|
||||||
|
const formLoading = ref(false)
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
const extraTotalPrice = computed(() => {
|
||||||
|
return form.value.extraPay?.reduce((pre, cur) => pre + cur.extraPayMoney, 0)
|
||||||
|
})
|
||||||
|
|
||||||
|
const showSchema = ref([])
|
||||||
|
|
||||||
|
const extraPayOptions = getDictOptions('other_pay_type')
|
||||||
|
|
||||||
|
const remarkInfo = ref({})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (route.params.id && route.params.id != 0) {
|
||||||
|
// 这里可以调用API获取会议详情数据
|
||||||
|
getClueRemarkByRemarkId({ remarkId: route.params.id }).then((response) => {
|
||||||
|
remarkInfo.value = response
|
||||||
|
resetForm()
|
||||||
|
getOptions()
|
||||||
|
getDiyFields()
|
||||||
|
ClueApi.getClue(remarkInfo.value.clueId).then((data) => {
|
||||||
|
info.value = { ...data, ...data.diyParams, signInfo: remarkInfo.value.signInfo }
|
||||||
|
let str = ''
|
||||||
|
if (!remarkInfo.value.remarkContent.includes(data.name)) {
|
||||||
|
// 提示姓名不一致
|
||||||
|
str += '学员姓名不一致'
|
||||||
|
}
|
||||||
|
if (!remarkInfo.value.remarkContent.includes(data.phone)) {
|
||||||
|
// 提示姓名不一致
|
||||||
|
str += '手机号不一致'
|
||||||
|
}
|
||||||
|
if (str.length) {
|
||||||
|
message.warning(`请注意:${str}`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 关闭网页
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
async function resetForm() {
|
||||||
|
const data = await getConfigByConfigKey({ configKey: 'companyCollectionConfig' })
|
||||||
|
form.value = {
|
||||||
|
name: remarkInfo.value.name,
|
||||||
|
phone: remarkInfo.value.phone,
|
||||||
|
clueId: remarkInfo.value.clueId,
|
||||||
|
dealDate: formatDate(new Date()),
|
||||||
|
isPayoff: true,
|
||||||
|
signPrice: 0,
|
||||||
|
payAmount: 0,
|
||||||
|
remark: undefined,
|
||||||
|
isCompanyReceipts: data.configValue == 'true',
|
||||||
|
receiver: remarkInfo.value.enterUser,
|
||||||
|
extraPay: [],
|
||||||
|
signProducts: [],
|
||||||
|
installStatus: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
rules.value = { ...ruleObj, ...schoolRules }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const formRef = ref()
|
||||||
|
async function handleSave() {
|
||||||
|
// 校验表单
|
||||||
|
if (!formRef.value) return
|
||||||
|
const valid = await formRef.value.validate()
|
||||||
|
if (!valid) return
|
||||||
|
|
||||||
|
if (form.value.extraPay.some((it) => !it.extraPayType || it.extraPayMoney == null)) {
|
||||||
|
message.info('请将费用类型及费用金额填写完整!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交请求
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
const params = { ...form.value }
|
||||||
|
params.diyParams = {}
|
||||||
|
diyFieldList.value.map((it) => {
|
||||||
|
params.diyParams[it.field] = undefined
|
||||||
|
})
|
||||||
|
for (const key in params.diyParams) {
|
||||||
|
if (Object.hasOwnProperty.call(params, key)) {
|
||||||
|
params.diyParams[key] = params[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await createSign(params)
|
||||||
|
message.success('登记成功!')
|
||||||
|
show.value = false
|
||||||
|
// 发送操作成功的事件
|
||||||
|
emit('success')
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const schoolOptions = ref([])
|
||||||
|
const allPlaceOptions = ref([])
|
||||||
|
|
||||||
|
const diyFieldList = ref([])
|
||||||
|
|
||||||
|
const placeOptions = computed(() => {
|
||||||
|
return allPlaceOptions.value.filter((it) => it.schoolId == form.value.signSchool)
|
||||||
|
})
|
||||||
|
|
||||||
|
const classOptions = ref([])
|
||||||
|
|
||||||
|
async function getClassTypeOptions() {
|
||||||
|
const data = await getClassTypeList({ placeId: form.value.signPlace, status: 0 })
|
||||||
|
classOptions.value = data
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOptions() {
|
||||||
|
getClueField().then((data) => {
|
||||||
|
const list = useCrudSchemas(data)?.allSchemas?.detailSchema?.map((it) => {
|
||||||
|
if (it.label.includes('日期')) {
|
||||||
|
it.dateFormat = 'YYYY-MM-DD'
|
||||||
|
}
|
||||||
|
return it
|
||||||
|
})
|
||||||
|
if (list.length % 2 != 0) {
|
||||||
|
list.push({})
|
||||||
|
}
|
||||||
|
const arr = [
|
||||||
|
{
|
||||||
|
field: 'requirement',
|
||||||
|
label: '诉求',
|
||||||
|
span: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
isEditor: true,
|
||||||
|
span: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'signInfo',
|
||||||
|
label: '报名信息',
|
||||||
|
isEditor: true,
|
||||||
|
span: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
showSchema.value = [...list, ...arr]
|
||||||
|
})
|
||||||
|
// 驾校
|
||||||
|
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
||||||
|
schoolOptions.value = data.schoolList
|
||||||
|
allPlaceOptions.value = data.placeList
|
||||||
|
})
|
||||||
|
// 自定义参数
|
||||||
|
getDiyFieldList().then((data) => {
|
||||||
|
diyFieldList.value = data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeSchool() {
|
||||||
|
form.value.signPlace = undefined
|
||||||
|
form.value.signClass = undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
function changePlace() {
|
||||||
|
form.value.signClass = undefined
|
||||||
|
getClassTypeOptions()
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeClass() {
|
||||||
|
form.value.signPrice =
|
||||||
|
classOptions.value.find((it) => it.typeId == form.value.signClass).guidingPrice || 0
|
||||||
|
signPriceChange()
|
||||||
|
}
|
||||||
|
|
||||||
|
function signPriceChange() {
|
||||||
|
if (form.value.isPayoff) {
|
||||||
|
form.value.payAmount = form.value.signPrice
|
||||||
|
}
|
||||||
|
calcSignProfit()
|
||||||
|
}
|
||||||
|
|
||||||
|
const profitNum = ref(0)
|
||||||
|
function calcSignProfit() {
|
||||||
|
if (form.value.signClass) {
|
||||||
|
// 计算员工利润
|
||||||
|
getSignProfit({ signClass: form.value.signClass, signPrice: form.value.signPrice }).then(
|
||||||
|
(data) => {
|
||||||
|
profitNum.value = data
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleRemove(type, index) {
|
||||||
|
form.value[type].splice(index, 1)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -34,6 +34,7 @@ import { getWxGroupSimpleList, getClueRemarkByClueId, reportClue } from '@/api/c
|
|||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const message = useMessage()
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
remarkContent: '',
|
remarkContent: '',
|
||||||
@@ -86,8 +87,9 @@ function handleSave() {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await reportClue(form.value)
|
await reportClue(form.value)
|
||||||
message.success(data)
|
message.success('提交报备信息成功')
|
||||||
|
show.value = false
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('提交报备信息失败', error)
|
console.error('提交报备信息失败', error)
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -413,6 +413,9 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const prodTotalPrice = computed(() => {
|
const prodTotalPrice = computed(() => {
|
||||||
|
if (appStore.getAppInfo?.instanceType != 2) {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
return form.value.signProducts.reduce(
|
return form.value.signProducts.reduce(
|
||||||
(pre, cur) => pre + (cur?.price || 0) * (cur?.signNum || 0),
|
(pre, cur) => pre + (cur?.price || 0) * (cur?.signNum || 0),
|
||||||
0
|
0
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
class="remark"
|
class="remark"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-model="remarkContent"
|
v-model="form.remarkContent"
|
||||||
:autosize="{ minRows: 5 }"
|
:autosize="{ minRows: 5 }"
|
||||||
readonly
|
readonly
|
||||||
/>
|
/>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="group">
|
<el-form-item prop="group">
|
||||||
<el-select v-model="form.group" placeholder="选择群聊并发送报名信息" filterable>
|
<el-select v-model="form.groupId" placeholder="选择群聊并发送报名信息" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in groupOptions"
|
v-for="item in groupOptions"
|
||||||
:key="item.groupId"
|
:key="item.groupId"
|
||||||
@@ -52,20 +52,20 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getWxGroupSimpleList } from '@/api/clue/clueRemark'
|
import { getWxGroupSimpleList } from '@/api/clue/clueRemark'
|
||||||
|
import { getClueRemarkByRemarkId, registerClue } from '@/api/clue/clueRemark'
|
||||||
|
|
||||||
const remarkContent = ref(
|
const route = useRoute()
|
||||||
`学员姓名:测试1\n联系方式:1234321\n意向班型:\n意向成交价:\n邀约时间:\n邀约人:仇教练\n备注:`
|
const message = useMessage()
|
||||||
)
|
|
||||||
|
|
||||||
const groupOptions = ref([])
|
const groupOptions = ref([])
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
signInfo: '',
|
signInfo: '',
|
||||||
group: ''
|
groupId: ''
|
||||||
})
|
})
|
||||||
const rules = {
|
const rules = {
|
||||||
signInfo: [{ required: true, message: '请输入接待信息', trigger: 'blur' }],
|
signInfo: [{ required: true, message: '请输入接待信息', trigger: 'blur' }],
|
||||||
group: [{ required: true, message: '请选择群聊', trigger: 'change' }]
|
groupId: [{ required: true, message: '请选择群聊', trigger: 'change' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
const formRef = ref(null)
|
const formRef = ref(null)
|
||||||
@@ -73,8 +73,9 @@ const formRef = ref(null)
|
|||||||
function handleSubmit() {
|
function handleSubmit() {
|
||||||
formRef.value.validate((valid) => {
|
formRef.value.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log('提交成功', form)
|
registerClue(form.value).then(() => {
|
||||||
// 在这里处理提交逻辑
|
message.success('提交接待信息成功')
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log('表单验证失败')
|
console.log('表单验证失败')
|
||||||
return false
|
return false
|
||||||
@@ -83,8 +84,18 @@ function handleSubmit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (route.params.id && route.params.id != 0) {
|
||||||
|
// 这里可以调用API获取会议详情数据
|
||||||
|
getClueRemarkByRemarkId({ remarkId: route.params.id }).then((response) => {
|
||||||
|
form.value = response
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 关闭网页
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
|
|
||||||
getWxGroupSimpleList().then((response) => {
|
getWxGroupSimpleList().then((response) => {
|
||||||
groupOptions.value = response.data
|
groupOptions.value = response
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user