You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm/static/js/chunk-c52a.c36c2abc.js

1 line
122 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c52a","chunk-34a4","chunk-9acd","chunk-5b3b"],{"/G0b":function(t,e,i){"use strict";var a=i("m1cH"),s=i.n(a),n=i("KTTK"),l=i("6iAj"),o=i("4XAY"),c=i("7Dod"),r=i("7Qib"),u=i("mkuN"),d=i("zMq1"),h=i("ye9D"),m=i("NYF1"),p=i("YIeP"),f=i("ZoMv"),v={name:"LogEditDialog",components:{CrmRelative:u.a,AddImageList:d.a,AddFileList:h.a,AddRelateList:m.a,CommonWords:p.a},props:{visible:{type:Boolean,required:!0,default:!1},data:Object},data:function(){return{loading:!1,crmType:"",content:"",imgFiles:[],businessAction:{},files:[],showBusinessPopover:!1,business:[],contacts:[],selectContactsId:"",followTypes:[],followType:"",next_time:"",showRelativeType:"",batchId:""}},computed:{autosize:function(){return{minRows:4,maxRows:8}},id:function(){return this.data?this.data.activity_type_id:""},showBusiness:function(){return"customer"==this.crmType},showContacts:function(){return this.showBusiness}},watch:{visible:{handler:function(t){if(t){var e=f.a.convertTypeToKey(this.data.activity_type);this.crmType!=e&&(this.crmType=e),this.handleDetailInfo(Object(r.t)(this.data))}},immediate:!0,deep:!0},id:{handler:function(){this.businessAction={type:"condition",data:{moduleType:this.crmType,customerId:this.id}}},immediate:!0}},created:function(){},beforeDestroy:function(){},methods:{handleDetailInfo:function(t){var e=this;this.showContacts&&this.getContactsList(),0==this.followTypes.length&&this.getLogTypeList(),this.content=t.content,this.imgFiles=t.imgList||[];var i=t.fileList||[];this.files=i.map(function(t){return t.icon=e.getFileTypeIcon(t.name),t});var a=t.business_list||[];this.business=a.map(function(t){return{businessName:t.name,business_id:t.business_id}}),this.selectContactsId=t.contacts_ids&&parseInt(t.contacts_ids),this.followType=t.category,this.next_time=t.next_time,this.batchId=t.batchId},getFileTypeIcon:function(t){if(!t)return"";var e=t?t.split("."):[],i="";return i=e.length>0?e[e.length-1]:"",Object(r.n)(i)},getLogTypeList:function(){var t=this;Object(l.r)().then(function(e){t.followTypes=e.data.map(function(t){return{value:t,label:t}})}).catch(function(){})},getContactsList:function(){var t=this;Object(c.y)({customer_id:this.id}).then(function(e){t.contacts=e.data.list}).catch(function(){})},getDefalutFollowType:function(){this.followTypes&&this.followTypes.length>0?this.followType=this.followTypes[0].value:this.followType=""},resetInfo:function(){this.next_time="",this.content="",this.imgFiles=[],this.files=[],this.business=[],this.selectContactsId=this.contactsId||"",this.showRelativeType="",this.batchId="",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;i<e.length;i++){if(-1==e[i].type.indexOf("image")&&"img"==this.showRelativeType)return void this.$message.error("请上传正确的文件类型")}for(var a="image/*"==t.target.accept?"img":"file",s=0;s<e.length;s++){var n=e[s];this.uploadFileRequest(n,a)}t.target.value=""}},uploadFileRequest:function(t,e,i){var a=this;this.$wkUploadFile.upload({file:t,params:{type:e,batchId:this.batchId}}).then(function(s){var n=s.res.data||{};n.size=Object(r.h)(t.size),"img"==e?a.imgFiles.push(n):(n.icon=Object(r.o)(t),a.files.push(n)),i&&i()}).catch(function(){})},deleteImage:function(t,e){this.deleteImgOrFile("image",t,e)},deleteFile:function(t,e){this.deleteImgOrFile("file",t,e)},deleteImgOrFile:function(t,e,i){var a=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.c)({module:"crm_"+a.crmType,module_id:e.file_id,save_name:e.save_name}).then(function(e){"image"==t?a.imgFiles.splice(i,1):a.files.splice(i,1),a.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteAllFile:function(t){var e=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.e)({module:"crm_"+e.crmType,module_id:e.id,file_id:[].concat(s()(e.imgFiles.map(function(t){return t.file_id})),s()(e.files.map(function(t){return t.file_id}))),batchId:e.batchId,type:t}).then(function(i){2==t?e.imgFiles=[]:e.files=[],e.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteRelate:function(t,e){this.business.splice(e,1)},inputFocus:function(){var t=this;this.$nextTick(function(){t.$refs.textarea.focus(),t.$emit("focus")})},handleConfirm:function(){var t=this;if(this.content){var e={};e.activity_id=this.data.activity_id,e.activity_type=this.data.activity_type,e.activity_type_id=this.id,e.content=this.content,e.category=this.followType,e.file_id=[].concat(s()(this.imgFiles.map(function(t){return t.file_id})),s()(this.files.map(function(t){return t.file_id})));var i=this.business.map(function(t){return t.business_id||t.id});e.batchId=this.batchId,e.business_ids=i,e.contacts_ids=this.contacts_id,e.next_time=this.next_time||"",e.is_event=0,this.loading=!0,Object(o.e)(e).then(function(e){t.loading=!1,t.$message.success("编辑成功"),t.$emit("save",e.data),t.handleCancel()}).catch(function(){t.loading=!1})}else this.$message.error("请输入跟进内容")},handleCancel:function(){this.$emit("update:visible",!1)}}},y=(i("uX/8"),i("KHd+")),b=Object(y.a)(v,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{visible:t.visible,"append-to-body":!0,"close-on-click-modal":!1,title:"编辑跟进记录",width:"700px","custom-class":"no-padding-dialog"},on:{close:t.handleCancel}},[i("div",{staticClass:"mix-content"},[i("div",{staticClass:"mix-content__body"},[i("div",{staticClass:"mix-content-select"},[t.showContacts?i("el-select",{attrs:{clearable:"",placeholder:"选择联系人"},model:{value:t.selectContactsId,callback:function(e){t.selectContactsId=e},expression:"selectContactsId"}},t._l(t.contacts,function(t){return i("el-option",{key:t.contacts_id,attrs:{label:t.name,value:t.contacts_id}})})):t._e(),t._v(" "),i("el-select",{attrs:{clearable:"",placeholder:"选择跟进方式"},model:{value:t.followType,callback:function(e){t.followType=e},expression:"followType"}},t._l(t.followTypes,function(t){return i("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),t._v(" "),i("el-date-picker",{attrs:{editable:!1,type:"datetime",placeholder:"选择下次联系时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.next_time,callback:function(e){t.next_time=e},expression:"next_time"}}),t._v(" "),i("common-words",{on:{select:t.commonWordsSelect}})],1),t._v(" "),i("div",{staticClass:"i-cont"},[i("el-input",{ref:"textarea",attrs:{autosize:t.autosize,maxlength:800,type:"textarea",clearable:"",resize:"none",placeholder:"请输入内容"},on:{focus:t.inputFocus},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}})],1),t._v(" "),t.imgFiles.length>0?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?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?i("add-relate-list",{attrs:{data:t.business,type:"business"},on:{delete:t.deleteRelate}}):t._e()],1),t._v(" "),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()],1),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}})]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{nativeOn:{click:function(e){return t.handleCancel(e)}}},[t._v("取消")]),t._v(" "),i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:t.handleConfirm,expression:"handleConfirm"}],attrs:{type:"primary"}},[t._v("确定")])],1)])},[],!1,null,"6939bfe3",null);b.options.__file="LogEditDialog.vue";e.a=b.exports},"0H8t":function(t,e,i){"use strict";var a=i("QVgs");i.n(a).a},"0dur":function(t,e,i){"use strict";var a=i("zhwh"),s=i("Ew9n"),n=i("raay"),l=i("w4ZA"),o=i("3gPr"),c=i("CjUg"),r=i("8OTK"),u=i("h59h"),d=i("f6dm"),h={name:"VisitDetail",components:{SlideView:s.a,CRMDetailHead:n.a,CRMEditBaseInfo:l.a,RelativeFiles:o.a,RelativeHandle:c.a,CRMAllCreate:r.default,Sections:u.a},mixins:[d.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:"visit",headDetails:[{title:"客户名称",value:""},{title:"回访时间",value:""},{title:"回访人",value:""},{title:"回访形式",value:""}],tabCurrentName:"CRMEditBaseInfo",isCreate:!1}},computed:{tabNames:function(){return[{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.d)({id:this.id}).then(function(e){t.loading=!1,t.detailData=e.data,t.headDetails[0].value=e.data.customer_name,t.headDetails[1].value=e.data.visit_time,t.headDetails[2].value=e.data.owner_user_name,t.headDetails[3].value=e.data.shape}).catch(function(){t.loading=!1,t.hideView()})},hideView:function(){this.$emit("hide-view")},editSaveSuccess:function(){this.$emit("handle",{type:"save-success"}),this.getDetial()},previewImage:function(t,e){this.$bus.emit("preview-image-bus",{index:e,data:t})}}},m=(i("tPTb"),i("KHd+")),p=Object(m.a)(h,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}}),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,"crm-type":t.crmType}})],1)}))],1)],1):t._e()],1),t._v(" "),t.isCreate?i("c-r-m-all-create",{attrs:{action:{type:"update",id:t.id,batchId:t.detailData.batchId,editDetail:t.detailData},"crm-type":t.crmType},on:{"save-success":t.editSaveSuccess,close:function(e){t.isCreate=!1}}}):t._e()],1)},[],!1,null,"1000b537",null);p.options.__file="Detail.vue";e.a=p.exports},"0obv":function(t,e,i){"use strict";var a=i("GTvT");i.n(a).a},"2/Ty":function(t,e,i){},"31UX":function(t,e,i){"use strict";var a=i("QbLZ"),s=i.n(a),n=i("4d7F"),l=i.n(n),o=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:o.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 l.a(function(a,n){t(s()({},e,{excel_types:i,excel_type:1})).then(function(t){Object(r.c)(t),a&&a(t)}).catch(function(t){n&&n(t)})})}},deactivated:function(){}}},"3ojK":function(t,e,i){"use strict";var a=i("c2Co"),s=i("4XAY"),n=i("Ew9n"),l=i("raay"),o=i("eOwn"),c=i("BzA1"),r=i("w4ZA"),u=i("3gPr"),d=i("CjUg"),h=i("8OTK"),m=i("f6dm"),p={name:"LeadsDetail",components:{SlideView:n.a,CRMDetailHead:l.a,Activity:o.a,CRMEditBaseInfo:r.a,RelativeFiles:u.a,RelativeHandle:d.a,ImportInfo:c.a,CRMAllCreate:h.default},mixins:[m.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,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("S46B"),i("KHd+")),v=Object(f.a)(p,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,"5e62f8fc",null);v.options.__file="Detail.vue";e.a=v.exports},"4q81":function(t,e,i){"use strict";var a=i("Rsh9");i.n(a).a},"73/Y":function(t,e,i){},"77fj":function(t,e,i){"use strict";var a=i("Btlj");i.n(a).a},"8uxz":function(t,e,i){"use strict";i.d(e,"a",function(){return s}),i.d(e,"b",function(){return n}),i.d(e,"c",function(){return l});var a=i("t3Un");function s(t){return Object(a.a)({url:"bi/business/businessTrend",method:"post",data:t,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function n(t){return Object(a.a)({url:"bi/business/trendList",method:"post",data:t,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function l(t){return Object(a.a)({url:"bi/business/win",method:"post",data:t,headers:{"Content-Type":"application/json;charset=UTF-8"}})}},"9/X1":function(t,e,i){"use strict";var a=i("gQl/");i.n(a).a},"9usl":function(t,e,i){},ALhW:function(t,e,i){"use strict";var a=i("1DpC"),s=i("Ew9n"),n=i("raay"),l=i("w4ZA"),o=i("3gPr"),c=i("CjUg"),r=i("RE/G"),u=i("8OTK"),d=i("3biH"),h=i("f6dm"),m=i("jHPx"),p={name:"ReceivablesDetail",components:{SlideView:s.a,CRMDetailHead:n.a,CRMEditBaseInfo:l.a,RelativeFiles:o.a,RelativeHandle:c.a,RelativePrint:r.a,ExamineInfo:d.a,CRMAllCreate:u.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:"receivables",name:"",headDetails:[{title:"客户名称",value:""},{title:"合同金额",value:""},{title:"合同名称",value:""},{title:"回款日期",value:""},{title:"回款金额",value:""},{title:"负责人",value:""}],tabCurrentName:"CRMEditBaseInfo",isCreate:!1}},computed:{tabNames:function(){return[{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.loading=!1,t.name=e.data.number,t.detailData=e.data,t.headDetails[0].value=e.data.customer_id_info.name,t.headDetails[1].value=Object(m.h)(e.data.contract_id_info.money||0),t.headDetails[2].value=e.data.contract_id_info.name,t.headDetails[3].value=e.data.return_time,t.headDetails[4].value=Object(m.h)(e.data.money||0),t.headDetails[5].value=e.data.owner_user_name}).catch(function(){t.loading=!1,t.hideView()})},hideView:function(){this.$emit("hide-view")},examineHandle:function(){this.$emit("handle",{type:"examine"})}}},f=(i("l5fv"),i("KHd+")),v=Object(f.a)(p,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}}),t._v(" "),t.detailData.flow_id?i("examine-info",{staticClass:"examine-info",attrs:{id:t.id,"record-id":t.detailData.flow_id,"owner-user-id":t.detailData.owner_user_id,"examine-type":"crm_receivables"},on:{"on-handle":t.examineHandle}}):t._e(),t._v(" "),i("div",{staticClass:"d-container-bd"},[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,"crm-type":t.crmType}})],1)}))],1)],1):t._e()],1),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,"01a39834",null);v.options.__file="Detail.vue";e.a=v.exports},AeXB:function(t,e,i){},Btlj:function(t,e,i){},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+")),l=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);l.options.__file="ImportInfo.vue";e.a=l.exports},CMIa:function(t,e,i){"use strict";var a=i("KTTK"),s=i("ERJp"),n=i("6iAj"),l=i("UCfG"),o=i("HHBN"),c=i("ZX9L"),r=i("wd/R"),u=i.n(r),d={name:"FiltrateHandleView",components:{TimeTypeSelect:c.a,XhStructureCell:l.a,XhUserCell:o.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(a.m)(e).then(function(e){t.userOptions=e.data}).catch(function(){t.$emit("error")})},getBusinessStatusList:function(t){var e=this;Object(s.t)().then(function(i){var a=i.data||[];e.businessOptions=a.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+")),m=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);m.options.__file="FiltrateHandleView.vue";e.a=m.exports},D67r:function(t,e,i){},GTvT:function(t,e,i){},"I+NK":function(t,e,i){"use strict";var a=i("PWYh");i.n(a).a},IHqA:function(t,e,i){},JBWo:function(t,e,i){"use strict";var a=i("k3SN");i.n(a).a},JftJ:function(t,e,i){"use strict";var a=i("i2VW");i.n(a).a},KmSi:function(t,e,i){"use strict";var a=i("YEIV"),s=i.n(a),n=i("QbLZ"),l=i.n(n),o=i("4XAY"),c=i("ZoMv"),r=i("yPq4"),u=i("O8VQ"),d=i("Ew9n"),h={name:"RecordList",components:{LogCell:u.a,SlideView:d.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-2704"),i.e("chunk-4ee54a4")]).then(i.bind(null,"3z7q"))}},filters:{crmIconClass:function(t){return"wk wk-"+c.a.convertTypeToKey(t)},crmName:function(t){return c.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(l()({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?c.a.convertTypeToKey(t):t,this.showFullDetail=!0},hideView:function(){this.$emit("hide")}}},m=(i("0H8t"),i("KHd+")),p=Object(m.a)(h,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);p.options.__file="RecordList.vue";var f=p.exports,v=i("L2JU"),y=i("4peS"),b=i.n(y),_=i("dAOq"),g={name:"ReportList",components:{CRMAllDetail:r.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:[_.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:b.a.get("crmPageSizes")||15,pageSizes:[15,30,60,100],total:0,rowID:"",rowType:"",showDview:!1,recordParams:{},recordShow:!1}},computed:l()({},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(l()({},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"==c.a[e]?"crm_activity":c.a[e],module:"crm",action:"index",controller:this.crmType};Object(o.A)(i).then(function(e){for(var i=0;i<e.data.length;i++){var a=e.data[i],s=0;s=a.width?a.width:a.name&&a.name.length<=6?15*a.name.length+45:140,t.showFieldList.push({prop:a.fieldName||a.field,label:a.name,width:s})}t.getList()}).catch(function(){t.loading=!1})}else this.getList()},fieldFormatter:function(t,e){return this.fieldList&&this.fieldList.length&&"types"==e.property?{crm_leads:"线索",crm_customer:"客户",crm_contacts:"联系人",crm_product:"产品",crm_business:"商机",crm_contract:"合同",crm_receivables:"回款",crm_receivables_plan:"回款计划",crm_pool:"公海",crm_visit:"回访",crm_invoice:"发票"}[t[e.property]]:""===t[e.property]||null===t[e.property]?"--":t[e.property]},sortChange:function(t,e,i){this.sortData=t,this.getList()},handleSizeChange:function(t){b.a.set("crmPageSizes",t),this.pageSize=t,this.getList()},handleCurrentChange:function(t){this.currentPage=t,this.getList()},handleRowClick:function(t,e,i){"leads"===this.crmType?"name"===e.property?(this.rowID=t.leads_id,this.showDview=!0):this.showDview=!1:"customer"===this.crmType?"name"===e.property?(this.rowID=t.customer_id,this.rowType="customer",this.showDview=!0):this.showDview=!1:"contacts"===this.crmType?"name"===e.property?(this.rowID=t.contacts_id,this.rowType="contacts",this.showDview=!0):"customer_name"===e.property?(this.rowID=t.customer_id,this.rowType="customer",this.showDview=!0):this.showDview=!1:"business"===this.crmType||"business_status"===this.crmType?"customer_name"===e.property?(this.rowID=t.customer_id,this.rowType="customer",this.showDview=!0):"name"===e.property?(this.rowID=t.business_id,this.rowType="business",this.showDview=!0):this.showDview=!1:"contract"===this.crmType?"name"===e.property?(this.rowID=t.contract_id,this.rowType="contract",this.showDview=!0):"customer_name"===e.property?(this.rowID=t.customer_id,this.rowType="customer",this.showDview=!0):"business_name"===e.property?(this.rowID=t.business_id,this.rowType="business",this.showDview=!0):"contacts_name"===e.property?(this.rowID=t.contacts_id,this.rowType="contacts",this.showDview=!0):"num"===e.property||"name"===e.property?(this.rowID=t.contract_id,this.rowType="contract",this.showDview=!0):this.showDview=!1:"product"===this.crmType?"name"===e.property?(this.rowID=t.product_id,this.showDview=!0):this.showDview=!1:"receivables"===this.crmType?"customer_name"===e.property?(this.rowID=t.customer_id,this.rowType="customer",this.showDview=!0):"contract_num"===e.property?(this.rowID=t.contract_id,this.rowType="contract",this.showDview=!0):"number"===e.property?(this.rowID=t.receivables_id,this.rowType="receivables",this.showDview=!0):this.showDview=!1:"activity"!==this.crmType&&"record"!==this.crmType||("dataCount"===e.property&&t.dataCount?(this.rowType=t.types,this.recordParams=l()({crmType:t.types,queryType:0},this.params),this.recordShow=!0):this.recordShow=!1)},handleHandle:function(t){"alloc"!==t.type&&"get"!==t.type&&"transfer"!==t.type&&"transform"!==t.type&&"delete"!==t.type&&"put_seas"!==t.type||(this.showDview=!1),"edit"!==t.type&&this.getList()},cellClassName:function(t){var e=t.row,i=t.column;t.rowIndex,t.columnIndex;return this.crmType&&("customer_name"===i.property||"business_name"===i.property||"name"===i.property||"contacts_name"===i.property||"num"===i.property||"contract_num"===i.property||"number"===i.property||("activity"===this.crmType||"record"===this.crmType)&&"dataCount"===i.property&&e.dataCount)?"can-visit--underline":""},hideView:function(){this.$emit("update:show",!1),this.$emit("hide")},handleDocumentClick:function(t){var e=!0,i=document.getElementsByClassName("el-table__row");if(i&&e)for(var a=0;a<i.length;a++){if(i[a].contains(t.target)){e=!1;break}}document.getElementById("slide")&&document.getElementById("slide").contains(t.target)&&(e=!1),e&&(this.showDview=!1)}}},w=(i("dtd4"),Object(m.a)(g,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{visible:t.show,"append-to-body":!0,"close-on-click-modal":!1,top:"10vh",width:"80%","custom-class":"no-padding-dialog"},on:{close:t.hideView}},[i("div",{staticClass:"header",attrs:{slot:"title"},on:{click:function(e){t.showDview=!1}},slot:"title"},[i("span",{staticClass:"title"},[t._v(t._s(t.title))]),t._v(" "),t.placeholder?i("el-input",{staticClass:"search-input",attrs:{placeholder:t.placeholder},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.searchInput(e):null}},model:{value:t.inputContent,callback:function(e){t.inputContent=e},expression:"inputContent"}},[i("el-button",{attrs:{slot:"append",icon:"el-icon-search"},nativeOn:{click:function(e){return t.searchInput(e)}},slot:"append"})],1):t._e()],1),t._v(" "),i("div",{staticClass:"container"},[i("div",{staticClass:"content"},[i("div",{staticClass:"list-body"},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"crmTable",staticStyle:{width:"100%"},attrs:{id:"crm-table",data:t.list,height:t.tableHeight,"cell-class-name":t.cellClassName,stripe:"",border:"","highlight-current-row":""},on:{"row-click":t.handleRowClick,"sort-change":t.sortChange}},[t._l(t.showFieldList,function(e,a){return i("el-table-column",{key:a,attrs:{sortable:"pool_day"!=e.prop&&"custom",fixed:0==a,prop:e.prop,label:e.label,width:e.width,"show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return["deal_status"==e.prop?[i("i",{class:t._f("dealIcon")(a.row[e.prop])}),t._v(" "),i("span",[t._v(t._s(t._f("dealName")(a.row[e.prop])))])]:"is_lock"==e.prop?[1==a.row.is_lock?i("i",{staticClass:"wk wk-circle-password customer-lock"}):t._e()]:"check_status"==e.prop?[i("span",{staticClass:"status-mark",style:{backgroundColor:t.getCRMStatusColor(a.row.check_status)}}),t._v(" "),i("span",[t._v(t._s(t.getCRMStatusName(a.row.check_status)))])]:[t._v(t._s(t.fieldFormatter(a.row,a.column)))]]}}])})}),t._v(" "),t.showFillColumn?i("el-table-column"):t._e()],2),t._v(" "),t.paging?i("div",{staticClass:"p-contianer"},[i("el-pagination",{staticClass:"p-bar",attrs:{"current-page":t.currentPage,"page-sizes":t.pageSizes,"page-size":t.pageSize,total:t.total,background:"",layout:"prev, pager, next, sizes, total, jumper"},on:{"update:pageSize":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)]),t._v(" "),i("c-r-m-all-detail",{staticClass:"d-view",attrs:{visible:t.showDview,"crm-type":t.rowType,id:t.rowID},on:{"update:visible":function(e){t.showDview=e},handle:t.handleHandle}}),t._v(" "),t.recordShow?i("record-list",{attrs:{"crm-type":t.rowType,request:t.recordRequest,params:t.recordParams},on:{handle:t.getList,hide:function(e){t.recordShow=!1}}}):t._e()],1)])},[],!1,null,"dd322cba",null));w.options.__file="index.vue";e.a=w.exports},"N8+3":function(t,e,i){"use strict";var a=i("epE4");i.n(a).a},NYF1:function(t,e,i){"use strict";var a={name:"AddRelateList",components:{},props:{data:Array,type:{type:[String,Number],require:!0},label:String},data:function(){return{}},computed:{typeName:function(){return this.label?this.label:{customer:"客户",contacts:"联系人",business:"商机",contract:"合同"}[this.type]}},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{getItemName:function(t){return t[{customer:"customerName",contacts:"name",business:"businessName",contract:"name"}[this.type]]||t.name},deleteItem:function(t,e){this.$emit("delete",t,e,this.type)}}},s=(i("s357"),i("KHd+")),n=Object(s.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("section",{staticClass:"c-cont"},[i("flexbox",{staticClass:"c-header"},[i("i",{class:["wk","wk-"+t.type]}),t._v(" "),i("div",{staticClass:"c-name"},[t._v(t._s(t.typeName))])]),t._v(" "),i("div",{staticClass:"c-body"},[i("flexbox",{attrs:{wrap:"wrap"}},t._l(t.data,function(e,a){return i("flexbox",{key:a,staticClass:"c-item"},[i("div",{staticClass:"c-item-name"},[t._v(t._s(t.getItemName(e)))]),t._v(" "),i("div",{staticClass:"c-item-close",on:{click:function(i){t.deleteItem(e,a)}}},[t._v("×")])])}))],1)],1)},[],!1,null,"60fd2091",null);n.options.__file="AddRelateList.vue";e.a=n.exports},O8VQ:function(t,e,i){"use strict";var a=i("QbLZ"),s=i.n(a),n=i("4XAY"),l=i("Vm8M"),o=i("7Qib"),c=i("Z+Ht"),r=i("vvxI"),u=i("L2JU"),d={name:"LogCell",components:{MapView:l.a},filters:{getFileSize:function(t){return Object(o.h)(t)}},mixins:[c.a,r.a],props:{item:{type:Object,default:function(){return{}}},section:[String,Number],index:[String,Number],canDelete:{type:Boolean,default:!0}},data:function(){return{showMapView:!1,mapViewInfo:{}}},computed:s()({},Object(u.b)(["crm"]),{hasEditAuth:function(){return this.crm&&this.crm.activity&&this.crm.activity.update},hasDeleteAuth:function(){return this.crm&&this.crm.activity&&this.crm.activity.delete},activityIcon:function(){return this.getXrIcon(this.getActivityType(this.item.activity_type))},activityIconColor:function(){return this.getXrIconColor(this.getActivityType(this.item.activity_type))}}),mounted:function(){},methods:{previewImg:function(t,e){this.$bus.emit("preview-image-bus",{index:e,data:t.map(function(t){return t.url=t.file_path,t})})},downloadFile:function(t){Object(o.d)({path:t.file_path,save_name:t.save_name,name:t.name})},handleCommand:function(t){var e=this;"delete"==t?this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){(4==e.item.type?n.d:n.b)({activity_id:e.item.activity_id}).then(function(t){e.$emit("delete",e.item,e.index,e.section),e.$store.dispatch("GetMessageNum"),e.$message.success("操作成功")}).catch(function(){})}).catch(function(){}):"edit"==t&&this.$emit("edit",this.item,this.index,this.section)},checkRelationDetail:function(t,e){this.$emit("crm-detail",t,e)},checkMapView:function(t){t.address&&(this.mapViewInfo={title:t.address,lat:t.lat,lng:t.lng},this.showMapView=!0)}}},h=(i("JBWo"),i("KHd+")),m=Object(h.a)(d,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"fl-c"},[i("flexbox",{staticClass:"fl-h"},[i("xr-avatar",{staticClass:"fl-h-img",attrs:{name:t.item.create_user_name,id:t.item.create_user_id,size:30,src:t.item.thumb_img,disabled:!1}}),t._v(" "),i("div",{staticClass:"fl-h-b"},[i("div",{staticClass:"fl-h-name"},[t._v(t._s(t.item.create_user_name))]),t._v(" "),i("div",{staticClass:"fl-h-time"},[t._v(t._s(t.item.update_time))])]),t._v(" "),t.item.category?i("div",{staticClass:"follow"},[i("span",{staticClass:"follow-info"},[t._v(t._s(t.item.category))])]):t._e(),t._v(" "),i("span",{staticClass:"log-mark",style:{right:t.canDelete?"40px":"15px"}},[i("i",{class:t.activityIcon,style:{color:t.activityIconColor}}),t._v(" "),i("span",{staticClass:"log-mark__label"},[t._v(t._s(t.getActivityTypeName(t.item.activity_type)+"-"+t.getRecordLogTypeName(t.item.type)))])]),t._v(" "),t.canDelete&&(t.hasDeleteAuth||t.hasEditAuth)?i("el-dropdown",{staticClass:"more-drop",attrs:{trigger:"click"},on:{command:t.handleCommand}},[i("i",{staticClass:"el-icon-arrow-down el-icon-more"}),t._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t.hasEditAuth?i("el-dropdown-item",{attrs:{command:"edit"}},[t._v("编辑")]):t._e(),t._v(" "),t.hasDeleteAuth?i("el-dropdown-item",{attrs:{command:"delete"}},[t._v("删除")]):t._e()],1)],1):t._e()],1),t._v(" "),i("div",{staticClass:"fl-b"},[i("div",{staticClass:"fl-b-content"},[t._v(t._s(t.item.content))]),t._v(" "),t.item.imgList&&t.item.imgList.length>0?i("flexbox",{staticClass:"fl-b-images",attrs:{wrap:"wrap"}},t._l(t.item.imgList,function(e,a){return i("div",{directives:[{name:"src",rawName:"v-src:background-image",value:e.file_path,expression:"file.file_path",arg:"background-image"}],key:e.file_path,staticClass:"fl-b-img-item",on:{click:function(e){t.previewImg(t.item.imgList,a)}}})})):t._e(),t._v(" "),t.item.fileList&&t.item.fileList.length>0?i("div",t._l(t.item.fileList,function(e,a){return i("flexbox",{key:a,staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd first-show"},[i("i",{staticClass:"wk wk-file"})]),t._v(" "),i("div",{staticClass:"cell-hd first-show"},[t._v("\n 附件:\n ")]),t._v(" "),i("div",{staticClass:"cell-bd text-one-line"},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),i("div",{staticClass:"cell-ft"},[i("span",{staticClass:"des"},[t._v(""+t._s(t._f("getFileSize")(e.size))+"")]),t._v(" "),i("a",{on:{click:function(e){t.previewImg(t.item.fileList,a)}}},[t._v("预览")]),t._v(" "),i("a",{on:{click:function(i){t.downloadFile(e)}}},[t._v("下载")])])])})):t._e(),t._v(" "),t.item.contacts_list&&t.item.contacts_list.length>0?i("div",[i("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd"},[i("i",{staticClass:"wk wk-contacts"})]),t._v(" "),i("div",{staticClass:"cell-bd"},[t._v("\n 相关联系人:\n ")]),t._v(" "),t._l(t.item.contacts_list,function(e,a){return i("div",{key:a,staticClass:"cell-ft__item text-one-line"},[i("a",{on:{click:function(i){t.checkRelationDetail("contacts",e.contacts_id)}}},[t._v(t._s(e.name))])])})],2)],1):t._e(),t._v(" "),t.item.business_list&&t.item.business_list.length>0?i("div",[i("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd"},[i("i",{staticClass:"wk wk-business"})]),t._v(" "),i("div",{staticClass:"cell-bd"},[t._v("\n 相关商机:\n ")]),t._v(" "),i("div",{staticClass:"cell-ft"},t._l(t.item.business_list,function(e,a){return i("div",{key:a,staticClass:"cell-ft__item text-one-line"},[i("a",{on:{click:function(i){t.checkRelationDetail("business",e.business_id)}}},[t._v(t._s(e.name))])])}))])],1):t._e(),t._v(" "),t.item.next_time?i("div",{staticClass:"cell-top"},[i("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd"},[i("i",{staticClass:"wk wk-time"})]),t._v(" "),i("div",{staticClass:"cell-bd text-one-line"},[t._v("\n 下次联系时间:"+t._s(t.item.next_time)+"\n ")])])],1):t._e(),t._v(" "),t.item.address?i("div",{staticClass:"cell-top"},[i("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd is-address"},[i("i",{staticClass:"wk wk-location"})]),t._v(" "),i("div",{staticClass:"cell-bd text-one-line can-visit--underline",on:{click:function(e){t.checkMapView(t.item)}}},[t._v(t._s(t.item.address))])])],1):t._e()],1),t._v(" "),t.showMapView?i("map-view",{attrs:{title:t.mapViewInfo.title,lat:t.mapViewInfo.lat,lng:t.mapViewInfo.lng},on:{hidden:function(e){t.showMapView=!1}}}):t._e(),t._v(" "),t._t("default")],2)},[],!1,null,"0f095540",null);m.options.__file="LogCell.vue";e.a=m.exports},PWYh:function(t,e,i){},Pcy3:function(t,e,i){},QVgs:function(t,e,i){},Rsh9:function(t,e,i){},S46B:function(t,e,i){"use strict";var a=i("9usl");i.n(a).a},TDiV:function(t,e,i){},Vm8M:function(t,e,i){"use strict";var a=i("7Qib"),s={name:"MapView",components:{},props:{title:{type:String,default:""},lat:{type:[String,Number],default:0},lng:{type:[String,Number],default:0}},data:function(){return{}},computed:{},mounted:function(){var t=this;this.$el.style.zIndex=Object(a.q)(),document.body.appendChild(this.$el),Object(a.l)().then(function(){var e=new BMap.Map("choicemap",{enableMapClick:!1}),i=new BMap.Point(parseFloat(t.lng),parseFloat(t.lat));e.centerAndZoom(i,18),e.enableScrollWheelZoom();var a=new BMap.Marker(i);e.addOverlay(a);var s=new BMap.InfoWindow(t.title);a.addEventListener("click",function(){e.openInfoWindow(s,i)})})},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{hiddenView:function(){this.$emit("hidden")}}},n=(i("I+NK"),i("KHd+")),l=Object(n.a)(s,function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"map-view"},[e("div",{attrs:{id:"choicemap"}}),this._v(" "),e("i",{staticClass:"el-icon-close map-close",on:{click:this.hiddenView}})])},[],!1,null,"33a9f6bf",null);l.options.__file="MapView.vue";e.a=l.exports},WhDH:function(t,e,i){"use strict";var a=i("fV8c");i.n(a).a},Wp0z:function(t,e,i){},"Y+PO":function(t,e,i){},YIeP:function(t,e,i){"use strict";var a=i("4XAY"),s=i("XJYT"),n=i("t2rG"),l={name:"Set",components:{draggable:i.n(n).a},props:{visible:{type:Boolean,required:!0,default:!1},list:Array},data:function(){return{setList:[],isDrag:!1}},computed:{},watch:{list:{handler:function(){this.initInfo()},immediate:!0},visible:function(t){t&&this.initInfo()}},created:function(){},beforeDestroy:function(){},methods:{initInfo:function(){this.setList=this.list.map(function(t){return{value:t}}),0==this.setList.length&&(this.setList=[{value:""}])},close:function(){this.$emit("update:visible",!1)},addClick:function(){this.setList.push({value:""})},deleteClick:function(t){this.setList.splice(t,1)},sureClick:function(){for(var t=this,e=[],i=0;i<this.setList.length;i++){var n=this.setList[i];n.value&&e.push(n.value)}if(0!=e.length){var l=s.Loading.service({target:document.querySelector('.el-dialog[aria-label="常用语管理"]')});Object(a.G)({phrase:e}).then(function(i){l.close(),t.$emit("update",e),t.close()}).catch(function(){l.close()})}else this.$message.error("请输入常用语")},dragEnter:function(){this.isDrag=!0},dragLeave:function(){this.isDrag=!1}}},o=(i("WhDH"),i("KHd+")),c=Object(o.a)(l,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{visible:t.visible,"append-to-body":!0,"close-on-click-modal":!1,title:"常用语管理",width:"600px"},on:{close:t.close}},[i("div",{staticClass:"set"},[i("draggable",{attrs:{options:{group:"list",forceFallback:!1,fallbackClass:"draggingStyle",filter:".el-input__inner",preventOnFilter:!1}},model:{value:t.setList,callback:function(e){t.setList=e},expression:"setList"}},t._l(t.setList,function(e,a){return i("flexbox",{key:a,staticClass:"set-item",class:{"is-drag":t.isDrag}},[i("el-input",{attrs:{maxlength:100},model:{value:e.value,callback:function(i){t.$set(e,"value",i)},expression:"item.value"}},[i("div",{staticClass:"drag-handle",attrs:{slot:"suffix"},on:{mouseenter:t.dragEnter,mouseleave:t.dragLeave},slot:"suffix"},[t._v("⋮⋮")])]),t._v(" "),i("i",{staticClass:"el-icon-remove",on:{click:function(e){t.deleteClick(a)}}})],1)})),t._v(" "),i("el-button",{attrs:{type:"text",icon:"el-icon-circle-plus"},on:{click:t.addClick}},[t._v("添加常用语")])],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:t.sureClick,expression:"sureClick"}],attrs:{type:"primary"}},[t._v("保存")])],1)])},[],!1,null,"1acbaeb8",null);c.options.__file="Set.vue";var r={name:"CommonWords",components:{Set:c.exports},props:{},data:function(){return{loading:!1,showPopover:!1,setShow:!1,list:[]}},computed:{},watch:{showPopover:function(t){t&&0==this.list.length&&this.getCommonWords()}},mounted:function(){},beforeDestroy:function(){},methods:{selectScene:function(t,e){this.$emit("select",t),this.showPopover=!1},setClick:function(){this.setShow=!0},getCommonWords:function(){var t=this;this.loading=!0,Object(a.F)().then(function(e){t.loading=!1,t.list=e.data||[]}).catch(function(){t.loading=!1})},udpateCommonWords:function(t){this.list=t}}},u=(i("q0fG"),Object(o.a)(r,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-popover",{attrs:{placement:"bottom",width:"320",trigger:"click","popper-class":"no-padding-popover"},model:{value:t.showPopover,callback:function(e){t.showPopover=e},expression:"showPopover"}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"common-words"},[i("div",{directives:[{name:"empty",rawName:"v-empty",value:t.list&&0==t.list.length,expression:"list && list.length == 0"}],staticClass:"word",attrs:{"xs-empty-icon":"none"}},t._l(t.list,function(e,a){return i("div",{key:a,staticClass:"word-item",on:{click:function(i){t.selectScene(e,a)}}},[t._v("\n "+t._s(e)+"\n ")])})),t._v(" "),i("div",{staticClass:"handle-interval"},[i("flexbox",{staticClass:"handle-button",nativeOn:{click:function(e){return t.setClick(e)}}},[i("i",{staticClass:"wk wk-manage handle-button-icon"}),t._v(" "),i("div",{staticClass:"handle-button-name"},[t._v("管理")])])],1)]),t._v(" "),i("el-button",{staticClass:"word-button",attrs:{slot:"reference"},slot:"reference"},[t._v("常用语")]),t._v(" "),i("set",{attrs:{visible:t.setShow,list:t.list},on:{"update:visible":function(e){t.setShow=e},update:t.udpateCommonWords}})],1)},[],!1,null,"6ddd3652",null));u.options.__file="index.vue";e.a=u.exports},"Z+Ht":function(t,e,i){"use strict";e.a={methods:{getXrIcon:function(t){return{leads:"wk wk-leads",customer:"wk wk-customer",contacts:"wk wk-contacts",product:"wk wk-product",business:"wk wk-business",contract:"wk wk-contract",receivables:"wk wk-receivables",invoice:"wk wk-invoice",log:"wk wk-log",examine:"wk wk-approve",task:"wk wk-o-task",record:"wk wk-record"}[t]},getXrIconColor:function(t){return{leads:"#704afd",customer:"#487DFF",contacts:"#27BA4A",product:"#26d4da",business:"#FB9323",contract:"#FD5B4A",receivables:"#FFB940",invoice:"#1cbaf5",log:"#5864FF",approve:"#9376FF",task:"#D376FF",record:"#19B5F6"}[t]}}}},ZX9L:function(t,e,i){"use strict";var a={name:"TimeTypeSelect",props:{defaultType:[String,Object],width:{type:Number,default:200},options:{type:Array,default:function(){return[{label:"今天",value:"today"},{label:"昨天",value:"yesterday"},{label:"本周",value:"week"},{label:"上周",value:"lastWeek"},{label:"本月",value:"month"},{label:"上月",value:"lastMonth"},{label:"本季度",value:"quarter"},{label:"上季度",value:"lastQuarter"},{label:"本年",value:"year"},{label:"去年",value:"lastYear"}]}}},data:function(){return{selectType:{label:"本年",value:"year"},showTypePopover:!1,showCustomContent:!1,sureCustomContent:!1,startTime:"",endTime:""}},computed:{typeShowValue:function(){return this.sureCustomContent?this.startTime||this.endTime?(this.startTime||"")+"-"+(this.endTime||""):"":this.selectType.label}},watch:{defaultType:function(){this.selectType.value!=this.defaultType&&(this.selectType=this.getDefaultTypeValue(this.defaultType))}},mounted:function(){void 0!==this.defaultType?"string"==typeof this.defaultType?this.selectType=this.getDefaultTypeValue(this.defaultType):this.defaultType.label?this.selectType=this.defaultType:"default"==this.defaultType.type?this.selectType=this.getDefaultTypeValue(this.defaultType.value):"custom"==this.defaultType.type&&(this.sureCustomContent=!0,this.showCustomContent=!0,this.startTime=this.defaultType.startTime,this.endTime=this.defaultType.endTime):this.$emit("change",{type:"default",value:this.selectType.value})},methods:{getDefaultTypeValue:function(t){for(var e=0;e<this.options.length;e++){var i=this.options[e];if(i.value==t)return i}return{label:"本年",value:"year"}},typeSelectClick:function(t){this.showTypePopover=!1,this.sureCustomContent=!1,this.showCustomContent=!1,this.selectType=t,this.$emit("change",{type:"default",value:this.selectType.value})},customSureClick:function(){this.startTime&&this.endTime&&(this.sureCustomContent=!0,this.showTypePopover=!1,this.$emit("change",{type:"custom",startTime:this.startTime,endTime:this.endTime}))}}},s=(i("77fj"),i("KHd+")),n=Object(s.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-popover",{staticClass:"time-type-select",attrs:{width:t.width,placement:"bottom","popper-class":"no-padding-popover",trigger:"click"},model:{value:t.showTypePopover,callback:function(e){t.showTypePopover=e},expression:"showTypePopover"}},[i("div",{staticClass:"type-popper"},[i("div",{staticClass:"type-content"},[t._l(t.options,function(e,a){return i("div",{key:a,staticClass:"type-content-item",class:{selected:t.selectType.value==e.value&&!t.showCustomContent},on:{click:function(i){t.typeSelectClick(e)}}},[i("div",{staticClass:"mark"}),t._v(t._s(e.label)+"\n ")])}),t._v(" "),i("div",{staticClass:"type-content-item",class:{selected:t.showCustomContent},on:{click:function(e){t.showCustomContent=!0}}},[i("div",{staticClass:"mark"}),t._v("自定义\n ")])],2),t._v(" "),t.showCustomContent?i("div",{staticClass:"type-content-custom"},[i("el-date-picker",{attrs:{type:"date","value-format":"yyyy.MM.dd",placeholder:"选择日期"},model:{value:t.startTime,callback:function(e){t.startTime=e},expression:"startTime"}}),t._v(" "),i("el-date-picker",{attrs:{type:"date","value-format":"yyyy.MM.dd",placeholder:"选择日期"},model:{value:t.endTime,callback:function(e){t.endTime=e},expression:"endTime"}}),t._v(" "),i("el-button",{on:{click:t.customSureClick}},[t._v("确定")])],1):t._e()]),t._v(" "),i("el-input",{staticClass:"type-select",style:{width:t.width+"px"},attrs:{slot:"reference",readonly:!0},slot:"reference",model:{value:t.typeShowValue,callback:function(e){t.typeShowValue=e},expression:"typeShowValue"}},[i("i",{class:["el-icon-arrow-up",{"is-reverse":t.showTypePopover}],attrs:{slot:"suffix"},slot:"suffix"})])],1)},[],!1,null,"20503202",null);n.options.__file="index.vue";e.a=n.exports},ZZZb:function(t,e,i){"use strict";var a=i("Pcy3");i.n(a).a},ZxH2:function(t,e,i){"use strict";i.r(e);var a=i("QbLZ"),s=i.n(a),n=i("8uxz"),l=i("KmSi"),o=i("31UX"),c=i("MT78"),r=i.n(c),u={name:"BusinessWinStatistics",components:{ReportList:l.a},mixins:[o.a],data:function(){return{loading:!1,axisOption:null,list:[],postParams:{},axisList:[],fieldList:[],reportListShow:!1,fieldReportList:[{prop:"business_name",label:"商机名称"},{prop:"customer_name",label:"客户名称"},{prop:"business_type",label:"商机状态组"},{prop:"business_stage",label:"商机阶段"},{prop:"money",label:"商机金额"},{prop:"deal_date",label:"预计成交日期"},{prop:"owner_user_name",label:"负责人"},{prop:"create_time",label:"创建时间"}],reportData:{title:"",placeholder:"",request:null,params:null}}},computed:{},mounted:function(){this.initAxis()},methods:{searchClick:function(t){this.postParams=t,this.getDataList()},getDataList:function(){var t=this;this.loading=!0,Object(n.c)(this.postParams).then(function(e){t.loading=!1,t.axisList=e.data||[];for(var i=[{name:"日期",field:"name"}],a=[],s=[],n=[],l=[],o={name:"转化率"},c=0;c<t.axisList.length;c++){var r=t.axisList[c];a.push(r.business_end),s.push(r.business_num),n.push(r.proportion),l.push(r.type),i.push({name:r.type,field:"type"+c}),o["type"+c]=r.proportion+"%"}t.fieldList=i,t.list=[o],t.axisOption.xAxis[0].data=l,t.axisOption.series[0].data=n,t.axisOption.series[1].data=s,t.axisOption.series[2].data=a,t.chartObj.setOption(t.axisOption,!0)}).catch(function(){t.loading=!1})},cellClassName:function(t){var e=t.row,i=t.column;t.rowIndex,t.columnIndex;return"name"!=i.property&&e[i.property].replace("%","")>0?"can-visit--underline":""},handleRowClick:function(t,e,i){if("name"!=e.property&&t[e.property].replace("%","")>0){this.reportData.title=e.label+"详情",this.reportData.request=n.b;var a=s()({},this.postParams);a.type=e.label,this.reportData.params=a,this.reportListShow=!0}},initAxis:function(){var t=r.a.init(document.getElementById("axismain")),e={color:["#6ca2ff","#6ac9d7","#ff7474"],toolbox:this.toolbox,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:["赢单转化率","商机总数","赢单商机数"],bottom:"0px",itemWidth:14},grid:{top:"40px",left:"40px",right:"40px",bottom:"40px",containLabel:!0,borderColor:"#fff"},xAxis:[{type:"category",data:[],axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#333"},axisLine:{lineStyle:{color:"#333"}},splitLine:{show:!1}}],yAxis:[{type:"value",name:"赢单转化率",axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#333",formatter:"{value}%"},axisLine:{lineStyle:{color:"#333"}},splitLine:{show:!1}},{type:"value",name:"商机数",axisTick:{alignWithLabel:!0,lineStyle:{width:0}},axisLabel:{color:"#333",formatter:"{value}个"},axisLine:{lineStyle:{color:"#333"}},splitLine:{show:!1}}],series:[{name:"赢单转化率",type:"line",yAxisIndex:0,data:[]},{name:"商机总数",type:"bar",yAxisIndex:1,barMaxWidth:15,data:[]},{name:"赢单商机数",type:"bar",yAxisIndex:1,barMaxWidth:15,data:[]}]};t.setOption(e,!0),t.on("click",function(t){}),this.axisOption=e,this.chartObj=t}}},d=(i("a6V+"),i("KHd+")),h=Object(d.a)(u,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"main-container"},[i("filtrate-handle-view",{staticClass:"filtrate-bar",attrs:{title:"商机转换率分析","module-type":"business"},on:{load:function(e){t.loading=!0},change:t.searchClick}}),t._v(" "),i("div",{staticClass:"content"},[t._m(0),t._v(" "),i("div",{staticClass:"table-content"},[i("el-table",{attrs:{data:t.list,"cell-class-name":t.cellClassName,height:"150",stripe:"",border:"","highlight-current-row":""},on:{"row-click":t.handleRowClick}},t._l(t.fieldList,function(t,e){return i("el-table-column",{key:e,attrs:{prop:t.field,label:t.name,align:"center","header-align":"center","show-overflow-tooltip":""}})}))],1)]),t._v(" "),i("report-list",{attrs:{show:t.reportListShow,title:t.reportData.title,placeholder:t.reportData.placeholder,request:t.reportData.request,params:t.reportData.params,"field-list":t.fieldReportList},on:{"update:show":function(e){t.reportListShow=e}}})],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"axis-content"},[e("div",{attrs:{id:"axismain"}})])}],!1,null,"1eb23f99",null);h.options.__file="BusinessWinStatistics.vue";e.default=h.exports},"a6V+":function(t,e,i){"use strict";var a=i("zm1/");i.n(a).a},deZW:function(t,e,i){},dtd4:function(t,e,i){"use strict";var a=i("73/Y");i.n(a).a},eOwn:function(t,e,i){"use strict";var a=i("m1cH"),s=i.n(a),n=i("QbLZ"),l=i.n(n),o=i("7Dod"),c=i("6iAj"),r=i("4XAY"),u=i("KTTK"),d=i("mkuN"),h=i("zMq1"),m=i("ye9D"),p=i("NYF1"),f=i("YIeP"),v=i("7Qib");var y={methods:{dispatch:function(t,e,i){for(var a=this.$parent||this.$root,s=a.$options.componentName;a&&(!s||s!==t);)(a=a.$parent)&&(s=a.$options.componentName);a&&a.$emit.apply(a,[e].concat(i))},broadcast:function(t,e,i){(function t(e,i,a){this.$children.forEach(function(s){s.$options.componentName===e?s.$emit.apply(s,[i].concat(a)):t.apply(s,[e,i].concat([a]))})}).call(this,t,e,i)}}},b={name:"LogAdd",components:{CrmRelative:d.a,AddImageList:h.a,AddFileList:m.a,AddRelateList:p.a,CommonWords:f.a},mixins:[y],props:{showBusiness:{type:Boolean,default:!1},showContacts:{type:Boolean,default:!1},contacts:Array,contactsId:[String,Number],followTypes:Array,id:[String,Number],crmType:{type:String,default:""}},data:function(){return{isUnfold:!1,content:"",imgFiles:[],businessAction:{},files:[],showBusinessPopover:!1,business:[],selectContactsId:"",followType:"",nextTime:"",showRelativeType:"",batchId:Object(v.s)()}},computed:{autosize:function(){return this.isUnfold?{minRows:3,maxRows:6}:{minRows:1,maxRows:1}}},watch:{followTypes:function(){this.getDefalutFollowType()},content:function(t){var e=!!(t&&t.length>0);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;i<e.length;i++){if(-1==e[i].type.indexOf("image")&&"img"==this.showRelativeType)return void this.$message.error("请上传正确的文件类型")}for(var a="image/*"==t.target.accept?"img":"file",s=0;s<e.length;s++){var n=e[s];this.uploadFileRequest(n,a)}t.target.value=""}},uploadFileRequest:function(t,e,i){var a=this;this.$wkUploadFile.upload({file:t,params:{module_id:this.id,module:"crm_"+this.crmType,type:e}}).then(function(s){var n=s.res.data||{};n.size=Object(v.h)(t.size),"img"==e?a.imgFiles.push(n):(n.icon=Object(v.o)(t),a.files.push(n)),i&&i()}).catch(function(){})},deleteImage:function(t,e){this.deleteImgOrFile("image",t,e)},deleteFile:function(t,e){this.deleteImgOrFile("file",t,e)},deleteImgOrFile:function(t,e,i){var a=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u.c)({module:"crm_"+a.crmType,module_id:a.id,save_name:"image"==t?a.imgFiles[i].save_name:a.files[i].save_name}).then(function(e){"image"==t?a.imgFiles.splice(i,1):a.files.splice(i,1),a.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteAllFile:function(t){var e=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u.e)({module:"crm_"+e.crmType,module_id:e.id,file_id:[].concat(s()(e.imgFiles.map(function(t){return t.file_id})),s()(e.files.map(function(t){return t.file_id}))),batchId:e.batchId,type:t}).then(function(i){2==t?e.imgFiles=[]:e.files=[],e.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteRelate:function(t,e){this.business.splice(e,1)},inputFocus:function(){var t=this;this.isUnfold=!0,this.$nextTick(function(){t.$refs.textarea.focus(),t.$emit("focus")})},sendClick:function(){this.$emit("send",{id:this.id,content:this.content,files:this.files,images:this.imgFiles,business:this.business,contactsId:this.selectContactsId,batchId:this.batchId,followType:this.followType,nextTime:this.nextTime})},close:function(){this.isUnfold=!1,this.$emit("close")}}},_=(i("uoQ8"),i("KHd+")),g=Object(_.a)(b,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["mix-content",{unfold:!t.isUnfold}]},[t.isUnfold?i("i",{staticClass:"wk wk-close",on:{click:t.close}}):t._e(),t._v(" "),t.isUnfold?i("div",{staticClass:"mix-content-select"},[t.showContacts?i("el-select",{attrs:{clearable:"",placeholder:"选择联系人"},model:{value:t.selectContactsId,callback:function(e){t.selectContactsId=e},expression:"selectContactsId"}},t._l(t.contacts,function(t){return i("el-option",{key:t.contactsId,attrs:{label:t.name,value:t.contacts_id}})})):t._e(),t._v(" "),i("el-select",{attrs:{clearable:"",placeholder:"选择跟进方式"},model:{value:t.followType,callback:function(e){t.followType=e},expression:"followType"}},t._l(t.followTypes,function(t){return i("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),t._v(" "),i("el-date-picker",{attrs:{editable:!1,type:"datetime",placeholder:"选择下次联系时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.nextTime,callback:function(e){t.nextTime=e},expression:"nextTime"}}),t._v(" "),i("common-words",{on:{select:t.commonWordsSelect}})],1):t._e(),t._v(" "),i("div",{class:["i-cont",{unfold:!t.isUnfold}]},[t.isUnfold?t._e():i("i",{staticClass:"wk wk-write"}),t._v(" "),i("el-input",{ref:"textarea",attrs:{autosize:t.autosize,maxlength:800,type:"textarea",clearable:"",resize:"none",placeholder:"请输入内容"},on:{focus:t.inputFocus},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}})],1),t._v(" "),t.imgFiles.length>0&&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);g.options.__file="LogAdd.vue";var w=g.exports,C=i("O8VQ"),x=i("/G0b"),D=i("8OTK"),T=i("C3Po"),k=i("ZoMv"),I=i("Z+Ht"),S=i("vvxI"),L=i("ZX9L"),A=i("ehos"),F=i("L2JU"),N={name:"Activity",components:{LogAdd:w,LogCell:C.a,CRMAllCreate:D.default,TaskQuickAdd:T.a,TimeTypeSelect:L.a,LogEditDialog:x.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:[I.a,S.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:l()({},Object(F.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(A.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(o.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:k.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(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(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:k.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()}}},R=(i("N8+3"),Object(_.a)(N,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));R.options.__file="index.vue";e.a=R.exports},ep8U:function(t,e,i){},epE4:function(t,e,i){},fMrA:function(t,e,i){"use strict";var a=i("2/Ty");i.n(a).a},fV8c:function(t,e,i){},"gQl/":function(t,e,i){},gmGe:function(t,e,i){"use strict";var a=i("IHqA");i.n(a).a},gwiD:function(t,e,i){"use strict";var a=i("AAeT"),s=i("Ew9n"),n=i("raay"),l=i("eOwn"),o=i("7Dod"),c=i("4XAY"),r={name:"ContactsImport",components:{ImportInfo:i("BzA1").a},props:{id:[Number,String],customerId:[Number,String]},data:function(){return{loading:!1,detail:null,list:[]}},computed:{hasInfo:function(){return this.id&&this.customerId},isDeal:function(){return 1==this.detail.dealStatus},dealIcon:function(){return this.isDeal?"wk wk-success":"wk wk-close"},dealName:function(){return this.isDeal?"已成交":"未成交"}},watch:{customerId:function(){this.detail=null,this.list=[],this.getDetial()},id:function(){this.detail=null,this.list=[],this.getDetial()}},created:function(){var t=this;this.$bus.on("crm-detail-update",function(e){t.getBaseInfo()})},mounted:function(){this.getDetial()},beforeDestroy:function(){this.$bus.off("crm-detail-update")},methods:{getDetial:function(){var t=this;this.hasInfo&&(this.loading=!0,Object(o.D)({id:this.customerId}).then(function(e){t.loading=!1,t.detail=e.data}).catch(function(){t.loading=!1}),this.getBaseInfo())},getBaseInfo:function(){var t=this;this.loading=!0,Object(c.y)({id:this.id,types:"crm_contacts",action_id:this.id,module:"crm",controller:"contacts",action:"read",system:1}).then(function(e){t.list=e.data,t.loading=!1}).catch(function(){t.loading=!1})}}},u=(i("ZZZb"),i("KHd+")),d=Object(u.a)(r,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"contacts-import"},[t.detail?a("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[a("img",{staticClass:"cell-hd",attrs:{src:i("wfwE")}}),t._v(" "),a("div",{staticClass:"cell-bd"},[a("p",{staticClass:"cell-bd__name"},[a("span",[t._v(t._s(t.detail.name))])]),t._v(" "),a("div",{staticClass:"cell-bd__detail"},[a("i",{staticClass:"wk wk-circle-iphone"}),t._v(" "),t.detail.mobile?a("span",[t._v(t._s(t.detail.mobile))]):a("span",{staticClass:"no-data"},[t._v("暂无电话")]),t._v(" "),a("div",{staticClass:"deal-info"},[a("span",{class:["mark",t.isDeal?"mark-suc":"mark-un"]},[a("i",{class:t.dealIcon}),t._v(t._s(t.dealName))])])])])]):t._e(),t._v(" "),t.list.length?a("import-info",{attrs:{list:t.list}}):t._e()],1)},[],!1,null,"06f5a3d6",null);d.options.__file="ContactsImport.vue";var h=d.exports,m=i("w4ZA"),p=i("QUqu"),f=i("CjUg"),v=i("3gPr"),y=i("8OTK"),b=i("f6dm"),_={name:"ContactsDetail",components:{SlideView:s.a,CRMDetailHead:n.a,Activity:l.a,CRMEditBaseInfo:m.a,RelativeBusiness:p.a,RelativeHandle:f.a,RelativeFiles:v.a,CRMAllCreate:y.default,ContactsImport:h},mixins:[b.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:"contacts",headDetails:[{title:"客户名称",value:""},{title:"职务",value:""},{title:"手机",value:""},{title:"创建时间",value:""}],tabCurrentName:"Activity",isCreate:!1,showImportInfo:!0}},computed:{activityHandle:function(){var t=[{type:"task",label:"创建任务"},{type:"business",label:"创建商机"},{type:"contract",label:"创建合同"},{type:"receivables",label:"创建回款"}];return this.canCreateFollowRecord&&(t=[{type:"log",label:"写跟进"}].concat(t)),t},tabNames:function(){var t=[];return t.push({label:"活动",name:"Activity"}),this.crm.contacts&&this.crm.contacts.read&&t.push({label:"详细资料",name:"CRMEditBaseInfo"}),this.crm.business&&this.crm.business.index&&t.push({label:this.getTabName("商机",this.tabsNumber.businessCount),name:"RelativeBusiness"}),t.push({label:this.getTabName("附件",this.tabsNumber.fileCount),name:"RelativeFiles"}),t.push({label:"操作记录",name:"RelativeHandle"}),t},logTyps:function(){return[{icon:"all",color:"#2362FB",command:"",label:"全部活动"},{icon:"contacts",color:"#27BA4A",command:3,label:"联系人"},{icon:"o-task",color:"#D376FF",command:11,label:"任务"},{icon:"log",color:"#5864FF",command:8,label:"日志"},{icon:"approve",color:"#9376FF",command:9,label:"审批"}]},customerId:function(){return this.detailData&&this.detailData.customer_id||""}},mounted:function(){},methods:{getDetial:function(){var t=this;this.loading=!0,Object(a.j)({id:this.id}).then(function(e){t.loading=!1,t.detailData=e.data,t.headDetails[0].value=e.data.customer_name,t.headDetails[1].value=e.data.post,t.headDetails[2].value=e.data.mobile,t.headDetails[3].value=e.data.create_time}).catch(function(){t.loading=!1,t.hideView()})},hideView:function(){this.$emit("hide-view")}}},g=(i("gmGe"),Object(u.a)(_,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,"type-list":t.logTyps,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("contacts-import",{attrs:{id:t.id,"customer-id":t.customerId}})],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,"8f619b7a",null));g.options.__file="Detail.vue";e.a=g.exports},i2VW:function(t,e,i){},k3SN:function(t,e,i){},k4Fl:function(t,e,i){},l5fv:function(t,e,i){"use strict";var a=i("Wp0z");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);e<t.length;e++)i[e]=t[e];return i}return(0,n.default)(t)}},m7P8:function(t,e,i){"use strict";var a=i("deZW");i.n(a).a},mv0S:function(t,e,i){},onbw:function(t,e,i){"use strict";var a=i("mv0S");i.n(a).a},paiq:function(t,e,i){"use strict";var a=i("D67r");i.n(a).a},q0fG:function(t,e,i){"use strict";var a=i("ep8U");i.n(a).a},s357:function(t,e,i){"use strict";var a=i("TDiV");i.n(a).a},tPTb:function(t,e,i){"use strict";var a=i("k4Fl");i.n(a).a},uSKd:function(t,e,i){"use strict";var a=i("VcMt"),s=i("Ew9n"),n=i("raay"),l=i("ZoMv"),o=i("h59h"),c=i("4XAY"),r=i("Vm8M"),u=i("u2hk"),d=i("dAOq"),h=i("jHPx"),m=i("a/5N"),p=i("7Qib"),f={name:"CRMBaseInfo",components:{Sections:o.a,MapView:r.a,FileListView:u.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-2704"),i.e("chunk-9acd"),i.e("chunk-4ee54a")]).then(i.bind(null,"3z7q"))}},filters:{arrayValue:function(t,e){return t&&"[object Array]"===Object.prototype.toString.call(t)?t.map(function(t){return e?t[e]:t}).join(""):""}},mixins:[d.a],props:{id:[String,Number],poolId:[String,Number],detail:{type:Object,default:function(){return{}}},crmType:{type:String,default:""},filedList:Array},data:function(){return{loading:!1,list:[],showMapView:!1,mapViewInfo:{},showFullDetail:!1,fullDetailId:"",fullDetailType:""}},inject:["rootTabs"],computed:{},watch:{id:function(t){this.filedList||this.getBaseInfo(!0)},filedList:function(){this.list=this.filedList},"rootTabs.currentName":function(t){"CRMBaseInfo"===t&&(this.filedList||this.getBaseInfo(!1))}},created:function(){var t=this;this.$bus.on("crm-detail-update",function(e){t.filedList||t.getBaseInfo(!1)})},beforeDestroy:function(){this.$bus.off("crm-detail-update")},mounted:function(){this.filedList?this.list=this.filedList:this.getBaseInfo(!0)},methods:{getBaseInfo:function(t){var e=this;this.loading=!!t;var i={types:l.a[this.crmType],id:this.id};this.poolId&&(i.poolId=this.poolId),Object(c.y)(i).then(function(t){var i=[],a=[];t.data.forEach(function(t){"floatnumber"===t.formType?t.value=Object(h.h)(t.value):"date"===t.formType&&(t.value=Object(p.r)(t.value)),1==t.sysInformation?a.push(t):i.push(t)}),e.list=[{name:"基本信息",list:i},{name:"系统信息",list:a}],e.loading=!1}).catch(function(){e.loading=!1})},checkMapView:function(t){t.value&&""!==t.value&&(this.mapViewInfo={title:t.value.location,lat:t.value.lat,lng:t.value.lng},this.showMapView=!0)},getArrayKey:function(t){return"structure"===t?"name":"user"===t?"realname":""},isModule:function(t){return["customer","business","contract","contacts","category","statusName","typeName"].includes(t.formType)},getShowBlock:function(t){return["map_address","file"].includes(t)},getModuleName:function(t){var e={customer:"customerName",business:"businessName",contract:"contractNum",contacts:"contactsName",category:"categoryName",statusName:"statusName",typeName:"typeName"}[t.formType];return t.value?t.value[e]:""},checkModuleDetail:function(t){Object(m.c)(t.value)&&(this.fullDetailType=t.formType,this.fullDetailId=t.value[t.formType+"Id"],this.showFullDetail=!0)}}},v=(i("4q81"),i("KHd+")),y=Object(v.a)(f,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"b-cont"},[i("div",[t._l(t.list,function(e,a){return i("sections",{key:a,staticClass:"b-cells",attrs:{title:e.name,"content-height":"auto"}},[i("flexbox",{staticStyle:{padding:"10px 8px 0"},attrs:{gutter:0,align:"stretch",wrap:"wrap"}},t._l(e.list,function(e,a){return i("flexbox-item",{key:a,class:{"b-cell":"map_address"!==e.formType},attrs:{span:t.getShowBlock(e.formType)?12:.5}},["map_address"===e.formType?i("flexbox",{attrs:{gutter:0,wrap:"wrap"}},[i("flexbox-item",{staticClass:"b-cell",attrs:{span:.5},nativeOn:{click:function(i){t.checkMapView(e)}}},[i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[i("div",{staticClass:"b-cell-name"},[t._v("定位")]),t._v(" "),i("div",{staticClass:"b-cell-value",staticStyle:{color:"#3E84E9",cursor:"pointer"}},[t._v(t._s(e.value.location))])])],1),t._v(" "),i("flexbox-item",{staticClass:"b-cell",attrs:{span:.5}},[i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[i("div",{staticClass:"b-cell-name"},[t._v("区域")]),t._v(" "),i("div",{staticClass:"b-cell-value"},[t._v(t._s(e.value.address))])])],1),t._v(" "),i("flexbox-item",{staticClass:"b-cell",attrs:{span:.5}},[i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[i("div",{staticClass:"b-cell-name"},[t._v("详细地址")]),t._v(" "),i("div",{staticClass:"b-cell-value"},[t._v(t._s(e.value.detailAddress))])])],1)],1):"single_user"===e.formType?i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[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?e.value.realname:""))])]):t.isModule(e)?i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[i("div",{staticClass:"b-cell-name"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"b-cell-value can-check",on:{click:function(i){t.checkModuleDetail(e)}}},[t._v(t._s(t.getModuleName(e)))])]):"checkbox"===e.formType||"structure"===e.formType||"user"===e.formType?i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[i("div",{staticClass:"b-cell-name"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"b-cell-value"},[t._v(t._s(t._f("arrayValue")(e.value,t.getArrayKey(e.formType))))])]):"file"===e.formType?i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[i("div",{staticClass:"b-cell-name"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"b-cell-value"},[i("file-list-view",{attrs:{list:e.value||[]}})],1)]):"check_status"===e.formType?i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[i("div",{staticClass:"b-cell-name"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"b-cell-value"},[t._v(t._s(t.getStatusName(e.value)))])]):i("flexbox",{staticClass:"b-cell-b",attrs:{align:"stretch"}},[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))])])],1)}))],1)}),t._v(" "),t._t("default")],2),t._v(" "),t.showMapView?i("map-view",{attrs:{title:t.mapViewInfo.title,lat:t.mapViewInfo.lat,lng:t.mapViewInfo.lng},on:{hidden:function(e){t.showMapView=!1}}}):t._e(),t._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:t.showFullDetail,id:t.fullDetailId,"crm-type":t.fullDetailType},on:{"update:visible":function(e){t.showFullDetail=e}}})],1)},[],!1,null,"0d2f3444",null);y.options.__file="CRMBaseInfo.vue";var b=y.exports,_=i("3gPr"),g=i("CjUg"),w=i("3biH"),C=i("ROSF"),x=i("f6dm"),D={name:"InvoiceDetail",components:{SlideView:s.a,CRMDetailHead:n.a,CRMBaseInfo:b,RelativeFiles:_.a,RelativeHandle:g.a,ExamineInfo:w.a,Create:C.a},mixins:[x.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:"invoice",name:"",headDetails:[{title:"客户名称",value:""},{title:"开票金额",value:""},{title:"发票号码",value:""},{title:"实际开票日期",value:""}],tabCurrentName:"CRMBaseInfo",baseDetailList:[],isCreate:!1}},computed:{tabNames:function(){return[{label:"详细资料",name:"CRMBaseInfo"},{label:this.getTabName("附件",this.tabsNumber.fileCount),name:"RelativeFiles"},{label:"操作记录",name:"RelativeHandle"}]}},mounted:function(){},methods:{viewAfterEnter:function(){this.getDetial()},getDetial:function(){var t=this;this.loading=!0,Object(a.g)({id:this.id}).then(function(e){t.loading=!1,t.name=e.data.invoice_number,t.detailData=e.data,t.getBaseList(e.data),t.headDetails[0].value=e.data.customer_name,t.headDetails[1].value=Object(h.h)(e.data.invoice_money||0),t.headDetails[2].value=e.data.invoice_number,t.headDetails[3].value=e.data.real_invoice_date}).catch(function(){t.loading=!1,t.hideView()})},getBaseList:function(t){this.baseDetailList=[{name:"基本信息",list:[{name:"发票申请编号",formType:"text",value:t.essential.invoice_apple_number},{name:"客户名称",value:t.essential.customer_name},{name:"合同编号",value:t.essential.contract_number},{name:"合同金额",value:t.essential.contract_money},{name:"开票金额(元)",value:t.essential.invoice_money},{name:"开票日期",value:t.essential.create_time},{name:"开票类型",value:{1:"增值税专用发票",2:"增值税普通发票",3:"国税通用机打发票",4:"地税通用机打发票",5:"收据"}[t.essential.invoice_type]},{name:"备注",value:t.essential.remark},{name:"创建人",value:t.essential.create_user_name},{name:"负责人",value:t.essential.owner_user_name},{name:"创建时间",value:t.essential.create_time},{name:"更新时间",value:t.essential.update_time}]},{name:"发票信息",list:[{name:"抬头类型",value:{1:"单位",2:"个人"}[t.invoice.title_type]},{name:"开票抬头",value:t.invoice.invoice_title},{name:"纳税人识别号",value:t.invoice.tax_number},{name:"开户行",value:t.invoice.deposit_bank},{name:"开户账号",value:t.invoice.deposit_account},{name:"开票地址",value:t.invoice.deposit_address},{name:"电话",value:t.invoice.phone}]},{name:"邮寄信息",list:[{name:"联系人",value:t.posting.contacts_name},{name:"联系方式",value:t.posting.contacts_mobile},{name:"邮寄地址",value:t.posting.contacts_address}]}]},hideView:function(){this.$emit("hide-view")},editSaveSuccess:function(){this.$emit("handle",{type:"save-success"}),this.getDetial()},examineHandle:function(){this.$emit("handle",{type:"examine"})}}},T=(i("0obv"),Object(v.a)(D,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}}),t._v(" "),t.detailData.flow_id?i("examine-info",{staticClass:"examine-info",attrs:{id:t.id,"record-id":t.detailData.flow_id,"owner-user-id":t.detailData.owner_user_id,"examine-type":"crm_invoice"},on:{"on-handle":t.examineHandle}}):t._e(),t._v(" "),i("div",{staticClass:"d-container-bd"},[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,"crm-type":t.crmType,"filed-list":t.baseDetailList}})],1)}))],1)],1):t._e()],1),t._v(" "),t.isCreate?i("create",{attrs:{detail:t.detailData},on:{"save-success":t.editSaveSuccess,close:function(e){t.isCreate=!1}}}):t._e()],1)},[],!1,null,"6097713d",null));T.options.__file="Detail.vue";e.a=T.exports},"uX/8":function(t,e,i){"use strict";var a=i("AeXB");i.n(a).a},uoQ8:function(t,e,i){"use strict";var a=i("Y+PO");i.n(a).a},"vV2+":function(t,e,i){"use strict";var a=i("ERJp"),s=i("Ew9n"),n=i("raay"),l=i("eOwn"),o=i("gTyn"),c=i("w4ZA"),r=i("J7m9"),u=i("f2Lb"),d=i("CjUg"),h=i("RDgq"),m=i("cnnj"),p=i("3gPr"),f=i("RE/G"),v=i("8OTK"),y=i("f6dm"),b=i("jHPx"),_={name:"BusinessDetail",components:{SlideView:s.a,CRMDetailHead:n.a,Activity:l.a,ChieflyContacts:o.a,CRMEditBaseInfo:c.a,RelativeContract:r.a,RelativeContacts:u.a,RelativeHandle:d.a,RelativeTeam:h.a,RelativeProduct:m.a,RelativeFiles:p.a,RelativePrint:f.a,CRMAllCreate:v.default},mixins:[y.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:"business",headDetails:[{title:"客户名称",value:""},{title:"商机金额(元)",value:""},{title:"商机组",value:""},{title:"负责人",value:""},{title:"创建时间",value:""}],tabCurrentName:"Activity",status:[],statuHandleItems:[{name:"赢单",type:1,value:"100%",img:i("y4JV")},{name:"输单",type:2,value:"0%",img:i("migV")},{name:"无效",type:3,value:"0%",img:i("x8Bg")}],isCreate:!1,showImportInfo:!0,firstContactsId:""}},computed:{activityHandle:function(){var t=[{type:"task",label:"创建任务"},{type:"contacts",label:"创建联系人"},{type:"contract",label:"创建合同"},{type:"receivables",label:"创建回款"}];return this.canCreateFollowRecord&&(t=[{type:"log",label:"写跟进"}].concat(t)),t},tabNames:function(){var t=[];return t.push({label:"活动",name:"Activity"}),this.crm.business&&this.crm.business.read&&t.push({label:"详细资料",name:"CRMEditBaseInfo"}),this.crm.contacts&&this.crm.contacts.index&&t.push({label:this.getTabName("联系人",this.tabsNumber.contactCount),name:"RelativeContacts"}),this.crm.contract&&this.crm.contract.index&&t.push({label:this.getTabName("合同",this.tabsNumber.contractCount),name:"RelativeContract"}),this.crm.product&&this.crm.product.index&&t.push({label:this.getTabName("产品",this.tabsNumber.productCount),name:"RelativeProduct"}),t.push({label:this.getTabName("团队成员",this.tabsNumber.memberCount),name:"RelativeTeam"}),t.push({label:this.getTabName("附件",this.tabsNumber.fileCount),name:"RelativeFiles"}),t.push({label:"操作记录",name:"RelativeHandle"}),t},logTyps:function(){return[{icon:"all",color:"#2362FB",command:"",label:"全部活动"},{icon:"customer",color:"#487DFF",command:2,label:"客户"},{icon:"o-task",color:"#D376FF",command:11,label:"任务"},{icon:"business",color:"#FB9323",command:5,label:"商机"},{icon:"contract",color:"#FD5B4A",command:6,label:"合同"},{icon:"contacts",color:"#27BA4A",command:3,label:"联系人"},{icon:"receivables",color:"#FFB940",command:7,label:"回款"},{icon:"log",color:"#5864FF",command:8,label:"日志"},{icon:"approve",color:"#9376FF",command:9,label:"审批"}]}},mounted:function(){},methods:{getDetial:function(){var t=this;this.firstContactsId="",this.loading=!0,Object(a.l)({id:this.id}).then(function(e){t.loading=!1,t.detailData=e.data,t.firstContactsId=t.detailData.contacts_id,t.headDetails[0].value=e.data.customer_id_info.name;var i=e.data.money||0;t.headDetails[1].value=i>0?Object(b.h)(i):"",t.headDetails[2].value=e.data.type_id_info,t.headDetails[3].value=e.data.owner_user_name,t.headDetails[4].value=e.data.create_time,t.handleBusinessStatus(e.data.is_end,e.data.status_id,e.data.status_list.status,e.data.statusRemark)}).catch(function(){t.loading=!1,t.hideView()})},getBusinessStatusById:function(){var t=this;this.loading=!0,Object(a.s)({business_id:this.id}).then(function(e){t.loading=!1;var i=e.data[0];t.handleBusinessStatus(i.is_end,i.statusId,i.statusList,i.statusRemark)}).catch(function(){t.loading=!1})},hideView:function(){this.$emit("hide-view")},handleBusinessStatus:function(t,e,i,a){if(this.status=[],i&&i.length>0){for(var s=0==t,n=-1,l=0;l<i.length;l++){var o=i[l];s?o.status_id==e?(n=l,o.class="state-suc"):o.class=n>=0?"state-undo":"state-suc":o.status_id==e?(n=l,o.class="state-suc"):o.class=n>=0?"state-invalid":"state-suc",this.status.push(o)}var c={type:t};0==t?(c.name="结束",c.overIcon=["el-icon-arrow-down","el-icon--right"],n==i.length-1?c.class="state-doing":(this.status.length>0&&0!=e&&(this.status[n+1].class="state-doing"),c.class="state-undo")):1==t?(c.name="赢单",c.title="赢单",c.detail="赢单率100%",c.overIcon=["el-icon-check","el-icon--right"],c.class="state-suc"):2==t?(c.name="输单",c.title="赢单率0%",c.detail=a,c.overIcon=["el-icon-circle-close","el-icon--right"],c.class="state-fail"):3==t&&(c.name="无效",c.title="赢单率0%",c.detail=a,c.overIcon=["el-icon-remove-outline","el-icon--right"],c.class="state-invalid"),this.status.push(c)}},handleStatuChange:function(t,e){var i=this;if(0==this.detailData.is_end&&!t.isdoing){var s="确定进入"+t.name+"阶段";this.$confirm(s,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){i.loading=!0,Object(a.a)({business_id:i.id,status_id:t.status_id}).then(function(t){i.loading=!1,i.$message.success("操作成功"),i.getDetial()}).catch(function(){i.loading=!1})}).catch(function(){})}},handleStatuResult:function(t,e){var i=this;if(0==this.detailData.is_end)if(2==t.type||3==t.type){var s="请填写"+t.name+"原因:",n=t.name+"原因";this.$prompt(s,n,{inputType:"text",confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(e){var s=e.value;i.loading=!0,Object(a.a)({business_id:i.id,status_id:t.status_id,is_end:t.type,statusRemark:s}).then(function(t){i.loading=!1,i.$message.success("操作成功"),i.getDetial()}).catch(function(){i.loading=!1})}).catch(function(){})}else this.$confirm("确定将当前商机设为"+t.name+"吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){i.loading=!0,Object(a.a)({business_id:i.id,status_id:t.status_id,is_end:t.type}).then(function(t){i.loading=!1,i.$message.success("操作成功"),i.getDetial()}).catch(function(){i.loading=!1})}).catch(function(){})}}},g=(i("onbw"),i("KHd+")),w=Object(g.a)(_,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(" "),t.status.length>0?i("div",{staticClass:"busi-state-main"},[i("flexbox",{staticClass:"busi-state",style:{opacity:(t.detailData.is_end,1)}},t._l(t.status,function(e,a){return i("a",{key:a},[i("el-popover",{attrs:{title:e.name,content:"赢单率"+e.rate+"%",placement:"bottom",width:"150",trigger:"hover"}},[t.status.length-1!=a?i("div",{staticClass:"busi-state-item",class:e.class,attrs:{slot:"reference"},on:{click:function(i){t.handleStatuChange(e,a)}},slot:"reference"},[t._v("\n "+t._s(e.name)+"\n "),0==a?i("div",{staticClass:"state-circle circle-left"}):t._e(),t._v(" "),0!=a?i("div",{staticClass:"state-arrow arrow-left"}):t._e(),t._v(" "),i("div",{staticClass:"state-arrow arrow-right"})]):t._e()]),t._v(" "),t.status.length-1==a?i("el-popover",{attrs:{title:0==e.type?"":e.title,content:0==e.type?"":e.detail,placement:"bottom",width:"150",trigger:"hover"}},[0==e.type?i("div",{staticClass:"state-handel-cont"},t._l(t.statuHandleItems,function(e,a){return i("flexbox",{key:a,staticClass:"state-handel-item",nativeOn:{click:function(i){t.handleStatuResult(e,a)}}},[i("img",{staticClass:"state-handel-item-img",attrs:{src:e.img||e.thumb_img}}),t._v(" "),i("div",{staticClass:"state-handel-item-name"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"state-handel-item-value"},[t._v(t._s(e.value))])])})):t._e(),t._v(" "),i("div",{staticClass:"busi-state-item",class:e.class,attrs:{slot:"reference"},slot:"reference"},[i("i",{class:e.overIcon,staticStyle:{"margin-right":"8px"}}),t._v("\n "+t._s(e.name)+"\n "),i("div",{staticClass:"state-arrow arrow-left"}),t._v(" "),i("div",{staticClass:"state-circle circle-right"})])]):t._e()],1)}))],1):t._e(),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,"type-list":t.logTyps,id:t.id,handle:t.activityHandle,"crm-type":t.crmType,"contacts-id":t.firstContactsId},on:{"update:contactsId":function(e){t.firstContactsId=e},"on-handle":t.detailHeadHandle}})],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("chiefly-contacts",{attrs:{"contacts-id":t.firstContactsId,id:t.id,"crm-type":t.crmType}})],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,"b3fe8112",null);w.options.__file="Detail.vue";e.a=w.exports},vvxI:function(t,e,i){"use strict";e.a={filters:{},methods:{getActivityType:function(t){return{1:"leads",2:"customer",3:"contacts",4:"product",5:"business",6:"contract",7:"receivables",8:"log",9:"examine",10:"schedule",11:"task"}[t]},getActivityTypeName:function(t){return{1:"线索",2:"客户",3:"联系人",4:"产品",5:"商机",6:"合同",7:"回款",8:"日志",9:"审批",10:"日程",11:"任务",12:"发邮件"}[t]},getRecordLogTypeName:function(t){return t?{1:"跟进记录",2:"创建记录",3:"商机阶段变更",4:"外勤签到"}[t]:"跟进记录"}}}},x8Bg:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkJGQkE4RTNGNDE2NTExRTlBREMyQzM3QjE2QkFDODFCIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkJGQkE4RTQwNDE2NTExRTlBREMyQzM3QjE2QkFDODFCIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QkZCQThFM0Q0MTY1MTFFOUFEQzJDMzdCMTZCQUM4MUIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QkZCQThFM0U0MTY1MTFFOUFEQzJDMzdCMTZCQUM4MUIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4PPbYiAAABIklEQVR42mI8c+YMAxbABsQBUGwJxFJA/AuInwDxeSBeD8QboWIogAWLYYFA3AXEKlgs0YDiSCC+A8TlQLwOWRETEpsZiDuhClQYCAOQmrVQPczYXNgGxGUMpAOYnnJkF4aQaRiyoSEwA0Fh089AOZgAMgtkYCgQy1DBQGkgDmOCJg1qgQCQgaZUNNAEFMsSyCLq6uoMPDw8ROn+8uULw82bN5GFJJmwpXZKAMiFz4GYFyaAZiOp4DnIhZeo6MAzIAM3UNHADSADV0NLEUrBU5BZsEgpooKBhUD8E5aXQa7spsCwbqgZKMVXJRBPIcOwqVC9GOXhXyDOhZYad4gw6A60HMiB6sVZYoMKzc1QxaDS2xia8WEBfxZaBazGlikAAgwA3vc6LEJJ7+0AAAAASUVORK5CYII="},yPq4:function(t,e,i){"use strict";var a=i("7Qib"),s=i("3ojK"),n=i("1bNe"),l=i("gwiD"),o=i("vV2+"),c=i("mVxz"),r=i("tMlD"),u=i("ALhW"),d=i("0dur"),h=i("uSKd"),m={name:"CRMAllDetail",components:{LeadsDetail:s.a,CustomerDetail:n.a,ContactsDetail:l.a,BusinessDetail:o.a,ContractDetail:c.a,ProductDetail:r.a,ReceivablesDetail:u.a,VisitDetail:d.a,InvoiceDetail:h.a},props:{id:[String,Number],crmType:{type:String,default:""},visible:{type:Boolean,default:!1},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{tabName:""}},computed:{},watch:{crmType:function(t){"leads"==this.crmType?this.tabName="LeadsDetail":"customer"==this.crmType?this.tabName="CustomerDetail":"contacts"==this.crmType?this.tabName="ContactsDetail":"business"==this.crmType?this.tabName="BusinessDetail":"contract"==this.crmType?this.tabName="ContractDetail":"product"==this.crmType?this.tabName="ProductDetail":"receivables"==this.crmType?this.tabName="ReceivablesDetail":"visit"==this.crmType?this.tabName="VisitDetail":"invoice"==this.crmType?this.tabName="InvoiceDetail":this.tabName=""}},mounted:function(){this.visible&&(document.body.appendChild(this.$el),this.$el.style.zIndex=Object(a.q)())},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{hiddenView:function(){this.$emit("update:visible",!1)},detailHandle:function(t){"alloc"!==t.type&&"get"!==t.type&&"transfer"!==t.type&&"transform"!==t.type&&"delete"!==t.type&&"put_seas"!==t.type||this.hiddenView(),this.$emit("handle",t)}}},p=(i("fMrA"),i("KHd+")),f=Object(p.a)(m,function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.id&&t.visible?i(t.tabName,{tag:"component",staticClass:"d-view",attrs:{"crm-type":t.crmType,id:t.id,"listener-ids":t.listenerIDs,"no-listener-ids":t.noListenerIDs,"no-listener-class":t.noListenerClass},on:{handle:t.detailHandle,"hide-view":t.hiddenView}}):t._e()},[],!1,null,"40023ab0",null);f.options.__file="CRMAllDetail.vue";e.a=f.exports},ye9D:function(t,e,i){"use strict";var a={name:"AddFileList",components:{},props:{data:Array},data:function(){return{}},computed:{},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{deleteItem:function(t,e){this.$emit("delete",t,e)},deleteAll:function(){this.$emit("delete-all")}}},s=(i("paiq"),i("KHd+")),n=Object(s.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("section",{staticClass:"file-cont"},[i("flexbox",{staticClass:"f-header"},[i("i",{staticClass:"wk wk-file"}),t._v(" "),i("div",{staticClass:"f-name"},[t._v("附件")])]),t._v(" "),i("div",{staticClass:"f-body"},t._l(t.data,function(e,a){return i("flexbox",{key:a,staticClass:"f-item"},[i("img",{staticClass:"f-img",attrs:{src:e.icon}}),t._v(" "),i("div",{staticClass:"f-name"},[t._v(t._s(e.name)),i("span",{staticClass:"f-size"},[t._v(t._s(""+e.size+""))])]),t._v(" "),i("div",{staticClass:"close-button",on:{click:function(i){t.deleteItem(e,a)}}},[t._v("×")])])})),t._v(" "),i("el-button",{attrs:{type:"text"},on:{click:t.deleteAll}},[t._v("全部删除")])],1)},[],!1,null,"472fadca",null);n.options.__file="AddFileList.vue";e.a=n.exports},zMq1:function(t,e,i){"use strict";var a={name:"AddImageList",components:{},props:{data:Array},data:function(){return{}},computed:{},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{mouseImgOver:function(t,e){t.showDelete=!0,this.$set(this.data,e,t)},mouseImgLeave:function(t,e){t.showDelete=!1,this.$set(this.data,e,t)},deleteItem:function(t,e){this.$emit("delete",t,e)},deleteAll:function(){this.$emit("delete-all")},uploadFile:function(t){this.$emit("upload",t)}}},s=(i("JftJ"),i("KHd+")),n=Object(s.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("section",{staticClass:"img-cont"},[i("flexbox",{attrs:{wrap:"wrap"}},[t._l(t.data,function(e,a){return i("div",{directives:[{name:"src",rawName:"v-src:background-image",value:e.file_path||e.path||e.url,expression:" item.file_path || item.path || item.url",arg:"background-image"}],key:a,staticClass:"img-item",on:{mouseover:function(i){t.mouseImgOver(e,a)},mouseleave:function(i){t.mouseImgLeave(e,a)}}},[e.showDelete?i("div",{staticClass:"img-delete",on:{click:function(i){t.deleteItem(e,a)}}},[t._v("×")]):t._e()])}),t._v(" "),i("div",{staticClass:"img-item-add"},[i("input",{staticClass:"img-item-iput",attrs:{type:"file",accept:"image/*",multiple:""},on:{change:t.uploadFile}})])],2),t._v(" "),i("el-button",{attrs:{type:"text"},on:{click:t.deleteAll}},[t._v("全部删除")])],1)},[],!1,null,"99238776",null);n.options.__file="AddImageList.vue";e.a=n.exports},"zm1/":function(t,e,i){}}]);