pull/2/head
qsh 4 months ago
parent b2a7fa8dc4
commit 2be616917e
  1. 33
      src/api/school/setting/area.js
  2. 22
      src/router/modules/remaining.ts
  3. 14
      src/views/Basic/Menu/MenuForm.vue
  4. 19
      src/views/Basic/Menu/index.vue
  5. 19
      src/views/Clue/Order/Comp/DialogFeebackAudit.vue
  6. 19
      src/views/Clue/Order/Comp/DialogFeebackDetail.vue
  7. 6
      src/views/Clue/Order/Comp/Reback.vue
  8. 37
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  9. 7
      src/views/Clue/Pool/index.vue
  10. 14
      src/views/SchoolManagement/Place/index.vue
  11. 147
      src/views/SchoolManagement/Set/Comp/DialogArea.vue
  12. 105
      src/views/SchoolManagement/Set/Comp/SettingArea.vue
  13. 7
      src/views/SchoolManagement/Set/index.vue

@ -0,0 +1,33 @@
import request from '@/config/axios'
// 查询列表
export const getAreaPage = async (params) => {
return await request.get({ url: '/admin-api/crm/area/page', params })
}
export const getAreaSimpleList = async (params) => {
return await request.get({ url: '/admin-api/crm/area/simple-list', params })
}
// 查询详情
export const getArea = async (id) => {
return await request.get({ url: '/admin-api/crm/area/get?id=' + id })
}
// 新增
export const createArea = async (data) => {
return await request.post({
url: '/admin-api/crm/area/create',
data: data,
isSubmitForm: true
})
}
// 修改
export const updateArea = async (params) => {
return await request.put({ url: '/admin-api/crm/area/update', data: params })
}
// 删除
export const deleteArea = async (id) => {
return await request.delete({ url: '/admin-api/crm/area/delete?id=' + id })
}

@ -130,7 +130,27 @@ const remainingRouter: AppRouteRecordRaw[] = [
// }
// ]
// },
// {
// path: '/Basic',
// component: Layout,
// name: 'Basic',
// meta: {},
// redirect: '/Basic/menu',
// children: [
// {
// path: 'menu',
// component: () => import('@/views/Basic/Menu/index.vue'),
// name: 'Menu',
// meta: {
// canTo: true,
// hidden: true,
// noTagsView: false,
// icon: 'ep:user',
// title: '菜单管理'
// }
// }
// ]
// },
{
path: '/login',
component: () => import('@/views/Login/Login.vue'),

@ -10,7 +10,7 @@
<el-form-item label="服务类型" prop="serviceId">
<el-select v-model="formData.serviceId" placeholder="选择服务类型" filterable>
<el-option
v-for="item in appList"
v-for="item in props.appList"
:key="item.serviceId"
:label="item.serviceName"
:value="item.serviceId"
@ -124,6 +124,10 @@ const { wsCache } = useCache()
const { t } = useI18n() //
const message = useMessage() //
const props = defineProps({
appList: Object as any
})
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
@ -159,7 +163,6 @@ const open = async (type: string, id?: number, parentId?: number) => {
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
getOptions()
if (parentId) {
formData.value.parentId = parentId
}
@ -177,13 +180,6 @@ const open = async (type: string, id?: number, parentId?: number) => {
}
defineExpose({ open }) // open
const appList = ref([])
const getOptions = () => {
MenuApi.getServiceAppList().then((data) => {
appList.value = data
})
}
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {

@ -62,6 +62,11 @@
<el-table-column :show-overflow-tooltip="true" label="组件路径" prop="component" />
<el-table-column :show-overflow-tooltip="true" label="组件名称" prop="componentName" />
<el-table-column label="状态" prop="status" width="80" />
<el-table-column label="服务类型" prop="" width="100">
<template #default="{ row }">
{{ getServiceName(row.serviceId) }}
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)">
@ -77,7 +82,7 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<MenuForm ref="formRef" @success="getList" />
<MenuForm ref="formRef" :appList="appList" @success="getList" />
</template>
<script lang="ts" name="SystemMenu" setup>
import { handleTree } from '@/utils/tree'
@ -160,8 +165,20 @@ const handleDelete = async (id: number) => {
} catch {}
}
const appList = ref([] as any)
const getOptions = () => {
MenuApi.getServiceAppList().then((data) => {
appList.value = data
})
}
function getServiceName(serviceId: any) {
return appList.value.find((it: any) => it.serviceId == serviceId)?.serviceName
}
/** 初始化 **/
onMounted(() => {
getOptions()
getList()
})
</script>

@ -1,6 +1,11 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<Descriptions :data="orderInfo" :schema="schema" :columns="2" labelWidth="130px" />
<el-table :data="followList" size="small" border class="mt-10px">
<el-table-column prop="userName" label="跟进人" />
<el-table-column prop="followTime" label="最新跟进时间" :formatter="dateFormatter" />
<el-table-column prop="signSate" label="成交状态" />
</el-table>
<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">
@ -19,7 +24,9 @@
</Dialog>
</template>
<script name="DialogFeebackAudit" setup>
import { getFollowUserList } from '@/api/clue'
import { auditPayment } from '@/api/clue/payment'
import { dateFormatter } from '@/utils/formatTime'
const message = useMessage() //
@ -90,8 +97,10 @@ const open = async (row) => {
dialogVisible.value = true
dialogTitle.value = '回款审核'
resetForm(row.id)
//
//
orderInfo.value = { ...row }
//
getFollowInfo(row.clueId)
}
defineExpose({ open }) // open
@ -124,4 +133,12 @@ const resetForm = (signId) => {
}
formRef.value?.resetFields()
}
const followList = ref([])
function getFollowInfo(id) {
getFollowUserList({ id }).then((data) => {
followList.value = data
})
}
</script>

@ -7,6 +7,11 @@
:columns="2"
labelWidth="130px"
/>
<el-table :data="followList" size="small" border class="mt-10px">
<el-table-column prop="userName" label="跟进人" />
<el-table-column prop="followTime" label="最新跟进时间" :formatter="dateFormatter" />
<el-table-column prop="signSate" label="成交状态" />
</el-table>
<Descriptions
title="审核详情"
:data="orderInfo"
@ -18,6 +23,7 @@
</template>
<script name="DialogFeebackDetail" setup>
import { getPaymentDetail } from '@/api/clue/payment'
import { getFollowUserList } from '@/api/clue'
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
@ -114,14 +120,23 @@ const cancelSchema = [
const orderInfo = ref({})
/** 打开弹窗 */
const open = async (id) => {
const open = async (row) => {
dialogVisible.value = true
dialogTitle.value = '回款申请详情'
try {
orderInfo.value = await getPaymentDetail({ id })
orderInfo.value = await getPaymentDetail({ id: row.id })
getFollowInfo(row.clueId)
} catch (error) {
console.log(error)
}
}
defineExpose({ open }) // open
const followList = ref([])
function getFollowInfo(id) {
getFollowUserList({ id }).then((data) => {
followList.value = data
})
}
</script>

@ -93,7 +93,7 @@
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90" />
<el-table-column label="操作" width="150px" fixed="right">
<template #default="{ row }">
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)">
<el-button type="primary" style="padding: 0" text @click="handleDetail(row)">
详情
</el-button>
<el-button
@ -214,8 +214,8 @@ function batchAudit() {
}
const feebackDetailDialog = ref()
function handleDetail(id) {
feebackDetailDialog.value.open(id)
function handleDetail(row) {
feebackDetailDialog.value.open(row)
}
async function handleCancel(id) {
try {

@ -11,7 +11,7 @@
labelWidth="130px"
:defaultShow="false"
/>
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px" class="mt-20px">
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" class="mt-20px">
<el-row :gutter="20">
<!-- 驾校招生模式 -->
<template v-if="appStore.getAppInfo?.instanceType == 1">
@ -102,6 +102,36 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8" :offset="0">
<el-form-item
v-if="appStore.getAppInfo?.instanceType == 1"
label="接待人"
prop="jiedairen"
>
<el-select v-model="form.jiedairen" placeholder="选择接待人" clearable filterable>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item
v-else-if="appStore.getAppInfo?.instanceType == 2"
label="线索转化人"
prop="zhuanhuaren"
>
<el-select v-model="form.zhuanhuaren" placeholder="选择接待人" clearable filterable>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span="8"
:offset="0"
@ -328,6 +358,9 @@ const message = useMessage() // 消息弹窗
const props = defineProps({
schema: {
type: Array
},
userOptions: {
type: Array
}
})
@ -390,6 +423,7 @@ function resetForm(id) {
payAmount: 0,
remark: undefined,
isCompanyReceipts: appStore.getAppInfo?.instanceType == 2,
jiedairen: undefined,
extraPay: [],
signProducts: []
}
@ -480,6 +514,7 @@ function getOptions() {
// getSimpleWarehouseList().then((data) => {
// warehouseOptions.value = data
// })
//
}
//

@ -169,7 +169,12 @@
@get-list="getTableList"
@update="handleEdit"
/>
<DialogSuccess ref="successRef" :schema="allSchemas.detailSchema" @success="getTableList" />
<DialogSuccess
ref="successRef"
:schema="allSchemas.detailSchema"
:userOptions="userOptions"
@success="getTableList"
/>
<DialogFollow ref="followRef" @success="getTableList" />
</div>
</template>

@ -118,9 +118,9 @@
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in areaOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
</el-select>
</el-form-item>
@ -234,6 +234,7 @@
<script setup name="Place">
import * as PlaceApi from '@/api/school/place'
import { getAreaSimpleList } from '@/api/school/setting/area'
import { checkPermi } from '@/utils/permission'
import FlagRed from '@/assets/imgs/flag/flag_red.png'
@ -593,8 +594,15 @@ function resetMarkers() {
createMarkersInMap()
}
function getDictOptions() {
getAreaSimpleList().then((data) => {
areaOptions.value = data
})
}
onMounted(() => {
initMap()
getDictOptions()
})
</script>

@ -0,0 +1,147 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="500px">
<el-form
ref="formRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="auto"
>
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="提成比例" prop="percentageRate">
<el-input v-model="formData.percentageRate" placeholder="请输入比例">
<template #suffix> % </template>
</el-input>
</el-form-item>
<el-form-item label="负责人" prop="director">
<el-select
v-model="formData.director"
placeholder="选择负责人"
clearable
filterable
style="width: 100%"
>
<el-option
v-for="item in employeeOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-row>
<el-col :span="24" :offset="0">
<el-form-item label="开始负责时间" prop="startTime">
<el-date-picker
v-model="formData.startTime"
type="date"
placeholder="选择日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
v-model="formData.remark"
placeholder="请输入备注"
:autosize="{ minRows: 4, maxRows: 8 }"
/>
</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="DialogArea" setup>
import * as AreaApi from '@/api/school/setting/area'
import { getSimpleUserList } from '@/api/system/user'
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
name: undefined,
percentageRate: undefined,
director: undefined,
startTime: undefined,
remark: ''
})
const formRules = reactive({
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
const employeeOptions = ref([])
/** 打开弹窗 */
const open = async (type, id) => {
dialogVisible.value = true
dialogTitle.value = type == 'update' ? '修改区域' : '新增区域'
formType.value = type
resetForm()
getOptions()
//
if (id) {
formLoading.value = true
try {
formData.value = await AreaApi.getArea(id)
} finally {
formLoading.value = false
}
}
}
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 === 'create') {
await AreaApi.createArea(formData.value)
message.success(t('common.createSuccess'))
} else {
await AreaApi.updateArea(formData.value)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
name: undefined,
percentageRate: undefined,
director: undefined,
startTime: undefined,
remark: ''
}
formRef.value?.resetFields()
}
function getOptions() {
getSimpleUserList().then((data) => {
employeeOptions.value = data
})
}
</script>

@ -0,0 +1,105 @@
<template>
<div>
<el-form ref="queryForm" :model="searchForm" label-width="0" inline @submit.prevent>
<el-form-item>
<el-input
v-model="searchForm.name"
placeholder="请输入名称"
clearable
style="width: 180px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
<el-button type="primary" @click="openForm('create', null)">新增</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList">
<el-table-column prop="name" label="名称" />
<el-table-column prop="percentageRate" label="提成比例(%)" />
<el-table-column prop="directorName" label="负责人" />
<el-table-column prop="startTime" label="开始负责时间" />
<el-table-column prop="remark" label="备注" />
<el-table-column label="操作">
<template #default="{ row }">
<el-button type="primary" text @click="openForm('update', row.id)"> 修改 </el-button>
<el-button type="danger" text @click="handleDelete(row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-model:limit="searchForm.pageSize"
v-model:page="searchForm.pageNo"
:total="total"
@pagination="handleQuery"
/>
<DialogArea ref="areaDialog" @success="handleQuery" />
</div>
</template>
<script setup name="SettingArea">
import * as AreaApi from '@/api/school/setting/area'
import DialogArea from './DialogArea.vue'
import { removeNullField } from '@/utils'
const { t } = useI18n() //
const message = useMessage() //
const searchForm = ref({
name: '',
pageNo: 1,
pageSize: 20
})
const total = ref(0)
const tableList = ref([])
const loading = ref(false)
function handleQuery() {
searchForm.value.pageNo = 1
getList()
}
function resetQuery() {
searchForm.value = {
name: '',
pageSize: 20,
pageNo: 1
}
getList()
}
async function getList() {
loading.value = true
try {
const data = await AreaApi.getAreaPage(removeNullField(searchForm.value))
tableList.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const areaDialog = ref()
function openForm(type, id = null) {
areaDialog.value.open(type, id)
}
async function handleDelete(id) {
try {
//
await message.delConfirm()
//
await AreaApi.deleteArea(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
onMounted(() => {
getList()
})
</script>
<style lang="scss" scoped></style>

@ -4,15 +4,16 @@
<el-tab-pane label="驾照类型" :name="0" v-if="checkPermi(['school:setting:cartype'])">
<SettingCartype v-if="tabIndex == 0" />
</el-tab-pane>
<!-- <el-tab-pane label="销售提成" :name="10" v-if="checkPermi(['basic:setting:comission'])">
<BSSalerComission v-if="tabIndex == 10" />
</el-tab-pane> -->
<el-tab-pane label="区域" :name="10" v-if="checkPermi(['school:setting:area'])">
<SettingArea v-if="tabIndex == 10" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup name="SchoolSetting">
import SettingCartype from './Comp/SettingCartype.vue'
import SettingArea from './Comp/SettingArea.vue'
import { checkPermi } from '@/utils/permission'
const tabIndex = ref(0)

Loading…
Cancel
Save