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-c002.5e65622c.js

1 line
70 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden 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-c002"],{"3ojK":function(e,t,i){"use strict";var s=i("c2Co"),a=i("4XAY"),n=i("Ew9n"),o=i("raay"),l=i("eOwn"),r=i("BzA1"),c=i("w4ZA"),u=i("3gPr"),d=i("CjUg"),p=i("8OTK"),h=i("f6dm"),m={name:"LeadsDetail",components:{SlideView:n.a,CRMDetailHead:o.a,Activity:l.a,CRMEditBaseInfo:c.a,RelativeFiles:u.a,RelativeHandle:d.a,ImportInfo:r.a,CRMAllCreate:p.default},mixins:[h.a],props:{id:[String,Number],listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,crmType:"leads",headDetails:[{title:"姓名",value:""},{title:"线索来源",value:""},{title:"手机",value:""},{title:"负责人",value:""},{title:"创建时间",value:""}],tabCurrentName:"Activity",isCreate:!1,showImportInfo:!0,importList:[]}},computed:{activityHandle:function(){var e=[];return this.canCreateFollowRecord&&(e=[{type:"log",label:"写跟进"}]),e},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 e=this;this.loading=!0,Object(s.i)({id:this.id}).then(function(t){e.detailData=t.data,0!==e.detailData.dataAuth&&(e.headDetails[0].value=t.data.name,e.headDetails[1].value=t.data.source,e.headDetails[2].value=t.data.mobile,e.headDetails[3].value=t.data.owner_user_id_info.realname||"",e.headDetails[4].value=t.data.create_time,e.loading=!1)}).catch(function(){e.loading=!1,e.hideView()}),this.getBaseInfo()},getBaseInfo:function(){var e=this;this.loading=!0,Object(a.y)({id:this.id,types:"crm_"+this.crmType,action_id:this.id,module:"crm",controller:this.crmType,action:"read",system:1}).then(function(t){e.importList=t.data,e.loading=!1}).catch(function(){e.loading=!1})},hideView:function(){this.$emit("hide-view")}}},f=(i("H4tY"),i("KHd+")),y=Object(f.a)(m,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("slide-view",{directives:[{name:"empty",rawName:"v-empty",value:!e.canShowDetail,expression:"!canShowDetail"}],attrs:{"listener-ids":e.listenerIDs,"no-listener-ids":e.noListenerIDs,"no-listener-class":e.noListenerClass,"body-style":{padding:0,height:"100%"},"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"},on:{afterEnter:e.viewAfterEnter,close:e.hideView}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"crmDetailMain",staticClass:"detail-main"},[e.canShowDetail&&e.detailData?i("flexbox",{staticClass:"d-container",attrs:{direction:"column",align:"stretch"}},[i("c-r-m-detail-head",{attrs:{detail:e.detailData,"head-details":e.headDetails,id:e.id,"crm-type":e.crmType},on:{handle:e.detailHeadHandle,close:e.hideView}},[i("template",{slot:"name"},[i("el-tooltip",{attrs:{content:0==e.detailData.star?"添加关注":"取消关注",effect:"dark",placement:"top"}},[i("i",{staticClass:"wk wk-focus-on focus-icon",class:{active:0!=e.detailData.star},on:{click:function(t){e.toggleStar()}}})])],1)],2),e._v(" "),i("flexbox",{staticClass:"d-container-bd",attrs:{align:"stretch"}},[i("el-tabs",{staticClass:"d-container-bd--left",attrs:{type:"border-card"},model:{value:e.tabCurrentName,callback:function(t){e.tabCurrentName=t},expression:"tabCurrentName"}},e._l(e.tabNames,function(t,s){return i("el-tab-pane",{key:s,attrs:{label:t.label,name:t.name,lazy:""}},[i(t.name,{tag:"component",attrs:{detail:e.detailData,id:e.id,handle:e.activityHandle,"crm-type":e.crmType}})],1)})),e._v(" "),i("transition",{attrs:{name:"slide-fade"}},[i("el-tabs",{directives:[{name:"show",rawName:"v-show",value:e.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:e.importList}})],1)],1)],1)],1)],1):e._e()],1),e._v(" "),i("el-button",{staticClass:"firse-button",on:{click:function(t){e.showImportInfo=!e.showImportInfo}}},[e._v("重"),i("br"),e._v("要"),i("br"),e._v("信"),i("br"),e._v("息"),i("br"),i("i",{staticClass:"el-icon-arrow-right el-icon--right",class:{"is-reverse":!e.showImportInfo}})]),e._v(" "),e.isCreate?i("c-r-m-all-create",{attrs:{action:{type:"update",id:e.id,batchId:e.detailData.batchId},"crm-type":e.crmType},on:{"save-success":e.editSaveSuccess,close:function(t){e.isCreate=!1}}}):e._e()],1)},[],!1,null,"dd0dbed6",null);y.options.__file="Detail.vue";t.a=y.exports},"6Mk1":function(e,t,i){},"77fj":function(e,t,i){"use strict";var s=i("Btlj");i.n(s).a},Btlj:function(e,t,i){},BzA1:function(e,t,i){"use strict";var s=i("a/5N"),a={name:"ImportInfo",components:{},props:{list:Array},data:function(){return{}},computed:{showList:function(){return this.list.filter(function(e){return"file"!==e.form_type})}},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{getValueContent:function(e){if("map_address"===e.form_type)return e.value?e.value.detail_address:"";if("structure"===e.form_type||"user"===e.form_type||"checkbox"===e.form_type){if(Object(s.a)(e.value)){var t={structure:"name",user:"realname",checkbox:""}[e.form_type];return e.value.map(function(e){return t?e[t]:e}).join("")}return""}if("single_user"===e.form_type)return Object(s.c)(e.value)&&e.value.realname?e.value.realname:"";if("customer"===e.form_type||"business"===e.form_type||"contract"===e.form_type||"contacts"===e.form_type||"category"===e.form_type||"statusName"===e.form_type||"typeName"===e.form_type){var i={customer:"name",business:"name",contract:"name",contacts:"name",category:"name",statusName:"name",typeName:"name"}[e.form_type];return Object(s.a)(e.value)?e.value.length>0?e.value[0][i]:"":e.value?e.value[i]:""}return e.value}}},n=(i("m7P8"),i("KHd+")),o=Object(n.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"content"},[i("div",{staticClass:"content-title"},[e._v("基本信息")]),e._v(" "),e._l(e.showList,function(t,s){return i("p",{key:s,staticClass:"detail-cell"},[i("span",{staticClass:"detail-cell__label"},[e._v("\n "+e._s(t.name)+"\n ")]),i("br"),e._v(" "),i("span",{staticClass:"detail-cell__value"},[e._v("\n "+e._s(e.getValueContent(t))+"\n ")])])})],2)},[],!1,null,"17796cac",null);o.options.__file="ImportInfo.vue";t.a=o.exports},"G+h+":function(e,t,i){"use strict";var s=i("M+GZ");i.n(s).a},H4tY:function(e,t,i){"use strict";var s=i("6Mk1");i.n(s).a},"I+NK":function(e,t,i){"use strict";var s=i("PWYh");i.n(s).a},J4Uw:function(e,t,i){"use strict";i.d(t,"b",function(){return s}),i.d(t,"a",function(){return a});var s=[{label:"发票申请编号",width:"120px",prop:"invoice_apple_number"},{label:"客户名称",width:"120px",prop:"customer_name"},{label:"合同编号",width:"120px",prop:"contract_number"},{label:"合同金额",width:"90px",prop:"contract_money"},{label:"开票金额(元)",width:"120px",prop:"invoice_money"},{label:"开票日期",width:"120px",prop:"invoice_date"},{label:"实际开票日期",width:"120px",prop:"real_invoice_date"},{label:"开票类型",width:"120px",prop:"invoice_type"},{label:"发票号码",width:"90px",prop:"invoice_number"},{label:"物流单号",width:"90px",prop:"logistics_number"},{label:"负责人",width:"90px",prop:"owner_user_name"},{label:"审核状态",width:"90px",prop:"check_status"}],a=[{form_type:"text",field:"invoice_number",fieldName:"invoiceNumber",name:"发票号码"},{form_type:"date",field:"real_invoice_date",fieldName:"realInvoiceDate",name:"实际开票日期"},{form_type:"text",field:"logistics_number",fieldName:"logisticsNumber",name:"物流单号"},{form_type:"select",field:"invoice_status",fieldName:"invoiceStatus",name:"开票状态",setting:["未开票","已开票"]},{form_type:"check_status",field:"check_status",fieldName:"check_status",name:"审核状态",setting:["待审核","审核中","审核通过","审核失败","已撤回"]},{form_type:"user",field:"owner_user_id",fieldName:"ownerUserId",name:"负责人"}]},Lc7H:function(e,t,i){},"M+GZ":function(e,t,i){},"N8+3":function(e,t,i){"use strict";var s=i("epE4");i.n(s).a},NzkR:function(e,t,i){"use strict";var s=i("bvur");i.n(s).a},PWYh:function(e,t,i){},QEKj:function(e,t,i){"use strict";t.a={methods:{getAdvancedFilterOptions:function(e){return"check_status"==e||"deal_status"==e?[{value:"is",label:"等于",disabled:!1,type:1},{value:"isNot",label:"不等于",disabled:!1,type:2}]:"user"==e||"single_user"==e||"structure"==e?[{value:"is",label:"等于",disabled:!1,type:1},{value:"isNot",label:"不等于",disabled:!1,type:2}]:"select"==e?[{value:"in",label:"等于",disabled:!1,type:1},{value:"isNot",label:"不等于",disabled:!1,type:2}]:"checkbox"==e?[{value:"is",label:"等于",disabled:!1,type:1},{value:"contains",label:"包含",disabled:!1,type:3}]:"module"==e||"text"==e||"textarea"==e?[{value:"is",label:"等于",disabled:!1,type:1},{value:"isNot",label:"不等于",disabled:!1,type:2},{value:"contains",label:"包含",disabled:!1,type:3},{value:"notContains",label:"不包含",disabled:!1,type:4}]:"floatnumber"==e||"number"==e?[{value:"is",label:"等于",disabled:!1,type:1},{value:"isNot",label:"不等于",disabled:!1,type:2},{value:"contains",label:"包含",disabled:!1,type:3},{value:"notContains",label:"不包含",disabled:!1,type:4},{value:"isNull",label:"为空",disabled:!1,type:5},{value:"isNotNull",label:"不为空",disabled:!1,type:6},{value:"gt",label:"大于",disabled:!1,type:7},{value:"egt",label:"大于等于",disabled:!1,type:8},{value:"lt",label:"小于",disabled:!1,type:9},{value:"elt",label:"小于等于",disabled:!1,type:10}]:"category"==e?[{value:"is",label:"等于",disabled:!1,type:1},{value:"isNot",label:"不等于",disabled:!1,type:2},{value:"contains",label:"包含",disabled:!1,type:3},{value:"not_contain",label:"不包含",disabled:!1,type:4}]:"mobile"==e||"email"==e?[{value:"is",label:"等于",disabled:!1,type:1},{value:"isNot",label:"不等于",disabled:!1,type:2},{value:"contains",label:"包含",disabled:!1,type:3},{value:"notContains",label:"不包含",disabled:!1,type:4},{value:"startWith",label:"开始于",disabled:!1,type:8},{value:"endWith",label:"结束于",disabled:!1,type:10},{value:"isNull",label:"为空",disabled:!1,type:5},{value:"isNotNull",label:"不为空",disabled:!1,type:6}]:[{value:"is",label:"等于",disabled:!1,type:1},{value:"isNot",label:"不等于",disabled:!1,type:2},{value:"contains",label:"包含",disabled:!1,type:3},{value:"notContains",label:"不包含",disabled:!1,type:4},{value:"startWith",label:"开始于",disabled:!1,type:8},{value:"endWith",label:"结束于",disabled:!1,type:10},{value:"isNull",label:"为空",disabled:!1,type:5},{value:"isNotNull",label:"不为空",disabled:!1,type:6},{value:"gt",label:"大于",disabled:!1,type:7},{value:"egt",label:"大于等于",disabled:!1,type:8},{value:"lt",label:"小于",disabled:!1,type:9},{value:"elt",label:"小于等于",disabled:!1,type:10}]}}}},TAVA:function(e,t,i){"use strict";var s=i("EJiy"),a=i.n(s),n=i("8GhS"),o=i("Woz+"),l=i("7Qib"),r=i("QEKj"),c={name:"Index",components:{XhUserCell:n.p,XhProuctCate:n.j,VDistpicker:o.a,XhStructureCell:n.n},mixins:[r.a],props:{dialogVisible:{type:Boolean,required:!0,default:!1},fieldList:{type:Array,required:!0,default:function(){return[]}},obj:{type:Object,required:!0,default:function(){return{}}},crmType:{type:String,default:""},saveScene:{type:Boolean,default:!0}},data:function(){return{form:[],visible:!1,showErrors:!1,saveChecked:!1,saveDefault:!1,saveName:null}},computed:{infoParams:function(){return this.crmType?{m:"crm",c:this.crmType,a:"index"}:{}}},watch:{dialogVisible:{handler:function(e){e&&(this.form=Object(l.t)(this.obj.form),0==this.form.length&&this.form.push({field:"",name:"",form_type:"",condition:"contains",type:3,value:"",typeOption:[],statusOption:[],type_id:"",status_id:"",address:{state:"",city:"",area:""}}),this.saveChecked=!1,this.saveDefault=!1,this.saveName=null),this.visible=this.dialogVisible},deep:!0,immediate:!0},form:function(){this.$nextTick(function(){var e=document.getElementById("filter-container");e.scrollTop=e.scrollHeight})}},methods:{selectProvince:function(e,t){t.address.state=e.value},selectCity:function(e,t){t.address.city=e.value},selectArea:function(e,t){t.address.area=e.value},typeOptionsChange:function(e){if(e.type_id){var t=e.typeOption.find(function(t){return t.type_id===e.type_id});e.statusOption=t.statusList||[]}else e.statusOption=[];e.status_id=""},arrayValueChange:function(e){e.value.length>0?(e.item.value=e.value,e.item.valueContent=e.valueContent):e.item.value=[]},selectChange:function(e,t){this.getAdvancedFilterOptions(t.form_type).forEach(function(i){i.value===e&&(t.type=i.type)})},showCalCondition:function(e){return"date"!=e&&"datetime"!=e&&"business_type"!=e&&"category"!=e&&"map_address"!=e},fieldFocus:function(){this.$el.click()},fieldChange:function(e){var t=this.fieldList.find(function(t){return t.field===e.field});t&&(e.form_type=t.form_type,e.name=t.name,"business_type"==e.form_type?(e.typeOption=t.setting,e.statusOption=[],e.type_id="",e.status_id="",e.value=""):"check_status"==e.form_type||"deal_status"==e.form_type?(e.setting=t.setting||[],e.value=""):"map_address"==e.form_type?e.address={state:"",city:"",area:""}:"date"===e.form_type||"datetime"===e.form_type||"user"===e.form_type||"single_user"===e.form_type||"structure"===e.form_type||"category"===e.form_type?e.value=[]:"select"==e.form_type||"checkbox"===e.form_type?(e.setting=t.setting||[],e.value=[]):e.value="","checkbox"==e.form_type||"check_status"==e.form_type||"deal_status"==e.form_type?(e.type=1,e.condition="is"):"user"==e.form_type||"single_user"==e.form_type||"structure"==e.form_type?(e.condition="is",e.type=1):"select"==e.form_type?(e.condition="in",e.type=1):(e.condition="is",e.type=1)),this.getError()},handleCancel:function(){this.$emit("update:dialogVisible",!1)},getError:function(){this.showErrors=!1;for(var e=[],t=0;t<this.form.length;t++){var i=this.form[t];if(e.includes(i.field)){this.showErrors=!0;break}e.push(i.field)}},handleConfirm:function(){var e=this;if(this.showErrors)this.$message.error("筛选条件中有重复项!");else if(!this.saveChecked||this.saveName&&""!==this.saveName){for(var t=0;t<this.form.length;t++){var i=this.form[t];if(!i.field||""===i.field)return void this.$message.error("筛选的字段名称不能为空!");if("business_type"==i.form_type){if(!i.type_id&&!i.status_id)return void this.$message.error("筛选内容不能为空!")}else if("map_address"==i.form_type){if(!i.address.state&&!i.address.city&&!i.address.area)return void this.$message.error("筛选内容不能为空!")}else if("date"==i.form_type||"datetime"==i.form_type||"user"==i.form_type||"single_user"==i.form_type||"structure"==i.form_type||"category"==i.form_type||"checkbox"==i.form_type||"select"==i.form_type){if((!i.value||0===i.value.length)&&"isNull"!=i.condition&&"isNotNull"!=i.condition)return void this.$message.error("筛选内容不能为空!")}else if((""===i.value||void 0===i.value||null===i.value)&&"isNull"!=i.condition&&"isNotNull"!=i.condition)return void this.$message.error("筛选内容不能为空")}var s=[];this.form.forEach(function(t){if("datetime"==t.form_type||"date"==t.form_type)s.push({condition:t.condition,form_type:t.form_type,name:t.name,type:t.field,value:t.value,start:new Date(t.value[0]).getTime()/1e3,end:new Date(t.value[1]).getTime()/1e3});else if("business_type"==t.form_type)s.push({form_type:t.form_type,name:t.status_id?"status_id":"type_id",type:t.field,type_id:t.type_id,status_id:t.status_id});else if("user"==t.form_type||"single_user"==t.form_type)s.push({condition:t.condition,value:[t.value[0].id],form_type:t.form_type,name:t.name,type:t.field});else if("structure"==t.form_type)s.push({condition:t.condition,value:[t.value[0].id],form_type:t.form_type,name:t.name,type:t.field});else if("checkbox"==t.form_type)s.push({condition:t.condition,value:t.value,form_type:t.form_type,name:t.name,type:t.field});else if("category"==t.form_type)s.push({condition:t.condition,value:[t.value[t.value.length-1]],form_type:t.form_type,name:t.name,type:t.field});else if("select"==t.form_type){var i=t.value;"string"!=e.getSettingValueType(t.setting)&&(i=[t.value]),s.push({condition:t.condition,value:i,form_type:t.form_type,name:t.name,type:t.field})}else if("map_address"==t.form_type)s.push({condition:t.condition,value:t.address,form_type:t.form_type,name:t.name,type:t.field});else{var a=[];if("string"==typeof t.value)a=t.value.replace(//g,";").split(";").filter(function(e){return""!==e&&null!==e});else a=[t.value];s.push({value:a,form_type:t.form_type,name:t.name,type:t.field,condition:t.condition})}});var a={obj:s,form:this.form,saveChecked:this.saveChecked,saveDefault:this.saveDefault,saveName:this.saveName};this.$emit("filter",a)}else this.$message.error("场景名称不能为空!")},handleAdd:function(){this.form.push({field:"",condition:"contains",value:"",type:"",form_type:"",setting:[],typeOption:[],statusOption:[],type_id:"",status_id:""})},handleDelete:function(e){var t=this;this.$confirm("您确定要删除这一条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.form.splice(e,1),t.getError()}).catch(function(){})},getSettingValueType:function(e){if(e&&e.length>0){var t=e[0];return void 0===t?"undefined":a()(t)}return[]}}},u=(i("XVLb"),i("KHd+")),d=Object(u.a)(c,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{visible:e.visible,"close-on-click-modal":!1,title:"高级筛选",width:"900px"},on:{"update:visible":function(t){e.visible=t},close:e.handleCancel}},[i("div",{staticStyle:{"margin-bottom":"10px"}},[e._v("筛选条件")]),e._v(" "),i("el-form",{staticClass:"filter-container",attrs:{id:"filter-container"}},[i("el-form-item",[e._l(e.form,function(t,s){return[i("el-row",{key:s},[i("el-col",{attrs:{span:8}},[i("el-select",{attrs:{placeholder:"请选择要筛选的字段名"},on:{change:function(i){e.fieldChange(t)},focus:e.fieldFocus},model:{value:t.field,callback:function(i){e.$set(t,"field",i)},expression:"formItem.field"}},e._l(e.fieldList,function(e){return i("el-option",{key:e.field,attrs:{label:e.name,value:e.field}})}))],1),e._v(" "),e.showCalCondition(t.form_type)?i("el-col",{attrs:{span:1}},[e._v(" ")]):e._e(),e._v(" "),e.showCalCondition(t.form_type)?i("el-col",{attrs:{span:4}},[i("el-select",{attrs:{placeholder:"请选择范围"},on:{change:function(i){e.selectChange(i,t)}},model:{value:t.condition,callback:function(i){e.$set(t,"condition",i)},expression:"formItem.condition"}},e._l(e.getAdvancedFilterOptions(t.form_type),function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1):e._e(),e._v(" "),"business_type"==t.form_type?i("el-col",{attrs:{span:1}},[e._v(" ")]):e._e(),e._v(" "),"business_type"==t.form_type?i("el-col",{attrs:{span:4}},[i("el-select",{on:{change:function(i){e.typeOptionsChange(t)}},model:{value:t.type_id,callback:function(i){e.$set(t,"type_id",i)},expression:"formItem.type_id"}},e._l(t.typeOption,function(e){return i("el-option",{key:e.type_id,attrs:{label:e.name,value:e.type_id}})}))],1):e._e(),e._v(" "),i("el-col",{attrs:{span:1}},[e._v(" ")]),e._v(" "),i("el-col",{attrs:{span:"datetime"===t.form_type||"date"===t.form_type||"map_address"===t.form_type?13:8}},["check_status"===t.form_type||"deal_status"===t.form_type||"select"===t.form_type&&"string"!=e.getSettingValueType(t.setting)?i("el-select",{attrs:{placeholder:"请选择筛选条件"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}},e._l(t.setting,function(e){return i("el-option",{key:e,attrs:{label:e,value:e}})})):"select"===t.form_type||"checkbox"===t.form_type?i("el-select",{attrs:{multiple:"",placeholder:"请选择筛选条件"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}},e._l(t.setting,function(e){return i("el-option",{key:e,attrs:{label:e,value:e}})})):"date"===t.form_type||"datetime"===t.form_type?i("el-date-picker",{staticStyle:{padding:"0px 10px"},attrs:{"value-format":"date"===t.form_type?"yyyy-MM-dd":"yyyy-MM-dd HH:mm:ss",type:"date"===t.form_type?"daterange":"datetimerange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}}):"business_type"===t.form_type?i("el-select",{model:{value:t.status_id,callback:function(i){e.$set(t,"status_id",i)},expression:"formItem.status_id"}},e._l(t.statusOption,function(e){return i("el-option",{key:e.status_id,attrs:{label:e.name,value:e.status_id}})})):"user"===t.form_type||"single_user"===t.form_type?i("xh-user-cell",{attrs:{item:t,"info-params":e.infoParams,value:t.value},on:{"value-change":e.arrayValueChange}}):"structure"===t.form_type?i("xh-structure-cell",{attrs:{item:t,value:t.value},on:{"value-change":e.arrayValueChange}}):"category"===t.form_type?i("xh-prouct-cate",{attrs:{item:t,value:t.value},on:{"value-change":e.arrayValueChange}}):"map_address"===t.form_type?i("v-distpicker",{attrs:{province:t.address.state,city:t.address.city,area:t.address.area},on:{province:function(i){e.selectProvince(i,t)},city:function(i){e.selectCity(i,t)},area:function(i){e.selectArea(i,t)}}}):i("el-input",{attrs:{placeholder:"多个条件请用;隔开"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}})],1),e._v(" "),i("el-col",{staticClass:"delete",attrs:{span:1}},[i("i",{staticClass:"el-icon-error delete-btn",on:{click:function(t){e.handleDelete(s)}}})])],1)]})],2)],1),e._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:e.showErrors,expression:"showErrors"}],staticClass:"el-icon-warning warning-info"},[i("span",{staticClass:"desc"},[e._v("筛选条件中有重复项!")])]),e._v(" "),i("el-button",{attrs:{type:"text"},on:{click:e.handleAdd}},[e._v("+ 添加筛选条件")]),e._v(" "),e.saveScene?i("div",{staticClass:"save"},[i("el-checkbox",{model:{value:e.saveChecked,callback:function(t){e.saveChecked=t},expression:"saveChecked"}},[e._v("保存为场景")]),e._v(" "),i("el-input",{directives:[{name:"show",rawName:"v-show",value:e.saveChecked,expression:"saveChecked"}],staticClass:"name",attrs:{maxlength:10,placeholder:"请输入场景名称最多10个字符"},model:{value:e.saveName,callback:function(t){e.saveName="string"==typeof t?t.trim():t},expression:"saveName"}}),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.saveChecked,expression:"saveChecked"}],staticClass:"save-setting"},[i("el-checkbox",{model:{value:e.saveDefault,callback:function(t){e.saveDefault=t},expression:"saveDefault"}},[e._v("设置为默认")])],1)],1):e._e(),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.handleCancel}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v("确 定")])],1)],1)},[],!1,null,"012f579f",null);d.options.__file="index.vue";t.a=d.exports},Vm8M:function(e,t,i){"use strict";var s=i("7Qib"),a={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 e=this;this.$el.style.zIndex=Object(s.q)(),document.body.appendChild(this.$el),Object(s.l)().then(function(){var t=new BMap.Map("choicemap",{enableMapClick:!1}),i=new BMap.Point(parseFloat(e.lng),parseFloat(e.lat));t.centerAndZoom(i,18),t.enableScrollWheelZoom();var s=new BMap.Marker(i);t.addOverlay(s);var a=new BMap.InfoWindow(e.title);s.addEventListener("click",function(){t.openInfoWindow(a,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+")),o=Object(n.a)(a,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"map-view"},[t("div",{attrs:{id:"choicemap"}}),this._v(" "),t("i",{staticClass:"el-icon-close map-close",on:{click:this.hiddenView}})])},[],!1,null,"33a9f6bf",null);o.options.__file="MapView.vue";t.a=o.exports},Vo7u:function(e,t,i){},XNX2:function(e,t,i){},XVLb:function(e,t,i){"use strict";var s=i("Vo7u");i.n(s).a},XoVn:function(e,t,i){"use strict";var s=i("XNX2");i.n(s).a},ZX9L:function(e,t,i){"use strict";var s={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(e){for(var t=0;t<this.options.length;t++){var i=this.options[t];if(i.value==e)return i}return{label:"本年",value:"year"}},typeSelectClick:function(e){this.showTypePopover=!1,this.sureCustomContent=!1,this.showCustomContent=!1,this.selectType=e,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}))}}},a=(i("77fj"),i("KHd+")),n=Object(a.a)(s,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-popover",{staticClass:"time-type-select",attrs:{width:e.width,placement:"bottom","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showTypePopover,callback:function(t){e.showTypePopover=t},expression:"showTypePopover"}},[i("div",{staticClass:"type-popper"},[i("div",{staticClass:"type-content"},[e._l(e.options,function(t,s){return i("div",{key:s,staticClass:"type-content-item",class:{selected:e.selectType.value==t.value&&!e.showCustomContent},on:{click:function(i){e.typeSelectClick(t)}}},[i("div",{staticClass:"mark"}),e._v(e._s(t.label)+"\n ")])}),e._v(" "),i("div",{staticClass:"type-content-item",class:{selected:e.showCustomContent},on:{click:function(t){e.showCustomContent=!0}}},[i("div",{staticClass:"mark"}),e._v("自定义\n ")])],2),e._v(" "),e.showCustomContent?i("div",{staticClass:"type-content-custom"},[i("el-date-picker",{attrs:{type:"date","value-format":"yyyy.MM.dd",placeholder:"选择日期"},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),e._v(" "),i("el-date-picker",{attrs:{type:"date","value-format":"yyyy.MM.dd",placeholder:"选择日期"},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}}),e._v(" "),i("el-button",{on:{click:e.customSureClick}},[e._v("确定")])],1):e._e()]),e._v(" "),i("el-input",{staticClass:"type-select",style:{width:e.width+"px"},attrs:{slot:"reference",readonly:!0},slot:"reference",model:{value:e.typeShowValue,callback:function(t){e.typeShowValue=t},expression:"typeShowValue"}},[i("i",{class:["el-icon-arrow-up",{"is-reverse":e.showTypePopover}],attrs:{slot:"suffix"},slot:"suffix"})])],1)},[],!1,null,"20503202",null);n.options.__file="index.vue";t.a=n.exports},a5JU:function(e,t,i){"use strict";var s=i("b+9q");i.n(s).a},"b+9q":function(e,t,i){},bvur:function(e,t,i){},deZW:function(e,t,i){},eOwn:function(e,t,i){"use strict";var s=i("m1cH"),a=i.n(s),n=i("QbLZ"),o=i.n(n),l=i("7Dod"),r=i("6iAj"),c=i("4XAY"),u=i("KTTK"),d=i("mkuN"),p=i("zMq1"),h=i("ye9D"),m=i("NYF1"),f=i("YIeP"),y=i("7Qib");var v={methods:{dispatch:function(e,t,i){for(var s=this.$parent||this.$root,a=s.$options.componentName;s&&(!a||a!==e);)(s=s.$parent)&&(a=s.$options.componentName);s&&s.$emit.apply(s,[t].concat(i))},broadcast:function(e,t,i){(function e(t,i,s){this.$children.forEach(function(a){a.$options.componentName===t?a.$emit.apply(a,[i].concat(s)):e.apply(a,[t,i].concat([s]))})}).call(this,e,t,i)}}},_={name:"LogAdd",components:{CrmRelative:d.a,AddImageList:p.a,AddFileList:h.a,AddRelateList:m.a,CommonWords:f.a},mixins:[v],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(y.s)()}},computed:{autosize:function(){return this.isUnfold?{minRows:3,maxRows:6}:{minRows:1,maxRows:1}}},watch:{followTypes:function(){this.getDefalutFollowType()},content:function(e){var t=!!(e&&e.length>0);this.dispatch("SlideView","setEditClose",[t])},contactsId:function(){this.selectContactsId=this.contactsId||""},id:{handler:function(){this.businessAction={type:"condition",data:{moduleType:this.crmType,customer_id:this.id}}},immediate:!0}},created:function(){this.selectContactsId=this.contactsId||"",this.getDefalutFollowType()},beforeDestroy:function(){},methods:{getDefalutFollowType:function(){this.followTypes&&this.followTypes.length>0?this.followType=this.followTypes[0].value:this.followType=""},resetInfo:function(){this.nextTime="",this.isUnfold=!1,this.content="",this.dispatch("SlideView","setEditClose",[!1]),this.imgFiles=[],this.files=[],this.business=[],this.selectContactsId=this.contactsId||"",this.showRelativeType="",this.batchId=Object(y.s)(),this.getDefalutFollowType()},commonWordsSelect:function(e){var t=this;this.content?this.$confirm("您选中的常用语将覆盖当前填写内容?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",customClass:"is-particulars"}).then(function(){t.content=e}).catch(function(){}):this.content=e},checkRelativeInfos:function(e){"business"==this.showRelativeType&&(this.business=e.data)},barClick:function(e){this.showRelativeType=e,"business"==e?this.showBusinessPopover=!0:"file"==e?this.$refs.fileInput.click():"img"==e&&this.$refs.imgInput.click()},uploadFile:function(e){var t=e.target.files;if(t.length){for(var i=0;i<t.length;i++){if(-1==t[i].type.indexOf("image")&&"img"==this.showRelativeType)return void this.$message.error("请上传正确的文件类型")}for(var s="image/*"==e.target.accept?"img":"file",a=0;a<t.length;a++){var n=t[a];this.uploadFileRequest(n,s)}e.target.value=""}},uploadFileRequest:function(e,t,i){var s=this;this.$wkUploadFile.upload({file:e,params:{module_id:this.id,module:"crm_"+this.crmType,type:t}}).then(function(a){var n=a.res.data||{};n.size=Object(y.h)(e.size),"img"==t?s.imgFiles.push(n):(n.icon=Object(y.o)(e),s.files.push(n)),i&&i()}).catch(function(){})},deleteImage:function(e,t){this.deleteImgOrFile("image",e,t)},deleteFile:function(e,t){this.deleteImgOrFile("file",e,t)},deleteImgOrFile:function(e,t,i){var s=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u.c)({module:"crm_"+s.crmType,module_id:s.id,save_name:"image"==e?s.imgFiles[i].save_name:s.files[i].save_name}).then(function(t){"image"==e?s.imgFiles.splice(i,1):s.files.splice(i,1),s.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteAllFile:function(e){var t=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u.e)({module:"crm_"+t.crmType,module_id:t.id,file_id:[].concat(a()(t.imgFiles.map(function(e){return e.file_id})),a()(t.files.map(function(e){return e.file_id}))),batchId:t.batchId,type:e}).then(function(i){2==e?t.imgFiles=[]:t.files=[],t.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteRelate:function(e,t){this.business.splice(t,1)},inputFocus:function(){var e=this;this.isUnfold=!0,this.$nextTick(function(){e.$refs.textarea.focus(),e.$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")}}},b=(i("t1Sh"),i("KHd+")),g=Object(b.a)(_,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{class:["mix-content",{unfold:!e.isUnfold}]},[e.isUnfold?i("i",{staticClass:"wk wk-close",on:{click:e.close}}):e._e(),e._v(" "),e.isUnfold?i("div",{staticClass:"mix-content-select"},[e.showContacts?i("el-select",{attrs:{clearable:"",placeholder:"选择联系人"},model:{value:e.selectContactsId,callback:function(t){e.selectContactsId=t},expression:"selectContactsId"}},e._l(e.contacts,function(e){return i("el-option",{key:e.contactsId,attrs:{label:e.name,value:e.contacts_id}})})):e._e(),e._v(" "),i("el-select",{attrs:{clearable:"",placeholder:"选择跟进方式"},model:{value:e.followType,callback:function(t){e.followType=t},expression:"followType"}},e._l(e.followTypes,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),e._v(" "),i("el-date-picker",{attrs:{editable:!1,type:"datetime",placeholder:"选择下次联系时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.nextTime,callback:function(t){e.nextTime=t},expression:"nextTime"}}),e._v(" "),i("common-words",{on:{select:e.commonWordsSelect}})],1):e._e(),e._v(" "),i("div",{class:["i-cont",{unfold:!e.isUnfold}]},[e.isUnfold?e._e():i("i",{staticClass:"wk wk-write"}),e._v(" "),i("el-input",{ref:"textarea",attrs:{autosize:e.autosize,maxlength:800,type:"textarea",clearable:"",resize:"none",placeholder:"请输入内容"},on:{focus:e.inputFocus},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}})],1),e._v(" "),e.imgFiles.length>0&&e.isUnfold?i("add-image-list",{attrs:{data:e.imgFiles},on:{delete:e.deleteImage,"delete-all":function(t){e.deleteAllFile(2)},upload:e.uploadFile}}):e._e(),e._v(" "),e.files.length>0&&e.isUnfold?i("add-file-list",{attrs:{data:e.files},on:{delete:e.deleteFile,"delete-all":function(t){e.deleteAllFile(1)}}}):e._e(),e._v(" "),e.business.length>0&&e.isUnfold?i("add-relate-list",{attrs:{data:e.business,type:"business"},on:{delete:e.deleteRelate}}):e._e(),e._v(" "),e.isUnfold?i("div",{staticClass:"bar-cont"},[i("el-button",{staticClass:"handle-button",attrs:{type:"text",icon:"wk wk-picture"},on:{click:function(t){e.barClick("img")}}},[e._v("图片")]),e._v(" "),i("el-button",{staticClass:"handle-button",attrs:{type:"text",icon:"wk wk-file"},on:{click:function(t){e.barClick("file")}}},[e._v("附件")]),e._v(" "),e.showBusiness?i("el-popover",{attrs:{placement:"bottom",width:"700","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showBusinessPopover,callback:function(t){e.showBusinessPopover=t},expression:"showBusinessPopover"}},[i("crm-relative",{ref:"crmrelative",attrs:{show:e.showBusinessPopover,radio:!1,action:e.businessAction,"selected-data":{business:e.business},"crm-type":"business"},on:{close:function(t){e.showBusinessPopover=!1},changeCheckout:e.checkRelativeInfos}}),e._v(" "),i("el-button",{staticClass:"handle-button",staticStyle:{"margin-left":"10px"},attrs:{slot:"reference",type:"text",icon:"wk wk-associate"},on:{click:function(t){e.barClick("business")}},slot:"reference"},[e._v("关联商机")])],1):e._e(),e._v(" "),i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:e.sendClick,expression:"sendClick"}],staticClass:"send-btn",attrs:{type:"primary"}},[e._v("发布")])],1):e._e(),e._v(" "),i("input",{ref:"fileInput",staticClass:"file-input",attrs:{accept:"*.*",type:"file",multiple:""},on:{change:e.uploadFile}}),e._v(" "),i("input",{ref:"imgInput",staticClass:"file-input",attrs:{accept:"image/*",type:"file",multiple:""},on:{change:e.uploadFile}})],1)},[],!1,null,"2caf5be7",null);g.options.__file="LogAdd.vue";var w=g.exports,T=i("O8VQ"),C=i("/G0b"),k=i("8OTK"),x=i("C3Po"),D=i("ZoMv"),I=i("Z+Ht"),L=i("vvxI"),N=i("ZX9L"),S=i("ehos"),O=i("L2JU"),F={name:"Activity",components:{LogAdd:w,LogCell:T.a,CRMAllCreate:k.default,TaskQuickAdd:x.a,TimeTypeSelect:N.a,LogEditDialog:C.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-024e"),i.e("chunk-6d9c"),i.e("chunk-0069"),i.e("chunk-9aaae")]).then(i.bind(null,"3z7q"))}},mixins:[I.a,L.a],props:{handle:{type:Array,default:function(){return[]}},id:[String,Number],contactsId:[String,Number],crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1},typeList:{type:Array,default:function(){return[]}},detail:{type:Object,default:function(){return{}}}},data:function(){return{loading:!1,isSearchRequest:!1,filterValue:{},timeOptions:[{label:"全部",value:""},{label:"最近7天",value:"7"},{label:"最近30天",value:"30"},{label:"最近60天",value:"60"}],contacts:[],followTypes:[],handleType:"",activityType:{icon:"all",color:"#2362FB",command:"",label:"全部活动"},list:[],noMore:!1,page:1,isCRMCreate:!1,createActionInfo:{type:"relative",crmType:this.crmType,data:{}},createCRMType:"",isTaskCreate:!1,showFullDetail:!1,relationID:"",relationCrmType:"",scrollKey:Date.now(),logEditData:null,logEditPosition:{seciton:0,index:0},logEditDialogVisible:!1}},computed:o()({},Object(O.b)(["crm"]),{canCreateFollowRecord:function(){return this.crm&&this.crm.activity&&this.crm.activity.save},showRelate:function(){return"customer"==this.crmType},scrollDisabled:function(){return this.loading||this.noMore},taskParams:function(){var e={};return e[this.crmType+"_ids"]=this.id,e},taskProps:function(){var e={};e[this.crmType]=[this.detail];var t={};return t[this.crmType+"Ids"]=[this.id],{relatedObj:e,relatedObjIds:t}}}),watch:{id:function(){this.initInfo(),this.refreshLogList()}},created:function(){this.debouncedRefreshLogList=Object(S.debounce)(300,this.refreshLogList),this.initInfo()},methods:{getLogTypeList:function(){var e=this;Object(r.r)().then(function(t){e.followTypes=t.data.map(function(e){return{value:e,label:e}})}).catch(function(){})},getContactsList:function(){var e=this;Object(l.I)({customer_id:this.id}).then(function(t){e.contacts=t.data.list}).catch(function(){})},sendLog:function(e){var t=this;if(e.content){var i={category:e.followType,activity_type:D.a.keyToTypeData[this.crmType],activity_type_id:e.id,content:e.content,next_time:e.nextTime||"",is_event:0,file_id:[].concat(a()(e.files.map(function(e){return e.file_id})),a()(e.images.map(function(e){return e.file_id}))),business_ids:[].concat(a()(e.business.map(function(e){return e.business_id}))),contacts_ids:e.contactsId};this.sendLoading=!0,Object(c.a)(i).then(function(e){t.sendLoading=!1,t.$message.success("发布成功"),t.$refs.logAdd&&t.$refs.logAdd.resetInfo(),t.refreshLogList()}).catch(function(){t.sendLoading=!1})}else this.$message.error("请输入跟进内容")},handleClick:function(e){var t=this;if(this.handleType==e?this.handleType="":this.handleType=e,"log"==e)this.isTaskCreate=!1,this.$nextTick(function(){t.$refs.logAdd&&(t.$refs.logAdd.isUnfold=t.handleType==e)});else if("task"==e)this.isTaskCreate=!0,this.$nextTick(function(){t.$refs.taskAdd.inputFocus()});else{this.isTaskCreate=!1;var i={type:"relative",crmType:this.crmType,data:{}};"contacts"==this.crmType?(i.data.customer=Object(y.t)(this.detail),"business"==e&&(i.relativeData={contactsId:this.detail.contactsId})):"customer"==this.crmType?i.data.customer=Object(y.t)(this.detail):"business"==this.crmType?(i.data.customer=Object(y.t)(this.detail),i.data.business=Object(y.t)(this.detail),"contacts"==e&&(i.relativeData={businessId:this.detail.businessId})):"contract"==this.crmType&&(i.data.customer=Object(y.t)(this.detail),i.data.contract=Object(y.t)(this.detail)),this.createActionInfo=i,this.createCRMType=e,this.isCRMCreate=!0}},initInfo:function(){var e=this;this.$nextTick(function(){e.$refs.logAdd&&e.$refs.logAdd.resetInfo(),e.$refs.taskAdd&&e.$refs.taskAdd.resetSendData()}),this.filterValue={search:"",timeLine:{label:"全部",value:""}},this.getLogTypeList(),this.showRelate&&this.getContactsList()},refreshLogList:function(e){this.isSearchRequest=e||!1,this.page=1,this.noMore=!1,this.list=[],this.scrollKey=Date.now()},handleSelectClick:function(e){this.activityType=e,this.refreshLogList()},timeTypeChange:function(e){this.filterValue.timeLine=e,this.refreshLogList()},getLogList:function(){var e=this;this.loading=!0;var t={module:this.crmType,page:this.page,crmType:D.a[this.crmType],activity_type:this.activityType.command||"",activity_type_id:this.id};this.filterValue.search&&(t.search=this.filterValue.search),this.filterValue.timeLine.type&&("custom"===this.filterValue.timeLine.type?(t.start_date=this.filterValue.timeLine.startTime.replace(/\./g,"-"),t.end_date=this.filterValue.timeLine.endTime.replace(/\./g,"-")):t.interval_day=this.filterValue.timeLine.value||""),Object(c.c)(t).then(function(t){if(e.loading=!1,!e.noMore)if(e.page++,e.list.length){var i=e.list[e.list.length-1];t.data.time&&t.data.list.length&&i.time!=t.data.time&&e.list.push(t.data)}else t.data.time&&t.data.list.length&&e.list.push(t.data);e.noMore=t.data.lastPage,e.isSearchRequest&&e.$nextTick(function(){e.$refs.activitySearchInput.focus()})}).catch(function(){e.noMore=!0,e.loading=!1})},createCRMSuccess:function(){this.handleType="",this.refreshLogList()},createCRMClose:function(){this.isCRMCreate=!1,this.handleType=""},checkCRMDetail:function(e,t){this.relationID=t,this.relationCrmType=e,this.showFullDetail=!0},getActivityIcon:function(e){return this.getXrIcon(this.getActivityType(e))},getActivityTypeColor:function(e){return this.getXrIconColor(this.getActivityType(e))},logCellDelete:function(e,t,i){this.list[i].list.splice(t,1),0==this.list[i].list.length&&this.list.splice(i,1),this.scrollKey=Date.now()},logCellEdit:function(e,t,i){this.logEditData=e,this.logEditPosition={seciton:i,index:t},this.logEditDialogVisible=!0},logEditSave:function(e){this.logEditPosition.seciton>=0&&this.logEditPosition.index>=0&&this.list[this.logEditPosition.seciton].list.splice(this.logEditPosition.index,1,e),this.getLogList()}}},$=(i("N8+3"),Object(b.a)(F,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.getLogList,expression:"getLogList"}],key:e.scrollKey,staticClass:"main",attrs:{"infinite-scroll-distance":"100","infinite-scroll-disabled":"scrollDisabled"}},[i("div",[!e.isSeas&&e.handle&&e.handle.length?i("div",{staticClass:"main-handle"},e._l(e.handle,function(t,s){return i("el-button",{key:s,class:{"is-select":e.handleType===t.type},attrs:{type:"primary",icon:"wk wk-add"},on:{click:function(i){e.handleClick(t.type)}}},[e._v("\n "+e._s(t.label)+"\n ")])})):e._e(),e._v(" "),!e.isSeas&&e.handle&&e.handle.length?[!e.isTaskCreate&&e.canCreateFollowRecord?i("log-add",{ref:"logAdd",staticClass:"log-add",attrs:{id:e.id,"show-business":e.showRelate,"show-contacts":e.showRelate,contacts:e.contacts,"contacts-id":e.contactsId,"follow-types":e.followTypes,"crm-type":e.crmType},on:{send:e.sendLog,focus:function(t){e.handleType="log"},close:function(t){e.handleClick(e.handleType)}}}):i("task-quick-add",{ref:"taskAdd",staticClass:"task-quick-add",attrs:{params:e.taskParams,props:e.taskProps},on:{focus:function(t){e.handleType="task"},send:e.refreshLogList}})]:e._e(),e._v(" "),i("div",{staticClass:"log",class:{"is-top":e.handle&&0==e.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(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.debouncedRefreshLogList(!0)}},model:{value:e.filterValue.search,callback:function(t){e.$set(e.filterValue,"search",t)},expression:"filterValue.search"}}),e._v(" "),i("time-type-select",{attrs:{width:190,options:e.timeOptions,"default-type":e.filterValue.timeLine},on:{change:e.timeTypeChange}}),e._v(" "),e.typeList.length>1?i("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleSelectClick}},[i("span",{staticClass:"el-dropdown-link"},[i("i",{class:["wk","dropdown-icon","wk-"+e.activityType.icon],style:{backgroundColor:e.activityType.color}}),e._v(e._s(e.activityType.label)),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.typeList,function(t,s){return i("el-dropdown-item",{key:s,attrs:{command:t}},[i("i",{class:["wk","dropdown-icon","wk-"+t.icon],style:{backgroundColor:t.color}}),e._v(e._s(t.label))])}))],1):e._e()],1),e._v(" "),e._l(e.list,function(t,s){return i("div",{key:s,staticClass:"log-section"},[i("div",{staticClass:"log-section__title"},[i("span",{staticClass:"section-title"},[i("span",{staticClass:"section-title__time"},[e._v(e._s(t.time))])])]),e._v(" "),e._l(t.list,function(a,n){return[1==a.type?i("div",{key:n,staticClass:"log-cell",class:{"only-one":1==t.list.length}},[i("log-cell",{attrs:{item:a,section:s,index:n,"can-delete":!e.isSeas},on:{"crm-detail":e.checkCRMDetail,delete:e.logCellDelete,edit:e.logCellEdit}}),e._v(" "),i("i",{staticClass:"wk wk-message log-cell__mark"})],1):i("div",{key:n,staticClass:"log-cell activity-cell",class:{"only-one":1==t.list.length}},[2==a.type?i("div",{staticClass:"activity-cell"},[i("span",{staticClass:"activity-cell__label"},[e._v(e._s(a.update_time)+" "+e._s(a.create_user_name)+"创建了"+e._s(e.getActivityTypeName(a.activity_type))+"")]),i("span",{staticClass:"activity-cell__content",on:{click:function(t){e.checkCRMDetail(e.getActivityType(a.activity_type),a.activity_type_id)}}},[e._v(e._s(a.activity_type_name||"查看详情"))])]):3==a.type?i("div",{staticClass:"activity-cell"},[i("span",{staticClass:"activity-cell__label"},[e._v(e._s(a.update_time)+" "+e._s(a.create_user_name)+"将商机:")]),e._v(" "),i("span",{staticClass:"activity-cell__content",on:{click:function(t){e.checkCRMDetail("business",a.activity_type_id)}}},[e._v(e._s(a.activity_type_name))]),e._v(" "),i("span",[e._v(e._s(" "+a.content))])]):4==a.type?i("log-cell",{attrs:{item:a,section:s,index:n,"can-delete":""},on:{"crm-detail":e.checkCRMDetail,delete:e.logCellDelete}}):e._e(),e._v(" "),i("i",{staticClass:"log-cell__mark",class:e.getActivityIcon(a.activity_type),staticStyle:{"background-color":"#FB9323"},style:{backgroundColor:e.getActivityTypeColor(a.activity_type)}})],1)]})],2)}),e._v(" "),e.loading?i("p",{staticClass:"scroll-bottom-tips"},[e._v("加载中...")]):e._e(),e._v(" "),e.noMore?i("p",{staticClass:"scroll-bottom-tips"},[e._v("没有更多了")]):e._e()],2)],2),e._v(" "),e.isCRMCreate?i("c-r-m-all-create",{attrs:{"crm-type":e.createCRMType,action:e.createActionInfo},on:{"save-success":e.createCRMSuccess,close:e.createCRMClose}}):e._e(),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,"crm-type":e.relationCrmType,id:e.relationID},on:{"update:visible":function(t){e.showFullDetail=t}}}),e._v(" "),i("log-edit-dialog",{attrs:{visible:e.logEditDialogVisible,data:e.logEditData},on:{"update:visible":function(t){e.logEditDialogVisible=t},save:e.logEditSave}})],1)},[],!1,null,"344bab02",null));$.options.__file="index.vue";t.a=$.exports},epE4:function(e,t,i){},j4Q1:function(e,t,i){"use strict";var s=i("EJiy"),a=i.n(s),n={name:"FilterContent",props:{obj:{type:Object,required:!0,default:function(){return{}}}},data:function(){return{optionsNames:{is:"等于",in:"等于",isNot:"不等于",contains:"包含",notContains:"不包含",startWith:"开始于",endWith:"结束于",isNull:"为空",isNotNull:"不为空",eq:"等于",neq:"不等于",gt:"大于",egt:"大于等于",lt:"小于",elt:"小于等于"},showObj:{}}},computed:{},watch:{obj:function(e){this.showObj=e}},mounted:function(){this.showObj=this.obj},methods:{handleDelete:function(e,t){this.showObj.obj.splice(t,1),this.showObj.form.splice(t,1),this.$emit("delete",{item:e,index:t,obj:this.showObj})},getTypesName:function(e){return e.type_id&&e.typeOption.find(function(t){return t.type_id===e.type_id}).name||""},getNameValue:function(e){return e.setting.find(function(t){return t===e.value})||""},getStatusName:function(e){if(e.status_id){var t=e.statusOption.find(function(t){return t.status_id===e.status_id});return t.name?"-"+t.name:""}return""},getDealStatus:function(e){return"未成交"==e?"未成交":"已成交"==e?"已成交":""},getSettingValueType:function(e){if(e&&e.length>0){var t=e[0];return void 0===t?"undefined":a()(t)}return[]}}},o=(i("NzkR"),i("KHd+")),l=Object(o.a)(n,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"wrapper"},[i("ul",{staticClass:"list"},e._l(e.showObj.form,function(t,s){return i("li",{key:s,staticClass:"list-item"},["date"==t.form_type?i("span",[e._v(e._s(t.name+" “"+t.value[0]+"-"+t.value[1]+"”"))]):"datetime"===t.form_type?i("span",[e._v(e._s(t.name+" “"+t.value[0]+"-"+t.value[1]+"”"))]):"business_type"===t.form_type?i("span",[e._v(e._s(t.name+" “"+e.getTypesName(t)+e.getStatusName(t)+"”"))]):"map_address"===t.form_type?i("span",[e._v(e._s(t.name+" "+t.address.state+" "+t.address.city+" "+t.address.area))]):"check_status"===t.form_type?i("span",[e._v(e._s(t.name+" “"+e.optionsNames[t.condition]+"” "+e.getNameValue(t)))]):"deal_status"===t.form_type?i("span",[e._v(e._s(t.name+" “"+e.optionsNames[t.condition]+"” "+e.getDealStatus(t.value)))]):"user"===t.form_type||"single_user"===t.form_type?i("span",[e._v(e._s(t.name+" "+e.optionsNames[t.condition]+"“"+t.value[0].realname+"”"))]):"structure"===t.form_type?i("span",[e._v(e._s(t.name+" "+e.optionsNames[t.condition]+"“"+t.value[0].name+"”"))]):"category"===t.form_type&&t.value.length>0?i("span",[e._v(e._s(t.name+" “"+t.valueContent+"”"))]):"select"===t.form_type&&"string"!=e.getSettingValueType(t.setting)?i("span",[e._v(e._s(t.name+" “"+e.getNameValue(t)+"”"))]):i("span",[e._v(e._s(t.name+" "+e.optionsNames[t.condition]+"“"+t.value+"”"))]),e._v(" "),i("i",{staticClass:"el-icon-close icon",on:{click:function(i){e.handleDelete(t,s)}}})])}))])},[],!1,null,"4014d07d",null);l.options.__file="FilterContent.vue";t.a=l.exports},jDh9:function(e,t,i){"use strict";i.r(t);var s=i("QbLZ"),a=i.n(s),n=i("ZoMv"),o=i("4XAY"),l=i("c2Co"),r=i("7Dod"),c=i("Ra/C"),u=i("GQeE"),d=i.n(u),p=i("dAOq"),h=i("J4Uw"),m={components:{},data:function(){return{loading:!1,tableHeight:document.documentElement.clientHeight-300,list:[],fieldList:[],currentPage:1,pageSize:15,pageSizes:[15,30,45,60],total:0}},mixins:[p.a],computed:{showOptions:function(){return"putInPoolRemind"!=this.infoType&&"returnVisitRemind"!=this.infoType}},mounted:function(){var e=this;this.$bus.on("message-scroll",function(t){e.tableHeight=t}),this.$bus.on("examine-handle-bus",function(){e.getList()}),window.onresize=function(){e.updateTableHeight()}},methods:{handleRowClick:function(e,t,i){"leads"===this.crmType?"name"===t.property?(this.rowID=e.leads_id,this.rowType="leads",this.showDview=!0):this.showDview=!1:"customer"===this.crmType?"name"===t.property?(this.rowID=e.customer_id,this.rowType="customer",this.showDview=!0):this.showDview=!1:"contacts"===this.crmType?"customer_name"===t.property?(this.rowID=e.customer_id,this.rowType="customer",this.showDview=!0):"name"===t.property?(this.rowID=e.contacts_id,this.rowType="contacts",this.showDview=!0):this.showDview=!1:"business"===this.crmType?"customer_name"===t.property?(this.rowID=e.customer_id,this.rowType="customer",this.showDview=!0):"name"===t.property?(this.rowID=e.business_id,this.rowType="business",this.showDview=!0):this.showDview=!1:"contract"===this.crmType?"customer_name"===t.property?(this.rowID=e.customer_id,this.rowType="customer",this.showDview=!0):"business_name"===t.property?(this.rowID=e.business_id,this.rowType="business",this.showDview=!0):"contacts_name"===t.property?(this.rowID=e.contacts_id,this.rowType="contacts",this.showDview=!0):"num"===t.property?(this.rowID=e.contract_id,this.rowType="contract",this.showDview=!0):this.showDview=!1:"product"===this.crmType?"name"===t.property?(this.rowID=e.product_id,this.showDview=!0):this.showDview=!1:"receivables"===this.crmType?"customer_name"===t.property?(this.rowID=e.customer_id,this.rowType="customer",this.showDview=!0):"contractNum"===t.property?(this.rowID=e.contract_id,this.rowType="contract",this.showDview=!0):"number"===t.property?(this.rowID=e.receivables_id,this.rowType="receivables",this.showDview=!0):this.showDview=!1:"receivables_plan"===this.crmType?"customer_name"===t.property?(this.rowID=e.customer_id,this.rowType="customer",this.showDview=!0):"contractNum"===t.property||"contract_name"===t.property?(this.rowID=e.contract_id,this.rowType="contract",this.showDview=!0):this.showDview=!1:"invoice"===this.crmType&&("customer_name"===t.property?(this.rowID=e.customer_id,this.rowType="customer",this.showDview=!0):"contractNum"===t.property?(this.rowID=e.contract_id,this.rowType="contract",this.showDview=!0):"invoice_apple_number"===t.property?(this.rowID=e.invoice_id,this.rowType="invoice",this.showDview=!0):this.showDview=!1)},getList:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.loading=t;var i=this.getIndexRequest(),s={page:this.currentPage,limit:this.pageSize,types:"list"};this.showSubType&&(s.isSub={1:0,2:1}[this.isSubType]),this.showOptions&&(s.type=this.optionsType);var a=this.filterObj.obj;a&&d()(a).length>0&&a.forEach(function(e){s[e.type]=e}),i(s).then(function(t){e.list=t.data.list,e.total=t.data.dataCount,e.loading=!1}).catch(function(){e.loading=!1})},getIndexRequest:function(){return{todayLeads:c.n,todayCustomer:c.m,todayBusiness:c.l,followLeads:c.k,followCustomer:c.j,checkContract:c.g,checkReceivables:c.i,remindReceivablesPlan:c.e,endContract:c.b,putInPoolRemind:c.d,returnVisitRemind:c.f,checkInvoice:c.h}[this.infoType]},getFieldList:function(){var e=this;if("receivables_plan"==this.crmType||"invoice"==this.crmType){var t=[];return"receivables_plan"==this.crmType?(t=[{field:"num",form_type:"text",name:"期数"},{field:"customer_name",form_type:"customer_name",name:"客户名称"},{field:"contract_name",form_type:"contract_name",name:"合同编号"},{field:"money",form_type:"text",name:"计划回款金额"},{field:"return_date",form_type:"text",name:"计划回款日期"},{field:"return_type",form_type:"text",name:"计划回款方式"},{field:"remind",form_type:"text",name:"提前几日提醒"},{field:"remark",form_type:"text",name:"备注"}],this.handelFieldList(t)):"invoice"==this.crmType&&(this.fieldList=h.b),void this.getList()}Object(o.A)({types:"crm_"+this.crmType,module:"crm",controller:this.crmType,action:"index"}).then(function(t){e.handelFieldList(t.data),e.getList()}).catch(function(){e.loading=!1})},handelFieldList:function(e){for(var t=0;t<e.length;t++){var i=e[t],s=0;s=i.width?i.width:i.name&&i.name.length<=6?15*i.name.length+45:140,this.fieldList.push({prop:i.fieldName||i.field,label:i.name,width:s})}},fieldFormatter:function(e,t){return"invoiceType"==t.property?{1:"增值税专用发票",2:"增值税普通发票",3:"国税通用机打发票",4:"地税通用机打发票",5:"收据"}[e[t.property]]:""===e[t.property]||null===e[t.property]?"--":e[t.property]},handleSizeChange:function(e){this.pageSize=e,this.getList()},handleCurrentChange:function(e){this.currentPage=e,this.getList()},getStatusStyle:function(e){return{backgroundColor:this.getCRMStatusColor(e)}},updateTableHeight:function(){var e=document.documentElement.clientHeight,t=d()(this.filterObj).length>0?360:300;this.tableHeight=e-t}},beforeDestroy:function(){this.$bus.off("message-scroll"),this.$bus.off("examine-handle-bus"),document.getElementById("crm-table")&&document.getElementById("crm-table").removeEventListener("click",function(e){e.stopPropagation()})}},f=i("TAVA"),y=i("j4Q1"),v=i("yPq4"),_={name:"CRMMessage",components:{FilterForm:f.a,FilterContent:y.a,CRMAllDetail:v.a},filters:{dealIcon:function(e){return"已成交"==e?"wk wk-success deal-suc":"wk wk-close deal-un"},dealName:function(e){return"已成交"==e?"已成交":"未成交"}},mixins:[m],props:{crmType:{type:String,default:""},infoType:{type:String,default:""},infoTitle:{type:String,default:""},infoTips:{type:String,default:""},iconData:Object,show:Boolean,model:Number},data:function(){return{optionsType:0,isSubType:1,showFilter:!1,filterFieldList:[],filterObj:{form:[]},selectionList:[],rowID:"",rowType:"",showDview:!1}},computed:{showFollow:function(){return"followLeads"==this.infoType||"followCustomer"==this.infoType},selectionButtonList:function(){var e=this.showFollow?[{name:"已跟进",type:"follow",icon:"wk wk-edit"}]:[];return e.push({name:"标记已处理",type:"mark-deal",icon:"wk wk-tag"}),e},showFilterView:function(){return"receivables_plan"!=this.crmType},showCheckStatus:function(){return"contract"==this.crmType||"receivables"==this.crmType},showPoolDay:function(){return"customer"==this.crmType},showSubType:function(){return"todayCustomer"==this.infoType||"todayBusiness"==this.infoType||"todayLeads"==this.infoType||"putInPoolRemind"==this.infoType||"returnVisitRemind"==this.infoType},options:function(){return"todayCustomer"==this.infoType||"todayBusiness"==this.infoType||"todayLeads"==this.infoType?[{name:"今日需联系",value:1},{name:"已逾期",value:2},{name:"已联系",value:3}]:"followLeads"==this.infoType||"followCustomer"==this.infoType?[{name:"待跟进",value:1},{name:"已跟进",value:2}]:"checkContract"==this.infoType||"checkReceivables"==this.infoType||"checkInvoice"==this.infoType?[{name:"待审核",value:1},{name:"已审核",value:2}]:"remindReceivablesPlan"==this.infoType?[{name:"待回款",value:1},{name:"已回款",value:2},{name:"已逾期",value:3}]:"endContract"==this.infoType?[{name:"即将到期",value:1},{name:"已到期",value:2}]:[]},canMark:function(){return!this.options.length||(this.showSubType&&this.showOptions?1==this.optionsType&&1==this.isSubType:this.showSubType?1==this.isSubType:!!this.showOptions&&1==this.optionsType)}},watch:{show:function(){this.showOptions&&this.options.length>0&&(this.optionsType=this.options[0].value),this.initTableHead()}},mounted:function(){this.showOptions&&this.options.length>0&&(this.optionsType=this.options[0].value),this.initTableHead()},methods:{initTableHead:function(){this.show&&(this.currentPage=1,0==this.fieldList.length?this.getFieldList():(this.getList(!1),this.$store.dispatch("GetMessageNum")))},refreshList:function(){this.currentPage=1,this.fieldList.length>0?this.getList():this.getFieldList()},handleSelectionChange:function(e){this.selectionList=e},selectionBarClick:function(e){var t=this;if("follow"==e)this.$confirm("您确定此操作吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){(0,{followLeads:l.k,followCustomer:r.R}[t.infoType])({type:"crm_"+t.crmType,type_id:t.selectionList.map(function(e){return e[t.crmType+"_id"]})}).then(function(e){t.$message.success("操作成功"),t.refreshList(),t.$emit("on-handle",{type:"follow",value:t.selectionList.length,infoType:t.infoType})}).catch(function(){})}).catch(function(){});else if("mark-deal"==e){var i={type:this.infoType};i.type_id=this.selectionList.map(function(e){return e["receivables_plan"===t.crmType?"plan_id":t.crmType+"_id"]}),Object(c.o)(i).then(function(e){t.$message.success("操作成功"),t.getList(),t.$parent.refreshNum()}).catch(function(){})}},getFilterFieldInfo:function(){var e=this;"invoice"==this.crmType?(this.filterFieldList=h.a,this.showFilter=!0):Object(o.E)({types:n.a[this.crmType]}).then(function(t){e.filterFieldList=t.data||[],e.showFilter=!0}).catch(function(){})},handleFilter:function(e){this.filterObj=e,this.showFilter=!1,this.updateTableHeight(),this.refreshList()},handleDeleteField:function(e){this.filterObj=e.obj,this.updateTableHeight(),this.refreshList()},cellClassName:function(e){e.row;var t=e.column;e.rowIndex,e.columnIndex;return"name"===t.property&&"contract"!=this.crmType||"number"===t.property||"leads_name"===t.property||"customer_name"===t.property||"business_name"===t.property||"contacts_name"===t.property||"num"===t.property&&"receivables_plan"!=this.crmType||"visitNumber"===t.property||"invoice_apple_number"===t.property||"contract_name"===t.property?"can-visit--underline":""},allMarkReadClick:function(){var e=this;Object(c.a)({isSub:1==this.isSubType?0:2,type:this.infoType}).then(function(t){e.$message.success("操作成功"),e.$parent.refreshNum(),e.getList()}).catch(function(){})},selectionDisabled:function(){return this.canMark}}},b=(i("XoVn"),i("KHd+")),g=Object(b.a)(_,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ec-container"},[i("div",{staticClass:"title"},[i("i",{class:["title-icon",e.iconData.iconClass],style:{backgroundColor:e.iconData.color}}),e._v(e._s(e.infoTitle)+"\n "),e.infoTips?i("el-tooltip",{attrs:{content:e.infoTips,effect:"dark",placement:"top"}},[i("i",{staticClass:"wk wk-help wk-help-tips"})]):e._e()],1),e._v(" "),i("div",{staticClass:"option-bar"},[0==e.selectionList.length?i("div",[e.showOptions?i("el-select",{on:{change:e.refreshList},model:{value:e.optionsType,callback:function(t){e.optionsType=t},expression:"optionsType"}},e._l(e.options,function(e){return i("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})):e._e(),e._v(" "),e.showSubType?i("el-select",{staticStyle:{width:"120px"},style:{"margin-left":e.showOptions?"10px":0},on:{change:e.refreshList},model:{value:e.isSubType,callback:function(t){e.isSubType=t},expression:"isSubType"}},e._l([{name:"我的",value:1},{name:"我下属的",value:2}],function(e){return i("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})):e._e(),e._v(" "),e.showFilterView?i("el-button",{staticClass:"filter-button el-button--margin ",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"wk wk-screening"},on:{click:e.getFilterFieldInfo}},[e._v("高级筛选")]):e._e(),e._v(" "),i("filter-form",{attrs:{"field-list":e.filterFieldList,"dialog-visible":e.showFilter,obj:e.filterObj,"crm-type":e.crmType,"save-scene":!1},on:{"update:dialogVisible":function(t){e.showFilter=t},filter:e.handleFilter}}),e._v(" "),i("el-button",{staticClass:"el-button--margin ",staticStyle:{"margin-left":"10px"},attrs:{disabled:!e.canMark,icon:"wk wk-tag",type:"primary",plain:""},on:{click:e.allMarkReadClick}},[e._v("全部标记已处理")])],1):i("flexbox",{staticClass:"selection-bar"},[i("div",{staticClass:"selected—title"},[e._v("已选中"),i("span",{staticClass:"selected—count"},[e._v(e._s(e.selectionList.length))]),e._v("项")]),e._v(" "),i("flexbox",{staticClass:"selection-items-box"},e._l(e.selectionButtonList,function(t,s){return i("el-button",{key:s,attrs:{icon:t.icon,type:"primary"},nativeOn:{click:function(i){e.selectionBarClick(t.type)}}},[e._v(e._s(t.name))])}))],1)],1),e._v(" "),e.filterObj.form&&e.filterObj.form.length>0?i("filter-content",{attrs:{obj:e.filterObj},on:{delete:e.handleDeleteField}}):e._e(),e._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"n-table--border",staticStyle:{width:"100%"},attrs:{id:"crm-table",data:e.list,height:e.tableHeight,"cell-class-name":e.cellClassName,stripe:"",border:"","highlight-current-row":""},on:{"row-click":e.handleRowClick,"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{selectable:e.selectionDisabled,"show-overflow-tooltip":"",type:"selection",align:"center",width:"55"}}),e._v(" "),e._l(e.fieldList,function(t,s){return i("el-table-column",{key:s,attrs:{prop:t.prop,label:t.label,width:t.width,"show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(s){return["deal_status"==t.prop?[i("i",{class:e._f("dealIcon")(s.row[t.prop])}),e._v(" "),i("span",[e._v(e._s(e._f("dealName")(s.row[t.prop])))])]:"is_lock"==t.prop&&"customer"===e.crmType?[1==s.row.is_lock?i("i",{staticClass:"wk wk-circle-password customer-lock"}):e._e()]:"check_status"==t.prop?[i("span",{staticClass:"status-mark",style:e.getStatusStyle(s.row.check_status)}),e._v(" "),i("span",[e._v(e._s(e.getCRMStatusName(s.row.check_status)))])]:[e._v("\n "+e._s(e.fieldFormatter(s.row,s.column))+"\n ")]]}}])})}),e._v(" "),i("el-table-column",{attrs:{resizable:!1}})],2),e._v(" "),i("div",{staticClass:"p-contianer"},[i("el-pagination",{staticClass:"p-bar",attrs:{"current-page":e.currentPage,"page-sizes":e.pageSizes,"page-size":e.pageSize,total:e.total,background:"",layout:"prev, pager, next, sizes, total, jumper"},on:{"update:pageSize":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),i("c-r-m-all-detail",{attrs:{visible:e.showDview,"crm-type":e.rowType,id:e.rowID},on:{"update:visible":function(t){e.showDview=t},handle:e.getList}})],1)},[],!1,null,"7f8d9d1b",null);g.options.__file="CRMMessage.vue";var w=g.exports,T=i("L2JU"),C=i("7Qib"),k={name:"XrMenuItem",components:{},props:{iconClass:String,iconColor:String,label:String,name:String,num:[String,Number],select:Boolean},data:function(){return{}},computed:{},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{}},x=(i("G+h+"),Object(b.a)(k,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"xr-menu-item",class:{"is-select":e.select}},[i("i",{class:["xr-menu-item__icon",e.iconClass]}),e._v(" "),i("span",{staticClass:"xr-menu-item__label"},[e._v(e._s(e.label))]),e._v(" "),e.num>0?i("el-badge",{attrs:{max:99,value:e.num}}):e._e()],1)},[],!1,null,"57686fca",null));x.options.__file="XrMenuItem.vue";var D={name:"Message",components:{CRMMessage:w,XrMenuItem:x.exports},data:function(){return{loading:!1,leftType:"",leftSides:[{name:"今日需联系线索",crmType:"leads",color:"#2362FB",iconClass:"wk wk-leads",infoType:"todayLeads",model:11,num:0,tips:"下次跟进时间为今日的线索",hidden:!0},{name:"今日需联系客户",crmType:"customer",color:"#2362FB",iconClass:"wk wk-customer",infoType:"todayCustomer",model:1,num:0,tips:"下次跟进时间为今日的客户",hidden:!0},{name:"今日需联系商机",crmType:"business",color:"#2362FB",iconClass:"wk wk-business",infoType:"todayBusiness",model:12,num:0,tips:"下次跟进时间为今日的商机",hidden:!0},{name:"分配给我的线索",crmType:"leads",color:"#704AFD",iconClass:"wk wk-leads",infoType:"followLeads",model:2,num:0,tips:"转移之后未跟进的线索",hidden:!0},{name:"分配给我的客户",crmType:"customer",color:"#19B5F6",iconClass:"wk wk-s-seas",infoType:"followCustomer",model:3,num:0,tips:"转移、领取、分配之后未跟进的客户,默认显示自己负责的客户",hidden:!0},{name:"待进入公海的客户",crmType:"customer",color:"#26D4DA",iconClass:"wk wk-seas",infoType:"putInPoolRemind",model:4,num:0,tips:"",hidden:!0},{name:"待审核合同",crmType:"contract",color:"#FD5B4A",iconClass:"wk wk-contract",infoType:"checkContract",model:5,num:0,tips:"",hidden:!0},{name:"待审核回款",crmType:"receivables",color:"#FFB940",iconClass:"wk wk-receivables",infoType:"checkReceivables",model:6,num:0,tips:"",hidden:!0},{name:"待回款提醒",crmType:"receivables_plan",color:"#27BA4A",iconClass:"wk wk-bell",infoType:"remindReceivablesPlan",model:7,num:0,tips:"",hidden:!0},{name:"即将到期的合同",crmType:"contract",color:"#FF7A38",iconClass:"wk wk-contract",infoType:"endContract",model:8,num:0,tips:"根据“合同到期时间”及设置的“提前提醒天数”提醒",hidden:!0},{name:"待回访合同",crmType:"contract",color:"#ff9232",iconClass:"wk wk-house",infoType:"returnVisitRemind",model:9,num:0,tips:"",hidden:!0},{name:"待审核发票",crmType:"invoice",color:"#ff9232",iconClass:"wk wk-invoice",infoType:"checkInvoice",model:10,num:0,tips:"",hidden:!0}]}},computed:a()({},Object(T.b)(["messageNum"]),{showLeftSides:function(){return this.leftSides.filter(function(e){return!e.hidden})}}),watch:{messageNum:function(){this.refreshNum()}},mounted:function(){var e=this;this.loading=!0,this.requestNumCount(),window.onresize=function(){var t=document.documentElement.clientHeight;e.$bus.emit("message-scroll",t-300)}},methods:{requestNumCount:function(){var e=this;this.$store.dispatch("GetMessageNum").then(function(t){e.loading=!1,e.refreshNum()}).catch(function(){e.loading=!1})},refreshNum:function(){for(var e=0;e<this.leftSides.length;e++){var t=this.leftSides[e];this.messageNum.hasOwnProperty(t.infoType)?(t.num=this.messageNum[t.infoType]||0,t.hidden=!1):t.hidden=!0}!this.leftType&&this.showLeftSides.length>0&&(this.leftType=this.showLeftSides[0].infoType)},messageHandle:function(e){if("follow"==e.type){var t=Object(C.t)(this.messageNum),i=parseInt(t[e.infoType])-e.value;t[e.infoType]=i>0?i:0,this.$store.commit("SET_MESSAGENUM",t)}},sideClick:function(e){this.leftType=e.infoType}}},I=(i("a5JU"),Object(b.a)(D,function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticStyle:{height:"100%"}},[s("flexbox",{staticClass:"message-header"},[s("img",{staticClass:"title-icon",attrs:{src:i("0Dkb")}}),e._v(" "),s("span",{staticClass:"title"},[e._v("待办事项")])]),e._v(" "),s("div",{staticClass:"message-body"},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"message-content"},[s("div",{staticClass:"message-body-side"},e._l(e.showLeftSides,function(t,i){return s("xr-menu-item",{key:i,attrs:{label:t.name,num:t.num,"icon-class":t.iconClass,select:e.leftType==t.infoType},nativeOn:{click:function(i){e.sideClick(t)}}})})),e._v(" "),s("div",{staticClass:"message-body-content"},e._l(e.showLeftSides,function(t,i){return s("c-r-m-message",{directives:[{name:"show",rawName:"v-show",value:e.leftType==t.infoType,expression:"leftType==item.infoType"}],key:i,attrs:{"crm-type":t.crmType,"info-type":t.infoType,"info-title":t.name,"info-tips":t.tips,model:t.model,show:e.leftType==t.infoType,"icon-data":t},on:{"on-handle":e.messageHandle}})}))])])],1)},[],!1,null,"b05242a4",null));I.options.__file="index.vue";t.default=I.exports},m1cH:function(e,t,i){"use strict";t.__esModule=!0;var s,a=i("rfXi"),n=(s=a)&&s.__esModule?s:{default:s};t.default=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return(0,n.default)(e)}},m7P8:function(e,t,i){"use strict";var s=i("deZW");i.n(s).a},t1Sh:function(e,t,i){"use strict";var s=i("Lc7H");i.n(s).a}}]);