|
@@ -14,12 +14,40 @@
|
|
|
<div style="text-align: center;">{{scope.$index + 1}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="客户名称" prop="name">
|
|
|
+ <el-table-column label="客户名称" prop="name"></el-table-column>
|
|
|
+ <el-table-column label="邀请项目" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="hui-table-operation" v-if="scope.row.status === 0">
|
|
|
+ <span class="table-operation" @click="inviteProject(scope.row)">发送邀请</span>
|
|
|
+ </div>
|
|
|
+ <div class="hui-table-operation" v-if="scope.row.status === 3">
|
|
|
+ <span class="table-operation" @click="inviteProject(scope.row)">重新邀请</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="邀请状态" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.status == 0" class="hui-state">
|
|
|
+ <span class="hui-state-bage hui-state-primary"></span>
|
|
|
+ <span class="hui-state-label">待邀请</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.status == 1" class="hui-state">
|
|
|
+ <span class="hui-state-bage hui-state-info"></span>
|
|
|
+ <span class="hui-state-label">邀请中</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.status == 2" class="hui-state">
|
|
|
+ <span class="hui-state-bage hui-state-success"></span>
|
|
|
+ <span class="hui-state-label">通过邀请</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.status == 3" class="hui-state">
|
|
|
+ <span class="hui-state-bage hui-state-error"></span>
|
|
|
+ <span class="hui-state-label">拒绝邀请</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<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="updateProject(scope.row)">编辑</span>
|
|
|
<span class="table-operation" @click="deleteProject(scope.row)">删除</span>
|
|
@@ -50,7 +78,8 @@
|
|
|
import {
|
|
|
getCustomerListByPage,
|
|
|
deleteCustomerById,
|
|
|
- bindProject
|
|
|
+ bindProject,
|
|
|
+ updateCustomer
|
|
|
} from '@/httpApi/crm'
|
|
|
import {
|
|
|
testPhone
|
|
@@ -78,7 +107,8 @@
|
|
|
getCustomerListByPage({
|
|
|
currPage: this.currPage,
|
|
|
pageSize: this.pageSize,
|
|
|
- organizationId: this.$store.getters.organization.id
|
|
|
+ organizationId: this.$store.getters.organization.id,
|
|
|
+ userId: this.$store.getters.user.id
|
|
|
}).then(res => {
|
|
|
if (res.state) {
|
|
|
this.tableData = res.data.dataList;
|
|
@@ -106,7 +136,7 @@
|
|
|
inviteProject(user) {
|
|
|
testPhone(user.phone).then(res => {
|
|
|
if (res.state) {
|
|
|
- this.$confirm('是否邀请该用户至当前项目?', () => {
|
|
|
+ this.$confirm('是否邀请该客户至当前项目?', () => {
|
|
|
this.$msg.send({
|
|
|
dataId: user.id,
|
|
|
identityId: 1
|
|
@@ -115,7 +145,15 @@
|
|
|
userIds: res.data.id
|
|
|
}).then(node => {
|
|
|
if (node.state) {
|
|
|
- this.$message.success('邀请成功');
|
|
|
+ updateCustomer({
|
|
|
+ id: user.id,
|
|
|
+ status: 1
|
|
|
+ }).then(res => {
|
|
|
+ if (res.state) {
|
|
|
+ this.init();
|
|
|
+ this.$message.success('邀请成功');
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
});
|