(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-13e6","chunk-6d9c","chunk-0069","chunk-9aaa","chunk-9aaae","chunk-9aaae9","chunk-7be5","chunk-445a","chunk-6a8c"],{"0H8t":function(t,e,i){"use strict";var a=i("QVgs");i.n(a).a},"1F+2":function(t,e,i){},"2MCj":function(t,e,i){"use strict";var a=i("1F+2");i.n(a).a},"3ojK":function(t,e,i){"use strict";var a=i("c2Co"),s=i("4XAY"),n=i("Ew9n"),o=i("raay"),l=i("eOwn"),r=i("BzA1"),c=i("w4ZA"),d=i("3gPr"),u=i("CjUg"),p=i("8OTK"),h=i("f6dm"),m={name:"LeadsDetail",components:{SlideView:n.a,CRMDetailHead:o.a,Activity:l.a,CRMEditBaseInfo:c.a,RelativeFiles:d.a,RelativeHandle:u.a,ImportInfo:r.a,CRMAllCreate:p.default},mixins:[h.a],props:{id:[String,Number],listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,crmType:"leads",headDetails:[{title:"姓名",value:""},{title:"线索来源",value:""},{title:"手机",value:""},{title:"负责人",value:""},{title:"创建时间",value:""}],tabCurrentName:"Activity",isCreate:!1,showImportInfo:!0,importList:[]}},computed:{activityHandle:function(){var t=[];return this.canCreateFollowRecord&&(t=[{type:"log",label:"写跟进"}]),t},tabNames:function(){return[{label:"活动",name:"Activity"},{label:"详细资料",name:"CRMEditBaseInfo"},{label:this.getTabName("附件",this.tabsNumber.fileCount),name:"RelativeFiles"},{label:"操作记录",name:"RelativeHandle"}]}},mounted:function(){},methods:{getDetial:function(){var t=this;this.loading=!0,Object(a.i)({id:this.id}).then(function(e){t.detailData=e.data,0!==t.detailData.dataAuth&&(t.headDetails[0].value=e.data.name,t.headDetails[1].value=e.data.source,t.headDetails[2].value=e.data.mobile,t.headDetails[3].value=e.data.owner_user_id_info.realname||"",t.headDetails[4].value=e.data.create_time,t.loading=!1)}).catch(function(){t.loading=!1,t.hideView()}),this.getBaseInfo()},getBaseInfo:function(){var t=this;this.loading=!0,Object(s.y)({id:this.id,types:"crm_"+this.crmType,action_id:this.id,module:"crm",controller:this.crmType,action:"read",system:1}).then(function(e){t.importList=e.data,t.loading=!1}).catch(function(){t.loading=!1})},hideView:function(){this.$emit("hide-view")}}},f=(i("H4tY"),i("KHd+")),v=Object(f.a)(m,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("slide-view",{directives:[{name:"empty",rawName:"v-empty",value:!t.canShowDetail,expression:"!canShowDetail"}],attrs:{"listener-ids":t.listenerIDs,"no-listener-ids":t.noListenerIDs,"no-listener-class":t.noListenerClass,"body-style":{padding:0,height:"100%"},"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"},on:{afterEnter:t.viewAfterEnter,close:t.hideView}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"crmDetailMain",staticClass:"detail-main"},[t.canShowDetail&&t.detailData?i("flexbox",{staticClass:"d-container",attrs:{direction:"column",align:"stretch"}},[i("c-r-m-detail-head",{attrs:{detail:t.detailData,"head-details":t.headDetails,id:t.id,"crm-type":t.crmType},on:{handle:t.detailHeadHandle,close:t.hideView}},[i("template",{slot:"name"},[i("el-tooltip",{attrs:{content:0==t.detailData.star?"添加关注":"取消关注",effect:"dark",placement:"top"}},[i("i",{staticClass:"wk wk-focus-on focus-icon",class:{active:0!=t.detailData.star},on:{click:function(e){t.toggleStar()}}})])],1)],2),t._v(" "),i("flexbox",{staticClass:"d-container-bd",attrs:{align:"stretch"}},[i("el-tabs",{staticClass:"d-container-bd--left",attrs:{type:"border-card"},model:{value:t.tabCurrentName,callback:function(e){t.tabCurrentName=e},expression:"tabCurrentName"}},t._l(t.tabNames,function(e,a){return i("el-tab-pane",{key:a,attrs:{label:e.label,name:e.name,lazy:""}},[i(e.name,{tag:"component",attrs:{detail:t.detailData,id:t.id,handle:t.activityHandle,"crm-type":t.crmType}})],1)})),t._v(" "),i("transition",{attrs:{name:"slide-fade"}},[i("el-tabs",{directives:[{name:"show",rawName:"v-show",value:t.showImportInfo,expression:"showImportInfo"}],staticClass:"d-container-bd--right",attrs:{value:"chiefly-contacts",type:"border-card"}},[i("el-tab-pane",{attrs:{label:"重要信息",name:"chiefly-contacts",lazy:""}},[i("import-info",{staticClass:"import-info",attrs:{list:t.importList}})],1)],1)],1)],1)],1):t._e()],1),t._v(" "),i("el-button",{staticClass:"firse-button",on:{click:function(e){t.showImportInfo=!t.showImportInfo}}},[t._v("重"),i("br"),t._v("要"),i("br"),t._v("信"),i("br"),t._v("息"),i("br"),i("i",{staticClass:"el-icon-arrow-right el-icon--right",class:{"is-reverse":!t.showImportInfo}})]),t._v(" "),t.isCreate?i("c-r-m-all-create",{attrs:{action:{type:"update",id:t.id,batchId:t.detailData.batchId},"crm-type":t.crmType},on:{"save-success":t.editSaveSuccess,close:function(e){t.isCreate=!1}}}):t._e()],1)},[],!1,null,"dd0dbed6",null);v.options.__file="Detail.vue";e.a=v.exports},"3z7q":function(t,e,i){"use strict";i.r(e);var a=i("7Qib"),s=i("3ojK"),n=i("1bNe"),o=i("gwiD"),l=i("vV2+"),r=i("mVxz"),c=i("tMlD"),d=i("ALhW"),u=i("slnp"),p=i("pKm3"),h=i("QbLZ"),m=i.n(h),f=i("VmBU"),v=i("Ir+r"),_=i("Ew9n"),y=i("MdnP"),g=i("hwzM"),b=i("/407"),w=i("BsgX"),C=i("KmSi"),k=i("dPzk"),D=i("z7oh"),T=i("L2JU"),L=i("jHPx"),x={name:"LogDetail",components:{SlideView:_.a,PictureListView:y.a,FileCell:g.a,RelatedBusinessCell:b.a,ReportMenu:w.a,ReportList:C.a,ReplyComment:k.a,CommentList:D.a,CRMFullScreenDetail:function(){return Promise.resolve().then(i.bind(null,"3z7q"))}},props:{id:[String,Number],noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,detail:null,relatedID:"",relatedCRMType:"",showRelatedDetail:!1,reportList:[{type:"customer",key:"customerNum",info:"今日新增客户",name:"今日新增客户 0"},{type:"business",key:"businessNum",info:"今日新增商机",name:"今日新增商机 0"},{type:"contract",key:"contractNum",info:"今日新增合同",name:"今日新增合同 0"},{type:"receivables",key:"receivablesMoneyNum",info:"今日新增回款",name:"今日新增回款 0"},{type:"record",key:"recordNum",info:"今日新增跟进记录",name:"今日新增跟进记录 0"}],reportListShow:!1,fieldReportList:null,reportData:{title:"",placeholder:"",crmType:"",request:null,recordRequest:f.j,params:null,paging:!0,sortable:!1},commentLoading:!1,replyList:[]}},computed:m()({},Object(T.b)(["userInfo"]),{relatedListData:function(){for(var t={},e=["contacts","customer","business","contract"],i=0;i0&&(t[a]=s)}return t}}),watch:{id:function(){this.viewAfterEnter()}},mounted:function(){},beforeDestroy:function(){},methods:{viewAfterEnter:function(){this.detail=null,this.getDetail()},getDetail:function(){var t=this;this.loading=!0,Object(f.i)({log_id:this.id}).then(function(e){if(t.detail=e.data.list,t.replyList=t.detail.replyList,t.detail.bulletin){var i=t.detail.bulletin||{};t.reportList=t.reportList.map(function(t){return"receivablesMoney"==t.key&&(i.receivablesMoney=Object(L.h)(Math.floor(i.receivablesMoney||0))),t.name=t.info+" "+i[t.key],t})}t.loading=!1}).catch(function(){t.loading=!1,t.hideView()})},checkRelatedDetail:function(t,e){this.relatedID=e[t+"_id"],this.relatedCRMType=t,this.showRelatedDetail=!0},hideView:function(){this.$emit("close"),this.$emit("hide-view")},reportSelect:function(t,e){e=this.detail,t.type&&(this.reportData.title="销售简报-"+t.info,this.reportData.placeholder={customer:"请输入客户名称",business:"请输入商机名称",contract:"请输入合同名称",receivables:"请输入回款编号",record:""}[t.type],this.reportData.crmType=t.type,this.reportData.params=e?{log_id:e.log_id}:{today:1},this.reportData.params.type={customer:1,business:2,contract:3,receivables:4,record:5}[t.type],"record"==t.type?(this.fieldReportList=[{label:"模块",prop:"types",width:300},{label:"新增跟进记录数",prop:"dataCount"}],this.reportData.request=f.f,this.reportData.paging=!1,this.reportData.sortable=!1):(this.fieldReportList=this.getReportFieldList(t.type),this.reportData.request=f.h,this.reportData.paging=!0,this.reportData.sortable="custom"),this.reportListShow=!0)},getReportFieldList:function(t){return{customer:[{label:"客户名称",prop:"name"},{label:"成交状态",prop:"deal_status"},{label:"最后跟进时间",prop:"last_time"},{label:"创建时间",prop:"create_time"},{label:"负责人",prop:"owner_user_name"}],business:[{label:"商机名称",prop:"name"},{label:"商机阶段",prop:"status_name"},{label:"最后跟进时间",prop:"last_time"},{label:"创建时间",prop:"create_time"},{label:"负责人",prop:"owner_user_name"}],contract:[{label:"合同名称",prop:"name"},{label:"合同状态",prop:"check_status"},{label:"创建时间",prop:"create_time"},{label:"公司签约人",prop:"order_user_name"}],receivables:[{label:"回款编号",prop:"number"},{label:"回款时间",prop:"return_time"},{label:"负责人",prop:"owner_user_name"}]}[t]},getCommentList:function(){var t=this;Object(v.b)({type_id:this.id,type:2}).then(function(e){var i=e.data||[];t.replyList=i}).catch(function(){})},closeOtherReply:function(t){!t&&this.$refs.comment_list&&this.$refs.comment_list.closeReply()},deleteComment:function(t){this.replyList.splice(t,1)},handleReply:function(t){var e=this;this.commentLoading=!0,Object(v.d)({type:2,content:t,log_id:this.id}).then(function(t){t.data.userInfo={user_id:e.userInfo.id,realname:e.userInfo.realname,img:e.userInfo.img},t.data.childCommentList=[],e.$refs.f_reply.commentsTextarea="",e.replyList.push(t.data),e.commentLoading=!1}).catch(function(){e.commentLoading=!1})}}},I=(i("lXhq"),i("KHd+")),R=Object(I.a)(x,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("slide-view",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"d-view",attrs:{"no-listener-class":t.noListenerClass,"body-style":{padding:0,height:"100%"},"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"},on:{afterEnter:t.viewAfterEnter,close:t.hideView}},[t.detail?i("div",{staticClass:"main",attrs:{direction:"column",align:"stretch"}},[i("flexbox",{staticClass:"detail-header"},[i("div",{staticClass:"header-icon"},[i("i",{staticClass:"wk wk-log"})]),t._v(" "),i("div",{staticClass:"header-name"},[t._v("日志")])]),t._v(" "),i("div",{staticClass:"main__bd"},[i("div",{staticClass:"main__bd--info"},[i("div",{staticClass:"content"},[t.detail.content?i("div",{staticClass:"content-box"},[i("div",{staticClass:"content-title"},[t._v("\n 今日工作内容:\n ")]),t._v(" "),i("div",{staticClass:"content-text"},[t._v(t._s(t.detail.content))])]):t._e(),t._v(" "),t.detail.tomorrow?i("div",{staticClass:"content-box"},[i("div",{staticClass:"content-title"},[t._v("\n 明日工作的内容:\n ")]),t._v(" "),i("div",{staticClass:"content-text"},[t._v(t._s(t.detail.tomorrow))])]):t._e(),t._v(" "),t.detail.question?i("div",{staticClass:"content-box"},[i("div",{staticClass:"content-title"},[t._v("\n 遇到的问题:\n ")]),t._v(" "),i("div",{staticClass:"content-text"},[t._v(t._s(t.detail.question))])]):t._e()]),t._v(" "),0!==t.detail.imgList.length?i("picture-list-view",{attrs:{list:t.detail.imgList}}):t._e(),t._v(" "),t.detail.sendUserList&&t.detail.sendUserList.length?i("flexbox",{staticClass:"send-list"},[i("span",{staticClass:"send-list__label"},[t._v("发送给:")]),t._v(" "),t._l(t.detail.sendUserList,function(t,e){return i("span",{key:e,staticClass:"send-list__user"},[i("xr-avatar",{attrs:{name:t.realname,size:32,src:t.img||t.thumb_img,id:t.user_id,disabled:!1,trigger:"hover"}})],1)})],2):t._e(),t._v(" "),t.detail.fileList.length?i("div",{staticClass:"section"},[i("div",{staticClass:"section__hd"},[i("i",{staticClass:"wukong wukong-file"}),t._v(" "),i("span",[t._v("附件")]),t._v(" "),i("span",[t._v("("+t._s(t.detail.fileList.length)+")")])]),t._v(" "),i("div",{staticClass:"section__bd"},t._l(t.detail.fileList,function(e,a){return i("file-cell",{key:a,attrs:{data:e,list:t.detail.file,"cell-index":a}})}))]):t._e(),t._v(" "),Object.keys(t.relatedListData).length>0?i("div",{staticClass:"section"},[i("div",{staticClass:"section__hd"},[i("i",{staticClass:"wukong wukong-relevance"}),t._v(" "),i("span",[t._v("相关信息")])]),t._v(" "),i("div",{staticClass:"section__bd"},t._l(t.relatedListData,function(e,a){return i("div",{key:a},t._l(e,function(e,s){return i("related-business-cell",{key:s,attrs:{data:e,"cell-index":s,type:a,"show-foot":!1},nativeOn:{click:function(i){t.checkRelatedDetail(a,e)}}})}))}))]):t._e(),t._v(" "),t.detail.bulletin?i("div",{staticClass:"section"},[i("div",{staticClass:"section__hd"},[i("i",{staticClass:"wk wk-briefing"}),t._v(" "),i("span",[t._v("销售简报")])]),t._v(" "),i("div",{staticClass:"section__bd"},[i("report-menu",{attrs:{list:t.reportList},on:{select:t.reportSelect}})],1)]):t._e()],1),t._v(" "),i("el-tabs",{staticClass:"commont",attrs:{value:"commont",type:"border-card"}},[i("el-tab-pane",{attrs:{label:"回复",name:"commont"}},[i("reply-comment",{directives:[{name:"loading",rawName:"v-loading",value:t.commentLoading,expression:"commentLoading"}],ref:"f_reply",on:{toggle:t.closeOtherReply,reply:t.handleReply}}),t._v(" "),t.replyList.length>0?i("comment-list",{ref:"comment_list",attrs:{id:t.id,list:t.replyList,type:"2"},on:{delete:t.deleteComment,"close-other-reply":function(e){t.$refs.f_reply.toggleFocus(!0)}}}):t._e()],1)],1)],1)],1):t._e(),t._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:t.showRelatedDetail,"crm-type":t.relatedCRMType,id:t.relatedID},on:{"update:visible":function(e){t.showRelatedDetail=e}}}),t._v(" "),i("report-list",{attrs:{show:t.reportListShow,title:t.reportData.title,placeholder:t.reportData.placeholder,"crm-type":t.reportData.crmType,request:t.reportData.request,params:t.reportData.params,"record-request":t.reportData.recordRequest,"field-list":t.fieldReportList,paging:t.reportData.paging,sortable:t.reportData.sortable},on:{"update:show":function(e){t.reportListShow=e}}})],1)},[],!1,null,"db43e2ba",null);R.options.__file="LogDetail.vue";var S=R.exports,$=i("FoeY"),F=i("jM2j"),O={name:"NoticeDetail",components:{SlideView:_.a,NewDialog:F.a},props:{id:[String,Number],noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,detail:null,announcementAddShow:!1}},computed:m()({},Object(T.b)(["oa"]),{permissionUpdate:function(){return this.oa&&this.oa.announcement&&this.oa.announcement.update},permissionDelete:function(){return this.oa&&this.oa.announcement&&this.oa.announcement.delete},moreTypes:function(){var t=[];return this.permissionUpdate&&t.push({type:"edit",name:"编辑",icon:"edit"}),this.permissionDelete&&t.push({type:"delete",name:"删除",icon:"delete"}),t}}),watch:{id:function(t){this.detail=null,this.getDetail()}},mounted:function(){this.getDetail()},beforeDestroy:function(){},methods:{getDetail:function(){var t=this;this.loading=!0,Object($.c)({announcement_id:this.id}).then(function(e){t.detail=e.data,t.loading=!1}).catch(function(){t.loading=!1,t.hideView()})},handleTypeDrop:function(t){"delete"==t?this.deleteDetail():this.announcementAddShow=!0},deleteDetail:function(){var t=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object($.b)({announcement_id:t.id}).then(function(e){t.$emit("delete"),t.$message({type:"success",message:"删除成功!"}),t.hideView()}).catch(function(){})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},hideView:function(){this.$emit("close"),this.$emit("hide-view")}}},j=(i("Eef2"),Object(I.a)(O,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("slide-view",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"d-view",attrs:{"no-listener-class":t.noListenerClass,"body-style":{padding:0,height:"100%"},"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"},on:{close:t.hideView}},[t.detail?i("div",{staticClass:"main",attrs:{direction:"column",align:"stretch"}},[i("flexbox",{staticClass:"detail-header"},[i("div",{staticClass:"header-icon"},[i("i",{staticClass:"wk wk-log"})]),t._v(" "),i("div",{staticClass:"header-name"},[t._v("公告")]),t._v(" "),t.moreTypes.length>0?i("el-dropdown",{attrs:{trigger:"click"},on:{command:t.handleTypeDrop}},[i("el-button",{attrs:{icon:"el-icon-more"}}),t._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.moreTypes,function(e,a){return i("el-dropdown-item",{key:a,attrs:{icon:t._f("wkIconPre")(e.icon),command:e.type}},[t._v(t._s(e.name))])}))],1):t._e()],1),t._v(" "),i("div",{staticClass:"detail-title"},[t._v(t._s(t.detail.title))]),t._v(" "),i("div",{staticClass:"detail-time"},[t._v(t._s(t.detail.update_time))]),t._v(" "),i("div",{staticClass:"main__bd"},[t._v(t._s(t.detail.content))])],1):t._e(),t._v(" "),t.announcementAddShow?i("new-dialog",{attrs:{action:{type:"update",id:t.id,data:t.detail}},on:{onSubmit:t.getDetail,close:function(e){t.announcementAddShow=!1}}}):t._e()],1)},[],!1,null,"7982a90d",null));j.options.__file="NoticeDetail.vue";var M=j.exports,A=i("0dur"),N=i("uSKd"),E={name:"CRMFullScreenDetail",components:{LeadsDetail:s.a,CustomerDetail:n.a,ContactsDetail:o.a,BusinessDetail:l.a,ContractDetail:r.a,ProductDetail:c.a,ReceivablesDetail:d.a,ExamineDetail:u.a,TaskDetail:p.a,LogDetail:S,NoticeDetail:M,VisitDetail:A.a,InvoiceDetail:N.a},props:{id:[String,Number],crmType:{type:String,default:""},visible:{type:Boolean,default:!1}},data:function(){return{showDetail:!1}},computed:{tabName:function(){return"leads"==this.crmType?"LeadsDetail":"customer"==this.crmType?"CustomerDetail":"contacts"==this.crmType?"ContactsDetail":"business"==this.crmType?"BusinessDetail":"contract"==this.crmType?"ContractDetail":"product"==this.crmType?"ProductDetail":"receivables"==this.crmType?"ReceivablesDetail":"examine"==this.crmType?"ExamineDetail":"task"==this.crmType?"TaskDetail":"log"==this.crmType?"LogDetail":"announcement"==this.crmType?"NoticeDetail":"visit"==this.crmType?"VisitDetail":"invoice"==this.crmType?"InvoiceDetail":""}},watch:{visible:function(t){this.showDetail=t,t&&(document.body.appendChild(this.$el),this.$el.addEventListener("click",this.handleDocumentClick,!1),this.$el.style.zIndex=Object(a.q)())},showDetail:function(t){var e=this;t||setTimeout(function(){e.$emit("update:visible",!1)},350)}},mounted:function(){this.visible&&(document.body.appendChild(this.$el),this.$el.addEventListener("click",this.handleDocumentClick,!1),this.$el.style.zIndex=Object(a.q)())},beforeDestroy:function(){this.$el&&this.$el.parentNode&&(this.$el.parentNode.removeChild(this.$el),this.$el.removeEventListener("click",this.handleDocumentClick,!1))},methods:{hiddenView:function(){this.showDetail=!1},handleDocumentClick:function(t){this.$el==t.target&&(this.showDetail=!1)},detailHandle:function(t){"alloc"!==t.type&&"get"!==t.type&&"transfer"!==t.type&&"transform"!==t.type&&"delete"!==t.type&&"put_seas"!==t.type||(this.showDetail=!1),this.$emit("handle",t)}}},V=(i("P5Gt"),Object(I.a)(E,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"full-container"},[t.id&&t.showDetail?i(t.tabName,t._b({tag:"component",staticClass:"d-view",attrs:{"crm-type":t.crmType,id:t.id},on:{handle:t.detailHandle,"hide-view":t.hiddenView}},"component",t.$attrs,!1)):t._e()],1)},[],!1,null,"58dcfa68",null));V.options.__file="CRMFullScreenDetail.vue";e.default=V.exports},"5ctX":function(t,e,i){},"6Mk1":function(t,e,i){},"73/Y":function(t,e,i){},BsgX:function(t,e,i){"use strict";var a={name:"ReportMenu",components:{},mixins:[i("Z+Ht").a],props:{list:Array},data:function(){return{}},computed:{},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{itemClick:function(t){this.$emit("select",t)}}},s=(i("2MCj"),i("KHd+")),n=Object(s.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",{staticClass:"report-menu"},t._l(t.list,function(e,a){return i("span",{key:a,staticClass:"report-menu-btn",on:{click:function(i){t.itemClick(e)}}},[i("i",{staticClass:"report-menu-btn__icon",class:t.getXrIcon(e.type),style:{color:t.getXrIconColor(e.type)}}),t._v(" "),i("span",{staticClass:"report-menu-btn__name"},[t._v(t._s(e.name))])])}))},[],!1,null,"37799401",null);n.options.__file="ReportMenu.vue";e.a=n.exports},BzA1:function(t,e,i){"use strict";var a=i("a/5N"),s={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(a.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(a.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(a.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)(s,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,a){return i("p",{key:a,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},Eef2:function(t,e,i){"use strict";var a=i("H/ow");i.n(a).a},"H/ow":function(t,e,i){},H4tY:function(t,e,i){"use strict";var a=i("6Mk1");i.n(a).a},"I+NK":function(t,e,i){"use strict";var a=i("PWYh");i.n(a).a},JTNW:function(t,e,i){},KmSi:function(t,e,i){"use strict";var a=i("YEIV"),s=i.n(a),n=i("QbLZ"),o=i.n(n),l=i("4XAY"),r=i("ZoMv"),c=i("yPq4"),d=i("O8VQ"),u=i("Ew9n"),p={name:"RecordList",components:{LogCell:d.a,SlideView:u.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-6d9c"),i.e("chunk-9aaae9")]).then(i.bind(null,"3z7q"))}},filters:{crmIconClass:function(t){return"wk wk-"+r.a.convertTypeToKey(t)},crmName:function(t){return r.a.convertTypeToName(t)}},props:{crmType:String,request:Function,params:Object,listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,page:1,noMore:!1,list:[],scrollKey:Date.now(),showFullDetail:!1,relationID:"",relationCrmType:""}},computed:{crmIcon:function(){var t=this.crmType.replace("crm_","");return i("p3hS")("./"+t+".png")},scrollDisabled:function(){return this.loading||this.noMore}},watch:{params:function(){this.refreshList()}},mounted:function(){},methods:{refreshList:function(){this.page=1,this.list=[],this.noMore=!1,this.scrollKey=Date.now()},getList:function(){var t=this;this.loading=!0,this.request(o()({page:this.page,limit:15},this.params,{label:1,activity_type:{crm_leads:1,crm_customer:2,crm_contacts:3,crm_business:5,crm_contract:6}[this.crmType]})).then(function(e){t.page++,t.list=t.list.concat(e.data.list),t.noMore=e.data.lastPage,t.loading=!1}).catch(function(){t.noMore=!0,t.loading=!1})},checkRelationDetail:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.relationID=e,this.relationCrmType=i?r.a.convertTypeToKey(t):t,this.showFullDetail=!0},hideView:function(){this.$emit("hide")}}},h=(i("0H8t"),i("KHd+")),m=Object(h.a)(p,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("slide-view",{staticClass:"d-view",attrs:{"listener-ids":t.listenerIDs,"no-listener-ids":t.noListenerIDs,"no-listener-class":t.noListenerClass,"body-style":{padding:0,height:"100%"}},on:{close:t.hideView}},[i("flexbox",{staticClass:"t-section"},[i("img",{staticClass:"t-img",attrs:{src:t.crmIcon}}),t._v(" "),i("div",{staticClass:"t-name"},[t._v("跟进记录")])]),t._v(" "),i("div",{staticClass:"t-content"},[i("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.getList,expression:"getList"}],key:t.scrollKey,attrs:{"infinite-scroll-disabled":"scrollDisabled","infinite-scroll-distance":"100"}},t._l(t.list,function(e,a){return i("log-cell",{key:a,attrs:{item:e,index:a,"can-delete":!1},on:{"crm-detail":t.checkRelationDetail}},[i("div",{staticClass:"relate-cell",on:{click:function(i){t.checkRelationDetail(e.activity_type,e.activity_type_id,!0)}}},[i("i",{staticClass:"relate-cell-icon",class:t._f("crmIconClass")(e.activity_type)}),t._v(" "),i("span",{staticClass:"relate-cell-type"},[t._v(t._s(t._f("crmName")(e.activity_type))+"-")]),t._v(" "),i("span",{staticClass:"relate-cell-name"},[t._v(t._s(e.activity_type_name))])])])})),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()]),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}}})],1)},[],!1,null,"54aab209",null);m.options.__file="RecordList.vue";var f=m.exports,v=i("L2JU"),_=i("4peS"),y=i.n(_),g=i("dAOq"),b={name:"ReportList",components:{CRMAllDetail:c.a,RecordList:f},filters:{dealIcon:function(t){return"已成交"==t?"wk wk-success deal-suc":"wk wk-close deal-un"},dealName:function(t){return"已成交"==t?"已成交":"未成交"}},mixins:[g.a],props:{show:{type:Boolean,default:!1},title:String,placeholder:{type:String,default:"请输入搜索内容"},crmType:String,fieldList:Array,recordRequest:Function,request:Function,params:Object,paging:{type:Boolean,default:!0},sortable:{type:[Boolean,String],default:!1}},data:function(){return{inputContent:"",loading:!1,tableHeight:this.getTableHeight(),list:[],showFieldList:[],sortData:{},currentPage:1,pageSize:y.a.get("crmPageSizes")||15,pageSizes:[15,30,60,100],total:0,rowID:"",rowType:"",showDview:!1,recordParams:{},recordShow:!1}},computed:o()({},Object(v.b)(["crm"]),{showExamineStatus:function(){return"contract"==this.crmType&&"receivables"==this.crmType},showFillColumn:function(){return!this.fieldList||!this.fieldList.length}}),watch:{show:function(t){t&&this.initInfo()}},mounted:function(){this.$el.addEventListener("click",this.handleDocumentClick,!1)},destroyed:function(){this.$el&&this.$el.removeEventListener("click",this.handleDocumentClick,!1)},methods:{getTableHeight:function(){var t=document.documentElement.clientHeight;return t-.2*t-200},initInfo:function(){var t=this;this.inputContent="",this.showFieldList=[],this.sortData={},this.$nextTick(function(){t.$refs.crmTable.clearSort()}),this.list=[],this.currentPage=1,window.onresize=function(){t.tableHeight=t.getTableHeight()},this.fieldList?(this.showFieldList=this.fieldList,this.getList()):this.getFieldList()},searchInput:function(){this.currentPage=1,this.getList()},getList:function(){var t=this;this.loading=!0;var e={};e={page:this.currentPage,limit:this.pageSize,types:"crm_"+this.crmType=="crm_record"?"crm_activity":"crm_"+this.crmType},this.placeholder&&(e.search=this.inputContent),this.sortData.order&&(e.order_field={create_user_name:"create_user_id",owner_user_name:"owner_user_id",customer_name:"customer_id",type_id_info:"type_id",status_id_info:"status_id",business_name:"business_id",contacts_name:"contacts_id",order_user_name:"order_user_id",category_name:"category_id",contract_num:"contract_id",contract_number:"contract_id",plan_id_info:"plan_id"}[this.sortData.prop]||this.sortData.prop,e.order_type="ascending"==this.sortData.order?"asc":"desc"),this.request(o()({},e,this.params,s()({},"record"!=this.crmType&&"log_type",{customer:1,business:2,receivables:4,contract:3}[this.crmType]))).then(function(e){t.paging?(t.list=e.data.list,t.total=e.data.dataCount):t.list=e.data,t.loading=!1}).catch(function(){t.loading=!1})},getFieldList:function(){var t=this;if(0==this.showFieldList.length){this.loading=!0;var e="business_status"==this.crmType?"business":this.crmType,i={types:"crm_record"==r.a[e]?"crm_activity":r.a[e],module:"crm",action:"index",controller:this.crmType};Object(l.A)(i).then(function(e){for(var i=0;i0);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(v.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,"2caf5be7",null);b.options.__file="LogAdd.vue";var w=b.exports,C=i("O8VQ"),k=i("/G0b"),D=i("8OTK"),T=i("C3Po"),L=i("ZoMv"),x=i("Z+Ht"),I=i("vvxI"),R=i("ZX9L"),S=i("ehos"),$=i("L2JU"),F={name:"Activity",components:{LogAdd:w,LogCell:C.a,CRMAllCreate:D.default,TaskQuickAdd:T.a,TimeTypeSelect:R.a,LogEditDialog:k.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-024e"),i.e("chunk-6d9c"),i.e("chunk-0069"),i.e("chunk-9aaae")]).then(i.bind(null,"3z7q"))}},mixins:[x.a,I.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($.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(S.debounce)(300,this.refreshLogList),this.initInfo()},methods:{getLogTypeList:function(){var t=this;Object(r.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.I)({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:L.a.keyToTypeData[this.crmType],activity_type_id:t.id,content:t.content,next_time:t.nextTime||"",is_event:0,file_id:[].concat(s()(t.files.map(function(t){return t.file_id})),s()(t.images.map(function(t){return t.file_id}))),business_ids:[].concat(s()(t.business.map(function(t){return t.business_id}))),contacts_ids:t.contactsId};this.sendLoading=!0,Object(c.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(v.t)(this.detail),"business"==t&&(i.relativeData={contactsId:this.detail.contactsId})):"customer"==this.crmType?i.data.customer=Object(v.t)(this.detail):"business"==this.crmType?(i.data.customer=Object(v.t)(this.detail),i.data.business=Object(v.t)(this.detail),"contacts"==t&&(i.relativeData={businessId:this.detail.businessId})):"contract"==this.crmType&&(i.data.customer=Object(v.t)(this.detail),i.data.contract=Object(v.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:L.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(c.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()}}},O=(i("N8+3"),Object(g.a)(F,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,a){return i("el-button",{key:a,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,a){return i("el-dropdown-item",{key:a,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,a){return i("div",{key:a,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(s,n){return[1==s.type?i("div",{key:n,staticClass:"log-cell",class:{"only-one":1==e.list.length}},[i("log-cell",{attrs:{item:s,section:a,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==s.type?i("div",{staticClass:"activity-cell"},[i("span",{staticClass:"activity-cell__label"},[t._v(t._s(s.update_time)+" "+t._s(s.create_user_name)+"创建了"+t._s(t.getActivityTypeName(s.activity_type))+":")]),i("span",{staticClass:"activity-cell__content",on:{click:function(e){t.checkCRMDetail(t.getActivityType(s.activity_type),s.activity_type_id)}}},[t._v(t._s(s.activity_type_name||"查看详情"))])]):3==s.type?i("div",{staticClass:"activity-cell"},[i("span",{staticClass:"activity-cell__label"},[t._v(t._s(s.update_time)+" "+t._s(s.create_user_name)+"将商机:")]),t._v(" "),i("span",{staticClass:"activity-cell__content",on:{click:function(e){t.checkCRMDetail("business",s.activity_type_id)}}},[t._v(t._s(s.activity_type_name))]),t._v(" "),i("span",[t._v(t._s(" "+s.content))])]):4==s.type?i("log-cell",{attrs:{item:s,section:a,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(s.activity_type),staticStyle:{"background-color":"#FB9323"},style:{backgroundColor:t.getActivityTypeColor(s.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));O.options.__file="index.vue";e.a=O.exports},epE4:function(t,e,i){},fx3D:function(t,e,i){"use strict";var a=i("PLZ3");i.n(a).a},lXhq:function(t,e,i){"use strict";var a=i("5ctX");i.n(a).a},m1cH:function(t,e,i){"use strict";e.__esModule=!0;var a,s=i("rfXi"),n=(a=s)&&a.__esModule?a:{default:a};e.default=function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e1?{icon:e[0],color:e[1]}:{icon:"wk wk-approve",color:"#9376FF"}}}}},slnp:function(t,e,i){"use strict";var a=i("7qmR"),s=i("Ew9n"),n=i("3biH"),o=i("/407"),l=i("hwzM"),r=i("7Qib"),c=i("oWzH"),d={name:"ExamineDetail",components:{SlideView:s.a,ExamineInfo:n.a,RelatedBusinessCell:o.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-6d9c"),i.e("chunk-0069"),i.e("chunk-7be5")]).then(i.bind(null,"3z7q"))},FileCell:l.a},filters:{fileName:function(t){return(t.name&&t.name.length>10?t.name.substring(0,10)+"...":t.name)+"("+Object(r.h)(t.size)+")"}},mixins:[c.a],props:{id:[String,Number],detailIndex:[String,Number],detailSection:[String,Number],noListenerClass:{type:Array,default:function(){return["list-box"]}}},data:function(){return{loading:!1,category_id:"",type:"",detail:null,list:[],category_name:"",fileList:[],imgList:[],travelList:[],travelField:[{prop:"vehicle",label:"交通工具"},{prop:"trip",label:"单程往返"},{prop:"start_address",label:"出发城市"},{prop:"end_address",label:"目的城市"},{prop:"start_time",label:"开始时间"},{prop:"end_time",label:"结束时间"},{prop:"duration",label:"时长(天)"},{prop:"description",label:"备注"}],expensesField:[{prop:"start_address",label:"出发城市"},{prop:"end_address",label:"目的城市"},{prop:"start_time",label:"开始时间"},{prop:"end_time",label:"结束时间"},{prop:"traffic",label:"交通费(元)"},{prop:"stay",label:"住宿费(元)"},{prop:"diet",label:"餐饮费(元)"},{prop:"other",label:"其他费用(元)"},{prop:"description",label:"费用明细描述"}],relatedID:"",relatedCRMType:"",showRelatedDetail:!1}},computed:{relatedListData:function(){for(var t=this,e={},i=["contacts","customer","business","contract"],a=function(a){var s=i[a],n=t.detail[s+"List"]||[];n.length>0&&(e[s]=n.map(function(t){return t.id&&(t[s+"Id"]=t.id),t}))},s=0;s0&&this.$bus.emit("preview-image-bus",{index:i,data:e.map(function(t){return t.file_path&&(t.url=t.file_path),t})}):"download"===t&&Object(r.d)({path:e.url,name:e.name})},imgZoom:function(t,e){this.$bus.emit("preview-image-bus",{index:e,data:t.map(function(t){return t.file_path&&(t.url=t.file_path),t})})},downloadFile:function(t){Object(r.d)({path:t.url,name:t.name})},examineHandle:function(t){this.$emit("on-examine-handle",t,this.detailIndex),this.$emit("handle",t,this.detailIndex)}}},u=(i("dDIi"),i("KHd+")),p=Object(u.a)(d,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("slide-view",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"d-view",attrs:{"listener-ids":["workbench-main-container"],"no-listener-class":t.noListenerClass},on:{afterEnter:t.viewAfterEnter,close:t.hideView}},[t.detail?i("flexbox",{staticClass:"detail-main",attrs:{orient:"vertical"}},[i("flexbox",{staticClass:"detail-header"},[i("div",{staticClass:"header-icon",style:{backgroundColor:t.detailIcon.color}},[i("i",{class:["wk","wk-"+t.detailIcon.icon]})]),t._v(" "),i("div",{staticClass:"header-name"},[t._v(t._s(t.category_name))])]),t._v(" "),i("div",{staticClass:"detail-body"},[i("flexbox",{attrs:{gutter:0,align:"stretch",wrap:"wrap"}},t._l(t.list,function(e,a){return"examine_cause"!==e.form_type&&"business_cause"!==e.form_type?i("flexbox-item",{key:a,staticClass:"b-cell",attrs:{span:.5}},["checkbox"===e.form_type?i("div",{staticClass:"b-cell-b"},[i("div",{staticClass:"b-cell-name"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"b-cell-value"},[i("flexbox",{staticStyle:{padding:"0px 10px 10px 0px"},attrs:{gutter:0,wrap:"wrap"}},t._l(e.value,function(e,a){return i("div",{key:a},[t._v("\n "+t._s(e)+"  \n ")])}))],1)]):"file"===e.form_type?i("div",{staticClass:"b-cell-b"},[i("div",{staticClass:"b-cell-name"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"b-cell-value"},t._l(e.value,function(a,s){return i("flexbox",{key:s,staticClass:"f-item"},[i("i",{staticClass:"wukong wukong-file f-img"}),t._v(" "),i("div",{staticClass:"f-name"},[t._v(t._s(t._f("fileName")(a)))]),t._v(" "),i("el-button",{attrs:{type:"text"},nativeOn:{click:function(i){t.handleFile("preview",e.value,s)}}},[t._v("预览")]),t._v(" "),i("el-button",{attrs:{type:"text"},nativeOn:{click:function(e){t.handleFile("download",a,s)}}},[t._v("下载")])],1)}))]):i("div",{staticClass:"b-cell-b"},[i("div",{staticClass:"b-cell-name"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"b-cell-value"},[t._v(t._s(e.value))])])]):t._e()})),t._v(" "),t.imgList.length>0?i("div",{staticClass:"img-box"},t._l(t.imgList,function(e,a){return i("div",{key:a,staticClass:"img-list",on:{click:function(e){t.imgZoom(t.imgList,a)}}},[i("img",{directives:[{name:"src",rawName:"v-src",value:e.file_path,expression:"imgItem.file_path"}],key:e.file_path})])})):t._e(),t._v(" "),t.fileList.length?i("div",{staticClass:"section"},[i("div",{staticClass:"section__hd"},[i("i",{staticClass:"wukong wukong-file"}),t._v(" "),i("span",[t._v("附件")]),t._v(" "),i("span",[t._v("("+t._s(t.fileList.length)+")")])]),t._v(" "),i("div",{staticClass:"section__bd"},t._l(t.fileList,function(e,a){return i("file-cell",{key:a,attrs:{data:e,list:t.fileList,"cell-index":a}})}))]):t._e(),t._v(" "),t.type&&3==t.type&&t.travelList&&t.travelList.length>0?i("div",{staticClass:"table-sections"},[i("div",{staticClass:"table-sections__title"},[t._v("行程")]),t._v(" "),i("el-table",{staticStyle:{"font-size":"13px"},attrs:{data:t.travelList,align:"center","header-align":"center",stripe:""}},t._l(t.travelField,function(t,e){return i("el-table-column",{key:e,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":""}})}))],1):t._e(),t._v(" "),t.type&&5==t.type&&t.travelList&&t.travelList.length>0?i("div",{staticClass:"table-sections"},[i("div",{staticClass:"table-sections__title"},[t._v("报销")]),t._v(" "),i("el-table",{staticStyle:{"font-size":"13px"},attrs:{data:t.travelList,align:"center","header-align":"center",stripe:""}},[t._l(t.expensesField,function(t,e){return i("el-table-column",{key:e,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":""}})}),t._v(" "),i("el-table-column",{attrs:{label:"发票",width:"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("flexbox",{attrs:{justify:"center"}},[i("el-button",{attrs:{type:"text"},nativeOn:{click:function(i){t.handleFile("preview",e.row.imgList,0)}}},[t._v(t._s(e.row.imgList?e.row.imgList.length:0)+"张")])],1)]}}])})],2)],1):t._e(),t._v(" "),Object.keys(t.relatedListData).length>0?i("div",{staticClass:"section"},[i("div",{staticClass:"section__hd"},[i("i",{staticClass:"wukong wukong-relevance"}),t._v(" "),i("span",[t._v("相关信息")])]),t._v(" "),i("div",{staticClass:"section__bd"},t._l(t.relatedListData,function(e,a){return i("div",{key:a},t._l(e,function(e,s){return i("related-business-cell",{key:s,attrs:{data:e,"cell-index":s,type:a,"show-foot":!1},nativeOn:{click:function(i){t.checkRelatedDetail(a,e)}}})}))}))]):t._e(),t._v(" "),i("div",{staticClass:"examine-section"},[i("examine-info",{staticClass:"create-sections-content",attrs:{id:t.id,"record-id":t.detail.flow_id,"examine-type":"oa_examine"},on:{"on-handle":t.examineHandle}})],1)],1)],1):t._e(),t._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:t.showRelatedDetail,"crm-type":t.relatedCRMType,id:t.relatedID},on:{"update:visible":function(e){t.showRelatedDetail=e}}})],1)},[],!1,null,"a857c570",null);p.options.__file="ExamineDetail.vue";e.a=p.exports},t1Sh:function(t,e,i){"use strict";var a=i("Lc7H");i.n(a).a}}]);