Merge branch 'main' of http://114.55.169.15:3000/qiushanhe/ss-crm-manage-web into dev-cl
This commit is contained in:
33
src/api/school/setting/area.js
Normal file
33
src/api/school/setting/area.js
Normal file
@@ -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 })
|
||||||
|
}
|
||||||
@@ -74,3 +74,8 @@ export const updateUserStatus = (id: number, status: number) => {
|
|||||||
export const getSimpleUserList = (): Promise<UserVO[]> => {
|
export const getSimpleUserList = (): Promise<UserVO[]> => {
|
||||||
return request.get({ url: '/admin-api/system/user/list-all-simple' })
|
return request.get({ url: '/admin-api/system/user/list-all-simple' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取所有用户列表-无权限限制
|
||||||
|
export const getAllUserList = (): Promise<UserVO[]> => {
|
||||||
|
return request.get({ url: '/admin-api/system/user/no/permission/list-all-simple' })
|
||||||
|
}
|
||||||
|
|||||||
@@ -75,13 +75,16 @@ const emit = defineEmits(['close'])
|
|||||||
<slot name="title">
|
<slot name="title">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</slot>
|
</slot>
|
||||||
<Icon
|
<div class="flex items-center">
|
||||||
v-if="fullscreen"
|
<slot name="btn"></slot>
|
||||||
:icon="isFullscreen ? 'zmdi:fullscreen-exit' : 'zmdi:fullscreen'"
|
<Icon
|
||||||
class="mr-22px cursor-pointer is-hover mt-2px z-10"
|
v-if="fullscreen"
|
||||||
color="var(--el-color-info)"
|
:icon="isFullscreen ? 'zmdi:fullscreen-exit' : 'zmdi:fullscreen'"
|
||||||
@click="toggleFull"
|
class="mr-22px cursor-pointer is-hover z-10"
|
||||||
/>
|
color="var(--el-color-info)"
|
||||||
|
@click="toggleFull"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export function hasPermi(app: App<Element>) {
|
|||||||
const { wsCache } = useCache()
|
const { wsCache } = useCache()
|
||||||
const { value } = binding
|
const { value } = binding
|
||||||
const all_permission = '*:*:*'
|
const all_permission = '*:*:*'
|
||||||
const permissions = wsCache.get(CACHE_KEY.USER).permissions
|
const permissions = wsCache.get(CACHE_KEY.USER)?.permissions || []
|
||||||
|
|
||||||
if (value && value instanceof Array && value.length > 0) {
|
if (value && value instanceof Array && value.length > 0) {
|
||||||
const permissionFlag = value
|
const permissionFlag = value
|
||||||
|
|||||||
@@ -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',
|
path: '/login',
|
||||||
component: () => import('@/views/Login/Login.vue'),
|
component: () => import('@/views/Login/Login.vue'),
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ export const fenToYuan = (amount: string | number): number => {
|
|||||||
export const removeNullField = (obj: Object) => {
|
export const removeNullField = (obj: Object) => {
|
||||||
for (const key in obj) {
|
for (const key in obj) {
|
||||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||||
if (obj[key] === '') {
|
if (obj[key] === '' || obj[key] === null || obj[key] == undefined) {
|
||||||
delete obj[key]
|
delete obj[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<el-form-item label="服务类型" prop="serviceId">
|
<el-form-item label="服务类型" prop="serviceId">
|
||||||
<el-select v-model="formData.serviceId" placeholder="选择服务类型" filterable>
|
<el-select v-model="formData.serviceId" placeholder="选择服务类型" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in appList"
|
v-for="item in props.appList"
|
||||||
:key="item.serviceId"
|
:key="item.serviceId"
|
||||||
:label="item.serviceName"
|
:label="item.serviceName"
|
||||||
:value="item.serviceId"
|
:value="item.serviceId"
|
||||||
@@ -124,6 +124,10 @@ const { wsCache } = useCache()
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
appList: Object as any
|
||||||
|
})
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
@@ -159,7 +163,6 @@ const open = async (type: string, id?: number, parentId?: number) => {
|
|||||||
dialogTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
getOptions()
|
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
formData.value.parentId = parentId
|
formData.value.parentId = parentId
|
||||||
}
|
}
|
||||||
@@ -177,13 +180,6 @@ const open = async (type: string, id?: number, parentId?: number) => {
|
|||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
const appList = ref([])
|
|
||||||
const getOptions = () => {
|
|
||||||
MenuApi.getServiceAppList().then((data) => {
|
|
||||||
appList.value = data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
const submitForm = async () => {
|
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="component" />
|
||||||
<el-table-column :show-overflow-tooltip="true" label="组件名称" prop="componentName" />
|
<el-table-column :show-overflow-tooltip="true" label="组件名称" prop="componentName" />
|
||||||
<el-table-column label="状态" prop="status" width="80" />
|
<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="操作">
|
<el-table-column align="center" label="操作">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="openForm('update', scope.row.id)">
|
<el-button link type="primary" @click="openForm('update', scope.row.id)">
|
||||||
@@ -77,7 +82,7 @@
|
|||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<MenuForm ref="formRef" @success="getList" />
|
<MenuForm ref="formRef" :appList="appList" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" name="SystemMenu" setup>
|
<script lang="ts" name="SystemMenu" setup>
|
||||||
import { handleTree } from '@/utils/tree'
|
import { handleTree } from '@/utils/tree'
|
||||||
@@ -160,8 +165,20 @@ const handleDelete = async (id: number) => {
|
|||||||
} catch {}
|
} 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(() => {
|
onMounted(() => {
|
||||||
|
getOptions()
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
|
|||||||
import DialogAfterSaleDetail from './DialogAfterSaleDetail.vue'
|
import DialogAfterSaleDetail from './DialogAfterSaleDetail.vue'
|
||||||
import DialogBatchAudit from './DialogBatchAudit.vue'
|
import DialogBatchAudit from './DialogBatchAudit.vue'
|
||||||
|
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
|
||||||
const afterSaleAuditDialog = ref()
|
const afterSaleAuditDialog = ref()
|
||||||
@@ -191,7 +192,7 @@ const loading = ref(false)
|
|||||||
async function getList() {
|
async function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await AfterSaleApi.getAfterSalePage(searchForm.value)
|
const data = await AfterSaleApi.getAfterSalePage(removeNullField(searchForm.value))
|
||||||
tableList.value = data.list
|
tableList.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -113,6 +113,7 @@
|
|||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||||
import { getSimpleProductList } from '@/api/mall/product'
|
import { getSimpleProductList } from '@/api/mall/product'
|
||||||
import * as DeliveryApi from '@/api/clue/delivery'
|
import * as DeliveryApi from '@/api/clue/delivery'
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
// const message = useMessage() // 消息弹窗
|
// const message = useMessage() // 消息弹窗
|
||||||
@@ -155,7 +156,7 @@ const loading = ref(false)
|
|||||||
async function getList() {
|
async function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await DeliveryApi.getDeliveryPage(searchForm.value)
|
const data = await DeliveryApi.getDeliveryPage(removeNullField(searchForm.value))
|
||||||
tableList.value = data.list
|
tableList.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||||
<Descriptions :data="orderInfo" :schema="schema" :columns="2" labelWidth="130px" />
|
<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 ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
|
||||||
<el-form-item label="状态" prop="state">
|
<el-form-item label="状态" prop="state">
|
||||||
<el-radio-group v-model="formData.state">
|
<el-radio-group v-model="formData.state">
|
||||||
@@ -19,7 +24,9 @@
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script name="DialogFeebackAudit" setup>
|
<script name="DialogFeebackAudit" setup>
|
||||||
|
import { getFollowUserList } from '@/api/clue'
|
||||||
import { auditPayment } from '@/api/clue/payment'
|
import { auditPayment } from '@/api/clue/payment'
|
||||||
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
@@ -90,8 +97,10 @@ const open = async (row) => {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
dialogTitle.value = '回款审核'
|
dialogTitle.value = '回款审核'
|
||||||
resetForm(row.id)
|
resetForm(row.id)
|
||||||
// 修改时,设置数据
|
// 设置数据
|
||||||
orderInfo.value = { ...row }
|
orderInfo.value = { ...row }
|
||||||
|
// 获取跟进信息
|
||||||
|
getFollowInfo(row.clueId)
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
@@ -124,4 +133,12 @@ const resetForm = (signId) => {
|
|||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const followList = ref([])
|
||||||
|
|
||||||
|
function getFollowInfo(id) {
|
||||||
|
getFollowUserList({ id }).then((data) => {
|
||||||
|
followList.value = data
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
:columns="2"
|
:columns="2"
|
||||||
labelWidth="130px"
|
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
|
<Descriptions
|
||||||
title="审核详情"
|
title="审核详情"
|
||||||
:data="orderInfo"
|
:data="orderInfo"
|
||||||
@@ -18,6 +23,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script name="DialogFeebackDetail" setup>
|
<script name="DialogFeebackDetail" setup>
|
||||||
import { getPaymentDetail } from '@/api/clue/payment'
|
import { getPaymentDetail } from '@/api/clue/payment'
|
||||||
|
import { getFollowUserList } from '@/api/clue'
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
@@ -114,14 +120,23 @@ const cancelSchema = [
|
|||||||
|
|
||||||
const orderInfo = ref({})
|
const orderInfo = ref({})
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (id) => {
|
const open = async (row) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
dialogTitle.value = '回款申请详情'
|
dialogTitle.value = '回款申请详情'
|
||||||
try {
|
try {
|
||||||
orderInfo.value = await getPaymentDetail({ id })
|
orderInfo.value = await getPaymentDetail({ id: row.id })
|
||||||
|
getFollowInfo(row.clueId)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
const followList = ref([])
|
||||||
|
|
||||||
|
function getFollowInfo(id) {
|
||||||
|
getFollowUserList({ id }).then((data) => {
|
||||||
|
followList.value = data
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -200,7 +200,7 @@
|
|||||||
<script setup name="ClueOrderList">
|
<script setup name="ClueOrderList">
|
||||||
import { getSimpleFieldList } from '@/api/clue/orderField'
|
import { getSimpleFieldList } from '@/api/clue/orderField'
|
||||||
import * as SignApi from '@/api/clue/sign'
|
import * as SignApi from '@/api/clue/sign'
|
||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
||||||
import { getSimpleProductList } from '@/api/mall/product'
|
import { getSimpleProductList } from '@/api/mall/product'
|
||||||
|
|
||||||
import DialogOrder from './DialogOrder.vue'
|
import DialogOrder from './DialogOrder.vue'
|
||||||
@@ -213,11 +213,8 @@ import { removeNullField } from '@/utils'
|
|||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
|
const allUserOptions = ref([])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getUserOption().then((data) => {
|
|
||||||
userOptions.value = data
|
|
||||||
getCurdSchemas()
|
|
||||||
})
|
|
||||||
getOptions()
|
getOptions()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -286,8 +283,10 @@ async function getCurdSchemas() {
|
|||||||
try {
|
try {
|
||||||
const data = await getSimpleFieldList()
|
const data = await getSimpleFieldList()
|
||||||
data.forEach((elem) => {
|
data.forEach((elem) => {
|
||||||
if (elem.field == 'createUser') {
|
if (['createUser'].includes(elem.field)) {
|
||||||
elem.search.options = userOptions.value
|
elem.search.options = userOptions.value
|
||||||
|
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
|
||||||
|
elem.search.options = allUserOptions.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
allSchemas.value = useCrudSchemas(data).allSchemas
|
allSchemas.value = useCrudSchemas(data).allSchemas
|
||||||
@@ -343,11 +342,15 @@ function handleAddFee(row) {
|
|||||||
extraFeeDialog.value.open(row.signId)
|
extraFeeDialog.value.open(row.signId)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOptions() {
|
async function getOptions() {
|
||||||
// 产品
|
// 产品
|
||||||
getSimpleProductList().then((data) => {
|
getSimpleProductList().then((data) => {
|
||||||
prodOptions.value = data
|
prodOptions.value = data
|
||||||
})
|
})
|
||||||
|
|
||||||
|
userOptions.value = await getUserOption()
|
||||||
|
allUserOptions.value = await getAllUserList()
|
||||||
|
getCurdSchemas()
|
||||||
}
|
}
|
||||||
const deliveryDialog = ref()
|
const deliveryDialog = ref()
|
||||||
function handleDelivery(row) {
|
function handleDelivery(row) {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
placement="top"
|
placement="top"
|
||||||
width="500px"
|
width="500px"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
v-if="item.form?.component == 'Editor' && row[item.field]"
|
v-if="item.field == 'remark' && row[item.field]"
|
||||||
>
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
<script setup name="ClueOrderList">
|
<script setup name="ClueOrderList">
|
||||||
import { getSimpleFieldList } from '@/api/clue/orderField'
|
import { getSimpleFieldList } from '@/api/clue/orderField'
|
||||||
import * as SignApi from '@/api/clue/sign'
|
import * as SignApi from '@/api/clue/sign'
|
||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
||||||
import { getPlaceList } from '@/api/school/place'
|
import { getPlaceList } from '@/api/school/place'
|
||||||
import { getClassTypeList } from '@/api/school/class'
|
import { getClassTypeList } from '@/api/school/class'
|
||||||
|
|
||||||
@@ -187,11 +187,8 @@ import { removeNullField } from '@/utils'
|
|||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
|
const allUserOptions = ref([])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getUserOption().then((data) => {
|
|
||||||
userOptions.value = data
|
|
||||||
getCurdSchemas()
|
|
||||||
})
|
|
||||||
getOptions()
|
getOptions()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -260,8 +257,10 @@ async function getCurdSchemas() {
|
|||||||
try {
|
try {
|
||||||
const data = await getSimpleFieldList()
|
const data = await getSimpleFieldList()
|
||||||
data.forEach((elem) => {
|
data.forEach((elem) => {
|
||||||
if (elem.field == 'createUser') {
|
if (['createUser'].includes(elem.field)) {
|
||||||
elem.search.options = userOptions.value
|
elem.search.options = userOptions.value
|
||||||
|
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
|
||||||
|
elem.search.options = allUserOptions.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
allSchemas.value = useCrudSchemas(data).allSchemas
|
allSchemas.value = useCrudSchemas(data).allSchemas
|
||||||
@@ -333,12 +332,15 @@ async function getClassTypeOptions() {
|
|||||||
classOptions.value = data
|
classOptions.value = data
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOptions() {
|
async function getOptions() {
|
||||||
// 驾校
|
// 驾校
|
||||||
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
||||||
schoolOptions.value = data.schoolList
|
schoolOptions.value = data.schoolList
|
||||||
allPlaceOptions.value = data.placeList
|
allPlaceOptions.value = data.placeList
|
||||||
})
|
})
|
||||||
|
userOptions.value = await getUserOption()
|
||||||
|
allUserOptions.value = await getAllUserList()
|
||||||
|
getCurdSchemas()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,26 @@
|
|||||||
<el-option label="已驳回" :value="4" />
|
<el-option label="已驳回" :value="4" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<el-select v-model="searchForm.receiver" placeholder="接待人" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in allUserOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-else-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
|
<el-select v-model="searchForm.convertPeople" placeholder="转化人" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in allUserOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
|
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -68,14 +88,28 @@
|
|||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="tableList"
|
:data="tableList"
|
||||||
border
|
border
|
||||||
|
show-summary
|
||||||
|
:summary-method="getSummaries"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
|
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
|
||||||
<el-table-column prop="signId" label="成交单号" min-width="150px" />
|
<el-table-column prop="signId" label="成交单号" min-width="180px" />
|
||||||
<el-table-column prop="name" label="线索名称" min-width="200px" />
|
<el-table-column prop="name" label="线索名称" min-width="150px" />
|
||||||
<el-table-column prop="phone" label="联系方式" min-width="150px" />
|
<el-table-column prop="phone" label="联系方式" min-width="150px" />
|
||||||
<el-table-column prop="money" label="回款金额" min-width="90" />
|
<el-table-column prop="money" label="回款金额" min-width="150px" />
|
||||||
<el-table-column prop="isPayoff" label="是否结清" min-width="90" />
|
<el-table-column prop="isPayoff" label="是否结清" min-width="90" />
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="receiverName"
|
||||||
|
label="接待人"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-else-if="appStore.getAppInfo?.instanceType == 2"
|
||||||
|
prop="convertPeopleName"
|
||||||
|
label="转化人"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="dealDate"
|
prop="dealDate"
|
||||||
@@ -93,7 +127,7 @@
|
|||||||
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90" />
|
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90" />
|
||||||
<el-table-column label="操作" width="150px" fixed="right">
|
<el-table-column label="操作" width="150px" fixed="right">
|
||||||
<template #default="{ row }">
|
<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>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -134,17 +168,20 @@
|
|||||||
|
|
||||||
<script setup name="Reback">
|
<script setup name="Reback">
|
||||||
import * as FeebackApi from '@/api/clue/payment'
|
import * as FeebackApi from '@/api/clue/payment'
|
||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
import DialogFeebackAudit from './DialogFeebackAudit.vue'
|
import DialogFeebackAudit from './DialogFeebackAudit.vue'
|
||||||
import DialogFeebackDetail from './DialogFeebackDetail.vue'
|
import DialogFeebackDetail from './DialogFeebackDetail.vue'
|
||||||
import DialogBatchAudit from './DialogBatchAudit.vue'
|
import DialogBatchAudit from './DialogBatchAudit.vue'
|
||||||
|
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
const appStore = useAppStore()
|
||||||
|
|
||||||
const feebackDialog = ref()
|
const feebackDialog = ref()
|
||||||
|
|
||||||
@@ -163,6 +200,7 @@ const searchForm = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
|
const allUserOptions = ref([])
|
||||||
|
|
||||||
const tableList = ref([])
|
const tableList = ref([])
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
@@ -175,6 +213,8 @@ function handleSearch() {
|
|||||||
function handleReset() {
|
function handleReset() {
|
||||||
searchForm.value = {
|
searchForm.value = {
|
||||||
signId: undefined,
|
signId: undefined,
|
||||||
|
receiver: undefined,
|
||||||
|
convertPeople: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
dealDate: [],
|
dealDate: [],
|
||||||
state: undefined,
|
state: undefined,
|
||||||
@@ -186,13 +226,15 @@ function handleReset() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const totalMoney = ref(0)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
async function getList() {
|
async function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await FeebackApi.getPaymentPage(searchForm.value)
|
const data = await FeebackApi.getPaymentPage(removeNullField(searchForm.value))
|
||||||
tableList.value = data.list
|
tableList.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
|
totalMoney.value = data.totalAmount
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
@@ -213,8 +255,8 @@ function batchAudit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const feebackDetailDialog = ref()
|
const feebackDetailDialog = ref()
|
||||||
function handleDetail(id) {
|
function handleDetail(row) {
|
||||||
feebackDetailDialog.value.open(id)
|
feebackDetailDialog.value.open(row)
|
||||||
}
|
}
|
||||||
async function handleCancel(id) {
|
async function handleCancel(id) {
|
||||||
try {
|
try {
|
||||||
@@ -237,6 +279,25 @@ function getOptions() {
|
|||||||
getUserOption().then((data) => {
|
getUserOption().then((data) => {
|
||||||
userOptions.value = data
|
userOptions.value = data
|
||||||
})
|
})
|
||||||
|
getAllUserList().then((data) => {
|
||||||
|
allUserOptions.value = data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSummaries(param) {
|
||||||
|
const { columns } = param
|
||||||
|
const sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
sums[index] = '合计'
|
||||||
|
} else if (column.property == 'money') {
|
||||||
|
sums[index] = totalMoney.value
|
||||||
|
} else {
|
||||||
|
sums[index] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return sums
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px" @close="destroyMap">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px" @close="destroyMap">
|
||||||
|
<template #btn>
|
||||||
|
<el-button class="mr-20px" type="primary" size="small" @click="handleSave">保存</el-button>
|
||||||
|
</template>
|
||||||
<el-tabs v-model="tabName" @tab-change="changeTab">
|
<el-tabs v-model="tabName" @tab-change="changeTab">
|
||||||
<el-tab-pane label="线索信息" name="info">
|
<el-tab-pane label="线索信息" name="info">
|
||||||
<Form ref="formRef" v-loading="formLoading" :rules="rules" isCol :schema="formSchema" />
|
<Form ref="formRef" v-loading="formLoading" :rules="rules" isCol :schema="formSchema" />
|
||||||
@@ -118,10 +121,10 @@
|
|||||||
</el-collapse>
|
</el-collapse>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div style="position: absolute; top: 75px; right: 20px">
|
<template #footer>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
||||||
</div>
|
</template>
|
||||||
<DialogSchoolInfo ref="schoolInfoDialog" />
|
<DialogSchoolInfo ref="schoolInfoDialog" />
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -154,6 +157,9 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
userOptions: {
|
userOptions: {
|
||||||
type: Array
|
type: Array
|
||||||
|
},
|
||||||
|
allUserOptions: {
|
||||||
|
type: Array
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -162,6 +168,10 @@ const formSchema = computed(() => {
|
|||||||
newSchema.forEach((it) => {
|
newSchema.forEach((it) => {
|
||||||
if (it.field == 'consultTime') {
|
if (it.field == 'consultTime') {
|
||||||
it.componentProps['disabled-date'] = dateAfterToday
|
it.componentProps['disabled-date'] = dateAfterToday
|
||||||
|
it.componentProps['disabled'] = formType.value != 'create'
|
||||||
|
}
|
||||||
|
if (it.field == 'convertPeople') {
|
||||||
|
it.options = props.allUserOptions.map((it) => ({ ...it, name: it.nickname }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return [
|
return [
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1000px">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1000px">
|
||||||
|
<template #btn>
|
||||||
|
<el-button class="mr-20px" type="primary" size="small" @click="handleSave">保存</el-button>
|
||||||
|
</template>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<el-form style="flex: 1" :model="form" ref="formRef" :rules="rules" label-width="120px">
|
<el-form style="flex: 1" :model="form" ref="formRef" :rules="rules" label-width="120px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="成交登记" v-model="show" width="900px">
|
<Dialog title="成交登记" v-model="show" width="900px">
|
||||||
|
<template #btn>
|
||||||
|
<el-button class="mr-20px" type="primary" size="small" @click="handleSave">保存</el-button>
|
||||||
|
</template>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
:title="`线索信息-${info.name}`"
|
:title="`线索信息-${info.name}`"
|
||||||
:data="info"
|
:data="info"
|
||||||
@@ -8,7 +11,7 @@
|
|||||||
labelWidth="130px"
|
labelWidth="130px"
|
||||||
:defaultShow="false"
|
: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">
|
<el-row :gutter="20">
|
||||||
<!-- 驾校招生模式 -->
|
<!-- 驾校招生模式 -->
|
||||||
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
@@ -78,9 +81,20 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<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 :span="8" :offset="0">
|
<el-col :span="8" :offset="0">
|
||||||
<el-form-item label="是否全款">
|
<el-form-item label="是否全款">
|
||||||
<el-radio-group v-model="form.state">
|
<el-radio-group v-model="form.isPayoff">
|
||||||
<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>
|
||||||
@@ -88,7 +102,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" :offset="0">
|
<el-col :span="8" :offset="0">
|
||||||
<el-form-item label="支付金额" prop="payAmount">
|
<el-form-item label="支付金额" prop="payAmount">
|
||||||
<el-input-number v-model="form.payAmount" :min="1" :step="1" style="width: 100%" />
|
<el-input-number
|
||||||
|
v-model="form.payAmount"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
:controls="false"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" :offset="0">
|
<el-col :span="8" :offset="0">
|
||||||
@@ -99,6 +118,18 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0" v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<el-form-item label="接待人" prop="receiver">
|
||||||
|
<el-select v-model="form.receiver" placeholder="选择接待人" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in allUserOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col
|
<el-col
|
||||||
:span="8"
|
:span="8"
|
||||||
:offset="0"
|
:offset="0"
|
||||||
@@ -297,6 +328,7 @@ import { getDiyFieldList } from '@/api/clue/orderField'
|
|||||||
import { getPlaceList } from '@/api/school/place'
|
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 { getSimpleWarehouseList } from '@/api/mall/warehouse'
|
// import { getSimpleWarehouseList } from '@/api/mall/warehouse'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { getDictOptions } from '@/utils/dict'
|
import { getDictOptions } from '@/utils/dict'
|
||||||
@@ -307,7 +339,8 @@ const show = ref(false)
|
|||||||
const form = ref({})
|
const form = ref({})
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
dealDate: { required: true, message: '成交日期不可为空', trigger: 'change' },
|
dealDate: { required: true, message: '成交日期不可为空', trigger: 'change' },
|
||||||
payAmount: { required: true, message: '支付金额不可为空', trigger: 'change,blur' }
|
payAmount: { required: true, message: '支付金额不可为空', trigger: 'change,blur' },
|
||||||
|
signPrice: { required: true, message: '支付金额不可为空', trigger: 'change,blur' }
|
||||||
})
|
})
|
||||||
|
|
||||||
const schoolRules = {
|
const schoolRules = {
|
||||||
@@ -325,6 +358,9 @@ const message = useMessage() // 消息弹窗
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
schema: {
|
schema: {
|
||||||
type: Array
|
type: Array
|
||||||
|
},
|
||||||
|
allUserOptions: {
|
||||||
|
type: Array
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -383,10 +419,12 @@ function resetForm(id) {
|
|||||||
form.value = {
|
form.value = {
|
||||||
clueId: id,
|
clueId: id,
|
||||||
dealDate: formatDate(new Date()),
|
dealDate: formatDate(new Date()),
|
||||||
state: true,
|
isPayoff: true,
|
||||||
|
signPrice: 0,
|
||||||
payAmount: 0,
|
payAmount: 0,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
isCompanyReceipts: appStore.getAppInfo?.instanceType == 1,
|
isCompanyReceipts: appStore.getAppInfo?.instanceType == 2,
|
||||||
|
receiver: undefined,
|
||||||
extraPay: [],
|
extraPay: [],
|
||||||
signProducts: []
|
signProducts: []
|
||||||
}
|
}
|
||||||
@@ -477,6 +515,7 @@ function getOptions() {
|
|||||||
// getSimpleWarehouseList().then((data) => {
|
// getSimpleWarehouseList().then((data) => {
|
||||||
// warehouseOptions.value = data
|
// warehouseOptions.value = data
|
||||||
// })
|
// })
|
||||||
|
// 获取员工列表
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义参数
|
// 自定义参数
|
||||||
@@ -496,8 +535,15 @@ function changePlace() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeClass() {
|
function changeClass() {
|
||||||
form.value.payAmount =
|
form.value.signPrice =
|
||||||
classOptions.value.find((it) => it.typeId == form.value.signClass).guidingPrice || 0
|
classOptions.value.find((it) => it.typeId == form.value.signClass).guidingPrice || 0
|
||||||
|
signPriceChange()
|
||||||
|
}
|
||||||
|
|
||||||
|
function signPriceChange() {
|
||||||
|
if (form.value.isPayoff) {
|
||||||
|
form.value.payAmount = form.value.signPrice
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRemove(type, index) {
|
function handleRemove(type, index) {
|
||||||
|
|||||||
@@ -159,6 +159,7 @@
|
|||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:userOptions="userOptions"
|
:userOptions="userOptions"
|
||||||
|
:allUserOptions="allUserOptions"
|
||||||
:schema="allSchemas.formSchema"
|
:schema="allSchemas.formSchema"
|
||||||
@success="getTableList"
|
@success="getTableList"
|
||||||
/>
|
/>
|
||||||
@@ -169,7 +170,13 @@
|
|||||||
@get-list="getTableList"
|
@get-list="getTableList"
|
||||||
@update="handleEdit"
|
@update="handleEdit"
|
||||||
/>
|
/>
|
||||||
<DialogSuccess ref="successRef" :schema="allSchemas.detailSchema" @success="getTableList" />
|
<DialogSuccess
|
||||||
|
ref="successRef"
|
||||||
|
:schema="allSchemas.detailSchema"
|
||||||
|
:allUserOptions="allUserOptions"
|
||||||
|
:userOptions="userOptions"
|
||||||
|
@success="getTableList"
|
||||||
|
/>
|
||||||
<DialogFollow ref="followRef" @success="getTableList" />
|
<DialogFollow ref="followRef" @success="getTableList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -182,7 +189,7 @@ import DrawerClue from './Comp/DrawerClue.vue'
|
|||||||
import DialogSuccess from './Comp/DialogSuccess.vue'
|
import DialogSuccess from './Comp/DialogSuccess.vue'
|
||||||
import DialogFollow from './Comp/DialogFollow.vue'
|
import DialogFollow from './Comp/DialogFollow.vue'
|
||||||
import ClueMap from './Comp/ClueMap.vue'
|
import ClueMap from './Comp/ClueMap.vue'
|
||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
@@ -209,7 +216,7 @@ async function getCurdSchemas() {
|
|||||||
try {
|
try {
|
||||||
const data = await getSimpleFieldList()
|
const data = await getSimpleFieldList()
|
||||||
data.forEach((elem) => {
|
data.forEach((elem) => {
|
||||||
if (elem.field == 'followUser') {
|
if (elem.field == 'followUser' || elem.field == 'convertPeople') {
|
||||||
elem.search.options = userOptions.value
|
elem.search.options = userOptions.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -351,12 +358,12 @@ function handleGain(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
|
const allUserOptions = ref([])
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getUserOption().then((data) => {
|
userOptions.value = await getUserOption()
|
||||||
userOptions.value = data
|
allUserOptions.value = await getAllUserList()
|
||||||
getCurdSchemas()
|
getCurdSchemas()
|
||||||
})
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -118,9 +118,9 @@
|
|||||||
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
|
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in areaOptions"
|
v-for="dict in areaOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.id"
|
||||||
:label="dict.dictLabel"
|
:label="dict.name"
|
||||||
:value="dict.dictValue"
|
:value="dict.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -234,6 +234,7 @@
|
|||||||
|
|
||||||
<script setup name="Place">
|
<script setup name="Place">
|
||||||
import * as PlaceApi from '@/api/school/place'
|
import * as PlaceApi from '@/api/school/place'
|
||||||
|
import { getAreaSimpleList } from '@/api/school/setting/area'
|
||||||
import { checkPermi } from '@/utils/permission'
|
import { checkPermi } from '@/utils/permission'
|
||||||
|
|
||||||
import FlagRed from '@/assets/imgs/flag/flag_red.png'
|
import FlagRed from '@/assets/imgs/flag/flag_red.png'
|
||||||
@@ -593,8 +594,15 @@ function resetMarkers() {
|
|||||||
createMarkersInMap()
|
createMarkersInMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDictOptions() {
|
||||||
|
getAreaSimpleList().then((data) => {
|
||||||
|
areaOptions.value = data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initMap()
|
initMap()
|
||||||
|
getDictOptions()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
147
src/views/SchoolManagement/Set/Comp/DialogArea.vue
Normal file
147
src/views/SchoolManagement/Set/Comp/DialogArea.vue
Normal file
@@ -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) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
|
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>
|
||||||
105
src/views/SchoolManagement/Set/Comp/SettingArea.vue
Normal file
105
src/views/SchoolManagement/Set/Comp/SettingArea.vue
Normal file
@@ -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'])">
|
<el-tab-pane label="驾照类型" :name="0" v-if="checkPermi(['school:setting:cartype'])">
|
||||||
<SettingCartype v-if="tabIndex == 0" />
|
<SettingCartype v-if="tabIndex == 0" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="销售提成" :name="10" v-if="checkPermi(['basic:setting:comission'])">
|
<el-tab-pane label="区域" :name="10" v-if="checkPermi(['school:setting:area'])">
|
||||||
<BSSalerComission v-if="tabIndex == 10" />
|
<SettingArea v-if="tabIndex == 10" />
|
||||||
</el-tab-pane> -->
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="SchoolSetting">
|
<script setup name="SchoolSetting">
|
||||||
import SettingCartype from './Comp/SettingCartype.vue'
|
import SettingCartype from './Comp/SettingCartype.vue'
|
||||||
|
import SettingArea from './Comp/SettingArea.vue'
|
||||||
import { checkPermi } from '@/utils/permission'
|
import { checkPermi } from '@/utils/permission'
|
||||||
|
|
||||||
const tabIndex = ref(0)
|
const tabIndex = ref(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user