salary
qsh 5 months ago
parent f63104591b
commit 848830a21b
  1. 17
      src/views/Clue/Order/Comp/DialogOrder.vue
  2. 8
      src/views/Clue/Pool/Comp/DialogClue.vue
  3. 24
      src/views/Clue/Pool/Comp/DialogFollow.vue
  4. 2
      src/views/Clue/Pool/Comp/DialogSchoolInfo.vue
  5. 34
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  6. 11
      src/views/Clue/Pool/Comp/DrawerClue.vue
  7. 5
      src/views/Clue/Pool/index.vue
  8. 11
      src/views/MiniMall/Product/add.vue
  9. 202
      src/views/SchoolManagement/Class/index.vue

@ -38,13 +38,15 @@
<el-table-column prop="extraPayMoney" label="金额" /> <el-table-column prop="extraPayMoney" label="金额" />
<el-table-column prop="remark" label="备注" /> <el-table-column prop="remark" label="备注" />
</el-table> </el-table>
<el-divider direction="horizontal" content-position="left">额外支出</el-divider> <div v-if="checkPermi(['clue:order:add-fee'])">
<el-table :data="extraPayList" border stripe> <el-divider direction="horizontal" content-position="left">额外支出</el-divider>
<el-table-column type="index" width="50" /> <el-table :data="extraPayList" border stripe>
<el-table-column prop="extraPayType" label="支出项" /> <el-table-column type="index" width="50" />
<el-table-column prop="extraPayMoney" label="金额" /> <el-table-column prop="extraPayType" label="支出项" />
<el-table-column prop="remark" label="备注" /> <el-table-column prop="extraPayMoney" label="金额" />
</el-table> <el-table-column prop="remark" label="备注" />
</el-table>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="回款记录" name="returnRecord"> <el-tab-pane label="回款记录" name="returnRecord">
<el-table :data="returnRecordList" border stripe> <el-table :data="returnRecordList" border stripe>
@ -78,6 +80,7 @@ import { getSimpleFieldList as getOrderFieldList } from '@/api/clue/orderField'
import { getPaymentPage } from '@/api/clue/payment' import { getPaymentPage } from '@/api/clue/payment'
import { getAfterSalePage } from '@/api/clue/afterSale' import { getAfterSalePage } from '@/api/clue/afterSale'
import { checkPermi } from '@/utils/permission'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
const tabName = ref('clueInfo') const tabName = ref('clueInfo')

@ -24,10 +24,10 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="followTime" label="下次跟进时间"> <el-table-column prop="nextFollowTime" label="下次跟进时间">
<template #default="{ row }"> <template #default="{ row }">
<el-date-picker <el-date-picker
v-model="row.followTime" v-model="row.nextFollowTime"
type="date" type="date"
placeholder="选择日期时间" placeholder="选择日期时间"
:disabled="!row.editable" :disabled="!row.editable"
@ -266,7 +266,7 @@ async function handleSave() {
message.info('请将跟进人填写完整!') message.info('请将跟进人填写完整!')
return return
} }
if (!address.value) { if (appStore.getAppInfo?.instanceType == 1 && !address.value) {
message.info('请选择学员位置!') message.info('请选择学员位置!')
return return
} }
@ -304,7 +304,7 @@ async function handleSave() {
function handleAppendFollow() { function handleAppendFollow() {
followList.value.push({ followList.value.push({
userId: undefined, userId: undefined,
followTime: formatDate(new Date()), nextFollowTime: formatDate(new Date()),
editable: true editable: true
}) })
} }

@ -25,6 +25,18 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="意向状态" prop="intentionState">
<el-select v-model="form.intentionState" filterable>
<el-option
v-for="item in intentionOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24" :offset="0"> <el-col :span="24" :offset="0">
@ -80,9 +92,12 @@
<script setup name="DialogFollow"> <script setup name="DialogFollow">
import { getSkillPage } from '@/api/clue/skill' import { getSkillPage } from '@/api/clue/skill'
import { createFollow } from '@/api/clue/followRecord' import { createFollow } from '@/api/clue/followRecord'
import { getDictOptions } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
const intentionOptions = getDictOptions('intention_state')
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const dialogTitle = ref('') // const dialogTitle = ref('') //
@ -97,18 +112,19 @@ const rules = {
content: { required: true, message: '跟进内容不可为空', trigger: 'blur' } content: { required: true, message: '跟进内容不可为空', trigger: 'blur' }
} }
const open = async (clueId) => { const open = async (clueId, status) => {
dialogVisible.value = true dialogVisible.value = true
dialogTitle.value = '新增跟进记录' dialogTitle.value = '新增跟进记录'
resetForm(clueId) resetForm(clueId, status)
} }
defineExpose({ open }) // open defineExpose({ open }) // open
function resetForm(clueId) { function resetForm(clueId, status) {
form.value = { form.value = {
clueId, clueId,
operateTime: undefined, operateTime: formatDate(new Date(), 'YYYY-MM-DD HH:mm'),
nextFollowTime: undefined, nextFollowTime: undefined,
intentionState: status,
content: undefined content: undefined
} }
} }

@ -12,7 +12,7 @@ const detail = ref('')
function open(info) { function open(info) {
title.value = `${info.schoolName}】详细信息` title.value = `${info.schoolName}】详细信息`
show.value = true show.value = true
detail.value = info.schoolRemark || '该驾校暂未配置详细信息' detail.value = info.introduce || '该驾校暂未配置详细信息'
} }
defineExpose({ defineExpose({

@ -1,5 +1,5 @@
<template> <template>
<Dialog title="成交登记" v-model="show" width="820px"> <Dialog title="成交登记" v-model="show" width="900px">
<Descriptions <Descriptions
:title="`线索信息-${info.name}`" :title="`线索信息-${info.name}`"
:data="info" :data="info"
@ -124,7 +124,9 @@
</el-col> </el-col>
<!-- 进销存模式 --> <!-- 进销存模式 -->
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2"> <el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2">
<el-divider direction="horizontal" content-position="left">成交产品</el-divider> <el-divider direction="horizontal" content-position="left">
成交产品<span v-if="prodTotalPrice">应收{{ prodTotalPrice }}</span>
</el-divider>
<el-button <el-button
class="mb-5px" class="mb-5px"
type="primary" type="primary"
@ -161,6 +163,11 @@
placeholder="选择规格" placeholder="选择规格"
filterable filterable
:disabled="!row.productId" :disabled="!row.productId"
@change="
row.price = specsOptions(row.productId).find(
(it) => it.specsId == row.specsId
).price
"
> >
<el-option <el-option
v-for="item in specsOptions(row.productId)" v-for="item in specsOptions(row.productId)"
@ -171,6 +178,7 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="price" label="销售单价" width="100px" />
<el-table-column prop="signNum" label="成交数量" width="100px"> <el-table-column prop="signNum" label="成交数量" width="100px">
<template #default="{ row }"> <template #default="{ row }">
<el-input-number <el-input-number
@ -199,7 +207,9 @@
</el-table> </el-table>
</el-col> </el-col>
<el-col :span="24" :offset="0" class="mb-18px"> <el-col :span="24" :offset="0" class="mb-18px">
<el-divider direction="horizontal" content-position="left">其他费用</el-divider> <el-divider direction="horizontal" content-position="left">
其他费用<span v-if="extraTotalPrice">应收{{ extraTotalPrice }}</span>
</el-divider>
<el-button <el-button
class="mb-5px" class="mb-5px"
type="primary" type="primary"
@ -247,6 +257,13 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-divider
v-if="prodTotalPrice + extraTotalPrice"
direction="horizontal"
content-position="left"
>
合计应收{{ prodTotalPrice + extraTotalPrice }}
</el-divider>
</el-col> </el-col>
<el-col :span="24" :offset="0"> <el-col :span="24" :offset="0">
<el-form-item label="备注"> <el-form-item label="备注">
@ -302,6 +319,17 @@ const props = defineProps({
} }
}) })
const prodTotalPrice = computed(() => {
return form.value.signProducts.reduce(
(pre, cur) => pre + (cur?.price || 0) * (cur?.signNum || 0),
0
)
})
const extraTotalPrice = computed(() => {
return form.value.extraPay.reduce((pre, cur) => pre + cur.extraPayMoney, 0)
})
const showSchema = computed(() => { const showSchema = computed(() => {
const arr = [ const arr = [
{ {

@ -42,6 +42,7 @@
<el-tabs v-model="infoIndex" type="border-card"> <el-tabs v-model="infoIndex" type="border-card">
<el-tab-pane label="跟进记录" name="followRecord"> <el-tab-pane label="跟进记录" name="followRecord">
<el-button <el-button
v-if="followList.length"
v-hasPermi="['clue:pool:update']" v-hasPermi="['clue:pool:update']"
class="mb-10px" class="mb-10px"
type="primary" type="primary"
@ -139,7 +140,7 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- 新建编辑跟进信息 --> <!-- 新建编辑跟进信息 -->
<DialogFollow ref="followRef" @success="getFollowList" /> <DialogFollow ref="followRef" @success="followSuccess" />
<DialogSchoolInfo ref="schoolInfoDialog" /> <DialogSchoolInfo ref="schoolInfoDialog" />
</el-drawer> </el-drawer>
</template> </template>
@ -252,6 +253,12 @@ async function open(id) {
} }
} }
function followSuccess() {
ClueApi.getClue(id).then((data) => {
info.value = { ...data, ...data.diyParams }
})
}
const placeList = ref([]) const placeList = ref([])
async function getSchoolPlace() { async function getSchoolPlace() {
const data = await getPlaceList() const data = await getPlaceList()
@ -418,7 +425,7 @@ defineExpose({
const followRef = ref() const followRef = ref()
function addFollow() { function addFollow() {
followRef.value.open(info.value.clueId) followRef.value.open(info.value.clueId, info.value.intentionState)
} }
function destroyMap() { function destroyMap() {

@ -69,6 +69,7 @@
text text
style="padding: 0" style="padding: 0"
@click="handleFollow(row)" @click="handleFollow(row)"
v-if="queryType != 4"
v-hasPermi="['clue:pool:update']" v-hasPermi="['clue:pool:update']"
> >
快速新增 快速新增
@ -109,7 +110,7 @@
<el-button <el-button
type="primary" type="primary"
link link
:disabled="scope.row.state == '成交'" :disabled="scope.row.state == '成交'"
@click="handleSuccess(scope.row)" @click="handleSuccess(scope.row)"
v-hasPermi="['clue:pool:enroll']" v-hasPermi="['clue:pool:enroll']"
> >
@ -268,7 +269,7 @@ function handleDetail(row) {
} }
function handleFollow(row) { function handleFollow(row) {
followRef.value.open(row.clueId) followRef.value.open(row.clueId, row.intentionState)
} }
async function makeCall(phone) { async function makeCall(phone) {

@ -387,14 +387,16 @@ function onSubmit() {
const element = diyFieldList.value[i] const element = diyFieldList.value[i]
data.diyParams[element.field] = data[element.field] data.diyParams[element.field] = data[element.field]
} }
const id = route.query.id const id = route.query.id || form.value.productId
if (!id) { if (!id) {
await ProductApi.createProduct(data) const resp = await ProductApi.createProduct(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
form.value.productId = resp
} else { } else {
await ProductApi.updateProduct(data) await ProductApi.updateProduct(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
getDetail()
} }
} catch (error) { } catch (error) {
console.log(error) console.log(error)
@ -461,10 +463,11 @@ const formLoading = ref(false)
/** 获得详情 */ /** 获得详情 */
const getDetail = async () => { const getDetail = async () => {
if (route.query?.id) { const id = route.query?.id || form.value.productId
if (id) {
formLoading.value = true formLoading.value = true
try { try {
const res = await ProductApi.getProduct(route.query.id) const res = await ProductApi.getProduct(id)
let diyField = {} let diyField = {}
if (res.diyParams) { if (res.diyParams) {
diyField = isObject(res.diyParams) ? res.diyParams : JSON.parse(res.diyParams) diyField = isObject(res.diyParams) ? res.diyParams : JSON.parse(res.diyParams)

@ -2,21 +2,16 @@
<div> <div>
<el-form :model="searchForm" ref="searchRef" inline label-width="0"> <el-form :model="searchForm" ref="searchRef" inline label-width="0">
<el-form-item> <el-form-item>
<el-input <el-cascader
v-model="searchForm.schoolName" :options="schoolOption"
placeholder="请输入驾校名称" v-model="searchForm.schPlace"
clearable clearable
style="width: 180px" filterable
@keyup.enter="handleQuery" show-all-levels
/> style="width: 300px"
</el-form-item> placeholder="选择驾校/场地"
<el-form-item> :props="{ expandTrigger: 'hover', multiple: false, checkStrictly: true }"
<el-input @change="handleQuery"
v-model="searchForm.placeName"
placeholder="请输入场地名称"
clearable
style="width: 180px"
@keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -69,85 +64,67 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="20"> <el-table
<el-col :span="6" :offset="0"> :data="tableList"
<div class="head-container" style="max-height: 700px; overflow-y: auto"> v-loading="loading"
<el-tree border
ref="tree" @selection-change="handleSelectionChange"
:data="schoolOption" >
accordion <el-table-column type="selection" width="50" />
node-key="id" <el-table-column type="index" label="序号" width="60" />
highlight-current <el-table-column
:default-expanded-keys="selectNodes.map((item) => item.id)" v-for="col in columns"
@node-click="handleNodeClick" :prop="col.props"
/> :key="col.props"
</div> :label="col.label"
</el-col> :width="col.width"
<el-col :span="18" :offset="0"> show-overflow-tooltip
<el-table />
:data="tableList" <el-table-column label="备注" width="260">
v-loading="loading" <template #default="{ row }">
border <div v-dompurify-html="row.remark"></div>
@selection-change="handleSelectionChange" </template>
> </el-table-column>
<el-table-column type="selection" width="50" /> <el-table-column label="状态" width="80">
<el-table-column type="index" label="序号" width="60" /> <template #default="{ row }">
<el-table-column <el-switch
v-for="col in columns" v-model="row.status"
:prop="col.props" :active-value="0"
:key="col.props" :inactive-value="1"
:label="col.label" :disabled="!checkPermi(['school:class:update'])"
:width="col.width" @change="handleChangeStatus(row)"
show-overflow-tooltip
/> />
<el-table-column label="备注" width="260"> </template>
<template #default="{ row }"> </el-table-column>
<div v-dompurify-html="row.remark"></div> <el-table-column label="操作" width="120px">
</template> <template #default="{ row }">
</el-table-column> <el-button
<el-table-column label="状态" width="80"> type="primary"
<template #default="{ row }"> style="padding: 0"
<el-switch text
v-model="row.status" v-hasPermi="['school:class:update']"
:active-value="0" @click="handleOpenDialog('update', row.typeId)"
:inactive-value="1" >
:disabled="!checkPermi(['school:class:update'])" 修改
@change="handleChangeStatus(row)" </el-button>
/> <el-button
</template> type="danger"
</el-table-column> style="padding: 0"
<el-table-column label="操作" width="120px"> text
<template #default="{ row }"> v-hasPermi="['school:class:delete']"
<el-button @click="handleRemove(row.typeId)"
type="primary" >
style="padding: 0" 删除
text </el-button>
v-hasPermi="['school:class:update']" </template>
@click="handleOpenDialog('update', row.typeId)" </el-table-column>
> </el-table>
修改 <Pagination
</el-button> v-model:limit="searchForm.pageSize"
<el-button v-model:page="searchForm.pageNo"
type="danger" :total="total"
style="padding: 0" @pagination="getList"
text />
v-hasPermi="['school:class:delete']"
@click="handleRemove(row.typeId)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
v-model:limit="searchForm.pageSize"
v-model:page="searchForm.pageNo"
:total="total"
@pagination="getList"
/>
</el-col>
</el-row>
<Dialog title="批量修改" v-model="batchStatusDialogShow" width="400px"> <Dialog title="批量修改" v-model="batchStatusDialogShow" width="400px">
<el-form :model="statusForm" ref="statusRef" label-width="80px"> <el-form :model="statusForm" ref="statusRef" label-width="80px">
<el-form-item label="选择状态" prop="status"> <el-form-item label="选择状态" prop="status">
@ -186,8 +163,7 @@ const total = ref(0)
const tableList = ref([]) const tableList = ref([])
const searchForm = ref({ const searchForm = ref({
schoolName: undefined, schPlace: undefined,
placeName: undefined,
typeName: undefined, typeName: undefined,
licenseType: undefined, licenseType: undefined,
pageNo: 1, pageNo: 1,
@ -195,41 +171,24 @@ const searchForm = ref({
}) })
const schoolOption = ref([]) const schoolOption = ref([])
const selectNodes = ref([]) // const selectNodes = ref([])
async function getSchoolList() { async function getSchoolList() {
try { try {
const data = await PlaceApi.getPlaceList() const data = await PlaceApi.getPlaceList()
schoolOption.value = data.schoolList.map((item) => ({ schoolOption.value = data.schoolList.map((item) => ({
id: item.schoolId, value: item.schoolId,
label: item.schoolName, label: item.schoolName,
level: 1,
children: data.placeList children: data.placeList
.filter((place) => item.schoolId === place.schoolId) .filter((place) => item.schoolId === place.schoolId)
.map((place) => ({ .map((place) => ({
id: place.placeId, value: place.placeId,
label: place.name, label: place.name
level: 2
})) }))
})) }))
} catch {} } catch {}
} }
function handleNodeClick(data, node) {
if (data.level === 1) {
selectNodes.value = [{ id: data.id, name: data.label }]
searchForm.value.schoolName = data.label
} else {
selectNodes.value = [
{ id: node.parent.data.id, name: node.parent.data.label },
{ id: data.id, name: data.label }
]
searchForm.value.schoolName = node.parent.data.label
searchForm.value.placeName = data.label
}
handleQuery()
}
const columns = [ const columns = [
{ props: 'schoolName', label: '驾校', width: '100px' }, { props: 'schoolName', label: '驾校', width: '100px' },
{ props: 'placeName', label: '场地' }, { props: 'placeName', label: '场地' },
@ -248,7 +207,15 @@ function handleQuery() {
async function getList() { async function getList() {
loading.value = true loading.value = true
try { try {
const data = await ClassApi.getClassTypePage(searchForm.value) const params = { ...searchForm.value }
if (params.schPlace && params.schPlace.length) {
params.schoolId = params.schPlace[0]
if (params.schPlace.length == 2) {
params.placeId = params.schPlace[1]
}
}
delete params.schPlace
const data = await ClassApi.getClassTypePage(params)
tableList.value = data.list tableList.value = data.list
total.value = data.total total.value = data.total
} finally { } finally {
@ -263,8 +230,7 @@ function handleOpenDialog(type, id = null) {
function handleReset() { function handleReset() {
searchForm.value = { searchForm.value = {
schoolName: undefined, schPlace: undefined,
placeName: undefined,
typeName: undefined, typeName: undefined,
licenseType: undefined, licenseType: undefined,
pageNo: 1, pageNo: 1,

Loading…
Cancel
Save