客户重复通知
This commit is contained in:
@@ -199,4 +199,12 @@ export class CrmService {
|
||||
// showErrorMessage: false // 不显示错误消息
|
||||
})
|
||||
}
|
||||
//通知客户重复
|
||||
static repeatCustomer(params: any) {
|
||||
return request.post<Api.Work.AddResponse>({
|
||||
url: '/crm/customer/distinctNotice',
|
||||
params
|
||||
// showErrorMessage: false // 不显示错误消息
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -147,6 +147,8 @@ declare namespace Api {
|
||||
interface AddResponse {
|
||||
code: string
|
||||
message: string
|
||||
status: any
|
||||
data?: any
|
||||
}
|
||||
/** 修改状态参数 */
|
||||
interface StatusParams {
|
||||
|
||||
@@ -104,6 +104,17 @@
|
||||
<el-button type="primary" @click="confirmMapSelect">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="centerDialogVisible" title="提示" width="500" center>
|
||||
<div style="text-align: center">
|
||||
<span v-html="warningMsg"></span>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="distinctNoticefn"> 通知跟进 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -111,7 +122,8 @@
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { CrmService } from '@/api/crmApi'
|
||||
|
||||
const warningMsg = ref('')
|
||||
const centerDialogVisible = ref(false)
|
||||
const router = useRouter()
|
||||
const formRef = ref()
|
||||
const form = ref({
|
||||
@@ -167,13 +179,18 @@
|
||||
function goBack() {
|
||||
router.back()
|
||||
}
|
||||
|
||||
const customer_id = ref('')
|
||||
function submitForm() {
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
try {
|
||||
const res = await CrmService.customerAdd(form.value)
|
||||
console.log(res)
|
||||
if (res.status == 'distinct') {
|
||||
customer_id.value = res.data.id
|
||||
warningMsg.value = res?.message
|
||||
centerDialogVisible.value = true
|
||||
return
|
||||
}
|
||||
ElMessage.success(res?.message || '提交成功!')
|
||||
router.push('/crmpc/customer')
|
||||
} catch (e: any) {
|
||||
@@ -182,6 +199,14 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
const distinctNoticefn = async () => {
|
||||
const res = await CrmService.repeatCustomer({
|
||||
customer_id: customer_id.value
|
||||
})
|
||||
ElMessage.success(res?.message)
|
||||
centerDialogVisible.value = false
|
||||
router.push('/crmpc/customer')
|
||||
}
|
||||
|
||||
const showMapDialog = ref(false)
|
||||
const selectedAddress = ref('')
|
||||
|
||||
@@ -412,8 +412,7 @@
|
||||
{ key: 'magnitude_txt', label: '客户商机' },
|
||||
{ key: 'channel_name', label: '渠道' },
|
||||
{ key: 'country_name', label: '国家' },
|
||||
{ key: 'phone', label: '电话' },
|
||||
{ key: 'email', label: '邮箱' },
|
||||
{ key: 'follow', label: '联系方式' },
|
||||
{ key: 'grade_txt', label: '等级' },
|
||||
{ key: 'follow_last', label: '上次跟进' },
|
||||
{ key: 'follow_next', label: '下次跟进' },
|
||||
|
||||
Reference in New Issue
Block a user