企微助手 ,仓库名 短剧

27.b07dd678790fdc2b9ae8.js 33KB

1
  1. webpackJsonp([27],{"13/1":function(t,e){},"76r5":function(t,e){},FPPW:function(t,e){},O0MD:function(t,e){},SKRE:function(t,e){},oC3A:function(t,e){},ysSF:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("McOJ"),s=i("MYCg"),n=i("sPH2"),l=i("fGUm"),o={name:"importCustomer",components:{selfCustomerservice:l.a,enterpriseTag:n.a,dialogPublic:s.a},data:function(){return{reset:!0,dialogType:"importconfirm",dialogVisible:!1,dialogTitle:"",dialogMsg:"",user_id_list:[],afferent_tag_obj:{tag_id_list:[]},new_file_name:"",original_file_name:"",ext:"",UPLOADdATA:{admin_id:this.$cookie.getCookie("admin_id"),ttl:this.$cookie.getCookie("ttl"),sign:this.$cookie.getCookie("sign"),corpid:this.$localSelfStore.getLocal("defaultCorp")&&"undefined"!=this.$localSelfStore.getLocal("defaultCorp")?JSON.parse(this.$localSelfStore.getLocal("defaultCorp")).corpid:""},excleList:[]}},watch:{dialogVisible:function(){this.pranentInit("dialogVisible")}},methods:{pranentInit:function(t){this.afferent_tag_obj.tag_id_list=[],this.user_id_list=[],this.excleList=[],this.original_file_name="",this.ext="",this.new_file_name="",this.reset=!this.reset,"dialogVisible"==t||this.$parent.init(1)},save:function(){var t=this;if(""!=this.original_file_name&&""!=this.ext&&""!=this.new_file_name&&this.excleList!=[])if(this.user_id_list&&0==this.user_id_list.length)this.$message({message:"员工不能为空",type:"warning"});else{this.$loading(this.$loadingConfig);var e={user_id_list:this.user_id_list,customer_tag_list:this.afferent_tag_obj.tag_id_list,original_file_name:this.original_file_name,new_file_name:this.new_file_name,ext:this.ext};this.$axios.post(this.URL.BASEURL+this.URL.batchAddCustomerImport,e).then(function(e){if((e=e.data)&&0==e.errno)t.dialogVisible=!1,t.pranentInit();else if(e&&e.rst&&!e.rst.count){var i="";e.rst.forEach(function(t){i+="系统检测到表格第"+t.row+"行"+t.error[0]+"。 "}),t.$nextTick(function(){t.dialogType="",t.$refs.dialogPublic.dialogVisible=!0,t.dialogTitle="提醒",t.dialogMsg=i})}else t.$nextTick(function(){t.$refs.dialogPublic.dialogVisible=!0,t.dialogTitle="提醒",t.dialogMsg="系统检测到导入客户列表中,与已导入客户列表有"+(e.rst&&e.rst.count?e.rst.count:0)+"个重复客户,是否跳过重复客户继续导入?"});t.$loading(t.$loadingConfig).close()}).catch(function(e){t.$loading(t.$loadingConfig).close(),t.$message({message:e,type:"warning"})})}else this.$message({message:"表格不能为空",type:"warning"})},tagDefine:function(t){t.tag_id_list&&0!=t.tag_id_list.length?this.afferent_tag_obj.tag_id_list=t.tag_id_list:this.afferent_tag_obj.tag_id_list=[]},beforeUploadUpload:function(t){this.$loading(this.$loadingConfig)},uploadExceed:function(){this.$loading(this.$loadingConfig).close(),this.$message({message:"最多只能上传一个文件,请删除文件后,重新上传",type:"fail"})},uploadSuccess:function(t,e,i){0==t.errno?(this.new_file_name=t.rst.new_file_name,this.original_file_name=t.rst.original_file_name,this.ext=t.rst.ext,this.$loading(this.$loadingConfig).close()):this.$message({message:t.err,type:"warning"})},uploadFail:function(){this.$loading(this.$loadingConfig).close(),this.$message({message:"上传失败",type:"fail"})}}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-dialog",{attrs:{title:"上传表格",visible:t.dialogVisible,width:"36%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("div",{staticClass:"f14"},[i("div",{staticClass:"tipsBox"},[i("i",{staticClass:"el-icon-message-solid f14 rMar7 c-00B38A"}),t._v(" 请下载模板后输入手机号上传,可批量复制手机号至模板内,若输入内容有重复手机号或空行将会自动过滤")]),t._v(" "),i("div",{staticClass:"downExcle"},[t._v("点击下载\n "),i("span",{staticClass:"pointer c-00B38A"},[i("a",{attrs:{href:t.URL.BASEURL+"/playlet/Excel批量添加好友模板 .xlsx#/"}},[t._v(" Excle模板")])])]),t._v(" "),i("div",{staticClass:"formTable"},[i("div",{staticClass:"itemBox"},[i("div",{staticClass:"lable"},[i("em",[t._v("*")]),t._v(" 选择表格 : ")]),t._v(" "),i("el-upload",{staticClass:"upload-demo",attrs:{action:t.URL.BASEURL+t.URL.batch_importExcel,accept:".xlsx,.xls","file-list":t.excleList,data:t.UPLOADdATA,limit:1,"before-upload":t.beforeUploadUpload,"on-success":t.uploadSuccess,"on-error":t.uploadFail,"on-exceed":t.uploadExceed}},[i("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1)],1),t._v(" "),i("div",{staticClass:"itemBox"},[i("div",{staticClass:"lable"},[i("em",[t._v("*")]),t._v(" 选择员工 : ")]),t._v(" "),i("div",[i("self-customerservice",{attrs:{title:"",width:"300px",afferent_users:t.user_id_list,reset:t.reset},on:{customerDefine:function(e){t.user_id_list=e}}}),t._v(" "),i("div",{staticClass:"c-999 f12 tMar8 line18"},[t._v("\n 表格内手机号将平均分配给选择的员工,分配完成后员工会在企业微信「企微提醒」收到添加好友的任务,需要员工手动添加\n ")])],1)]),t._v(" "),i("div",{staticClass:"itemBox"},[i("div",{staticClass:"lable"},[t._v(" 客户标签 : ")]),t._v(" "),i("div",[i("enterprise-tag",{attrs:{title:"",width:"300px",afferent_obj:t.afferent_tag_obj,reset:t.reset},on:{tagDefine:t.tagDefine}}),t._v(" "),i("div",{staticClass:"c-999 f12 tMar8 line18"},[t._v("设置标签后,表格内添加成功的客户将会被自动添加选择的标签")])],1)])])]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{size:"mini"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){return t.save()}}},[t._v("导 入")])],1)]),t._v(" "),i("dialogPublic",{ref:"dialogPublic",attrs:{dialogTitle:t.dialogTitle,dialogMsg:t.dialogMsg,type:t.dialogType,new_file_name:t.new_file_name},on:{pranentInit:t.pranentInit,dialogVisibleFalse:function(){t.dialogVisible=!1}}})],1)},staticRenderFns:[]};var c=i("VU/8")(o,r,!1,function(t){i("76r5")},"data-v-181c5556",null).exports,d={name:"setting",props:["settingFlag"],components:{selfCustomerservice:l.a},data:function(){return{user_id_list:[],dialogVisible:!1,activeName:"first",loading:!1,config_list:{assigned:{config_id:"",type:1,threshold:1,action_time:"09:00:00",notice_users:"",enable:0},charged:{config_id:"",type:2,threshold:1,action_time:"09:00:00",enable:0},auto_recycle:{config_id:"",type:3,threshold:1,enable:0}}}},watch:{user_id_list:function(){this.config_list.assigned.notice_users=this.user_id_list&&this.user_id_list.length>0?1==this.user_id_list.length?this.user_id_list[0]:this.user_id_list.join():""}},methods:{save:function(){this.user_id_list&&0==this.user_id_list.length||""==this.config_list.assigned.notice_users?this.$message({type:"error",message:"请选择管理员!"}):this.newSetting()},newSetting:function(){var t=this;this.loading=!0;var e=[],i=this.config_list.assigned,a=this.config_list.charged,s=this.config_list.auto_recycle;i.threshold=1440*i.threshold,a.threshold=1440*a.threshold,s.threshold=1440*s.threshold,e.push(i,a,s),this.$axios.post(this.URL.BASEURL+this.URL.editConfig,{config_list:e}).then(function(e){e=e.data;t.$message({message:e.err,type:"warning"}),t.loading=!1,t.dialogVisible=!1}).catch(function(e){t.loading=!1,t.$message({message:e,type:"warning"})})},rebackInfo:function(){var t=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.setting_rebackInfo).then(function(e){if((e=e.data)&&0==e.errno){var i=t.config_list;if(1==e.rst.assigned.enable){i.assigned=e.rst.assigned,i.assigned.enable=!0,i.assigned.threshold=e.rst.assigned.threshold/1440;var a=i.assigned.notice_users;a.split(",")?t.user_id_list=a.split(","):t.user_id_list.push(a)}else i.assigned.enable=!1,e.rst.assigned.config_id&&(i.assigned.config_id=e.rst.assigned.config_id),e.rst.assigned.threshold&&(i.assigned.threshold=e.rst.assigned.threshold/1440);1==e.rst.charged.enable?(i.charged=e.rst.charged,i.charged.enable=!0,i.charged.threshold=e.rst.charged.threshold/1440):(i.charged.enable=!1,e.rst.charged.config_id&&(i.charged.config_id=e.rst.charged.config_id),e.rst.charged.threshold&&(i.charged.threshold=e.rst.charged.threshold/1440)),1==e.rst.auto_recycle.enable?(i.auto_recycle=e.rst.auto_recycle,i.auto_recycle.enable=!0,i.auto_recycle.threshold=e.rst.auto_recycle.threshold/1440):(i.auto_recycle.enable=!1,e.rst.auto_recycle.config_id&&(i.auto_recycle.config_id=e.rst.auto_recycle.config_id),e.rst.auto_recycle.threshold&&(i.auto_recycle.threshold=e.rst.auto_recycle.threshold/1440)),t.loading=!1}else t.loading=!1,t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1,t.$message({message:e,type:"warning"})})}}},u={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"friend_setting"},[i("el-dialog",{attrs:{title:"设置",visible:t.dialogVisible,width:"40%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("el-tabs",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{type:"card"},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[i("el-tab-pane",{attrs:{label:"自动提醒",name:"first"}},[[i("div",{staticClass:"flex-align-center"},[i("div",{staticClass:"f14 fWeight600 rMar22 c-000"},[t._v("未分配提醒")]),t._v(" "),i("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ccc"},model:{value:t.config_list.assigned.enable,callback:function(e){t.$set(t.config_list.assigned,"enable",e)},expression:"config_list.assigned.enable"}})],1),t._v(" "),t.config_list.assigned.enable?i("div",{staticClass:"line40"},[t._v("\n 超过 "),i("el-input",{staticClass:"dayIpt",attrs:{size:"mini"},on:{change:function(e){return t.config_list.assigned.threshold=e||1}},model:{value:t.config_list.assigned.threshold,callback:function(e){t.$set(t.config_list.assigned,"threshold",e)},expression:"config_list.assigned.threshold"}}),t._v(" 天,\n "),i("span",{staticClass:"fWeight600 c-000"},[t._v("客户未分配跟进成员")]),t._v(",次日\n "),i("el-time-picker",{attrs:{"prefix-icon":"none",clearable:!1,size:"mini",format:"HH:mm:ss","value-format":"HH:mm:ss","picker-options":{selectableRange:"00:00:00 - 23:59:59"}},model:{value:t.config_list.assigned.action_time,callback:function(e){t.$set(t.config_list.assigned,"action_time",e)},expression:"config_list.assigned.action_time"}}),t._v("\n 提醒管理员分配,\n 选择接收提醒管理员:\n "),i("self-customerservice",{staticStyle:{display:"inline-block"},attrs:{title:"",width:"360px",afferent_users:t.user_id_list},on:{customerDefine:function(e){t.user_id_list=e}}})],1):t._e()],t._v(" "),i("div",{staticClass:"splitLine"}),t._v(" "),[i("div",{staticClass:"flex-align-center"},[i("div",{staticClass:"f14 fWeight600 rMar22 c-000"},[t._v("未跟进提醒")]),t._v(" "),i("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ccc"},model:{value:t.config_list.charged.enable,callback:function(e){t.$set(t.config_list.charged,"enable",e)},expression:"config_list.charged.enable"}})],1),t._v(" "),t.config_list.charged.enable?i("div",{staticClass:"line40"},[t._v("\n 超过 "),i("el-input",{staticClass:"dayIpt",attrs:{size:"mini"},on:{change:function(e){return t.config_list.charged.threshold=e||1}},model:{value:t.config_list.charged.threshold,callback:function(e){t.$set(t.config_list.charged,"threshold",e)},expression:"config_list.charged.threshold"}}),t._v(" 天,\n "),i("span",{staticClass:"fWeight600 c-000"},[t._v("成员未添加客户")]),t._v(",次日\n "),i("el-time-picker",{attrs:{"prefix-icon":"none",clearable:!1,size:"mini",format:"HH:mm:ss","value-format":"HH:mm:ss","picker-options":{selectableRange:"00:00:00 - 23:59:59"}},model:{value:t.config_list.charged.action_time,callback:function(e){t.$set(t.config_list.charged,"action_time",e)},expression:"config_list.charged.action_time"}}),t._v("\n 提醒成员添加\n ")],1):t._e()]],2),t._v(" "),i("el-tab-pane",{attrs:{label:"自动回收",name:"second"}},[i("div",{staticClass:"flex-align-center"},[i("div",{staticClass:"f14 fWeight600 rMar22 c-000"},[t._v("未通过提醒")]),t._v(" "),i("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ccc"},model:{value:t.config_list.auto_recycle.enable,callback:function(e){t.$set(t.config_list.auto_recycle,"enable",e)},expression:"config_list.auto_recycle.enable"}})],1),t._v(" "),t.config_list.auto_recycle.enable?i("div",{staticClass:"line40"},[t._v("\n 超过 "),i("el-input",{staticClass:"dayIpt",attrs:{size:"mini"},on:{change:function(e){return t.config_list.auto_recycle.threshold=e||1}},model:{value:t.config_list.auto_recycle.threshold,callback:function(e){t.$set(t.config_list.auto_recycle,"threshold",e)},expression:"config_list.auto_recycle.threshold"}}),t._v(" 天,\n "),i("span",{staticClass:"fWeight600 c-000"},[t._v("客户未通过好友申请")]),t._v(",自动转移到待分配\n ")],1):t._e()])],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{size:"mini"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var _=i("VU/8")(d,u,!1,function(t){i("oC3A"),i("O0MD")},"data-v-89f4d2ce",null).exports,g=i("VULP"),h={name:"addFriend",components:{selfInput:a.a,importCustomer:c,setting:_,dialogPublic:s.a,detial:g.a},data:function(){return{drawerSize:"60%",detialDrawer:!1,rowPro:{},loading:!1,statusArrs:[{name:"全部",label:0},{name:"待分配",label:4},{name:"待添加",label:1},{name:"待通过",label:2},{name:"已添加",label:3}],input_keyword:"",tableData:[],height:"",page:1,pages:0,total:0,page_size:20,dialogTitle:"",dialogMsg:"",dialogType:"",user_id_list:[],noChooseFlag:!1,user_ids:[],select_id_list:[],exclude_id_list:[],pageOptionValue:0,pageOptions:[{name:"全部",id:1},{name:"当前页面",id:0}],allotId:""}},created:function(){this.height=document.documentElement.clientHeight-250>400?document.documentElement.clientHeight-250:400,this.init(1)},methods:{tagUpdate:function(t){this.$set(this.rowPro,"tag_list",t),this.$set(this.tableData,this.rowPro.self_index,this.rowPro)},pageOptionSelect:function(t){var e=this;this.pageOptionValue=t,this.tableData.forEach(function(t){e.$refs.multipleTable.toggleRowSelection(t,1==e.pageOptionValue)})},noChooseCustomeTips:function(){this.noChooseFlag=!1,this.user_ids&&0==this.user_ids.length&&(this.$message({type:"error",message:"请选择客户!"}),this.noChooseFlag=!0)},rowSelectClick:function(t,e){1==this.pageOptionValue&&this.exclude_id_list.push(e.id)},handleSelectionChange:function(t){var e=this;this.user_ids=[],this.select_id_list=[],t.forEach(function(t){e.user_ids.push(t.user_id),e.select_id_list.push(t.id)})},batchDele:function(){var t=this;this.noChooseCustomeTips(),this.noChooseFlag||this.$alert("确定删除选择的"+(this.select_id_list&&this.select_id_list.length)+"个客户?","提示",{cancelButtonText:"取消",confirmButtonText:"确定"}).then(function(){t.allot_dele_remind_pack("dele",t.pageOptionValue,t.select_id_list,t.exclude_id_list)})},deleCustomer:function(t){var e=this;this.$alert("是否确定删除此客户","提示",{cancelButtonText:"取消",confirmButtonText:"确定"}).then(function(){var i=[];i.push(t),e.allot_dele_remind_pack("dele",0,i)})},batchRemind:function(){var t=this;this.noChooseCustomeTips(),this.noChooseFlag||this.$alert("确认后将会给选择的"+(this.user_ids&&this.user_ids.length?this.user_ids.length:"-")+"名成员发送提醒通知,是否发送?","提示",{cancelButtonText:"取消",confirmButtonText:"确定"}).then(function(){t.allot_dele_remind_pack("remind",t.pageOptionValue,t.select_id_list,t.exclude_id_list)})},remindCustomer:function(t,e){var i=this;this.$nextTick(function(){i.$refs.dialogPublic.dialogVisible=!0,i.dialogType="remindSingle",i.dialogTitle="提醒",i.dialogMsg="如果员工长时间未"+(1==e?"添加客户":"通过好友申请可再次添加")+",可通过猎羽再次提醒员工"+(1==e?"添加":"跟进")+"客户,是否确认发送?",i.user_ids=[],i.user_ids.push(t)})},batchAllot:function(t){var e=this;if(t);else if(this.noChooseCustomeTips(),this.noChooseFlag)return;this.$nextTick(function(){e.$refs.dialogPublic.dialogVisible=!0,e.dialogType=t?"allotSingle":"allotMultiple",e.dialogTitle="分配",e.dialogMsg="",e.user_id_list=[],t&&(e.allotId=t)})},dialogPublic_allot_single:function(){var t=[];t.push(this.allotId),this.allot_dele_remind_pack("allot",0,t)},allot_dele_remind_pack:function(t,e,i,a){var s=this;this.loading=!0;var n="";"allot"==t?n=this.URL.batchDistributionCustomer:"dele"==t?n=this.URL.batchAddCustomer_delete:"remind"==t&&(n=this.URL.batchRemind),this.$axios.post(this.URL.BASEURL+n,{add_status:0==this.$store.state.batchStatus?"":this.$store.state.batchStatus,keyword:this.input_keyword,start_time:this.$store.state.batchTime[0],end_time:this.$store.state.batchTime[1],select_all:e,select_id_list:i,exclude_id_list:a||[],user_id_list:this.$refs.dialogPublic.user_id_list}).then(function(e){s.loading=!1;e=e.data;s.$message({message:e.err,type:"warning"}),e&&0==e.errno&&(s.init(1),"allot"==t&&s.$refs.dialogPublic.successReset())}).catch(function(t){s.loading=!1,s.$message({message:t,type:"warning"})})},goDetail:function(t,e){var i=this;this.rowPro=t,this.rowPro.self_index=e,this.drawerSize="60%",this.detialDrawer=!0,this.$nextTick(function(){i.$refs.detial.acIdx=0,i.$refs.detial.init()})},init:function(t,e,i){var a=this;this.page=t||this.page,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.batchAddCustomerDetailsList,{params:{add_status:0==this.$store.state.batchStatus?"":this.$store.state.batchStatus,keyword:this.input_keyword,start_time:this.$store.state.batchTime[0],end_time:this.$store.state.batchTime[1],page:this.page,page_size:this.page_size}}).then(function(t){t=t.data;a.loading=!1,t&&0==t.errno?(a.tableData=t.rst.data,a.total=t.rst.pageInfo.total,a.pages=t.rst.pageInfo.pages,"handleCurrentChange"==i?1==a.pageOptionValue&&a.$nextTick(function(){a.tableData.forEach(function(t){a.$refs.multipleTable.toggleRowSelection(t,!0),a.exclude_id_list.forEach(function(e){e==t.id&&a.$refs.multipleTable.toggleRowSelection(t,!1)})})}):(a.user_ids=[],a.select_id_list=[],a.exclude_id_list=[],1==a.pageOptionValue&&a.$nextTick(function(){a.tableData.forEach(function(t){a.$refs.multipleTable.toggleRowSelection(t,!0)})}))):4002!=t.errno&&a.$message({message:t.err,type:"warning"})}).catch(function(t){a.loading=!1})},handleCurrentChange:function(t){this.init(t,"","handleCurrentChange")}}},f={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"operatArea"},[i("el-radio-group",{on:{change:function(e){return t.init(1)}},model:{value:t.$store.state.batchStatus,callback:function(e){t.$set(t.$store.state,"batchStatus",e)},expression:"$store.state.batchStatus"}},t._l(t.statusArrs,function(e){return i("el-radio",{key:e.label,attrs:{label:e.label}},[t._v(t._s(e.name))])}),1),t._v(" "),i("div",{staticClass:"btnArea"},[i("self-input",{attrs:{hasLabel:!1,label_name:"电话/备注名"},on:{inputChange:function(e){t.input_keyword=e,t.init(1)}}}),t._v(" "),i("el-button",{staticClass:"lMar10",attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){t.$refs.importCustomerRef.dialogVisible=!0}}},[t._v("导入客户")]),t._v(" "),i("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){return t.$router.push("/importRecord")}}},[t._v("导入记录")]),t._v(" "),i("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){t.$refs.settingRef.dialogVisible=!0,t.$refs.settingRef.rebackInfo()}}},[t._v("设置")]),t._v(" "),0!==t.$store.state.batchStatus?i("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){return t.batchDele()}}},[t._v("批量删除")]):t._e(),t._v(" "),1==t.$store.state.batchStatus||2==t.$store.state.batchStatus?i("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){return t.batchRemind()}}},[t._v("批量提醒")]):t._e(),t._v(" "),4==t.$store.state.batchStatus?i("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(e){return t.batchAllot()}}},[t._v("批量分配")]):t._e()],1)],1),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:t.height,data:t.tableData,"tooltip-effect":"dark"},on:{select:t.rowSelectClick,"selection-change":t.handleSelectionChange}},[0!==t.$store.state.batchStatus?i("el-table-column",{attrs:{width:"30px",type:"selection"}}):t._e(),t._v(" "),i("el-table-column",{attrs:{label:"电话号码",align:"center","show-overflow-tooltip":"","min-width":"120"},scopedSlots:t._u([0!==t.$store.state.batchStatus?{key:"header",fn:function(){return[i("div",{staticClass:"customTitle",attrs:{slot:"reference"},slot:"reference"},[t._v(t._s(0==t.pageOptionValue?"选择当前页面客户":"选择全部客户")),i("i",{staticClass:"el-icon-arrow-down"}),t._v(" "),i("el-select",{staticClass:"customTitleSelect",attrs:{placeholder:"请选择",size:"mini"},on:{change:t.pageOptionSelect},model:{value:t.pageOptionValue,callback:function(e){t.pageOptionValue=e},expression:"pageOptionValue"}},t._l(t.pageOptions,function(t){return i("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1)]},proxy:!0}:null,{key:"default",fn:function(e){return[i("div",[t._v(t._s(e.row.phone?e.row.phone:"-"))])]}}],null,!0)}),t._v(" "),i("el-table-column",{attrs:{label:"备注",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",[t._v(t._s(e.row.remark?e.row.remark:"-"))])]}}])}),t._v(" "),i("el-table-column",{attrs:{"min-width":"120",label:"导入时间","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",[t._v(t._s(e.row.import_time?e.row.import_time:"-"))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"客户标签",align:"center","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.tag_list&&0==e.row.tag_list.length?[t._v("-")]:i("div",{staticClass:"customerServiceTagBox biaoqian"},t._l(e.row.tag_list,function(e,a){return i("div",{key:a+"biaoqian",staticClass:"customerServiceTag"},[t._v(t._s(e))])}),0)]}}])}),t._v(" "),i("el-table-column",{attrs:{align:"center"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("\n 添加状态\n "),i("el-tooltip",{staticClass:"disinblock",attrs:{placement:"top",effect:"light"}},[i("div",{staticClass:"f12",attrs:{slot:"content"},slot:"content"},[i("div",[t._v("待分配:未分配跟进成员的客户")]),t._v(" "),i("div",[t._v("待添加:成员未添加的客户")]),t._v(" "),i("div",[t._v("待通过:已发送申请,等待通过的客户")]),t._v(" "),i("div",[t._v("已添加:成功添加的客户")])]),t._v(" "),i("i",{staticClass:"el-icon-question"})])]},proxy:!0},{key:"default",fn:function(e){return[1==e.row.add_status?i("span",{staticClass:"c-FFB055"},[t._v("待添加")]):2==e.row.add_status?i("span",{staticClass:"c-448AFF"},[t._v("待通过")]):3==e.row.add_status?i("span",{staticClass:"c-58BCA6"},[t._v("已添加")]):4==e.row.add_status?i("span",{staticClass:"c-F03F5C"},[t._v("待分配")]):i("span",[t._v("-")])]}}])}),t._v(" "),i("el-table-column",{attrs:{"min-width":"120",label:"添加时间",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",[t._v(t._s(e.row.add_time?e.row.add_time:"-"))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"操作人",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",[t._v(t._s(e.row.operator_name?e.row.operator_name:"-"))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"分配客服",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"customerServiceTagBox"},[i("div",{staticClass:"customerServiceTag"},[i("i",{staticClass:"el-icon-user-solid"}),t._v(" "+t._s(e.row.user_name?e.row.user_name:"-"))])])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"分配次数",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",[t._v(t._s(e.row.distribution_num?e.row.distribution_num:"-"))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center","flex-wrap":"wrap"}},[3==e.row.add_status?i("div",{staticClass:"c-00B38A pointer",on:{click:function(i){return t.goDetail(e.row,e.$index)}}},[t._v("详情")]):t._e(),t._v(" "),i("div",{staticClass:"c-00B38A pointer lMar10",on:{click:function(i){return t.deleCustomer(e.row.id)}}},[t._v("删除")]),t._v(" "),4==e.row.add_status?i("div",{staticClass:"lMar10",class:4==e.row.add_status?"c-00B38A pointer":"c-999 pointer-drop",on:{click:function(i){return t.batchAllot(e.row.id)}}},[t._v("分配")]):t._e(),t._v(" "),1==e.row.add_status||2==e.row.add_status?i("div",{staticClass:"c-00B38A pointer lMar10",on:{click:function(i){return t.remindCustomer(e.row.user_id,e.row.add_status)}}},[t._v("提醒")]):t._e()])]}}])})],1),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],staticClass:"pagination"},[i("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),i("dialogPublic",{ref:"dialogPublic",attrs:{dialogTitle:t.dialogTitle,dialogMsg:t.dialogMsg,type:t.dialogType,user_ids:t.user_ids},on:{clearuser_ids:function(){t.user_ids=[]},init:function(){t.init(1)},dialogPublic_allot_single:t.dialogPublic_allot_single,dialogPublic_allot_multiple:function(e){return t.allot_dele_remind_pack("allot",t.pageOptionValue,t.select_id_list,t.exclude_id_list)}}}),t._v(" "),i("setting",{ref:"settingRef"}),t._v(" "),i("importCustomer",{ref:"importCustomerRef"}),t._v(" "),i("el-drawer",{attrs:{size:t.drawerSize,visible:t.detialDrawer,"with-header":!1},on:{"update:visible":function(e){t.detialDrawer=e}}},[i("detial",{ref:"detial",attrs:{rowProp:{customer_id:t.rowPro.customer_id,user_id:t.rowPro.user_id}},on:{changeDrawerSize:function(){t.drawerSize="100%"==t.drawerSize?"60%":"100%"},closeDrawer:function(e){t.detialDrawer=!1},tagUpdate:t.tagUpdate}})],1)],1)},staticRenderFns:[]};var p=i("VU/8")(h,f,!1,function(t){i("FPPW")},"data-v-628845b8",null).exports,m=i("gzej"),v=i("LYKV"),b={name:"dataPreview",components:{datePicker:m.a,selfCustomerservice:l.a,userDetail:v.a},data:function(){return{userDetailFlag:!1,drawerSize:"60%",user_detail_id:"",default_time:[this.$getDay(-30,!1),this.$getDay(0,!1)],time:[],loading:!1,dataLoading:!1,page:1,pages:0,total:0,page_size:20,height:"",overviewArrs:[{id:0,name:"导入总客户数",num:"",key:"import_count"},{id:4,name:"待分配客户数",num:"",key:"assigned_count"},{id:1,name:"待添加客户数",num:"",key:"waiting_add_count"},{id:2,name:"待通过客户数",num:"",key:"passed_count"},{id:3,name:"已添加总客户数",num:"",key:"added_count"},{id:5,name:"添加完成率",num:"",key:"added_rate"}],user_id_list:[],tableData:[],desCol:[{prop:"name",label:"成员"},{prop:"assign_count",label:"分配客户数"},{prop:"waiting_add_count",label:"待添加客户数"},{prop:"passed_count",label:"待通过客户数",tooltip:"已发送好友申请,等待客户通过"},{prop:"added_count",label:"已添加客户数"},{prop:"recycled_count",label:"回收客户数"},{prop:"add_rate",label:"添加完成率"}]}},created:function(){this.height=document.documentElement.clientHeight-300>400?document.documentElement.clientHeight-300:400,this.time=this.default_time,this.init_predata(),this.init(1)},watch:{user_id_list:function(){this.init(1)}},methods:{goDetial:function(t){this.userDetailFlag=!0,this.user_detail_id=t.user_id},gooverviewDetial:function(t){var e=this;this.$store.state.batchTime=this.time,this.$store.state.batchStatus=t,this.$nextTick(function(){e.$emit("changeType",1)})},changeTime:function(t){!t||t&&0==t.length?this.time=[]:this.time=t,this.init_predata(),this.init(1)},init_predata:function(){var t=this;this.dataLoading=!0,this.$axios.get(this.URL.BASEURL+this.URL.batchAddCustomer_dataSummary,{params:{start_date:this.time[0],end_date:this.time[1]}}).then(function(e){e=e.data;t.dataLoading=!1,e&&0==e.errno?t.overviewArrs.forEach(function(t){t.num=e.rst[t.key]}):4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.dataLoading=!1})},init:function(t,e){var i=this;if("export"!=e)this.page=t||this.page;else if(0==this.total)return void this.$message({message:"暂无数据可导出",type:"warning"});this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.batchAddCustomer_statistic,{params:{user_id:this.user_id_list&&this.user_id_list.length>0?this.user_id_list.join():"",start_date:this.time[0],end_date:this.time[1],page:"export"==e?1:this.page,pagesize:"export"==e?this.$store.state.exportNumber:this.page_size}}).then(function(t){t=t.data;i.loading=!1,t&&0==t.errno?"export"==e?i.exportEvent(t.rst.data):(i.tableData=t.rst.data,i.total=t.rst.pageInfo.total,i.pages=t.rst.pageInfo.pages):4002!=t.errno&&i.$message({message:t.err,type:"warning"})}).catch(function(t){i.loading=!1})},handleCurrentChange:function(t){this.init(t)},exportEvent:function(t){var e=t,i=[{tHeader:this.desCol.map(function(t){return t.label}),filterVal:this.desCol.map(function(t){return t.prop}),tableDatas:e,sheetName:""}];this.$exportOrder({excelDatas:i,name:"批量加好友-数据概览(导出时间:"+this.$getDay(0)+")"})}}},w={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{"padding-right":"15px"}},[i("date-picker",{attrs:{title:"",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1},on:{changeTime:t.changeTime}}),t._v(" "),i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.dataLoading,expression:"dataLoading"}],staticClass:"dataPreview"},[t._l(t.overviewArrs,function(e){return[i("div",{staticClass:"flex-align-center"},[i("div",{staticClass:"box_item"},[i("div",{staticClass:"num"},[t._v(t._s(e.num||0==e.num?e.num:"-"))]),t._v(" "),i("div",{staticClass:"name"},[t._v(t._s(e.name?e.name:"-"))]),t._v(" "),5!==e.id?i("div",{staticClass:"detial",on:{click:function(i){return t.gooverviewDetial(e.id)}}},[t._v("详情")]):t._e()])]),t._v(" "),5!==e.id?i("div",{staticClass:"line"}):t._e()]})],2),t._v(" "),i("div",{staticClass:"flex-align-center"},[i("div",{staticClass:"fWeight600 f14"},[t._v("统计列表")]),t._v(" "),i("div",{staticClass:"flex-align-center lMarauto"},[i("self-customerservice",{attrs:{title:"选择成员",width:"180px",afferent_users:t.user_id_list},on:{customerDefine:function(e){t.user_id_list=e}}}),t._v(" "),i("el-button",{staticClass:"lMar8",attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(e){return t.init(1,"export")}}},[t._v("导出Excel")])],1)]),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:t.height,data:t.tableData,"tooltip-effect":"dark"}},[t._l(t.desCol,function(e){return[i("el-table-column",{key:e.prop,attrs:{label:e.label,align:"center","show-overflow-tooltip":e.showOverTooltip,"min-width":e.min_width?e.min_width:120},scopedSlots:t._u([e.tooltip?{key:"header",fn:function(){return[t._v("\n "+t._s(e.label?e.label:"-")+"\n "),i("el-tooltip",{staticClass:"disinblock",attrs:{content:e.tooltip,placement:"top"}},[i("i",{staticClass:"el-icon-question"})])]},proxy:!0}:null,{key:"default",fn:function(a){return[i("div",[t._v(t._s(a.row[e.prop]?a.row[e.prop]:"-"))])]}}],null,!0)})]}),t._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"c-00B38A pointer",on:{click:function(i){return t.goDetial(e.row)}}},[t._v("详情")])]}}])})],2),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],staticClass:"pagination"},[i("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),i("el-drawer",{attrs:{size:t.drawerSize,visible:t.userDetailFlag,"with-header":!1},on:{"update:visible":function(e){t.userDetailFlag=e}}},[t.userDetailFlag?i("user-detail",{attrs:{user_id:t.user_detail_id},on:{changeDrawerSize:function(){t.drawerSize="100%"==t.drawerSize?"60%":"100%"},closeDrawer:function(e){t.detialDrawer=!1}}}):t._e()],1)],1)},staticRenderFns:[]};var C={name:"index",components:{addFriend:p,dataPreview:i("VU/8")(b,w,!1,function(t){i("13/1")},"data-v-65d1314b",null).exports},data:function(){return{tagType:1}},methods:{changeType:function(t){this.tagType=t}}},y={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"topTagBox flex"},[i("div",{staticClass:"left flex-align-center"},[i("div",{class:["tagItem",1==t.tagType?"tagItem_active":""],on:{click:function(e){return t.changeType(1)}}},[t._v("添加客户")]),t._v(" "),i("div",{class:["tagItem",2==t.tagType?"tagItem_active":""],on:{click:function(e){return t.changeType(2)}}},[t._v("数据总览")])]),t._v(" "),i("instructions",{attrs:{doc:"batchAddFriend"}})],1),t._v(" "),1==t.tagType?i("addFriend"):t._e(),t._v(" "),2==t.tagType?i("dataPreview",{on:{changeType:function(e){return t.changeType(e)}}}):t._e()],1)},staticRenderFns:[]};var x=i("VU/8")(C,y,!1,function(t){i("SKRE")},"data-v-83060d82",null);e.default=x.exports}});