1 |
- webpackJsonp([40],{rZ4c:function(e,t){},wxwy:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("McOJ"),s=a("erru"),n=a("VULP"),r={components:{selfInput:i.a,selfChannel:s.a,detial:n.a},data:function(){return{drawerSize:"60%",detialDrawer:!1,rowPro:{},loading:!1,page:1,pages:0,total:0,page_size:20,tableData:[],resetFlag:!1,input_keyword:"",add_way:"",height:""}},created:function(){this.height=document.documentElement.clientHeight-240>400?document.documentElement.clientHeight-240: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()})},removeCustomer:function(e){var t=this;this.$confirm("确定要将【"+e.name+"】从黑名单中移除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$loading(t.$loadingConfig),t.$axios.post(t.URL.BASEURL+t.URL.removeCustomerFromBlackList,{customer_id:e.customer_id,user_id:e.user_id}).then(function(e){e=e.data;t.$loading(t.$loadingConfig).close(),e&&0==e.errno?(t.$message({message:"移除成功!",type:"success"}),t.init(1)):t.$message({message:e.err,type:"warning"})}).catch(function(){t.$loading(t.$loadingConfig).close()})}).catch(function(){})},goDetail:function(e){this.$router.push({path:"/massMsg/"+e})},resetEvent:function(){this.resetFlag=!this.resetFlag,this.add_way="",this.input_keyword="",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,this.$axios.get(this.URL.BASEURL+this.URL.blackList,{params:{customer_name:this.input_keyword,add_way:this.add_way,page:"export"==t?1:this.page,page_size:"export"==t?this.$store.state.exportNumber:this.page_size}}).then(function(e){e=e.data;a.loading=!1,e&&0==e.errno?"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_type=1==e.type?"微信用户":2==e.type?"":"企业微信",e.self_relation_enable=0==e.relation_enable?"已流失":1==e.relation_enable?"未流失":2==e.relation_enable?"待分配":""});var a=[{tHeader:["客户id","客户名称","客户备注","客户头像","外部联系人的类型","客户状态","客服ID","添加时间","添加渠道","添加到黑名单时间","拉黑原因"],filterVal:["customer_id","name","remark","avatar","self_type","self_relation_enable","user_id","createtime","add_way","operate_time","reason"],tableDatas:t,sheetName:""}];this.$exportOrder({excelDatas:a,name:"黑名单(导出时间:"+this.$getDay(0)+")"})}}},o={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"}]},[i("div",{staticClass:"screenBox"},[i("self-input",{attrs:{label_name:"搜索客户",hasLabel:!1,noMarLeft:!0,reset:e.resetFlag},on:{inputChange:function(t){e.input_keyword=t,e.init(1)}}}),e._v(" "),i("self-channel",{attrs:{reset:e.resetFlag},on:{channelDefine:function(t){e.add_way=t,e.init(1)}}}),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"},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:"所属客服",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticClass:"customerServiceTagBox"},[i("div",{staticClass:"customerServiceTag"},[i("i",{staticClass:"el-icon-headset"}),e._v(e._s(t.row.user_list.name))])])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"客户状态",width:"100","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:"createtime",width:"180",label:"添加时间","show-overflow-tooltip":"",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{prop:"add_way",label:"添加渠道","show-overflow-tooltip":"",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{prop:"operate_time",width:"180",label:"操作时间","show-overflow-tooltip":"",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{label:"原因","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(t.row.reason))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center"},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("用户详情")]),e._v(" "),i("div",{staticClass:"c-00B38A pointer",staticStyle:{margin:"0 6px"},on:{click:function(a){return e.removeCustomer(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:[]};var l=a("VU/8")(r,o,!1,function(e){a("rZ4c")},"data-v-7c4dc8b2",null);t.default=l.exports}});
|