Compare commits

..

6 Commits

  1. 4
      src/api/clue/sign.js
  2. 2
      src/store/modules/user.ts
  3. 26
      src/views/Clue/Pool/Comp/DialogSchoolInfo.vue
  4. 20
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  5. 12
      src/views/Clue/Set/Comp/ClueSource.vue
  6. 7
      src/views/Home/CloseRate.vue
  7. 83
      src/views/SchoolManagement/Place/index.vue

@ -47,3 +47,7 @@ export const updateProduceStatus = (data) => {
export const updateProduceSort = (data) => {
return request.post({ url: '/admin-api/crm/sign-prodcut/adjust/sort', data: data })
}
export const getSignProfit = (params) => {
return request.get({ url: '/admin-api/crm/sign/profit', params })
}

@ -49,7 +49,7 @@ export const useUserStore = defineStore('admin-user', {
return null
}
let userInfo = cache.local.get(CACHE_KEY.USER)
if (!userInfo) {
if (!userInfo || !userInfo?.menus || userInfo.menus.length == 0) {
userInfo = await getInfo({})
}
this.permissions = userInfo.permissions

@ -1,18 +1,44 @@
<template>
<el-dialog width="800px" :title="title" v-model="show" append-to-body>
<el-divider direction="horizontal" content-position="left" style="margin-top: 10px">
场地班型
</el-divider>
<el-table :data="tableList" border stripe size="small">
<el-table-column type="index" width="50" />
<el-table-column prop="typeName" label="班型名称" />
<el-table-column prop="licenseType" label="驾照类型" />
<el-table-column label="班型备注">
<template #default="{ row }">
<el-popover placement="top" width="500px" trigger="click">
<template #reference>
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
</template>
<div v-dompurify-html="row.remark"></div>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-divider direction="horizontal" content-position="left">场地详细信息</el-divider>
<div v-dompurify-html="detail" class="mb-20px"></div>
</el-dialog>
</template>
<script setup name="DialogSchoolInfo">
import { getClassTypeList } from '@/api/school/class'
const title = ref('')
const show = ref(false)
const detail = ref('')
const tableList = ref([])
function open(info) {
title.value = `${info.schoolName}】详细信息`
show.value = true
detail.value = info.introduce || '该驾校暂未配置详细信息'
getClassTypeList({ placeId: info.placeId, status: 0 }).then((data) => {
tableList.value = data
})
}
defineExpose({

@ -119,6 +119,11 @@
</el-form-item>
</el-col>
<template v-if="appStore.getAppInfo?.instanceType == 1">
<el-col :span="8" :offset="0" v-if="form.signClass">
<el-form-item label="利润">
<div style="color: blue; font-weight: bold; font-size: 16px">{{ profitNum }}</div>
</el-form-item>
</el-col>
<el-col :span="8" :offset="0">
<el-form-item label="接待人" prop="receiver">
<el-select v-model="form.receiver" placeholder="选择接待人" clearable filterable>
@ -336,7 +341,7 @@
<script setup name="DialogSuccess">
import * as ClueApi from '@/api/clue'
import { createSign } from '@/api/clue/sign'
import { createSign, getSignProfit } from '@/api/clue/sign'
import { getDiyFieldList } from '@/api/clue/orderField'
import { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class'
@ -594,6 +599,19 @@ function signPriceChange() {
if (form.value.isPayoff) {
form.value.payAmount = form.value.signPrice
}
calcSignProfit()
}
const profitNum = ref(0)
function calcSignProfit() {
if (form.value.signClass && appStore.getAppInfo?.instanceType == 1) {
//
getSignProfit({ signClass: form.value.signClass, signPrice: form.value.signPrice }).then(
(data) => {
profitNum.value = data
}
)
}
}
function handleRemove(type, index) {

@ -9,6 +9,12 @@
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-radio-group v-model="searchForm.status" @change="handleQuery">
<el-radio :label="0"> 开启 </el-radio>
<el-radio :label="1"> 关闭 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
@ -59,7 +65,8 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() //
const searchForm = ref({
sourceName: undefined
sourceName: undefined,
status: 0
})
const sourceDialog = ref()
@ -71,7 +78,8 @@ function handleQuery() {
}
function resetQuery() {
searchForm.value = {
sourceName: ''
sourceName: '',
status: 0
}
getList()
}

@ -0,0 +1,7 @@
<template>
<div> 成交率 </div>
</template>
<script setup name="CloseRate"></script>
<style lang="scss" scoped></style>

@ -109,10 +109,22 @@
<el-input v-model="placeForm.address" placeholder="输入地址" />
</el-form-item>
<el-form-item label="经度" prop="lng">
<el-input v-model="placeForm.lng" placeholder="输入经度" />
<el-input-number
v-model="placeForm.lng"
:min="1"
:controls="false"
placeholder="输入经度"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="纬度" prop="lat">
<el-input v-model="placeForm.lat" placeholder="输入纬度" />
<el-input-number
v-model="placeForm.lat"
:min="1"
:controls="false"
placeholder="输入纬度"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="所属区域" prop="area">
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
@ -130,10 +142,10 @@
<el-form-item label="负责人" prop="contact">
<el-input v-model="placeForm.contact" placeholder="输入负责人" />
</el-form-item>
<el-form-item label="是否推荐" prop="contact">
<!-- <el-form-item label="是否推荐" prop="contact">
<el-radio v-model="placeForm.recommend" :label="true"></el-radio>
<el-radio v-model="placeForm.recommend" :label="false"></el-radio>
</el-form-item>
</el-form-item> -->
</el-form>
</el-tab-pane>
<el-tab-pane label="描述" name="desc">
@ -145,6 +157,19 @@
<el-button @click="closePlaceDialog">取消</el-button>
</div>
</el-card>
<el-autocomplete
:style="{
position: 'absolute',
top: '20px',
left: placeDialogShow ? '380px' : '20px',
width: '200px'
}"
v-model="areaValue"
clearable
placeholder="输入并搜索位置"
:fetch-suggestions="remoteMethod"
@select="currentSelect"
/>
<!-- 底部驾校场地列表 -->
<el-card
@ -234,6 +259,7 @@
<script setup name="Place">
import * as PlaceApi from '@/api/school/place'
import { getConfigByConfigKey } from '@/api/system/set'
import { getAreaSimpleList } from '@/api/school/setting/area'
import { checkPermi } from '@/utils/permission'
@ -267,18 +293,35 @@ const mapHelpText = ref('')
const tipPostion = ref({})
const placeTab = ref('info')
function initMap() {
const defaultLatLng = ref({
lat: 31.86119,
lng: 117.283042
})
const defaultCity = ref('合肥')
let AutoComplete = ref(null)
async function initMap() {
const data = await getConfigByConfigKey({ configKey: 'defaultLocation' })
const cityInfo = JSON.parse(data.configValue)
defaultLatLng.value = {
lat: cityInfo.lat,
lng: cityInfo.lng
}
defaultCity.value = cityInfo.locationName
AMapLoader.load({
key: '713d839ff505943b0f18e6df45f3b0dc', //key
version: '2.0',
plugins: ['AMap.Geocoder']
plugins: ['AMap.Geocoder', 'AMap.AutoComplete']
}).then((AMap) => {
aMap.value = AMap
geoCoder.value = new AMap.Geocoder()
dialogMap.value = new AMap.Map('dialogMap', {
zoom: 12,
zooms: [2, 22],
center: [117.283042, 31.86119]
center: [defaultLatLng.value.lng, defaultLatLng.value.lat]
})
AutoComplete.value = new AMap.AutoComplete({
city: defaultCity.value
})
locationMarker.value = new AMap.Marker({
icon: FlagRed
@ -313,6 +356,32 @@ function initMap() {
})
}
const areaValue = ref('')
function remoteMethod(searchValue, cb) {
if (searchValue) {
AutoComplete.value?.search(searchValue, (status, result) => {
if (result.tips?.length) {
// areaList.value = result?.tips
const list = result.tips.map((it) => ({
...it,
value: it.name
}))
cb(list)
} else {
cb([])
}
})
} else {
cb([])
}
}
function currentSelect(val) {
if (val) {
dialogMap.value.setCenter([val.location?.lng, val.location?.lat], true)
}
}
function regeoCode() {
geoCoder.value.getAddress([placeForm.value.lng, placeForm.value.lat], (status, result) => {
if (status === 'complete' && result.regeocode) {

Loading…
Cancel
Save