猎户系统

34.1a28ba270f5de885addc.js 14KB

1
  1. webpackJsonp([34],{"6EwD":function(e,t){},AxBU:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("fGUm"),s=a("gzej"),n={props:{labelWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},reset:{type:Boolean,default:!1},title:{type:String,default:""},iptPlaceholder:{type:String,default:""},unit:{type:String,default:""}},watch:{reset:function(){this.yes_value_obj={minValue:"",maxValue:""},this.valueObj={minValue:"",maxValue:""}}},data:function(){return{visible:!1,valueObj:{minValue:"",maxValue:""},yes_value_obj:{minValue:"",maxValue:""}}},methods:{clear:function(){this.yes_value_obj={minValue:"",maxValue:""},this.valueObj={minValue:"",maxValue:""},this.$emit("durationChange",this.yes_value_obj)},customPay:function(){""==this.valueObj.minValue||""==this.valueObj.maxValue||this.valueObj.maxValue<this.valueObj.minValue?this.$message({message:"请正确填写自定义次数",type:"warning"}):(this.yes_value_obj={minValue:this.valueObj.minValue,maxValue:this.valueObj.maxValue},this.$emit("durationChange",this.yes_value_obj),this.visible=!1)}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"common-screen-item"},[a("label",{staticClass:"common-screen-label",style:e.labelWidth?"width:auto;margin-left:20px;flex-shrink: 0;":"width:120px;"},[e._v(e._s(e.title||"添加员工时长"))]),e._v(" "),a("el-popover",{attrs:{placement:"bottom",trigger:"click"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("div",{class:["common-screen-self-box","common-input-select",e.yes_value_obj.minValue&&e.yes_value_obj.maxValue&&e.clearable?"common-input-select-hover":""],attrs:{slot:"reference"},slot:"reference"},[a("div",{class:["common-screen-self-con",""==e.yes_value_obj.minValue&&""==e.yes_value_obj.maxValue?"common-screen-self-placeholder":""]},[a("div",{staticClass:"common-screen-self-con-div"},[a("span",[e._v(e._s(e.yes_value_obj.minValue&&e.yes_value_obj.maxValue?e.yes_value_obj.minValue+" ~ "+e.yes_value_obj.maxValue:e.iptPlaceholder||"请输入天数范围"))])]),e._v(" "),a("i",{staticClass:"el-icon-circle-close other-icon",on:{click:function(t){return t.stopPropagation(),e.clear.apply(null,arguments)}}})]),e._v(" "),a("div",{staticClass:"common-screen-self-icon"},[a("i",{staticClass:"el-icon-arrow-down"})])]),e._v(" "),a("div",{staticClass:"popover_con"},[a("div",{staticClass:"custom"},[a("p",[e._v(e._s(e.iptPlaceholder||"请输入天数范围"))]),e._v(" "),a("div",{staticClass:"inputBox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.valueObj.minValue,expression:"valueObj.minValue"}],attrs:{type:"number",placeholder:"最小值"},domProps:{value:e.valueObj.minValue},on:{input:function(t){t.target.composing||e.$set(e.valueObj,"minValue",t.target.value)}}}),e._v(" "),a("span",[e._v(" - ")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.valueObj.maxValue,expression:"valueObj.maxValue"}],attrs:{type:"number",placeholder:"最大值"},domProps:{value:e.valueObj.maxValue},on:{input:function(t){t.target.composing||e.$set(e.valueObj,"maxValue",t.target.value)}}}),e._v(" "),a("span",[e._v(e._s(e.unit||"天"))])])]),e._v(" "),a("div",{staticClass:"buttons"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.customPay}},[e._v("确定")])],1)])])],1)},staticRenderFns:[]};var r=a("VU/8")(n,l,!1,function(e){a("JUwj")},"data-v-382360ee",null).exports,o=a("VULP"),c=a("w5PV"),u={components:{selfCustomerservice:i.a,datePicker:s.a,addDuration:r,detial:o.a,chatGroupOptions:c.a},data:function(){return{drawerSize:"60%",detialDrawer:!1,rowPro:{},loading:!1,page:1,pages:0,total:0,page_size:20,tableData:[],resetFlag:!1,remindValue:!1,user_id_list:[],add_time:[],drain_time:[],duration:{minValue:"",maxValue:""},height:"",chatGroupList:[]}},created:function(){this.height=document.documentElement.clientHeight-400>400?document.documentElement.clientHeight-400:400,this.init(1)},methods:{changeDrawerSize:function(){this.drawerSize="100%"==this.drawerSize?"60%":"100%"},closeDrawer:function(){this.detialDrawer=!1},showDetial:function(e){var t=this;this.rowPro=e,this.drawerSize="60%",this.detialDrawer=!0,this.$nextTick(function(){t.$refs.detial.acIdx=0,t.$refs.detial.init()})},resetEvent:function(){this.resetFlag=!this.resetFlag,this.user_id_list=[],this.add_time=[],this.drain_time=[],this.duration={minValue:"",maxValue:""},this.chatGroupList=[],this.init(1)},durationChange:function(e){this.duration=e,this.init(1)},changeTime:function(e,t){"addTime"==t&&(!e||e&&0==e.length?this.add_time=[]:this.add_time=e),"drainTime"==t&&(!e||e&&0==e.length?this.drain_time=[]:this.drain_time=e),this.init(1)},init:function(e,t){var a=this;if("export"!=t)this.page=e||this.page;else if(0==this.total)return void this.$message({message:"暂无数据可导出",type:"warning"});this.loading=!0;var i={user_id_list:this.user_id_list,add_date_start:this.add_time&&this.add_time.length>1?this.add_time[0]:"",add_date_end:this.add_time&&this.add_time.length>1?this.add_time[1]:"",loss_date_start:this.drain_time&&this.drain_time.length>1?this.drain_time[0]:"",loss_date_end:this.drain_time&&this.drain_time.length>1?this.drain_time[1]:"",add_duration_min:this.duration.minValue,add_duration_max:this.duration.maxValue,page:"export"==t?1:this.page,page_size:"export"==t?this.$store.state.exportNumber:this.page_size,chat_id:this.chatGroupList?this.chatGroupList.map(function(e){return e.chat_id}):[]};console.log("params => ",i),this.$axios.get(this.URL.BASEURL+this.URL.lossCustomerList,{params:i}).then(function(e){e=e.data;a.loading=!1,e&&0==e.errno?(e.rst.data.forEach(function(e){e.chat_list&&Array.isArray(e.chat_list)&&(e.chat_list=e.chat_list.map(function(e){return e||"未设置群名"}).join(", "))}),"export"==t?a.exportEvent(e.rst.data):(a.tableData=e.rst.data,a.total=e.rst.pageInfo.total,a.pages=e.rst.pageInfo.pages)):4002!=e.errno&&a.$message({message:e.err,type:"warning"})}).catch(function(e){a.loading=!1})},handleCurrentChange:function(e){this.init(e)},exportEvent:function(e){var t=e;t.forEach(function(e){e.self_gender=1==e.gender?"男":2==e.gender?"女":"未知",e.self_type=1==e.type?"微信用户":2==e.type?"":"企业微信",e.self_relation_enable=0==e.relation_enable?"已流失":1==e.relation_enable?"未流失":2==e.relation_enable?"待分配":"",e.self_user_kf_name=e.user_list.name,e.self_user_kf_department=e.user_list.department});var a=[{tHeader:["客户id","客户名称","客户备注","客户头像","客户性别","外部联系人的类型","客户状态","客服ID","所属客服","客服所属部门","所属群聊","标签","流失时间","添加时间","添加渠道","添加市场/天"],filterVal:["customer_id","name","remark","avatar","self_gender","self_type","self_relation_enable","user_id","self_user_kf_name","self_user_kf_department","chat_list","tag_list","loss_time","createtime","add_way","add_duration_days"],tableDatas:t,sheetName:""}];this.$exportOrder({excelDatas:a,name:"客户流失(导出时间:"+this.$getDay(0)+")"})},onChangeChatGroupList:function(e){this.init(1)}}},d={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[e._m(0),e._v(" "),i("div",{staticClass:"screenBox",staticStyle:{"margin-top":"10px"}},[i("self-customerservice",{attrs:{reset:e.resetFlag},on:{customerDefine:function(t){e.user_id_list=t,e.init(1)}}}),e._v(" "),i("chatGroupOptions",{attrs:{label:"所属群聊"},on:{change:e.onChangeChatGroupList},model:{value:e.chatGroupList,callback:function(t){e.chatGroupList=t},expression:"chatGroupList"}}),e._v(" "),i("date-picker",{attrs:{title:"流失时间",reset:e.resetFlag},on:{changeTime:function(t){e.changeTime(t,"drainTime")}}}),e._v(" "),i("date-picker",{attrs:{title:"添加时间",reset:e.resetFlag},on:{changeTime:function(t){e.changeTime(t,"addTime")}}}),e._v(" "),i("add-duration",{attrs:{reset:e.resetFlag},on:{durationChange:e.durationChange}}),e._v(" "),i("div",{staticClass:"reset",on:{click:e.resetEvent}},[e._v("重置")])],1),e._v(" "),i("div",{staticClass:"tableInfo"},[i("div",[i("div",{staticClass:"flex"},[i("i",{staticClass:"el-icon-user-solid"}),e._v(" "),i("div",{staticClass:"totalCustom"},[e._v("共有"),i("span",[e._v(e._s(e.total))]),e._v("个客户")])])]),e._v(" "),i("div",{staticClass:"flex"},[i("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(t){return e.init(1,"export")}}},[e._v("导出Excel")])],1)]),e._v(" "),i("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:e.height,data:e.tableData,"tooltip-effect":"dark"}},[i("el-table-column",{attrs:{width:"230",fixed:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticClass:"userBox",staticStyle:{"padding-left":"30px"}},[t.row.avatar?i("img",{staticClass:"userImg",attrs:{src:t.row.avatar,alt:""}}):i("img",{staticClass:"userImg",attrs:{src:a("pIyw"),alt:""}}),e._v(" "),i("div",{staticClass:"userInfo"},[i("div",{staticClass:"userName"},[i("p",{staticClass:"name"},[e._v(e._s(t.row.remark))]),e._v(" "),1==t.row.type?i("span",[e._v("@微信")]):e._e()]),e._v(" "),i("div",{staticClass:"nickname"},[i("span",[e._v("昵称:")]),e._v(e._s(t.row.name))])])])]}}])},[i("template",{slot:"header"},[i("div",{staticStyle:{"margin-left":"70px"}},[e._v("客户")])])],2),e._v(" "),i("el-table-column",{attrs:{label:"性别","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.gender?i("span",[e._v("未知")]):e._e(),e._v(" "),1==t.row.gender?i("span",[e._v("男")]):e._e(),e._v(" "),2==t.row.gender?i("span",[e._v("女")]):e._e()]}}])}),e._v(" "),i("el-table-column",{attrs:{"min-width":"160",label:"所属客服",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticClass:"customerServiceTagBox"},[i("div",{staticClass:"customerServiceTag-v2"},[e._v(e._s(t.row.user_list.name))])])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"所属群聊","min-width":"160","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[i("span",[e._v(e._s(a.chat_list||"-"))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"所属部门","min-width":"130","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",[e._v(e._s(t.row.department_list&&t.row.department_list.join(",")))])]}}])}),e._v(" "),i("el-table-column",{attrs:{"min-width":"160",label:"标签",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticClass:"customerServiceTagBox biaoqian"},e._l(t.row.tag_list,function(t){return i("div",{key:t,staticClass:"customerServiceTag"},[e._v(e._s(t))])}),0)]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"客户状态","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.relation_enable?i("span",{staticClass:"c-F03F5C"},[e._v("已流失")]):e._e(),e._v(" "),1==t.row.relation_enable?i("span",{staticClass:"c-448AFF"},[e._v("未流失")]):e._e(),e._v(" "),2==t.row.relation_enable?i("span",{staticClass:"c-FFB055"},[e._v("待分配")]):e._e()]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"loss_time","min-width":"180",label:"流失时间","show-overflow-tooltip":"",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{prop:"createtime","min-width":"180",label:"添加时间","show-overflow-tooltip":"",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{prop:"add_duration_days","min-width":"120","show-overflow-tooltip":"",align:"center"}},[i("template",{slot:"header"},[i("div",[e._v("添加时长/天\n "),i("el-tooltip",{staticClass:"disinblock",attrs:{content:"添加员工时长/天 = 客户流失时间 - 客户添加猎户员工的时间",placement:"top"}},[i("i",{staticClass:"el-icon-question"})])],1)])],2),e._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticClass:"flex",staticStyle:{"justify-content":"center"}},[i("div",{staticClass:"c-00B38A pointer",staticStyle:{margin:"0 6px"},on:{click:function(a){return e.showDetial(t.row)}}},[e._v("详情")])])]}}])})],1),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],staticClass:"pagination"},[i("el-pagination",{attrs:{background:"","current-page":e.page,layout:"prev, pager, next","page-count":Number(e.pages)},on:{"current-change":e.handleCurrentChange}})],1),e._v(" "),i("el-drawer",{attrs:{size:e.drawerSize,visible:e.detialDrawer,"with-header":!1},on:{"update:visible":function(t){e.detialDrawer=t}}},[i("detial",{ref:"detial",attrs:{rowProp:{customer_id:e.rowPro.customer_id,user_id:e.rowPro.user_id}},on:{changeDrawerSize:e.changeDrawerSize,closeDrawer:e.closeDrawer}})],1)],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"self-hint"},[t("i",{staticClass:"el-icon-message-solid"}),this._v(" "),t("div",[t("p",[this._v("当企业成员被客户从微信联系人中删除时,会在客户流失列表中产生一条记录,开启「被删除通知」后,被删除的成员会收到一条推送")]),this._v(" "),t("p",[this._v("客户流失功能只会记录授权给猎户成员的客户流失信息,未被授权的成员信息将不会展示在列表中。"),t("a",{staticClass:"c-00B38A",attrs:{href:"https://docs.qq.com/doc/p/302c154caadbfb317828a3edf057f06741bdc47d?dver=2.1.27292865",target:"_blank"}},[this._v("如何添加授权成员?")])])])])}]};var _=a("VU/8")(u,d,!1,function(e){a("6EwD")},"data-v-6dfe41f4",null);t.default=_.exports},JUwj:function(e,t){}});