上传
This commit is contained in:
@@ -38,13 +38,15 @@
|
||||
<el-table-column prop="extraPayMoney" label="金额" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
</el-table>
|
||||
<el-divider direction="horizontal" content-position="left">额外支出</el-divider>
|
||||
<el-table :data="extraPayList" border stripe>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column prop="extraPayType" label="支出项" />
|
||||
<el-table-column prop="extraPayMoney" label="金额" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
</el-table>
|
||||
<div v-if="checkPermi(['clue:order:add-fee'])">
|
||||
<el-divider direction="horizontal" content-position="left">额外支出</el-divider>
|
||||
<el-table :data="extraPayList" border stripe>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column prop="extraPayType" label="支出项" />
|
||||
<el-table-column prop="extraPayMoney" label="金额" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="回款记录" name="returnRecord">
|
||||
<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 { getAfterSalePage } from '@/api/clue/afterSale'
|
||||
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
const tabName = ref('clueInfo')
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="followTime" label="下次跟进时间">
|
||||
<el-table-column prop="nextFollowTime" label="下次跟进时间">
|
||||
<template #default="{ row }">
|
||||
<el-date-picker
|
||||
v-model="row.followTime"
|
||||
v-model="row.nextFollowTime"
|
||||
type="date"
|
||||
placeholder="选择日期时间"
|
||||
:disabled="!row.editable"
|
||||
@@ -266,7 +266,7 @@ async function handleSave() {
|
||||
message.info('请将跟进人填写完整!')
|
||||
return
|
||||
}
|
||||
if (!address.value) {
|
||||
if (appStore.getAppInfo?.instanceType == 1 && !address.value) {
|
||||
message.info('请选择学员位置!')
|
||||
return
|
||||
}
|
||||
@@ -304,7 +304,7 @@ async function handleSave() {
|
||||
function handleAppendFollow() {
|
||||
followList.value.push({
|
||||
userId: undefined,
|
||||
followTime: formatDate(new Date()),
|
||||
nextFollowTime: formatDate(new Date()),
|
||||
editable: true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -25,6 +25,18 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</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 :gutter="20">
|
||||
<el-col :span="24" :offset="0">
|
||||
@@ -80,9 +92,12 @@
|
||||
<script setup name="DialogFollow">
|
||||
import { getSkillPage } from '@/api/clue/skill'
|
||||
import { createFollow } from '@/api/clue/followRecord'
|
||||
import { getDictOptions } from '@/utils/dict'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const intentionOptions = getDictOptions('intention_state')
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
@@ -97,18 +112,19 @@ const rules = {
|
||||
content: { required: true, message: '跟进内容不可为空', trigger: 'blur' }
|
||||
}
|
||||
|
||||
const open = async (clueId) => {
|
||||
const open = async (clueId, status) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = '新增跟进记录'
|
||||
resetForm(clueId)
|
||||
resetForm(clueId, status)
|
||||
}
|
||||
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
function resetForm(clueId) {
|
||||
function resetForm(clueId, status) {
|
||||
form.value = {
|
||||
clueId,
|
||||
operateTime: undefined,
|
||||
operateTime: formatDate(new Date(), 'YYYY-MM-DD HH:mm'),
|
||||
nextFollowTime: undefined,
|
||||
intentionState: status,
|
||||
content: undefined
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ const detail = ref('')
|
||||
function open(info) {
|
||||
title.value = `【${info.schoolName}】详细信息`
|
||||
show.value = true
|
||||
detail.value = info.schoolRemark || '该驾校暂未配置详细信息'
|
||||
detail.value = info.introduce || '该驾校暂未配置详细信息'
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog title="成交登记" v-model="show" width="820px">
|
||||
<Dialog title="成交登记" v-model="show" width="900px">
|
||||
<Descriptions
|
||||
:title="`线索信息-${info.name}`"
|
||||
:data="info"
|
||||
@@ -124,7 +124,9 @@
|
||||
</el-col>
|
||||
<!-- 进销存模式 -->
|
||||
<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
|
||||
class="mb-5px"
|
||||
type="primary"
|
||||
@@ -161,6 +163,11 @@
|
||||
placeholder="选择规格"
|
||||
filterable
|
||||
:disabled="!row.productId"
|
||||
@change="
|
||||
row.price = specsOptions(row.productId).find(
|
||||
(it) => it.specsId == row.specsId
|
||||
).price
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in specsOptions(row.productId)"
|
||||
@@ -171,6 +178,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="销售单价" width="100px" />
|
||||
<el-table-column prop="signNum" label="成交数量" width="100px">
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
@@ -199,7 +207,9 @@
|
||||
</el-table>
|
||||
</el-col>
|
||||
<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
|
||||
class="mb-5px"
|
||||
type="primary"
|
||||
@@ -247,6 +257,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-divider
|
||||
v-if="prodTotalPrice + extraTotalPrice"
|
||||
direction="horizontal"
|
||||
content-position="left"
|
||||
>
|
||||
合计应收:{{ prodTotalPrice + extraTotalPrice }}
|
||||
</el-divider>
|
||||
</el-col>
|
||||
<el-col :span="24" :offset="0">
|
||||
<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 arr = [
|
||||
{
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<el-tabs v-model="infoIndex" type="border-card">
|
||||
<el-tab-pane label="跟进记录" name="followRecord">
|
||||
<el-button
|
||||
v-if="followList.length"
|
||||
v-hasPermi="['clue:pool:update']"
|
||||
class="mb-10px"
|
||||
type="primary"
|
||||
@@ -139,7 +140,7 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 新建编辑跟进信息 -->
|
||||
<DialogFollow ref="followRef" @success="getFollowList" />
|
||||
<DialogFollow ref="followRef" @success="followSuccess" />
|
||||
<DialogSchoolInfo ref="schoolInfoDialog" />
|
||||
</el-drawer>
|
||||
</template>
|
||||
@@ -252,6 +253,12 @@ async function open(id) {
|
||||
}
|
||||
}
|
||||
|
||||
function followSuccess() {
|
||||
ClueApi.getClue(id).then((data) => {
|
||||
info.value = { ...data, ...data.diyParams }
|
||||
})
|
||||
}
|
||||
|
||||
const placeList = ref([])
|
||||
async function getSchoolPlace() {
|
||||
const data = await getPlaceList()
|
||||
@@ -418,7 +425,7 @@ defineExpose({
|
||||
|
||||
const followRef = ref()
|
||||
function addFollow() {
|
||||
followRef.value.open(info.value.clueId)
|
||||
followRef.value.open(info.value.clueId, info.value.intentionState)
|
||||
}
|
||||
|
||||
function destroyMap() {
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
text
|
||||
style="padding: 0"
|
||||
@click="handleFollow(row)"
|
||||
v-if="queryType != 4"
|
||||
v-hasPermi="['clue:pool:update']"
|
||||
>
|
||||
快速新增
|
||||
@@ -109,7 +110,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:disabled="scope.row.state == '已成交'"
|
||||
:disabled="scope.row.state == '成交'"
|
||||
@click="handleSuccess(scope.row)"
|
||||
v-hasPermi="['clue:pool:enroll']"
|
||||
>
|
||||
@@ -268,7 +269,7 @@ function handleDetail(row) {
|
||||
}
|
||||
|
||||
function handleFollow(row) {
|
||||
followRef.value.open(row.clueId)
|
||||
followRef.value.open(row.clueId, row.intentionState)
|
||||
}
|
||||
|
||||
async function makeCall(phone) {
|
||||
|
||||
Reference in New Issue
Block a user