|
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-55e6"],{"+kVj":function(e,t,i){"use strict";var s=i("7+hE");i.n(s).a},"0IZ6":function(e,t,i){"use strict";var s=i("bmyS");i.n(s).a},"3Byl":function(e,t,i){"use strict";var s=i("J8i2");i.n(s).a},"5QVi":function(e,t,i){"use strict";var s=i("QbLZ"),a=i.n(s),n=i("L2JU"),o=i("8OTK"),l=i("7Dod"),r=i("WGjG"),c=i("ZoMv"),d={name:"DuplicateCheck",components:{AllocHandle:r.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-1194"),i.e("chunk-62fb"),i.e("chunk-293b"),i.e("chunk-fe5f"),i.e("chunk-4b80")]).then(i.bind(null,"3z7q"))}},props:{visible:{type:Boolean,default:!1}},data:function(){return{loading:!1,typeSelect:"name",searchContent:"",tableData:null,showFullDetail:!1,relationId:"",relationData:{},poolId:"",relationCrmType:"",allocDialogShow:!1}},computed:{showTable:function(){return this.tableData},isCustomerFilter:function(){return"name"==this.typeSelect},fieldList:function(){return this.isCustomerFilter?[{prop:"name",label:"客户名称",width:200},{prop:"create_time",label:"创建时间",width:160},{prop:"owner_user_name",label:"负责人",width:100},{prop:"last_time",label:"最后跟进时间",width:160},{prop:"module",label:"模块",width:100}]:[{prop:"mobile",label:"手机号/电话",width:160},{prop:"contacts_name",label:"联系人",width:160},{prop:"name",label:"客户名称",width:200},{prop:"owner_user_name",label:"负责人",width:100},{prop:"module",label:"模块",width:100}]}},watch:{typeSelect:function(){this.searchContent="",this.tableData=null}},mounted:function(){},methods:{handleClose:function(){this.$emit("update:visible",!1),this.resetData()},resetData:function(){this.typeSelect="name",this.searchContent="",this.tableData=null},getList:function(){var e=this;if(this.searchContent){var t={type:this.typeSelect,content:this.searchContent};this.loading=!0,Object(l.a)(t).then(function(t){e.loading=!1;var i=t.data||[];e.tableData=i.map(function(t){return t.poolName&&(t.module=t.module+"("+t.poolName+")"),e.isCustomerFilter||(t.mobile=e.searchContent,t.type==c.a.contacts&&(t.contactsName=t.name,t.contactsId=t.id,t.name=t.customerName,t.id=t.customerId,t.type=c.a.customer)),t})}).catch(function(){e.loading=!1})}},handleRowClick:function(e,t,i){if("name"==t.property&&e.id){this.relationId=e.id,e.poolAuthList?this.poolId=e.poolAuthList.poolId:this.poolId="";var s=c.a.convertTypeToKey(e.type);this.relationCrmType="pool"==s?"customer":s,this.showFullDetail=!0}else"contacts_name"==t.property&&e.contacts_id&&(this.relationId=e.contacts_id,this.relationCrmType="contacts",this.showFullDetail=!0)},cellClassName:function(e){e.row;var t=e.column;e.rowIndex,e.columnIndex;return"name"===t.property||"contacts_name"===t.property?"can-visit--underline":""},handleClick:function(e,t){var i=this;"receive"===e?this.$confirm("确定要领取该客户吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(l.E)({customer_id:[t.id],poolId:t.poolAuthList.poolId}).then(function(e){i.$message.success("操作成功"),i.getList()}).catch(function(){})}).catch(function(){}):(t.customer_id=t.id,this.relationData=t,this.allocDialogShow=!0)}}},u=(i("d9qK"),i("KHd+")),h=Object(u.a)(d,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{visible:e.visible,"append-to-body":!0,"close-on-click-modal":!1,"before-close":e.handleClose,title:"客户查重","custom-class":"no-padding-dialog",width:"800px"},on:{"update:visible":function(t){e.visible=t}}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"duplicate-check",class:{"show-table":e.showTable}},[i("div",[i("el-input",{staticClass:"search-input",nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.getList(t):null}},model:{value:e.searchContent,callback:function(t){e.searchContent=t},expression:"searchContent"}},[i("el-select",{attrs:{slot:"prepend"},slot:"prepend",model:{value:e.typeSelect,callback:function(t){e.typeSelect=t},expression:"typeSe
|