You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm/static/js/chunk-371b.fd752ab3.js

1 line
89 KiB

3 years ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-371b"],{"/TkR":function(e,t,i){},"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},"5Nny":function(e,t,i){},"5QVi":function(e,t,i){"use strict";var s=i("QbLZ"),n=i.n(s),a=i("L2JU"),o=i("8OTK"),l=i("7Dod"),r=i("WGjG"),c=i("ZoMv"),u={name:"DuplicateCheck",components:{AllocHandle:r.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3146"),i.e("chunk-29ec"),i.e("chunk-2a3e"),i.e("chunk-21d9"),i.e("chunk-78d3")]).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:{},pool_id:"",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.pool_name&&(t.module=t.module+""+t.pool_name+""),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.pool_id=e.poolAuthList.pool_id:this.pool_id="";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.O)({customer_id:[t.id],pool_id:t.poolAuthList.pool_id}).then(function(e){i.$message.success("操作成功"),i.getList()}).catch(function(){})}).catch(function(){}):(t.customer_id=t.id,this.relationData=t,this.allocDialogShow=!0)}}},d=(i("fd0J"),i("KHd+")),h=Object(d.a)(u,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:"typeSelect