wansfa 2 yıl önce
ebeveyn
işleme
8486c3cc43

+ 7 - 2
public/wx.html

@@ -56,7 +56,7 @@
   <script type="text/javascript">
     var cid=0;
     $(document).ready(function() {
-        cid=getQueryString("cid");
+        cid=getQueryString("id");
         htmlInfo();
         getInfos();
     });
@@ -104,7 +104,12 @@
 	
 	  
       $.ajax({
-            url: "http://192.169.1.150:7015/app/user/getAppletScheme",
+            type: "get",
+            //async: false,
+            //dataType: "jsonp",
+            //jsonp: "callback",//传递给请求处理程序或页面的,标识jsonp回调函数名(一般为:callback)
+            //jsonpCallback: "GetData",//callback的function名称
+            url: "http://127.0.0.1:7015/app/user/getAppletScheme",
             data: {
               "cardId":cid,
               // "domain": "eturl.cn",

+ 15 - 4
src/api/company/companyUserCard.js

@@ -46,8 +46,19 @@ export function delCard(id) {
 // 导出card
 export function exportCard(query) {
   return request({
-    url: '/company/companUsercard/export',
-    method: 'get',
-    params: query
+      url: '/company/companUsercard/export',
+      method: 'get',
+      params: query
   })
-}
+}
+
+
+  //群发短信
+  export function sendCustomerBatchMsg(data) {
+    return request({
+        url: '/company/companUsercard/sendCustomerBatchMsg',
+        method: 'post',
+        data: data
+    })
+ }
+ 

+ 2 - 2
src/utils/call.js

@@ -30,13 +30,13 @@ export function callNumber(customerId,contactsId){
 	const callUser = store.getters && store.getters.callUser
 	const callRealm = store.getters && store.getters.callRealm
 	const callHa1 = store.getters && store.getters.callHa1
+    JsSIP.C.SESSION_EXPIRES=120,JsSIP.C.MIN_SESSION_EXPIRES=360;
 
 	console.log(callUser)
 	console.log(callRealm)
 	console.log(callHa1)
 	if(_phone==null){
-		console.log(1);
-		JsSIP.C.SESSION_EXPIRES=120,JsSIP.C.MIN_SESSION_EXPIRES=360;
+		
 		_phone = new WebPhoneSDK({
 				lib: JsSIP,
 				debug: true,

+ 246 - 0
src/views/company/companyUser/card/addSms.vue

@@ -0,0 +1,246 @@
+<template>
+    <div>
+            <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+               <el-form-item label="我的客户" prop="customerIds"  >
+                    <el-row>
+                        <el-col >
+                            <el-button plain  type="primary" icon="el-icon-plus" @click="handleAddCustomer">添加客户</el-button>
+                        </el-col>
+                    </el-row>
+                    <el-table border width="100%" style="margin-top:5px;"  :data="customerList">
+                            <el-table-column label="客户编码" width="100px" align="center" prop="customerCode" />
+                            <el-table-column  label="客户名称"   align="center" prop="customerName" :show-overflow-tooltip="true">
+                                <template slot-scope="scope">
+                                    {{scope.row.customerName}}
+                                   <!-- <el-link  :underline="false" type="primary" >{{scope.row.customerName}}</el-link> -->
+                                </template>
+                            </el-table-column>
+                            <el-table-column  label="手机" width="120px"  align="center" prop="mobile"   >
+                                <template slot-scope="scope">
+                                {{scope.row.mobile}}
+                                </template>
+                            </el-table-column>
+                            <el-table-column  label="跟进阶段"  align="center" prop="visitStatus">
+                                <template slot-scope="scope">
+                                    <el-tag prop="visitStatus" v-for="(item, index) in statusOptions"    v-if="scope.row.visitStatus==item.dictValue">{{item.dictLabel}}</el-tag>
+                                </template>
+                            </el-table-column>
+                            <el-table-column  label="客户来源" align="center" prop="source">
+                                <template slot-scope="scope">
+                                    <el-tag prop="status" v-for="(item, index) in sourceOptions"    v-if="scope.row.source==item.dictValue">{{item.dictLabel}}</el-tag>
+                                </template>
+                            </el-table-column>
+                            <el-table-column  label="客户类型"   align="center" prop="customerType">
+                                <template slot-scope="scope">
+                                    <el-tag prop="status" v-for="(item, index) in typeOptions"    v-if="scope.row.customerType==item.dictValue">{{item.dictLabel}}</el-tag>
+                                </template>
+                            </el-table-column>
+                            <el-table-column  label="标签" align="center" prop="tags"   >
+                                <template slot-scope="scope">
+                                {{scope.row.tags}}
+                                </template>
+                            </el-table-column>
+                            <!-- <el-table-column  label="备注" width="120px"  align="center" prop="remark"   >
+                                <template slot-scope="scope">
+                                {{scope.row.remark}}
+                                <el-button   v-hasPermi="['crm:customer:addRemark']" type="text" size="mini" @click="handleAddRemark(scope.row)">修改备注</el-button>
+                                </template>
+                            </el-table-column> -->
+                            <!-- <el-table-column label="进线客户详情" align="center" :show-overflow-tooltip="true" prop="registerDesc" />
+                            <el-table-column label="领取时间" align="center" prop="startTime" />
+                            <el-table-column label="进线客户提交日期" align="center" prop="registerSubmitTime" /> -->
+                            <el-table-column label="创建时间" align="center" prop="customerCreateTime" width="180">
+                            </el-table-column>
+
+                            <el-table-column label="操作"   align="center" fixed="right" width="120px" class-name="small-padding fixed-width">
+                                <template slot-scope="scope">
+                                      <el-button
+                                        size="mini"
+                                        type="text"
+                                        icon="el-icon-delete"
+                                        @click="handleDelCustomer(scope.row)"
+                                        >删除</el-button>   
+                                </template>
+                            </el-table-column>
+                    </el-table>
+                </el-form-item>
+
+                <el-form-item label="模板库" prop="tempId">
+                    <el-select @change="smsChange" v-model="form.tempId" placeholder="请选择" clearable size="small">
+                        <el-option
+                                v-for="item in smsTemps"
+                                :key="item.tempId"
+                                :label="item.title"
+                                :value="item.tempId"
+                            />
+                    </el-select>
+                </el-form-item>
+
+                <el-form-item label="短信数量" >
+                    {{smsCount}}
+                </el-form-item>
+
+                <!-- <el-form-item label="接收手机号" >
+                    {{form.mobile}}
+                </el-form-item> -->
+                <el-form-item label="内容" prop="content">
+                    <el-input :rows="5" v-model="form.content"  type="textarea" placeholder="请输入内容" />
+                </el-form-item>
+            </el-form>
+
+            <div  class="footer">
+                <el-button type="primary" @click="submitForm">发送</el-button>
+            </div>
+
+    </div>
+</template>
+  
+<script>
+    import { getSmsTempList } from "@/api/company/companySmsTemp";
+    import { getCompanySmsCount } from "@/api/company/companySms";
+    import { sendCustomerBatchMsg } from "@/api/company/companyUserCard";
+    export default {
+        name: "addSms",
+        data() {
+            return {
+                customerList:[],
+                statusOptions:[],
+                typeOptions:[],
+                sourceOptions:[],
+                sexOptions:[],
+                tagsOptions:[],
+                smsTemps:[],
+                smsCount:0, 
+                form: {
+                    tempId:null,
+                    tempCode:null,
+                    customerIds:[],
+                    content:null,
+                    cardUrl:null,
+                    type:1
+                },
+                 // 查询参数
+                queryParams: {
+                      customerName: null,
+                      pageNum: 1,
+                      pageSize: 10,
+                },
+                // 表单校验
+                rules: {
+                    customerIds: [
+                        { required: true, message: "请选择客户" }
+                    ],
+                    tempId: [
+                        { required: true, message: "请选择短信模版" }
+                    ],
+                     content: [
+                        { required: true, message: "内容不能为空", trigger: "change" }
+                    ],
+                }
+            };
+        },
+        created() {
+            this.getDicts("crm_customer_user_status").then((response) => {
+                  this.statusOptions = response.data;
+            });
+            this.getDicts("common_sex").then((response) => {
+                  this.sexOptions = response.data;
+            });
+            this.getDicts("crm_customer_source").then((response) => {
+                  this.sourceOptions = response.data;
+            });
+            this.getDicts("crm_customer_type").then((response) => {
+                  this.typeOptions = response.data;
+            });
+            this.getDicts("crm_customer_tag").then((response) => {
+                this.tagsOptions = response.data;
+            });
+            getSmsTempList().then(response => {
+                this.smsTemps = response.data;
+            });
+            this.getCompanySmsCount()
+            
+        },
+        methods: {
+            selectCustomer(row){
+                console.log(row);
+                for(var i=0;i<this.customerList.length;i++){
+                    if(this.customerList[i].customerId==row.customerId){
+                       return;
+                    }
+                }
+                this.customerList.push(row);
+            },
+           
+            handleAddCustomer(){
+                this.$emit('handleAddCustomer');
+            },
+            handleDelCustomer(row){
+                this.customerList.splice(this.customerList.findIndex(item => item.customerId === row.idcustomerId), 1)
+                //this.compute();
+            },
+            getCompanySmsCount(){
+                getCompanySmsCount().then(response => {
+                    if(response.data!=null){
+                        this.smsCount = response.data.remainSmsCount;
+                    }
+                });
+            },
+            smsChange(e){
+                var v=this.smsTemps.find(value=>value.tempId==e);
+                console.log(v)
+                this.form.content=v.content
+                this.form.tempCode=v.tempCode
+            },
+            reset(shortUrl) {
+                this.form.cardUrl=shortUrl;
+                this.getCompanySmsCount()
+            },
+            submitForm() {
+
+               this.form.customerIds=[];
+               this.customerList.forEach((item) => {
+                   this.form.customerIds.push(item.customerId)
+               });
+               this.$refs["form"].validate(valid => {
+                    if (valid) {
+                        this.myloading = this.$loading({
+                            lock: true,
+                            text: '处理中...',
+                            spinner: 'el-icon-loading',
+                            background: 'rgba(0, 0, 0, 0.7)'
+                        });
+                        sendCustomerBatchMsg(this.form).then(response => {
+                            this.myloading.close()
+                            if (response.code === 200) {
+                                this.msgSuccess(response.msg);
+                                this.$emit('close');
+                            }
+                            else{
+                                this.myloading=false;
+                                this.msgError(response.msg);
+                            }
+                        });
+                    }
+                });
+            },
+        }
+    };
+</script>
+<style lang="scss" scoped>
+.contents{
+    height: 100%;
+    background-color: #fff;
+    padding: 20px;
+        
+}
+.footer{
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+}
+</style>
+
+
+
+ 

+ 167 - 0
src/views/company/companyUser/card/customerSelect.vue

@@ -0,0 +1,167 @@
+<template>
+  <div style="margin-bottom:15px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+      <el-form-item label="客户名称" prop="customerName">
+        <el-input
+          style="width:200px"
+          v-model="queryParams.customerName"
+          placeholder="请输入客户名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"/>
+      </el-form-item>
+
+      <el-form-item label="跟进阶段" prop="status">
+        <el-select style="width:220px" filterable  v-model="queryParams.status" placeholder="请选择跟进阶段" clearable size="small">
+           <el-option
+                v-for="item in statusOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-table border v-loading="loading" :data="customerList">
+            <el-table-column label="客户编码" align="center" prop="customerCode" />
+            <el-table-column  label="客户名称"   align="center" prop="customerName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  {{scope.row.customerName}}
+                <!-- <el-link @click="handleShow(scope.row)" :underline="false" type="primary" >{{scope.row.customerName}}</el-link> -->
+                </template>
+            </el-table-column>
+            <el-table-column  label="手机" width="120px"  align="center" prop="mobile"   >
+                <template slot-scope="scope">
+                {{scope.row.mobile}}
+                </template>
+            </el-table-column>
+            <el-table-column  label="客户来源" align="center" prop="source">
+                <template slot-scope="scope">
+                    <el-tag prop="status" v-for="(item, index) in sourceOptions"    v-if="scope.row.source==item.dictValue">{{item.dictLabel}}</el-tag>
+                </template>
+            </el-table-column>
+            <el-table-column  width="120px"  label="跟进阶段"  align="center" prop="visitStatus">
+                <template slot-scope="scope">
+                    <el-tag prop="visitStatus" v-for="(item, index) in statusOptions"    v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
+                    <!-- <el-button  v-hasPermi="['crm:customer:addVisitStatus']"  type="text" size="mini">修改</el-button> -->
+                </template>
+            </el-table-column>
+            <el-table-column  label="客户类型" align="center" prop="customerType">
+                <template slot-scope="scope">
+                    <el-tag prop="status" v-for="(item, index) in typeOptions"    v-if="scope.row.customerType==item.dictValue">{{item.dictLabel}}</el-tag>
+                    <!-- <el-button   v-hasPermi="['crm:customer:addCustomerType']"  type="text" size="mini" @click="handleCustomerType(scope.row)">修改</el-button> -->
+                </template>
+            </el-table-column>
+            <el-table-column  label="标签" align="center" prop="tags"   >
+                <template slot-scope="scope">
+                {{scope.row.tags}}
+                <!-- <el-button  v-hasPermi="['crm:customer:addTag']"  type="text" size="mini" @click="handleAddTag(scope.row)">打标签</el-button> -->
+                </template>
+            </el-table-column>
+            <!-- <el-table-column  label="备注" width="120px"  align="center" prop="remark"   >
+                <template slot-scope="scope">
+                {{scope.row.remark}}
+                <el-button   v-hasPermi="['crm:customer:addRemark']" type="text" size="mini" @click="handleAddRemark(scope.row)">修改备注</el-button>
+                </template>
+            </el-table-column> -->
+            <!-- <el-table-column label="进线客户详情" align="center" :show-overflow-tooltip="true" prop="registerDesc" />
+            <el-table-column label="领取时间" align="center" prop="startTime" />
+            <el-table-column label="进线客户提交日期" align="center" prop="registerSubmitTime" /> -->
+            <el-table-column label="创建时间"  width="100" align="center" prop="customerCreateTime" >
+            </el-table-column>
+            <el-table-column label="操作" align="center" width="100px" >
+                <template slot-scope="scope">
+                <el-button
+                    size="mini"
+                    type="text"
+                    @click="handleSelect(scope.row)"
+                >选择</el-button>
+                </template>
+            </el-table-column>
+    </el-table> 
+    <pagination
+      style="padding-bottom:10px;"
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { getMyCustomerList } from "@/api/crm/customer";
+export default {
+  name: "selectCustomer",
+  data() {
+    return {
+      loading: true,
+      total: 0,
+      queryParams: {
+            customerName: null,
+            pageNum: 1,
+            pageSize: 10,
+            status:null,
+      },
+      statusOptions:[],
+      typeOptions:[],
+      sourceOptions:[],
+      sexOptions:[],
+      tagsOptions:[],
+      customerList: [],
+    };
+  },
+  created() {
+    this.getDicts("crm_customer_user_status").then((response) => {
+        this.statusOptions = response.data;
+    });
+    this.getDicts("common_sex").then((response) => {
+      this.sexOptions = response.data;
+    });
+    this.getDicts("crm_customer_source").then((response) => {
+      this.sourceOptions = response.data;
+    });
+    this.getDicts("crm_customer_type").then((response) => {
+      this.typeOptions = response.data;
+    });
+    this.getDicts("crm_customer_tag").then((response) => {
+        this.tagsOptions = response.data;
+    });
+     this.getList();
+  },
+
+  methods: {
+    handleSelect(row){
+      this.$emit('selectCustomer',row);
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    getList(){
+        this.loading = true;
+        // if(this.tagIds.length>0){
+        //     this.queryParams.tags=this.tagIds.toString();
+        // }
+        // else{
+        //     this.queryParams.tags=null
+        // }
+        getMyCustomerList(this.queryParams).then(response => {
+            this.customerList = response.rows;
+            this.total = response.total;
+            this.loading = false;
+        });
+    }
+  }
+};
+</script>
+<style scoped>
+ 
+</style>

+ 88 - 37
src/views/company/companyUser/card/index.vue

@@ -11,11 +11,15 @@
         />
       </el-form-item>
 
-
-      <el-form-item label="类型" prop="type">
-        <el-select v-model="queryParams.type" placeholder="请选择类型" clearable size="small">
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
+      <el-form-item   label="客户类型" prop="customerType">
+            <el-select filterable v-model="queryParams.type" placeholder="请选择类型" clearable size="small">
+            <el-option
+                    v-for="item in typeOptions"
+                    :key="item.dictValue"
+                    :label="item.dictLabel"
+                    :value="item.dictValue"
+                />
+            </el-select>
       </el-form-item>
 
       <!-- <el-form-item label="名片访问次数" prop="lookNum">
@@ -38,8 +42,8 @@
       </el-form-item> -->
 
       <el-form-item>
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
@@ -86,21 +90,34 @@
     </el-row>
 
     <el-table v-loading="loading" :data="cardList" @selection-change="handleSelectionChange">
+
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="Id" align="center" prop="id" />
       <el-table-column label="名片标题" align="center" prop="title" />
       <el-table-column label="用户ID" align="center" prop="userId" />
-      <!-- <el-table-column label="微信url_scheme" align="center" prop="urlScheme" /> -->
-      <!-- <el-table-column label="微信url_scheme" align="center" prop="companyId" /> -->
-      <el-table-column label="名片图片地址" align="center" prop="imageUrl" />
-      <el-table-column label="名片类型" align="center" prop="type" />
+
+      <el-table-column label="名片图片地址" width="270" align="center" prop="imageUrl" />
+     
       <el-table-column label="微信名片短链接" align="center" prop="shortUrl" />
-      <el-table-column label="是否访问" align="center" prop="isVisit" />
+
+     <el-table-column  label="名片类型"  align="center" prop="type">
+        <template slot-scope="scope">
+          <el-tag prop="status" v-for="(item, index) in typeOptions"    v-if="scope.row.type==item.dictValue">{{item.dictLabel}}</el-tag>
+        </template>
+      </el-table-column>
+
+      <!-- <el-table-column label="是否访问" align="center" prop="isVisit" /> -->
       <el-table-column label="名片访问次数" align="center" prop="lookNum" />
       <!-- <el-table-column label="名片访问人数" align="center" prop="personNum" />
       <el-table-column label="名片访问ip数" align="center" prop="ipNum" /> -->
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-sms"
+            @click="handleSms(scope.row)"
+          >发短信</el-button>
           <el-button
             size="mini"
             type="text"
@@ -133,23 +150,17 @@
         <el-form-item label="名片标题" prop="title">
           <el-input v-model="form.title" placeholder="请输入名片标题" />
         </el-form-item>
-        <el-form-item label="用户ID" prop="userId">
-          <el-input v-model="form.userId" placeholder="请输入用户ID" />
-        </el-form-item>
-        <el-form-item label="微信url_scheme" prop="urlScheme">
-          <el-input v-model="form.urlScheme" placeholder="请输入微信url_scheme" />
-        </el-form-item>
-        <el-form-item label="微信url_scheme" prop="companyId">
-          <el-input v-model="form.companyId" placeholder="请输入微信url_scheme" />
-        </el-form-item>
+    
         <el-form-item label="名片图片地址" prop="imageUrl">
           <el-input v-model="form.imageUrl" placeholder="请输入名片图片地址" />
         </el-form-item>
-        <el-form-item label="0:个微 1:企微" prop="type">
-          <el-select v-model="form.type" placeholder="请选择0:个微 1:企微">
-            <el-option label="请选择字典生成" value="" />
-          </el-select>
-        </el-form-item>
+
+       <el-table-column  label="名片类型"  align="center" prop="type">
+          <template slot-scope="scope">
+              <el-tag prop="status" v-for="(item, index) in typeOptions"    v-if="scope.row.type==item.dictValue">{{item.dictLabel}}</el-tag>
+          </template>
+        </el-table-column>
+
         <!-- <el-form-item label="微信名片短链接" prop="shortUrl">
           <el-input v-model="form.shortUrl" placeholder="请输入微信名片短链接" />
         </el-form-item>
@@ -171,14 +182,25 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog :title="addSms.title" :visible.sync="addSms.open" width="800px" append-to-body>
+        <add-sms ref="sms" @close="closeSms()" @handleAddCustomer="handleAddCustomer()"  ></add-sms>
+    </el-dialog>
+
+     <el-dialog :title="customer.title" v-if="customer.open"  :visible.sync="customer.open" width="900px" append-to-body>
+        <customer-select  ref="customer"  @selectCustomer="selectCustomer" />
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
 import { listCard, getCard, delCard, addCard, updateCard, exportCard } from "@/api/company/companyUserCard";
-
+import addSms from './addSms.vue';
+import customerSelect from './customerSelect.vue';
 export default {
   name: "companyUserCard",
+  components:{ addSms,customerSelect },
   data() {
     return {
       // 遮罩层
@@ -215,6 +237,16 @@ export default {
         personNum: null,
         ipNum: null,
       },
+      
+      typeOptions:[],
+      addSms:{
+         open:false,
+         title:"发短信"
+      },
+      customer:{
+         open:false,
+         title:"选择客户"
+      },
       // 表单参数
       form: {},
       // 表单校验
@@ -226,6 +258,9 @@ export default {
     };
   },
   created() {
+    this.getDicts("company_user_card_type").then((response) => {
+        this.typeOptions = response.data;
+    });
     this.getList();
   },
   methods: {
@@ -297,8 +332,8 @@ export default {
         this.title = "修改个人名片";
       });
     },
-    /** 提交按钮 */
-    submitForm() {
+     /** 提交按钮 */
+     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
@@ -320,9 +355,9 @@ export default {
           }
         }
       });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
+     },
+     /** 删除按钮操作 */
+     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
           confirmButtonText: "确定",
@@ -334,9 +369,9 @@ export default {
           this.getList();
           this.msgSuccess("删除成功");
         }).catch(function() {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
+     },
+     /** 导出按钮操作 */
+     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有数据项?', "警告", {
           confirmButtonText: "确定",
@@ -347,7 +382,23 @@ export default {
         }).then(response => {
           this.download(response.msg);
         }).catch(function() {});
-    }
+     },
+     handleSms(item){
+        this.addSms.open=true;
+        var that=this;
+        setTimeout(() => {
+            that.$refs.sms.reset(item.shortUrl);
+        }, 500);
+     },
+     closeSms(){
+          this.addSms.open=false;
+     },
+     selectCustomer(row){
+        this.$refs.sms.selectCustomer(row);
+     },
+     handleAddCustomer(){
+         this.customer.open=true; 
+     },
   }
 };
 </script>

+ 2 - 0
src/views/company/companyUser/index.vue

@@ -145,6 +145,7 @@
               </el-select>
             </el-form-item>
           </el-col>
+
           <el-col :span="12">
             <el-form-item label="角色">
               <el-select v-model="form.roleIds" multiple placeholder="请选择">
@@ -152,6 +153,7 @@
               </el-select>
             </el-form-item>
           </el-col>
+          
         </el-row>
          <el-row>
           <el-col :span="12">

+ 39 - 4
src/views/crm/components/customerDetails.vue

@@ -2,13 +2,14 @@
     <div class="contents" v-if="item!=null">
         <div class="customer-title"  >
             <div class="customer-name">
-                {{item.customerName}}
+                {{ showDuplicate?item.customerName+"[从]":item.customerName}}
+                 <el-button size="mini"  v-if="showDuplicate"  v-hasPermi="['crm:customer:lookDuplicate']"  @click=" handleDuplicate()" >主客户</el-button>
             </div>
             <div>
                 <el-button size="mini"  v-hasPermi="['crm:customer:edit']"  @click=" handleEdit()">修改客户</el-button>
                 <el-button size="mini"  v-hasPermi="['crm:customer:addTag']"  @click=" handleAddTag()" >打标签</el-button>
                 <el-button size="mini"  v-hasPermi="['crm:customer:addRemark']"  @click=" handleAddRemark()" >修改备注</el-button>
-            
+
             </div>
         </div>
         <el-descriptions title="" :column="3" border>
@@ -182,9 +183,19 @@
         <el-dialog :title="addSms.title" :visible.sync="addSms.open" width="600px" append-to-body>
             <add-sms ref="sms" @close="closeSms()"></add-sms>
         </el-dialog>
+
         <el-dialog :title="customer.title" :visible.sync="customer.open" width="1000px" append-to-body>
             <add-or-edit-customer ref="customer" @close="closeCustomer()"></add-or-edit-customer>
         </el-dialog>
+
+        <!-- <el-dialog :title="duplicate.title" :visible.sync="duplicate.open" width="800px" append-to-body>
+            <duplicate-customer ref="duplicateCustomer" @close="closeDuplicate()"></duplicate-customer>
+        </el-dialog> -->
+
+       <el-drawer size="75%" :modal="false" :title="duplicate.title" :visible.sync="duplicate.open">
+            <duplicate-customer  ref="duplicateCustomer" />
+        </el-drawer>
+
     </div>
 </template>
   
@@ -195,6 +206,7 @@
     import customerSmsLogsList from '../components/customerSmsLogsList.vue';
     import customerVoiceLogsList from '../components/customerVoiceLogsList.vue';
     import customerStoreOrderList from '../components/customerStoreOrderList.vue';
+    import duplicateCustomer from '../components/duplicateCustomer.vue';
     import customerContacts from './customerContacts.vue';
     import { getCustomerDetails,updateCustomer  } from "@/api/crm/customer";
     import addTag from './addTag.vue';
@@ -203,7 +215,7 @@
     import addOrEditCustomer from '../components/addOrEditCustomer.vue';
     export default {
         name: "customer",
-        components: {addOrEditCustomer,addSms,addTag,addRemark, customerContacts,customerVisitList,customerLogsList,customerVoiceLogsList,customerStoreOrderList,customerSmsLogsList },
+        components: {addOrEditCustomer,addSms,addTag,addRemark, customerContacts,customerVisitList,customerLogsList,customerVoiceLogsList,customerStoreOrderList,customerSmsLogsList,duplicateCustomer },
         data() {
             return {
                 customer:{
@@ -225,6 +237,10 @@
                     open:false,
                     title:"客户备注"
                 },
+                duplicate:{
+                    open:false,
+                    title:"客户详情"
+                },
                 customerId:null,
                  // 弹出层标题
                 title: "",
@@ -243,6 +259,8 @@
                 customerExts:[],
                 activeName:"",
                 item:null,
+                showDuplicate:false,
+                dCustomerId:null,
                  
             };
         },
@@ -310,7 +328,6 @@
                 setTimeout(() => {
                     that.$refs.remark.reset(this.item);
                 }, 500);
-                
             },
             closeTag(){
                 this.addTag.open=false;
@@ -378,6 +395,24 @@
                     
                 });
             },
+            initDuplicate(isDuplicate,dCustomerId){
+                 
+                this.showDuplicate=isDuplicate;
+                this.dCustomerId=dCustomerId;
+            },
+            handleDuplicate(){
+                this.duplicate.open=true;
+                var that=this;
+               
+                setTimeout(() => {
+                    that.$refs.duplicateCustomer.getDetails(that.dCustomerId);
+                }, 200);
+            },
+            closeDuplicate(){
+                this.duplicate.open=false;
+                this.getDetails(this.customerId)
+            }
+        
         }
     };
 </script>

+ 416 - 0
src/views/crm/components/duplicateCustomer.vue

@@ -0,0 +1,416 @@
+<template>
+    <div class="contents" v-if="item!=null">
+        <div class="customer-title"  >
+            <div class="customer-name">
+                {{item.customerName}}
+            </div>
+            <div>
+                <el-button size="mini"  v-hasPermi="['crm:customer:edit']"  @click=" handleEdit()">修改客户</el-button>
+                <el-button size="mini"  v-hasPermi="['crm:customer:addTag']"  @click=" handleAddTag()" >打标签</el-button>
+                <el-button size="mini"  v-hasPermi="['crm:customer:addRemark']"  @click=" handleAddRemark()" >修改备注</el-button>
+            </div>
+        </div>
+        <el-descriptions title="" :column="3" border>
+            <el-descriptions-item label="客户编号"  >
+                <span v-if="item!=null">{{item.customerCode}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="客户名称" >
+                <span v-if="item!=null">{{item.customerName}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="手机号" >
+                <span v-if="item!=null">{{item.mobile}}</span>
+                 <el-button type="text"  v-if="isReceive" size="mini" @click="callNumber(item.customerId,null)">拨号</el-button>
+                 <el-button type="text" v-if="isReceive" size="mini" @click="handleSms(item.mobile)">短信</el-button>
+            </el-descriptions-item>
+            <el-descriptions-item label="性别" >
+                <span v-if="item!=null">
+                    <el-tag  v-for="(dict, index) in sexOptions"    v-if="item.sex==dict.dictValue">{{dict.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="微信号" >
+                <span v-if="item!=null">
+                    {{item.weixin}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="所在地">
+                <span v-if="item!=null">
+                    {{item.address}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="客户来源" >
+                <span v-if="item!=null">
+                    <el-tag  v-for="(dict, index) in sourceOptions"    v-if="item.source==dict.dictValue">{{dict.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="客户类型" >
+                <span v-if="item!=null">
+                    <el-tag  v-for="(dict, index) in typeOptions"    v-if="item.customerType==dict.dictValue">{{dict.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="客户状态" >
+                <span v-if="item!=null">
+                    <el-tag  v-for="(dict, index) in statusOptions"    v-if="item.status==dict.dictValue">{{dict.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="创建时间" >
+                <span v-if="item!=null">
+                    {{item.createTime}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="最后一次跟进时间" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.visitTime}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="入公海时间" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.poolTime}}
+                </span>
+            </el-descriptions-item>
+
+            <el-descriptions-item label="标签" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.tags}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+           
+            <el-descriptions-item label="进线日期" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.registerDate}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="进线链接" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.registerLinkUrl}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="进线客户详情" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.registerDesc}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="进线客户填写时间" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.registerSubmitTime}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="进线方式" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.registerType}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="消费金额" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.payMoney}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="购买次数" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.buyCount}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="来源渠道编码" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.sourceCode}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="推荐编码" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.pushCode}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+            <el-descriptions-item label="推荐时间" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.pushTime}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+
+            <el-descriptions-item :label="ext.name" v-for="ext in exts" label-class-name="my-label">
+                <span >
+                    {{ext.value}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="备注" label-class-name="my-label">
+                <span v-if="item!=null">
+                    {{item.remark}}
+                </span>
+                <!-- <el-button size="mini" icon="el-icon-edit"></el-button> -->
+            </el-descriptions-item>
+           
+        </el-descriptions>
+
+        <el-tabs style="margin-top:15px;"  z-index = "99" type="border-card" v-model="activeName" @tab-click="handleClick">
+            <el-tab-pane label="跟进记录" name="visit">
+                <customer-visit-list ref="visit"></customer-visit-list>
+            </el-tab-pane>
+            <el-tab-pane label="联系人" name="contacts">
+                <customer-contacts ref="contacts"></customer-contacts>
+            </el-tab-pane>
+            <el-tab-pane label="订单记录" name="storeOrder">
+                <customer-store-order-list ref="storeOrder"></customer-store-order-list>
+            </el-tab-pane>
+           
+            <el-tab-pane label="通话记录" name="voiceLogs">
+                <customer-voice-logs-list ref="voiceLogs"></customer-voice-logs-list>
+            </el-tab-pane>
+            <el-tab-pane label="短信记录" name="smsLogs">
+                <customer-sms-logs-list ref="smsLogs"></customer-sms-logs-list>
+            </el-tab-pane>
+            <el-tab-pane label="客户日志" name="logs">
+                <customer-logs-list ref="logs"></customer-logs-list>
+            </el-tab-pane>
+        </el-tabs>
+       
+        <el-dialog :title="addTag.title" :visible.sync="addTag.open" width="600px" append-to-body>
+            <add-tag ref="tag" @close="closeTag()"></add-tag>
+        </el-dialog>
+        <el-dialog :title="addRemark.title" :visible.sync="addRemark.open" width="600px" append-to-body>
+            <add-remark ref="remark" @close="closeRemark()"></add-remark>
+        </el-dialog>
+        <el-dialog :title="addSms.title" :visible.sync="addSms.open" width="600px" append-to-body>
+            <add-sms ref="sms" @close="closeSms()"></add-sms>
+        </el-dialog>
+
+        <el-dialog :title="customer.title" :visible.sync="customer.open" width="1000px" append-to-body>
+            <add-or-edit-customer ref="customer" @close="closeCustomer()"></add-or-edit-customer>
+        </el-dialog>
+
+        <el-dialog :title="duplicate.title" :visible.sync="duplicate.open" width="800px" append-to-body>
+            <duplicate-customer ref="duplicateCustomer" @close="closeDuplicate()"></duplicate-customer>
+        </el-dialog>
+
+    </div>
+</template>
+  
+<script>
+    import { listCustomerExt } from "@/api/crm/customerExt";
+    import customerVisitList from '../components/customerVisitList.vue';
+    import customerLogsList from '../components/customerLogsList.vue';
+    import customerSmsLogsList from '../components/customerSmsLogsList.vue';
+    import customerVoiceLogsList from '../components/customerVoiceLogsList.vue';
+    import customerStoreOrderList from '../components/customerStoreOrderList.vue';
+    import duplicateCustomer from '../components/duplicateCustomer.vue';
+    import customerContacts from './customerContacts.vue';
+    import { getCustomerDetails,updateCustomer  } from "@/api/crm/customer";
+    import addTag from './addTag.vue';
+    import addRemark from './addRemark.vue';
+    import addSms from './addSms.vue';
+    import addOrEditCustomer from '../components/addOrEditCustomer.vue';
+    export default {
+        name: "customer",
+        components: {addOrEditCustomer,addSms,addTag,addRemark, customerContacts,customerVisitList,customerLogsList,customerVoiceLogsList,customerStoreOrderList,customerSmsLogsList,duplicateCustomer },
+        data() {
+            return {
+                customer:{
+                    open:false,
+                    title:"修改客户"
+                },
+                isReceive:false,
+                tagId:null,
+                tagsOptions:[],
+                addSms:{
+                    open:false,
+                    title:"发短信"
+                },
+                addTag:{
+                    open:false,
+                    title:"打标签"
+                },
+                addRemark:{
+                    open:false,
+                    title:"客户备注"
+                },
+                duplicate:{
+                    open:false,
+                    title:"重客户"
+                },
+                customerId:null,
+                 // 弹出层标题
+                title: "",
+                // 是否显示弹出层
+                open: false,
+                cityIds:[],
+                citys:[],
+                tags:[],
+                inputVisible: false,
+                inputValue: '',
+                receiveOptions:[],
+                statusOptions:[],
+                typeOptions:[],
+                sourceOptions:[],
+                sexOptions:[],
+                customerExts:[],
+                activeName:"",
+                item:null,
+                showDuplicate:false,
+                dCustomerId:null,
+                 
+            };
+        },
+        created() {
+            this.getDicts("crm_customer_source").then((response) => {
+                this.sourceOptions = response.data;
+            });
+            this.getDicts("common_sex").then((response) => {
+                this.sexOptions = response.data;
+            });
+            this.getDicts("crm_customer_tag").then((response) => {
+                this.tagsOptions = response.data;
+            });
+            this.getDicts("crm_customer_status").then((response) => {
+                this.statusOptions = response.data;
+            });
+            this.getDicts("crm_customer_type").then((response) => {
+                this.typeOptions = response.data;
+            });
+            this.getDicts("crm_customer_is_receive").then((response) => {
+                this.receiveOptions = response.data;
+            });
+            
+        },
+        mounted(){
+           
+        },
+        methods: {
+            handleEdit() {
+                this.customer.open = true;
+                var that=this;
+                setTimeout(() => {
+                    that.$refs.customer.handleUpdate(that.customerId);
+                }, 200);
+            },
+            closeCustomer(){
+                this.customer.open=false;
+                this.getDetails(this.customerId)
+            },
+            tagsChange(e){
+                var item=this.tagsOptions.find(val => val.dictValue === e);
+                console.log(item);
+                this.tags.push(item.dictLabel);
+                this.form.tags=this.tags.toString();
+            },
+            closeSms(){
+                this.addSms.open=false;
+                this.getDetails(this.customerId)
+            },
+            handleSms(mobile){
+                this.addSms.open=true;
+                var that=this;
+                setTimeout(() => {
+                    that.$refs.sms.reset(this.item.customerId,mobile);
+                }, 500);
+                
+            },
+            closeRemark(){
+                this.addRemark.open=false;
+                this.getDetails(this.customerId)
+            },
+            handleAddRemark(){
+                this.addRemark.open=true;
+                var that=this;
+                setTimeout(() => {
+                    that.$refs.remark.reset(this.item);
+                }, 500);
+            },
+            closeTag(){
+                this.addTag.open=false;
+                this.getDetails(this.customerId)
+            },
+            handleAddTag(){
+                this.addTag.open=true;
+                var that=this;
+                setTimeout(() => {
+                    that.$refs.tag.reset(this.item);
+                }, 500);
+                
+            },
+            handleClick(tab, event) {
+                if(tab.name=="contacts"){
+                    this.$refs.contacts.getData(this.item.customerId);
+                }
+                if(tab.name=="visit"){
+                    this.$refs.visit.getData(this.item.customerId,this.isReceive);
+                }
+                if(tab.name=="logs"){
+                    this.$refs.logs.getData(this.item.customerId);
+                }
+                if(tab.name=="voiceLogs"){
+                    this.$refs.voiceLogs.getData(this.item.customerId);
+                }
+                if(tab.name=="storeOrder"){
+                    this.$refs.storeOrder.getData(this.item.customerId);
+                }
+                if(tab.name=="smsLogs"){
+                    this.$refs.smsLogs.getData(this.item.customerId);
+                }
+            },
+            getDetails(customerId) {
+                var data={customerId:customerId}
+                this.customerId=customerId;
+                var that=this;
+                this.exts=[];
+                listCustomerExt(data).then(response => {
+                    this.customerExts = response.data;
+                    this.customerExts.forEach(element => {
+                        var data={extId:element.extId,name:element.name,value:""};
+                        this.exts.push(data)
+                    });
+                });
+                getCustomerDetails(data).then(response => {
+                    this.item = response.customer;
+                    this.isReceive=response.isReceive;
+                    if(this.item.extJson!=null){
+                        var extList=JSON.parse(this.item.extJson);
+                        that.exts.forEach(item => {
+                            extList.forEach(element => {
+                                if(item.extId==element.extId){
+                                    item.value=element.value
+                                }
+                            });
+                           
+                        });
+                    }
+                    this.activeName="visit"
+                    setTimeout(() => {
+                        that.$refs.visit.getData(customerId);
+                    }, 500);
+                    
+                });
+            },
+        }
+    };
+</script>
+<style lang="scss" scoped>
+.contents{
+    height: 100%;
+    background-color: #fff;
+    padding: 0px 20px;
+        
+}
+.customer-title{
+    margin-bottom: 15px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .customer-name{
+        font-size: 28px;
+    }
+}
+</style>
+<style>
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  
+</style>

+ 5 - 5
src/views/crm/customer/full.vue

@@ -152,18 +152,18 @@
                 <el-tag prop="status" v-for="(item, index) in sourceOptions"    v-if="scope.row.source==item.dictValue">{{item.dictLabel}}</el-tag>
             </template>
           </el-table-column>
-          <el-table-column  label="跟进阶段"  width="200" align="center" prop="visitStatus">
+          <el-table-column  label="跟进阶段"  align="center" prop="visitStatus">
             <template slot-scope="scope">
                 <el-tag prop="visitStatus" v-for="(item, index) in visitStatusOptions"    v-if="scope.row.visitStatus==item.dictValue">{{item.dictLabel}}</el-tag>
               </template>
           </el-table-column>
-          <el-table-column  label="客户类型"  width="200" align="center" prop="customerType">
+          <el-table-column  label="客户类型"  align="center" prop="customerType">
             <template slot-scope="scope">
                 <el-tag prop="status" v-for="(item, index) in typeOptions"    v-if="scope.row.customerType==item.dictValue">{{item.dictLabel}}</el-tag>
             </template>
           </el-table-column>
           <el-table-column label="标签" align="center" prop="tags" />
-          <el-table-column label="备注" align="center" prop="remark" />
+          <el-table-column  label="备注" align="center" prop="remark" width="200px" />
           <el-table-column label="进线客户详情" align="center" :show-overflow-tooltip="true" prop="registerDesc" />
           <el-table-column label="领取时间" align="center" prop="startTime" />
           <el-table-column label="进线客户提交日期" align="center" prop="registerSubmitTime" />
@@ -171,9 +171,9 @@
           </el-table-column>
           <el-table-column  label="认领人"  align="center" prop="companyUserNickName" :show-overflow-tooltip="true">
           </el-table-column>
-          <el-table-column label="最后一次跟进时间" align="center" prop="receiveTime" width="180">
+          <el-table-column label="最后一次跟进时间" align="center" prop="receiveTime" width="120">
           </el-table-column>
-          <el-table-column label="入公海时间" align="center" prop="poolTime" width="180">
+          <el-table-column label="入公海时间" align="center" prop="poolTime" width="120">
           </el-table-column>
           <el-table-column label="操作"   align="center" fixed="right" width="120px" class-name="small-padding fixed-width">
             <template slot-scope="scope">

+ 34 - 11
src/views/crm/customer/line.vue

@@ -59,6 +59,19 @@
                   />
             </el-select>
           </el-form-item>
+
+         <el-form-item label="从客户" prop="isDuplicate">
+            <el-select   filterable v-model="queryParams.isDuplicate" placeholder="请选择从客户" clearable size="small">
+              <el-option
+                    v-for="item in isDuplicateOptions"
+                    :key="item.dictLabel"
+                    :label="item.dictLabel"
+                    :value="item.dictValue"
+                  />
+            </el-select>
+          </el-form-item>
+
+          
         <el-form-item label="创建时间" prop="createTime">
           <el-date-picker
               style="width:205.4px"
@@ -151,7 +164,7 @@
         <el-table-column label="客户编码" align="center" prop="customerCode" />
         <el-table-column  label="客户名称"   align="center" prop="customerName" :show-overflow-tooltip="true">
           <template slot-scope="scope">
-            <el-link @click="handleShow(scope.row)" :underline="false" type="primary" >{{scope.row.customerName}}</el-link>
+            <el-link @click="handleShow(scope.row)" :underline="false" type="primary" >{{  scope.row.isDuplicate==1?getCustomerName(scope.row.customerName)+"[从]":getCustomerName(scope.row.customerName)   }}</el-link>
           </template>
         </el-table-column>
         <el-table-column  label="手机" width="120px"  align="center" prop="mobile"   >
@@ -164,28 +177,29 @@
               <el-tag prop="status" v-for="(item, index) in sourceOptions"    v-if="scope.row.source==item.dictValue">{{item.dictLabel}}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column  label="跟进阶段"  width="200" align="center" prop="visitStatus">
+        <el-table-column  label="跟进阶段"  align="center" prop="visitStatus" >
           <template slot-scope="scope">
               <el-tag prop="visitStatus" v-for="(item, index) in visitStatusOptions"    v-if="scope.row.visitStatus==item.dictValue">{{item.dictLabel}}</el-tag>
             </template>
         </el-table-column>
-        <el-table-column  label="客户类型"  width="200" align="center" prop="customerType">
+        <el-table-column  label="客户类型"  align="center" prop="customerType" >
           <template slot-scope="scope">
               <el-tag prop="status" v-for="(item, index) in typeOptions"    v-if="scope.row.customerType==item.dictValue">{{item.dictLabel}}</el-tag>
           </template>
         </el-table-column>
         <el-table-column label="标签" align="center" prop="tags" />
-        <el-table-column label="备注" align="center" prop="remark" />
+        <el-table-column label="备注" align="center" prop="remark" width="120"  />
         <el-table-column label="进线客户详情" align="center" :show-overflow-tooltip="true" prop="registerDesc" />
         <el-table-column label="领取时间" align="center" prop="startTime" />
         <el-table-column label="进线客户提交日期" align="center" prop="registerSubmitTime" />
-        <el-table-column label="创建时间" align="center" prop="createTime" width="180">
+         <el-table-column  label="认领人"  align="center" prop="companyUserNickName" :show-overflow-tooltip="true">
         </el-table-column>
-        <el-table-column  label="认领人"  align="center" prop="companyUserNickName" :show-overflow-tooltip="true">
+        <el-table-column label="创建时间" align="center" prop="createTime" width="100">
         </el-table-column>
-        <el-table-column label="最后一次跟进时间" align="center" prop="receiveTime" width="180">
+       
+        <el-table-column label="最后一次跟进时间" align="center" prop="receiveTime" width="100">
         </el-table-column>
-        <el-table-column label="入公海时间" align="center" prop="poolTime" width="180">
+        <el-table-column label="入公海时间" align="center" prop="poolTime" width="100">
         </el-table-column>
       </el-table>
       
@@ -204,8 +218,7 @@
     </el-dialog>
     <el-drawer
       size="75%"
-      :title="show.title" :visible.sync="show.open"
-      >
+      :title="show.title" :visible.sync="show.open">
         <customer-details  ref="customerDetails" />
     </el-drawer>
     <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
@@ -260,6 +273,7 @@ export default {
   data() {
     return {
       visitStatusOptions:[],
+      isDuplicateOptions:[ {"dictLabel":"不限","dictValue":""},{"dictLabel":"重客户","dictValue":1},{"dictLabel":"非重客户","dictValue":2}],
       tagIds:[],
       tagsOptions:[],
       assignList:{
@@ -356,7 +370,8 @@ export default {
         companyId: null,
         isLine: null,
         source: null,
-        tags: null
+        tags: null,
+        isDuplicate:null
       },
       // 表单参数
       form: {
@@ -414,6 +429,8 @@ export default {
       this.show.open=true;
       var that=this;
       setTimeout(() => {
+        console.log("qxj dCustomerId ",row.dcustomerId);
+        that.$refs.customerDetails.initDuplicate(row.isDuplicate,row.dcustomerId);
         that.$refs.customerDetails.getDetails(row.customerId);
       }, 200);
     },
@@ -624,6 +641,12 @@ export default {
           this.download(response.msg);
         }).catch(function() {});
     },
+    getCustomerName(customerName){
+       if(customerName==null || customerName==""){
+         return "";
+       }
+       return customerName;
+    }
   }
 };
 </script>

+ 1 - 2
src/views/store/storeProductPackage/index.vue

@@ -161,8 +161,7 @@
                     <el-popover
                       placement="right"
                       title=""
-                      trigger="hover"
-                    >
+                      trigger="hover">
                       <img slot="reference" :src="scope.row.image" width="50">
                       <img :src="scope.row.image" style="max-width: 50px;">
                     </el-popover>