This commit is contained in:
qsh
2024-06-26 18:24:45 +08:00
parent f63104591b
commit 848830a21b
9 changed files with 169 additions and 145 deletions

View File

@@ -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
}
}