|
@@ -16,9 +16,10 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="客户名称" prop="name">
|
|
<el-table-column label="客户名称" prop="name">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="操作" width="150">
|
|
|
|
|
|
+ <el-table-column label="操作" width="200">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="hui-table-operation">
|
|
<div class="hui-table-operation">
|
|
|
|
+ <span class="table-operation" @click="inviteProject(scope.row)">邀请</span>
|
|
<span class="table-operation" @click="lookProject(scope.row)">详情</span>
|
|
<span class="table-operation" @click="lookProject(scope.row)">详情</span>
|
|
<span class="table-operation" @click="updateProject(scope.row)">编辑</span>
|
|
<span class="table-operation" @click="updateProject(scope.row)">编辑</span>
|
|
<span class="table-operation" @click="deleteProject(scope.row)">删除</span>
|
|
<span class="table-operation" @click="deleteProject(scope.row)">删除</span>
|
|
@@ -48,8 +49,12 @@
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
getCustomerListByPage,
|
|
getCustomerListByPage,
|
|
- deleteCustomerById
|
|
|
|
|
|
+ deleteCustomerById,
|
|
|
|
+ bindProject
|
|
} from '@/httpApi/crm'
|
|
} from '@/httpApi/crm'
|
|
|
|
+ import {
|
|
|
|
+ testPhone
|
|
|
|
+ } from '@/httpApi/organization'
|
|
import edit from '@/components/work/crm/customer/edit'
|
|
import edit from '@/components/work/crm/customer/edit'
|
|
import detail from '@/components/work/crm/customer/detail'
|
|
import detail from '@/components/work/crm/customer/detail'
|
|
export default {
|
|
export default {
|
|
@@ -98,6 +103,27 @@
|
|
this.detailId = val.id;
|
|
this.detailId = val.id;
|
|
this.drawer = true;
|
|
this.drawer = true;
|
|
},
|
|
},
|
|
|
|
+ inviteProject(user) {
|
|
|
|
+ testPhone(user.phone).then(res => {
|
|
|
|
+ if (res.state) {
|
|
|
|
+ this.$confirm('是否邀请该用户至当前项目?', () => {
|
|
|
|
+ this.$msg.send({
|
|
|
|
+ dataId: user.id,
|
|
|
|
+ identityId: 1
|
|
|
|
+ }, {
|
|
|
|
+ messageType: 2,
|
|
|
|
+ userIds: res.data.id
|
|
|
|
+ }).then(node => {
|
|
|
|
+ if (node.state) {
|
|
|
|
+ this.$message.success('邀请成功');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.warning('用户不存在,无法绑定');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
deleteCustomerById(val) {
|
|
deleteCustomerById(val) {
|
|
this.$confirm('确定要删除该客户?', () => {
|
|
this.$confirm('确定要删除该客户?', () => {
|
|
deleteProjectById(val.id).then(res => {
|
|
deleteProjectById(val.id).then(res => {
|