Compare commits

..

No commits in common. 'ffd15e2433a44f6a36db9b7099a76df23e2e0a4e' and '2bebd0480e16b8a95ff5e8aaa6fb3acbd81af83b' have entirely different histories.

  1. 33
      src/api/school/setting/area.js
  2. 5
      src/api/system/user/index.ts
  3. 17
      src/components/Dialog/src/Dialog.vue
  4. 2
      src/directives/permission/hasPermi.ts
  5. 22
      src/router/modules/remaining.ts
  6. 2
      src/utils/index.ts
  7. 14
      src/views/Basic/Menu/MenuForm.vue
  8. 19
      src/views/Basic/Menu/index.vue
  9. 3
      src/views/Clue/Order/Comp/AfterSales.vue
  10. 3
      src/views/Clue/Order/Comp/Delivery.vue
  11. 19
      src/views/Clue/Order/Comp/DialogFeebackAudit.vue
  12. 19
      src/views/Clue/Order/Comp/DialogFeebackDetail.vue
  13. 17
      src/views/Clue/Order/Comp/MallOrderList.vue
  14. 18
      src/views/Clue/Order/Comp/OrderList.vue
  15. 79
      src/views/Clue/Order/Comp/Reback.vue
  16. 14
      src/views/Clue/Pool/Comp/DialogClue.vue
  17. 3
      src/views/Clue/Pool/Comp/DialogFollow.vue
  18. 60
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  19. 23
      src/views/Clue/Pool/index.vue
  20. 14
      src/views/SchoolManagement/Place/index.vue
  21. 147
      src/views/SchoolManagement/Set/Comp/DialogArea.vue
  22. 105
      src/views/SchoolManagement/Set/Comp/SettingArea.vue
  23. 7
      src/views/SchoolManagement/Set/index.vue

@ -1,33 +0,0 @@
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,8 +74,3 @@ export const updateUserStatus = (id: number, status: number) => {
export const getSimpleUserList = (): Promise<UserVO[]> => {
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,16 +75,13 @@ const emit = defineEmits(['close'])
<slot name="title">
{{ title }}
</slot>
<div class="flex items-center">
<slot name="btn"></slot>
<Icon
v-if="fullscreen"
:icon="isFullscreen ? 'zmdi:fullscreen-exit' : 'zmdi:fullscreen'"
class="mr-22px cursor-pointer is-hover z-10"
color="var(--el-color-info)"
@click="toggleFull"
/>
</div>
<Icon
v-if="fullscreen"
:icon="isFullscreen ? 'zmdi:fullscreen-exit' : 'zmdi:fullscreen'"
class="mr-22px cursor-pointer is-hover mt-2px z-10"
color="var(--el-color-info)"
@click="toggleFull"
/>
</div>
</template>

@ -8,7 +8,7 @@ export function hasPermi(app: App<Element>) {
const { wsCache } = useCache()
const { value } = binding
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) {
const permissionFlag = value

@ -130,27 +130,7 @@ 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'),

@ -213,7 +213,7 @@ export const fenToYuan = (amount: string | number): number => {
export const removeNullField = (obj: Object) => {
for (const key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
if (obj[key] === '' || obj[key] === null || obj[key] == undefined) {
if (obj[key] === '') {
delete obj[key]
}
}

@ -10,7 +10,7 @@
<el-form-item label="服务类型" prop="serviceId">
<el-select v-model="formData.serviceId" placeholder="选择服务类型" filterable>
<el-option
v-for="item in props.appList"
v-for="item in appList"
:key="item.serviceId"
:label="item.serviceName"
:value="item.serviceId"
@ -124,10 +124,6 @@ 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
@ -163,6 +159,7 @@ 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
}
@ -180,6 +177,13 @@ 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,11 +62,6 @@
<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)">
@ -82,7 +77,7 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<MenuForm ref="formRef" :appList="appList" @success="getList" />
<MenuForm ref="formRef" @success="getList" />
</template>
<script lang="ts" name="SystemMenu" setup>
import { handleTree } from '@/utils/tree'
@ -165,20 +160,8 @@ 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>

@ -142,7 +142,6 @@ import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
import DialogAfterSaleDetail from './DialogAfterSaleDetail.vue'
import DialogBatchAudit from './DialogBatchAudit.vue'
import { removeNullField } from '@/utils'
import { dateFormatter } from '@/utils/formatTime'
const afterSaleAuditDialog = ref()
@ -192,7 +191,7 @@ const loading = ref(false)
async function getList() {
loading.value = true
try {
const data = await AfterSaleApi.getAfterSalePage(removeNullField(searchForm.value))
const data = await AfterSaleApi.getAfterSalePage(searchForm.value)
tableList.value = data.list
total.value = data.total
} finally {

@ -113,7 +113,6 @@
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getSimpleProductList } from '@/api/mall/product'
import * as DeliveryApi from '@/api/clue/delivery'
import { removeNullField } from '@/utils'
import { dateFormatter } from '@/utils/formatTime'
// const message = useMessage() //
@ -156,7 +155,7 @@ const loading = ref(false)
async function getList() {
loading.value = true
try {
const data = await DeliveryApi.getDeliveryPage(removeNullField(searchForm.value))
const data = await DeliveryApi.getDeliveryPage(searchForm.value)
tableList.value = data.list
total.value = data.total
} finally {

@ -1,11 +1,6 @@
<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">
@ -24,9 +19,7 @@
</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() //
@ -97,10 +90,8 @@ const open = async (row) => {
dialogVisible.value = true
dialogTitle.value = '回款审核'
resetForm(row.id)
//
//
orderInfo.value = { ...row }
//
getFollowInfo(row.clueId)
}
defineExpose({ open }) // open
@ -133,12 +124,4 @@ const resetForm = (signId) => {
}
formRef.value?.resetFields()
}
const followList = ref([])
function getFollowInfo(id) {
getFollowUserList({ id }).then((data) => {
followList.value = data
})
}
</script>

@ -7,11 +7,6 @@
: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"
@ -23,7 +18,6 @@
</template>
<script name="DialogFeebackDetail" setup>
import { getPaymentDetail } from '@/api/clue/payment'
import { getFollowUserList } from '@/api/clue'
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
@ -120,23 +114,14 @@ const cancelSchema = [
const orderInfo = ref({})
/** 打开弹窗 */
const open = async (row) => {
const open = async (id) => {
dialogVisible.value = true
dialogTitle.value = '回款申请详情'
try {
orderInfo.value = await getPaymentDetail({ id: row.id })
getFollowInfo(row.clueId)
orderInfo.value = await getPaymentDetail({ id })
} catch (error) {
console.log(error)
}
}
defineExpose({ open }) // open
const followList = ref([])
function getFollowInfo(id) {
getFollowUserList({ id }).then((data) => {
followList.value = data
})
}
</script>

@ -200,7 +200,7 @@
<script setup name="ClueOrderList">
import { getSimpleFieldList } from '@/api/clue/orderField'
import * as SignApi from '@/api/clue/sign'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getSimpleProductList } from '@/api/mall/product'
import DialogOrder from './DialogOrder.vue'
@ -213,8 +213,11 @@ import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime'
const userOptions = ref([])
const allUserOptions = ref([])
onMounted(() => {
getUserOption().then((data) => {
userOptions.value = data
getCurdSchemas()
})
getOptions()
})
@ -283,10 +286,8 @@ async function getCurdSchemas() {
try {
const data = await getSimpleFieldList()
data.forEach((elem) => {
if (['createUser'].includes(elem.field)) {
if (elem.field == 'createUser') {
elem.search.options = userOptions.value
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
elem.search.options = allUserOptions.value
}
})
allSchemas.value = useCrudSchemas(data).allSchemas
@ -342,15 +343,11 @@ function handleAddFee(row) {
extraFeeDialog.value.open(row.signId)
}
async function getOptions() {
function getOptions() {
//
getSimpleProductList().then((data) => {
prodOptions.value = data
})
userOptions.value = await getUserOption()
allUserOptions.value = await getAllUserList()
getCurdSchemas()
}
const deliveryDialog = ref()
function handleDelivery(row) {

@ -93,7 +93,7 @@
placement="top"
width="500px"
trigger="click"
v-if="item.field == 'remark' && row[item.field]"
v-if="item.form?.component == 'Editor' && row[item.field]"
>
<template #reference>
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
@ -174,7 +174,7 @@
<script setup name="ClueOrderList">
import { getSimpleFieldList } from '@/api/clue/orderField'
import * as SignApi from '@/api/clue/sign'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class'
@ -187,8 +187,11 @@ import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime'
const userOptions = ref([])
const allUserOptions = ref([])
onMounted(() => {
getUserOption().then((data) => {
userOptions.value = data
getCurdSchemas()
})
getOptions()
})
@ -257,10 +260,8 @@ async function getCurdSchemas() {
try {
const data = await getSimpleFieldList()
data.forEach((elem) => {
if (['createUser'].includes(elem.field)) {
if (elem.field == 'createUser') {
elem.search.options = userOptions.value
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
elem.search.options = allUserOptions.value
}
})
allSchemas.value = useCrudSchemas(data).allSchemas
@ -332,15 +333,12 @@ async function getClassTypeOptions() {
classOptions.value = data
}
async function getOptions() {
function getOptions() {
//
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
schoolOptions.value = data.schoolList
allPlaceOptions.value = data.placeList
})
userOptions.value = await getUserOption()
allUserOptions.value = await getAllUserList()
getCurdSchemas()
}
</script>

@ -15,26 +15,6 @@
<el-option label="已驳回" :value="4" />
</el-select>
</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-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
<el-option
@ -88,28 +68,14 @@
v-loading="loading"
:data="tableList"
border
show-summary
:summary-method="getSummaries"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
<el-table-column prop="signId" label="成交单号" min-width="180px" />
<el-table-column prop="name" label="线索名称" min-width="150px" />
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
<el-table-column prop="signId" label="成交单号" min-width="150px" />
<el-table-column prop="name" label="线索名称" min-width="200px" />
<el-table-column prop="phone" label="联系方式" min-width="150px" />
<el-table-column prop="money" label="回款金额" min-width="150px" />
<el-table-column prop="money" 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="dealDate"
@ -127,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)">
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)">
详情
</el-button>
<el-button
@ -168,20 +134,17 @@
<script setup name="Reback">
import * as FeebackApi from '@/api/clue/payment'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { useUserStore } from '@/store/modules/user'
import DialogFeebackAudit from './DialogFeebackAudit.vue'
import DialogFeebackDetail from './DialogFeebackDetail.vue'
import DialogBatchAudit from './DialogBatchAudit.vue'
import { removeNullField } from '@/utils'
import { useAppStore } from '@/store/modules/app'
import { dateFormatter } from '@/utils/formatTime'
const userStore = useUserStore()
const message = useMessage() //
const appStore = useAppStore()
const feebackDialog = ref()
@ -200,7 +163,6 @@ const searchForm = ref({
})
const userOptions = ref([])
const allUserOptions = ref([])
const tableList = ref([])
const total = ref(0)
@ -213,8 +175,6 @@ function handleSearch() {
function handleReset() {
searchForm.value = {
signId: undefined,
receiver: undefined,
convertPeople: undefined,
name: undefined,
dealDate: [],
state: undefined,
@ -226,15 +186,13 @@ function handleReset() {
}
}
const totalMoney = ref(0)
const loading = ref(false)
async function getList() {
loading.value = true
try {
const data = await FeebackApi.getPaymentPage(removeNullField(searchForm.value))
const data = await FeebackApi.getPaymentPage(searchForm.value)
tableList.value = data.list
total.value = data.total
totalMoney.value = data.totalAmount
} finally {
loading.value = false
}
@ -255,8 +213,8 @@ function batchAudit() {
}
const feebackDetailDialog = ref()
function handleDetail(row) {
feebackDetailDialog.value.open(row)
function handleDetail(id) {
feebackDetailDialog.value.open(id)
}
async function handleCancel(id) {
try {
@ -279,25 +237,6 @@ function getOptions() {
getUserOption().then((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(() => {

@ -1,8 +1,5 @@
<template>
<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-tab-pane label="线索信息" name="info">
<Form ref="formRef" v-loading="formLoading" :rules="rules" isCol :schema="formSchema" />
@ -121,10 +118,10 @@
</el-collapse>
</el-tab-pane>
</el-tabs>
<template #footer>
<div style="position: absolute; top: 75px; right: 20px">
<el-button @click="dialogVisible = false"> </el-button>
<el-button :disabled="formLoading" type="primary" @click="handleSave"> </el-button>
</template>
</div>
<DialogSchoolInfo ref="schoolInfoDialog" />
</Dialog>
</template>
@ -157,9 +154,6 @@ const props = defineProps({
},
userOptions: {
type: Array
},
allUserOptions: {
type: Array
}
})
@ -168,10 +162,6 @@ const formSchema = computed(() => {
newSchema.forEach((it) => {
if (it.field == 'consultTime') {
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 [

@ -1,8 +1,5 @@
<template>
<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">
<el-form style="flex: 1" :model="form" ref="formRef" :rules="rules" label-width="120px">
<el-row :gutter="20">

@ -1,8 +1,5 @@
<template>
<Dialog title="成交登记" v-model="show" width="900px">
<template #btn>
<el-button class="mr-20px" type="primary" size="small" @click="handleSave">保存</el-button>
</template>
<Descriptions
:title="`线索信息-${info.name}`"
:data="info"
@ -11,7 +8,7 @@
labelWidth="130px"
:defaultShow="false"
/>
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" class="mt-20px">
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px" class="mt-20px">
<el-row :gutter="20">
<!-- 驾校招生模式 -->
<template v-if="appStore.getAppInfo?.instanceType == 1">
@ -81,20 +78,9 @@
/>
</el-form-item>
</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-form-item label="是否全款">
<el-radio-group v-model="form.isPayoff">
<el-radio-group v-model="form.state">
<el-radio :label="true"> 全款 </el-radio>
<el-radio :label="false"> 非全款 </el-radio>
</el-radio-group>
@ -102,12 +88,7 @@
</el-col>
<el-col :span="8" :offset="0">
<el-form-item label="支付金额" prop="payAmount">
<el-input-number
v-model="form.payAmount"
:min="0"
style="width: 100%"
:controls="false"
/>
<el-input-number v-model="form.payAmount" :min="1" :step="1" style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="8" :offset="0">
@ -118,18 +99,6 @@
</el-radio-group>
</el-form-item>
</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
:span="8"
:offset="0"
@ -328,7 +297,6 @@ import { getDiyFieldList } from '@/api/clue/orderField'
import { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class'
import { getSimpleProductList } from '@/api/mall/product'
// import { getSimpleWarehouseList } from '@/api/mall/warehouse'
import { formatDate } from '@/utils/formatTime'
import { getDictOptions } from '@/utils/dict'
@ -339,8 +307,7 @@ const show = ref(false)
const form = ref({})
const rules = ref({
dealDate: { required: true, message: '成交日期不可为空', trigger: 'change' },
payAmount: { required: true, message: '支付金额不可为空', trigger: 'change,blur' },
signPrice: { required: true, message: '支付金额不可为空', trigger: 'change,blur' }
payAmount: { required: true, message: '支付金额不可为空', trigger: 'change,blur' }
})
const schoolRules = {
@ -358,9 +325,6 @@ const message = useMessage() // 消息弹窗
const props = defineProps({
schema: {
type: Array
},
allUserOptions: {
type: Array
}
})
@ -419,12 +383,10 @@ function resetForm(id) {
form.value = {
clueId: id,
dealDate: formatDate(new Date()),
isPayoff: true,
signPrice: 0,
state: true,
payAmount: 0,
remark: undefined,
isCompanyReceipts: appStore.getAppInfo?.instanceType == 2,
receiver: undefined,
isCompanyReceipts: appStore.getAppInfo?.instanceType == 1,
extraPay: [],
signProducts: []
}
@ -515,7 +477,6 @@ function getOptions() {
// getSimpleWarehouseList().then((data) => {
// warehouseOptions.value = data
// })
//
}
//
@ -535,15 +496,8 @@ function changePlace() {
}
function changeClass() {
form.value.signPrice =
form.value.payAmount =
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) {

@ -159,7 +159,6 @@
v-if="!loading"
ref="formRef"
:userOptions="userOptions"
:allUserOptions="allUserOptions"
:schema="allSchemas.formSchema"
@success="getTableList"
/>
@ -170,13 +169,7 @@
@get-list="getTableList"
@update="handleEdit"
/>
<DialogSuccess
ref="successRef"
:schema="allSchemas.detailSchema"
:allUserOptions="allUserOptions"
:userOptions="userOptions"
@success="getTableList"
/>
<DialogSuccess ref="successRef" :schema="allSchemas.detailSchema" @success="getTableList" />
<DialogFollow ref="followRef" @success="getTableList" />
</div>
</template>
@ -189,7 +182,7 @@ import DrawerClue from './Comp/DrawerClue.vue'
import DialogSuccess from './Comp/DialogSuccess.vue'
import DialogFollow from './Comp/DialogFollow.vue'
import ClueMap from './Comp/ClueMap.vue'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime'
@ -216,7 +209,7 @@ async function getCurdSchemas() {
try {
const data = await getSimpleFieldList()
data.forEach((elem) => {
if (elem.field == 'followUser' || elem.field == 'convertPeople') {
if (elem.field == 'followUser') {
elem.search.options = userOptions.value
}
})
@ -358,12 +351,12 @@ function handleGain(id) {
}
const userOptions = ref([])
const allUserOptions = ref([])
onMounted(async () => {
userOptions.value = await getUserOption()
allUserOptions.value = await getAllUserList()
getCurdSchemas()
onMounted(() => {
getUserOption().then((data) => {
userOptions.value = data
getCurdSchemas()
})
})
</script>

@ -118,9 +118,9 @@
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in areaOptions"
:key="dict.id"
:label="dict.name"
:value="dict.id"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
@ -234,7 +234,6 @@
<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'
@ -594,15 +593,8 @@ function resetMarkers() {
createMarkersInMap()
}
function getDictOptions() {
getAreaSimpleList().then((data) => {
areaOptions.value = data
})
}
onMounted(() => {
initMap()
getDictOptions()
})
</script>

@ -1,147 +0,0 @@
<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>

@ -1,105 +0,0 @@
<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,16 +4,15 @@
<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(['school:setting:area'])">
<SettingArea v-if="tabIndex == 10" />
</el-tab-pane>
<!-- <el-tab-pane label="销售提成" :name="10" v-if="checkPermi(['basic:setting:comission'])">
<BSSalerComission 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