(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3760"],{"31UX":function(t,e,i){"use strict";var s=i("QbLZ"),a=i.n(s),n=i("4d7F"),o=i.n(n),l=i("CMIa"),c=i("ehos"),r=i("7Qib");e.a={data:function(){return{chartObj:null,chartOtherObj:null,chartColors:["#6CA2FF","#6AC9D7","#72DCA2","#48E78D","#FECD51","#DBB375","#FF7474","#F59561","#A3AEBC","#4C84FF","#0DBEB4","#00DEDE","#FFAA00","#C7C116","#F7A57C","#F661AC","#8652EE"],chartXAxisStyle:{axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#333"},axisLine:{lineStyle:{color:"#333"}},splitLine:{show:!1}},chartYAxisStyle:{axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#333"},axisLine:{lineStyle:{color:"#333"}},splitLine:{show:!1}},currentPage:1,pageSizes:[15,30,45,60],pageSize:0,total:0,toolbox:{showTitle:!1,feature:{saveAsImage:{show:!0,pixelRatio:2}}}}},components:{FiltrateHandleView:l.a},props:{},computed:{},watch:{},mounted:function(){var t=this;this.debouncedResize=Object(c.debounce)(300,this.resizeFn),this.$nextTick(function(){window.addEventListener("resize",t.debouncedResize)})},beforeDestroy:function(){window.removeEventListener("resize",this.debouncedResize)},methods:{resizeFn:function(){this.chartObj&&this.chartObj.resize(),this.chartOtherObj&&this.chartOtherObj.resize()},handleSizeChange:function(t){this.pageData.limit=t,this.getList(this.pageData)},handleCurrentChange:function(t){this.pageData.page=t,this.getList(this.pageData)},requestExportInfo:function(t,e,i){return new o.a(function(s,n){t(a()({},e,{excel_types:i,excel_type:1})).then(function(t){Object(r.c)(t),s&&s(t)}).catch(function(t){n&&n(t)})})}},deactivated:function(){}}},"74lk":function(t,e,i){"use strict";i.d(e,"a",function(){return a}),i.d(e,"b",function(){return n}),i.d(e,"d",function(){return o}),i.d(e,"e",function(){return l}),i.d(e,"c",function(){return c});var s=i("t3Un");function a(t){return Object(s.a)({url:"bi/achievement/statistics",method:"post",data:t})}function n(t){return Object(s.a)({url:"bi/achievement/excelExport",method:"post",data:t,responseType:"blob"})}function o(t){return Object(s.a)({url:"bi/product/statistics",method:"post",data:t,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function l(t){return Object(s.a)({url:"bi/product/excelExport",method:"post",data:t,responseType:"blob",headers:{"Content-Type":"application/json;charset=UTF-8"}})}function c(t){return Object(s.a)({url:"bi/business/funnel",method:"post",data:t,headers:{"Content-Type":"application/json;charset=UTF-8"}})}},"77fj":function(t,e,i){"use strict";var s=i("Btlj");i.n(s).a},"9/X1":function(t,e,i){"use strict";var s=i("gQl/");i.n(s).a},Btlj:function(t,e,i){},BzA1:function(t,e,i){"use strict";var s=i("a/5N"),a={name:"ImportInfo",components:{},props:{list:Array},data:function(){return{}},computed:{showList:function(){return this.list.filter(function(t){return"file"!==t.form_type})}},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{getValueContent:function(t){if("map_address"===t.form_type)return t.value?t.value.detail_address:"";if("structure"===t.form_type||"user"===t.form_type||"checkbox"===t.form_type){if(Object(s.a)(t.value)){var e={structure:"name",user:"realname",checkbox:""}[t.form_type];return t.value.map(function(t){return e?t[e]:t}).join(",")}return""}if("single_user"===t.form_type)return Object(s.c)(t.value)&&t.value.realname?t.value.realname:"";if("customer"===t.form_type||"business"===t.form_type||"contract"===t.form_type||"contacts"===t.form_type||"category"===t.form_type||"statusName"===t.form_type||"typeName"===t.form_type){var i={customer:"name",business:"name",contract:"name",contacts:"name",category:"name",statusName:"name",typeName:"name"}[t.form_type];return Object(s.a)(t.value)?t.value.length>0?t.value[0][i]:"":t.value?t.value[i]:""}return t.value}}},n=(i("m7P8"),i("KHd+")),o=Object(n.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"content"},[i("div",{staticClass:"content-title"},[t._v("基本信息")]),t._v(" "),t._l(t.showList,function(e,s){return i("p",{key:s,staticClass:"detail-cell"},[i("span",{staticClass:"detail-cell__label"},[t._v("\n "+t._s(e.name)+"\n ")]),i("br"),t._v(" "),i("span",{staticClass:"detail-cell__value"},[t._v("\n "+t._s(t.getValueContent(e))+"\n ")])])})],2)},[],!1,null,"17796cac",null);o.options.__file="ImportInfo.vue";e.a=o.exports},CMIa:function(t,e,i){"use strict";var s=i("KTTK"),a=i("ERJp"),n=i("6iAj"),o=i("UCfG"),l=i("HHBN"),c=i("ZX9L"),r=i("wd/R"),u=i.n(r),d={name:"FiltrateHandleView",components:{TimeTypeSelect:c.a,XhStructureCell:o.a,XhUserCell:l.a},props:{moduleType:{type:String},title:{type:String,default:""},showFilterView:{default:!0,type:Boolean},showYearSelect:{default:!1,type:Boolean},showBusinessSelect:{default:!1,type:Boolean},showUserSelect:{default:!0,type:Boolean},showCustomSelect:{default:!1,type:Boolean},customDefault:"",customOptions:{default:function(){return[]},type:Array},showProductSelect:{default:!1,type:Boolean}},data:function(){return{pickerOptions:{disabledDate:function(t){return t.getTime()>Date.now()}},yearValue:"",timeTypeValue:{},dataSelect:1,structuresSelectValue:[],userSelectValue:[],businessOptions:[],businessStatusValue:"",productValue:[],productOptions:[],customValue:""}},computed:{showUserStrucSelect:function(){return this.showUserSelect}},watch:{},mounted:function(){var t=this;this.showCustomSelect&&(this.customValue=this.customDefault),this.showYearSelect&&(this.yearValue=u()(new Date).year().toString()),this.$emit("load"),this.showBusinessSelect?this.getBusinessStatusList(function(){t.postFiltrateValue()}):this.postFiltrateValue(),this.showProductSelect&&this.getProductCategoryIndex()},beforeDestroy:function(){},methods:{structureChange:function(t){this.structuresSelectValue=t.value||[]},userChange:function(t){this.userSelectValue=t.value||[]},customSelectChange:function(){this.$emit("typeChange",this.customValue)},timeTypeChange:function(t){this.timeTypeValue=t},structuresValueChange:function(t){this.showUserSelect&&(this.userSelectValue="",this.userOptions=[],this.getUserList())},getUserList:function(){var t=this,e={};e.structure_id=this.structuresSelectValue,Object(s.m)(e).then(function(e){t.userOptions=e.data}).catch(function(){t.$emit("error")})},getBusinessStatusList:function(t){var e=this;Object(a.t)().then(function(i){var s=i.data||[];e.businessOptions=s.filter(function(t){return 1===t.status}),e.businessOptions.length>0&&(e.businessStatusValue=e.businessOptions[0].type_id),t(!0)}).catch(function(){e.$emit("error")})},getProductCategoryIndex:function(){var t=this;Object(n.K)({type:"tree"}).then(function(e){t.productOptions=e.data}).catch(function(){})},postFiltrateValue:function(){var t={};this.showUserStrucSelect?1==this.dataSelect&&(t.structure_id=this.structuresSelectValue.length>0?this.structuresSelectValue[0].id:"1"):t.structure_id=this.structuresSelectValue.length>0?this.structuresSelectValue[0].id:"1",this.showUserSelect&&2==this.dataSelect&&(t.user_id=this.userSelectValue.length>0?this.userSelectValue[0].id:""),this.showBusinessSelect&&(t.type_id=this.businessStatusValue),this.showProductSelect&&(t.category_id=this.productValue.length>0?this.productValue[this.productValue.length-1]:""),this.showYearSelect?t.year=this.yearValue:"custom"==this.timeTypeValue.type?(t.start_time=this.timeTypeValue.startTime.replace(/\./g,"-"),t.end_time=this.timeTypeValue.endTime.replace(/\./g,"-")):t.type=this.timeTypeValue.value,this.$emit("change",t)}}},h=(i("9/X1"),i("KHd+")),p=Object(h.a)(d,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("flexbox",{staticClass:"filtrate-content",attrs:{justify:"flex-start"}},[i("flexbox",{staticClass:"title-box",attrs:{justify:"flex-start"}},[i("div",{staticClass:"icon-box"},[i("span",{staticClass:"wk wk-my-task icon"})]),t._v(" "),i("span",{staticClass:"text"},[t._v(t._s(t.title))])]),t._v(" "),t.showFilterView?[t.showYearSelect?t._e():i("time-type-select",{on:{change:t.timeTypeChange}}),t._v(" "),t.showYearSelect?i("el-date-picker",{attrs:{clearable:!1,"picker-options":t.pickerOptions,type:"year","value-format":"yyyy",placeholder:"选择年"},model:{value:t.yearValue,callback:function(e){t.yearValue=e},expression:"yearValue"}}):t._e(),t._v(" "),t.showUserStrucSelect?i("el-select",{model:{value:t.dataSelect,callback:function(e){t.dataSelect=e},expression:"dataSelect"}},t._l([{label:"按部门",value:1},{label:"按员工",value:2}],function(t){return i("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})):t._e(),t._v(" "),1==t.dataSelect?i("xh-structure-cell",{staticClass:"xh-structure-cell",attrs:{radio:"",placeholder:"选择部门(默认为本部门及下属部门)"},on:{"value-change":t.structureChange}}):t._e(),t._v(" "),2==t.dataSelect&&t.showUserSelect?i("xh-user-cell",{staticClass:"xh-user-cell",attrs:{radio:"",placeholder:"选择员工(默认为本人及下属)\n"},on:{"value-change":t.userChange}}):t._e(),t._v(" "),t.showBusinessSelect?i("el-select",{attrs:{placeholder:"商机组"},model:{value:t.businessStatusValue,callback:function(e){t.businessStatusValue=e},expression:"businessStatusValue"}},t._l(t.businessOptions,function(t){return i("el-option",{key:t.type_id,attrs:{label:t.name,value:t.type_id}})})):t._e(),t._v(" "),t.showProductSelect?i("el-cascader",{staticStyle:{width:"100%"},attrs:{options:t.productOptions,"show-all-levels":!1,props:{children:"children",label:"label",value:"categoryId"},"change-on-select":""},model:{value:t.productValue,callback:function(e){t.productValue=e},expression:"productValue"}}):t._e(),t._v(" "),t.showCustomSelect?i("el-select",{on:{change:t.customSelectChange},model:{value:t.customValue,callback:function(e){t.customValue=e},expression:"customValue"}},t._l(t.customOptions,function(t){return i("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})})):t._e(),t._v(" "),t._t("append"),t._v(" "),i("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){t.postFiltrateValue()}}},[t._v("搜索")]),t._v(" "),t._t("default")]:t._e()],2)},[],!1,null,"6e5853cd",null);p.options.__file="FiltrateHandleView.vue";e.a=p.exports},"I+NK":function(t,e,i){"use strict";var s=i("PWYh");i.n(s).a},"N8+3":function(t,e,i){"use strict";var s=i("epE4");i.n(s).a},PWYh:function(t,e,i){},Rw0F:function(t,e,i){"use strict";i.r(e);var s=i("74lk"),a=i("mVxz"),n=i("1bNe"),o=i("tMlD"),l=i("31UX"),c=i("7Qib"),r={name:"ProductStatistics",components:{ContractDetail:a.a,CustomerDetail:n.a,ProductDetail:o.a},mixins:[l.a],data:function(){return{loading:!1,tableHeight:document.documentElement.clientHeight-170,postParams:{},headFieldList:[{field:"category_id_info",name:"产品分类",width:"115px"},{field:"product_name",name:"产品名称",width:"115px"},{field:"contract_num",name:"合同编号",width:"115px"},{field:"owner_user_name",name:"负责人",width:"115px"},{field:"contract_name",name:"客户名称",width:"115px"},{field:"price",name:"销售单价",width:"115px"},{field:"num",name:"数量",width:"115px"},{field:"subtotal",name:"订单产品小计",width:"115px"}],list:[],spanList:[],newList:[],showContractview:!1,showCustomerView:!1,showProductview:!1,rowID:""}},computed:{},mounted:function(){var t=this;window.onresize=function(){var e=document.documentElement.clientHeight;t.tableHeight=e-170}},methods:{objectSpanMethod:function(t){t.row,t.column;var e=t.rowIndex,i=t.columnIndex,s=this.spanList[e];return 0==i?0==s.rowspan?{rowspan:0,colspan:0}:{rowspan:s.rowspan,colspan:1}:1==i?0==s.productRowspan?{rowspan:0,colspan:0}:{rowspan:s.productRowspan,colspan:1}:void 0},handleRowClick:function(t,e,i){"contract_name"===e.property?(this.showProductview&&(this.showProductview=!1),this.showContractview&&(this.showContractview=!1),this.rowID=t.customer_id,this.showCustomerView=!0):"product_name"===e.property?(this.showCustomerView&&(this.showCustomerView=!1),this.showContractview&&(this.showContractview=!1),this.rowID=t.product_id,this.showProductview=!0):"contract_num"===e.property&&(this.showProductview&&(this.showProductview=!1),this.showCustomerView&&(this.showCustomerView=!1),this.rowID=t.contract_id,this.showContractview=!0)},cellStyle:function(t){t.row,t.column;var e=t.rowIndex,i=t.columnIndex,s=this.spanList[e];return 1==s.isSum?{backgroundColor:"#FFF9F2",borderRight:"0 none",fontWeight:"bold"}:1==s.isAllSum?{backgroundColor:"#FFF3E8",borderRight:"0 none",fontWeight:"bold"}:1===i||2===i||4===i?{color:"#2362FB",cursor:"pointer"}:void 0},getProductDatalist:function(t){var e=this;this.postParams=t,this.loading=!0,Object(s.d)(t).then(function(t){t.data&&t.data.length>0?(e.list=t.data,e.handleShowInfo()):(e.list=[],e.spanList=[],e.newList=[]),e.loading=!1}).catch(function(){e.loading=!1})},handleShowInfo:function(){for(var t=[],e=[],i=0,s=0,a=0,n=0,o=0,l=0,r=0;r0);this.dispatch("SlideView","setEditClose",[e])},contactsId:function(){this.selectContactsId=this.contactsId||""},id:{handler:function(){this.businessAction={type:"condition",data:{moduleType:this.crmType,customer_id:this.id}}},immediate:!0}},created:function(){this.selectContactsId=this.contactsId||"",this.getDefalutFollowType()},beforeDestroy:function(){},methods:{getDefalutFollowType:function(){this.followTypes&&this.followTypes.length>0?this.followType=this.followTypes[0].value:this.followType=""},resetInfo:function(){this.nextTime="",this.isUnfold=!1,this.content="",this.dispatch("SlideView","setEditClose",[!1]),this.imgFiles=[],this.files=[],this.business=[],this.selectContactsId=this.contactsId||"",this.showRelativeType="",this.batchId=Object(y.s)(),this.getDefalutFollowType()},commonWordsSelect:function(t){var e=this;this.content?this.$confirm("您选中的常用语将覆盖当前填写内容?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",customClass:"is-particulars"}).then(function(){e.content=t}).catch(function(){}):this.content=t},checkRelativeInfos:function(t){"business"==this.showRelativeType&&(this.business=t.data)},barClick:function(t){this.showRelativeType=t,"business"==t?this.showBusinessPopover=!0:"file"==t?this.$refs.fileInput.click():"img"==t&&this.$refs.imgInput.click()},uploadFile:function(t){var e=t.target.files;if(e.length){for(var i=0;i0&&t.isUnfold?i("add-image-list",{attrs:{data:t.imgFiles},on:{delete:t.deleteImage,"delete-all":function(e){t.deleteAllFile(2)},upload:t.uploadFile}}):t._e(),t._v(" "),t.files.length>0&&t.isUnfold?i("add-file-list",{attrs:{data:t.files},on:{delete:t.deleteFile,"delete-all":function(e){t.deleteAllFile(1)}}}):t._e(),t._v(" "),t.business.length>0&&t.isUnfold?i("add-relate-list",{attrs:{data:t.business,type:"business"},on:{delete:t.deleteRelate}}):t._e(),t._v(" "),t.isUnfold?i("div",{staticClass:"bar-cont"},[i("el-button",{staticClass:"handle-button",attrs:{type:"text",icon:"wk wk-picture"},on:{click:function(e){t.barClick("img")}}},[t._v("图片")]),t._v(" "),i("el-button",{staticClass:"handle-button",attrs:{type:"text",icon:"wk wk-file"},on:{click:function(e){t.barClick("file")}}},[t._v("附件")]),t._v(" "),t.showBusiness?i("el-popover",{attrs:{placement:"bottom",width:"700","popper-class":"no-padding-popover",trigger:"click"},model:{value:t.showBusinessPopover,callback:function(e){t.showBusinessPopover=e},expression:"showBusinessPopover"}},[i("crm-relative",{ref:"crmrelative",attrs:{show:t.showBusinessPopover,radio:!1,action:t.businessAction,"selected-data":{business:t.business},"crm-type":"business"},on:{close:function(e){t.showBusinessPopover=!1},changeCheckout:t.checkRelativeInfos}}),t._v(" "),i("el-button",{staticClass:"handle-button",staticStyle:{"margin-left":"10px"},attrs:{slot:"reference",type:"text",icon:"wk wk-associate"},on:{click:function(e){t.barClick("business")}},slot:"reference"},[t._v("关联商机")])],1):t._e(),t._v(" "),i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:t.sendClick,expression:"sendClick"}],staticClass:"send-btn",attrs:{type:"primary"}},[t._v("发布")])],1):t._e(),t._v(" "),i("input",{ref:"fileInput",staticClass:"file-input",attrs:{accept:"*.*",type:"file",multiple:""},on:{change:t.uploadFile}}),t._v(" "),i("input",{ref:"imgInput",staticClass:"file-input",attrs:{accept:"image/*",type:"file",multiple:""},on:{change:t.uploadFile}})],1)},[],!1,null,"3cdb3711",null);b.options.__file="LogAdd.vue";var _=b.exports,C=i("O8VQ"),T=i("/G0b"),k=i("8OTK"),S=i("C3Po"),x=i("ZoMv"),V=i("Z+Ht"),F=i("vvxI"),I=i("ZX9L"),L=i("ehos"),O=i("L2JU"),D={name:"Activity",components:{LogAdd:_,LogCell:C.a,CRMAllCreate:k.default,TaskQuickAdd:S.a,TimeTypeSelect:I.a,LogEditDialog:T.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-5f62"),i.e("chunk-34a4"),i.e("chunk-2704"),i.e("chunk-9acd"),i.e("chunk-4ee54")]).then(i.bind(null,"3z7q"))}},mixins:[V.a,F.a],props:{handle:{type:Array,default:function(){return[]}},id:[String,Number],contactsId:[String,Number],crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1},typeList:{type:Array,default:function(){return[]}},detail:{type:Object,default:function(){return{}}}},data:function(){return{loading:!1,isSearchRequest:!1,filterValue:{},timeOptions:[{label:"全部",value:""},{label:"最近7天",value:"7"},{label:"最近30天",value:"30"},{label:"最近60天",value:"60"}],contacts:[],followTypes:[],handleType:"",activityType:{icon:"all",color:"#2362FB",command:"",label:"全部活动"},list:[],noMore:!1,page:1,isCRMCreate:!1,createActionInfo:{type:"relative",crmType:this.crmType,data:{}},createCRMType:"",isTaskCreate:!1,showFullDetail:!1,relationID:"",relationCrmType:"",scrollKey:Date.now(),logEditData:null,logEditPosition:{seciton:0,index:0},logEditDialogVisible:!1}},computed:o()({},Object(O.b)(["crm"]),{canCreateFollowRecord:function(){return this.crm&&this.crm.activity&&this.crm.activity.save},showRelate:function(){return"customer"==this.crmType},scrollDisabled:function(){return this.loading||this.noMore},taskParams:function(){var t={};return t[this.crmType+"_ids"]=this.id,t},taskProps:function(){var t={};t[this.crmType]=[this.detail];var e={};return e[this.crmType+"Ids"]=[this.id],{relatedObj:t,relatedObjIds:e}}}),watch:{id:function(){this.initInfo(),this.refreshLogList()}},created:function(){this.debouncedRefreshLogList=Object(L.debounce)(300,this.refreshLogList),this.initInfo()},methods:{getLogTypeList:function(){var t=this;Object(c.r)().then(function(e){t.followTypes=e.data.map(function(t){return{value:t,label:t}})}).catch(function(){})},getContactsList:function(){var t=this;Object(l.y)({customer_id:this.id}).then(function(e){t.contacts=e.data.list}).catch(function(){})},sendLog:function(t){var e=this;if(t.content){var i={category:t.followType,activity_type:x.a.keyToTypeData[this.crmType],activity_type_id:t.id,content:t.content,next_time:t.nextTime||"",is_event:0,file_id:[].concat(a()(t.files.map(function(t){return t.file_id})),a()(t.images.map(function(t){return t.file_id}))),business_ids:[].concat(a()(t.business.map(function(t){return t.business_id}))),contacts_ids:t.contactsId};this.sendLoading=!0,Object(r.a)(i).then(function(t){e.sendLoading=!1,e.$message.success("发布成功"),e.$refs.logAdd&&e.$refs.logAdd.resetInfo(),e.refreshLogList()}).catch(function(){e.sendLoading=!1})}else this.$message.error("请输入跟进内容")},handleClick:function(t){var e=this;if(this.handleType==t?this.handleType="":this.handleType=t,"log"==t)this.isTaskCreate=!1,this.$nextTick(function(){e.$refs.logAdd&&(e.$refs.logAdd.isUnfold=e.handleType==t)});else if("task"==t)this.isTaskCreate=!0,this.$nextTick(function(){e.$refs.taskAdd.inputFocus()});else{this.isTaskCreate=!1;var i={type:"relative",crmType:this.crmType,data:{}};"contacts"==this.crmType?(i.data.customer=Object(y.t)(this.detail),"business"==t&&(i.relativeData={contactsId:this.detail.contactsId})):"customer"==this.crmType?i.data.customer=Object(y.t)(this.detail):"business"==this.crmType?(i.data.customer=Object(y.t)(this.detail),i.data.business=Object(y.t)(this.detail),"contacts"==t&&(i.relativeData={businessId:this.detail.businessId})):"contract"==this.crmType&&(i.data.customer=Object(y.t)(this.detail),i.data.contract=Object(y.t)(this.detail)),this.createActionInfo=i,this.createCRMType=t,this.isCRMCreate=!0}},initInfo:function(){var t=this;this.$nextTick(function(){t.$refs.logAdd&&t.$refs.logAdd.resetInfo(),t.$refs.taskAdd&&t.$refs.taskAdd.resetSendData()}),this.filterValue={search:"",timeLine:{label:"全部",value:""}},this.getLogTypeList(),this.showRelate&&this.getContactsList()},refreshLogList:function(t){this.isSearchRequest=t||!1,this.page=1,this.noMore=!1,this.list=[],this.scrollKey=Date.now()},handleSelectClick:function(t){this.activityType=t,this.refreshLogList()},timeTypeChange:function(t){this.filterValue.timeLine=t,this.refreshLogList()},getLogList:function(){var t=this;this.loading=!0;var e={module:this.crmType,page:this.page,crmType:x.a[this.crmType],activity_type:this.activityType.command||"",activity_type_id:this.id};this.filterValue.search&&(e.search=this.filterValue.search),this.filterValue.timeLine.type&&("custom"===this.filterValue.timeLine.type?(e.start_date=this.filterValue.timeLine.startTime.replace(/\./g,"-"),e.end_date=this.filterValue.timeLine.endTime.replace(/\./g,"-")):e.interval_day=this.filterValue.timeLine.value||""),Object(r.c)(e).then(function(e){if(t.loading=!1,!t.noMore)if(t.page++,t.list.length){var i=t.list[t.list.length-1];e.data.time&&e.data.list.length&&i.time!=e.data.time&&t.list.push(e.data)}else e.data.time&&e.data.list.length&&t.list.push(e.data);t.noMore=e.data.lastPage,t.isSearchRequest&&t.$nextTick(function(){t.$refs.activitySearchInput.focus()})}).catch(function(){t.noMore=!0,t.loading=!1})},createCRMSuccess:function(){this.handleType="",this.refreshLogList()},createCRMClose:function(){this.isCRMCreate=!1,this.handleType=""},checkCRMDetail:function(t,e){this.relationID=e,this.relationCrmType=t,this.showFullDetail=!0},getActivityIcon:function(t){return this.getXrIcon(this.getActivityType(t))},getActivityTypeColor:function(t){return this.getXrIconColor(this.getActivityType(t))},logCellDelete:function(t,e,i){this.list[i].list.splice(e,1),0==this.list[i].list.length&&this.list.splice(i,1),this.scrollKey=Date.now()},logCellEdit:function(t,e,i){this.logEditData=t,this.logEditPosition={seciton:i,index:e},this.logEditDialogVisible=!0},logEditSave:function(t){this.logEditPosition.seciton>=0&&this.logEditPosition.index>=0&&this.list[this.logEditPosition.seciton].list.splice(this.logEditPosition.index,1,t),this.getLogList()}}},j=(i("N8+3"),Object(g.a)(D,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.getLogList,expression:"getLogList"}],key:t.scrollKey,staticClass:"main",attrs:{"infinite-scroll-distance":"100","infinite-scroll-disabled":"scrollDisabled"}},[i("div",[!t.isSeas&&t.handle&&t.handle.length?i("div",{staticClass:"main-handle"},t._l(t.handle,function(e,s){return i("el-button",{key:s,class:{"is-select":t.handleType===e.type},attrs:{type:"primary",icon:"wk wk-add"},on:{click:function(i){t.handleClick(e.type)}}},[t._v("\n "+t._s(e.label)+"\n ")])})):t._e(),t._v(" "),!t.isSeas&&t.handle&&t.handle.length?[!t.isTaskCreate&&t.canCreateFollowRecord?i("log-add",{ref:"logAdd",staticClass:"log-add",attrs:{id:t.id,"show-business":t.showRelate,"show-contacts":t.showRelate,contacts:t.contacts,"contacts-id":t.contactsId,"follow-types":t.followTypes,"crm-type":t.crmType},on:{send:t.sendLog,focus:function(e){t.handleType="log"},close:function(e){t.handleClick(t.handleType)}}}):i("task-quick-add",{ref:"taskAdd",staticClass:"task-quick-add",attrs:{params:t.taskParams,props:t.taskProps},on:{focus:function(e){t.handleType="task"},send:t.refreshLogList}})]:t._e(),t._v(" "),i("div",{staticClass:"log",class:{"is-top":t.handle&&0==t.handle.length}},[i("flexbox",{staticClass:"log__header",attrs:{justify:"flex-end"}},[i("el-input",{ref:"activitySearchInput",attrs:{placeholder:"关键字搜索","prefix-icon":"el-icon-search"},nativeOn:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.debouncedRefreshLogList(!0)}},model:{value:t.filterValue.search,callback:function(e){t.$set(t.filterValue,"search",e)},expression:"filterValue.search"}}),t._v(" "),i("time-type-select",{attrs:{width:190,options:t.timeOptions,"default-type":t.filterValue.timeLine},on:{change:t.timeTypeChange}}),t._v(" "),t.typeList.length>1?i("el-dropdown",{attrs:{trigger:"click"},on:{command:t.handleSelectClick}},[i("span",{staticClass:"el-dropdown-link"},[i("i",{class:["wk","dropdown-icon","wk-"+t.activityType.icon],style:{backgroundColor:t.activityType.color}}),t._v(t._s(t.activityType.label)),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.typeList,function(e,s){return i("el-dropdown-item",{key:s,attrs:{command:e}},[i("i",{class:["wk","dropdown-icon","wk-"+e.icon],style:{backgroundColor:e.color}}),t._v(t._s(e.label))])}))],1):t._e()],1),t._v(" "),t._l(t.list,function(e,s){return i("div",{key:s,staticClass:"log-section"},[i("div",{staticClass:"log-section__title"},[i("span",{staticClass:"section-title"},[i("span",{staticClass:"section-title__time"},[t._v(t._s(e.time))])])]),t._v(" "),t._l(e.list,function(a,n){return[1==a.type?i("div",{key:n,staticClass:"log-cell",class:{"only-one":1==e.list.length}},[i("log-cell",{attrs:{item:a,section:s,index:n,"can-delete":!t.isSeas},on:{"crm-detail":t.checkCRMDetail,delete:t.logCellDelete,edit:t.logCellEdit}}),t._v(" "),i("i",{staticClass:"wk wk-message log-cell__mark"})],1):i("div",{key:n,staticClass:"log-cell activity-cell",class:{"only-one":1==e.list.length}},[2==a.type?i("div",{staticClass:"activity-cell"},[i("span",{staticClass:"activity-cell__label"},[t._v(t._s(a.update_time)+" "+t._s(a.create_user_name)+"创建了"+t._s(t.getActivityTypeName(a.activity_type))+":")]),i("span",{staticClass:"activity-cell__content",on:{click:function(e){t.checkCRMDetail(t.getActivityType(a.activity_type),a.activity_type_id)}}},[t._v(t._s(a.activity_type_name||"查看详情"))])]):3==a.type?i("div",{staticClass:"activity-cell"},[i("span",{staticClass:"activity-cell__label"},[t._v(t._s(a.update_time)+" "+t._s(a.create_user_name)+"将商机:")]),t._v(" "),i("span",{staticClass:"activity-cell__content",on:{click:function(e){t.checkCRMDetail("business",a.activity_type_id)}}},[t._v(t._s(a.activity_type_name))]),t._v(" "),i("span",[t._v(t._s(" "+a.content))])]):4==a.type?i("log-cell",{attrs:{item:a,section:s,index:n,"can-delete":""},on:{"crm-detail":t.checkCRMDetail,delete:t.logCellDelete}}):t._e(),t._v(" "),i("i",{staticClass:"log-cell__mark",class:t.getActivityIcon(a.activity_type),staticStyle:{"background-color":"#FB9323"},style:{backgroundColor:t.getActivityTypeColor(a.activity_type)}})],1)]})],2)}),t._v(" "),t.loading?i("p",{staticClass:"scroll-bottom-tips"},[t._v("加载中...")]):t._e(),t._v(" "),t.noMore?i("p",{staticClass:"scroll-bottom-tips"},[t._v("没有更多了")]):t._e()],2)],2),t._v(" "),t.isCRMCreate?i("c-r-m-all-create",{attrs:{"crm-type":t.createCRMType,action:t.createActionInfo},on:{"save-success":t.createCRMSuccess,close:t.createCRMClose}}):t._e(),t._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:t.showFullDetail,"crm-type":t.relationCrmType,id:t.relationID},on:{"update:visible":function(e){t.showFullDetail=e}}}),t._v(" "),i("log-edit-dialog",{attrs:{visible:t.logEditDialogVisible,data:t.logEditData},on:{"update:visible":function(e){t.logEditDialogVisible=e},save:t.logEditSave}})],1)},[],!1,null,"344bab02",null));j.options.__file="index.vue";e.a=j.exports},epE4:function(t,e,i){},"gQl/":function(t,e,i){},m1cH:function(t,e,i){"use strict";e.__esModule=!0;var s,a=i("rfXi"),n=(s=a)&&s.__esModule?s:{default:s};e.default=function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e