代码拉取完成,页面将自动刷新
MWF.xApplication.CRM=MWF.xApplication.CRM||{},MWF.xDesktop.requireApp("Template","MForm",null,!1),MWF.xDesktop.requireApp("CRM","Template",null,!1),MWF.xDesktop.requireApp("Template","Explorer",null,!1),MWF.require("MWF.widget.Identity",null,!1),MWF.xApplication.CRM.Message=new Class({Extends:MWF.widget.Common,Implements:[Options,Events],options:{style:"default"},initialize:function(t,e,i,n){this.setOptions(n),this.app=e,this.lp=e.lp.customer,this.path="/x_component_CRM/$Message/",this.loadCss(),this.actions=i,this.node=$(t)},loadCss:function(){this.cssPath="/x_component_CRM/$Message/"+this.options.style+"/css.wcss",this._loadCss()},load:function(){this.formContentArr&&this.formContentArr.empty(),this.formContentArr=[],this.formMarkArr&&this.formMarkArr.empty(),this.formMarkArr=[],this.rightContentDiv=this.app.rightContentDiv,this.createHeadContent(),this.createCustomerContent(),this.resizeWindow(),this.app.addEvent("resize",function(){this.resizeWindow()}.bind(this))},reload:function(){this.createCustomerContent(),this.resizeWindow()},createHeadContent:function(){this.headContentDiv&&this.headContentDiv.destroy(),this.headContentDiv=new Element("div.headContentDiv",{styles:this.css.headContentDiv}).inject(this.rightContentDiv),this.headTitleDiv=new Element("div.headTitleDiv",{styles:this.css.headTitleDiv,text:"待办信息"}).inject(this.headContentDiv)},createToolBarContent:function(){},createCustomerContent:function(){(_self=this).contentListDiv&&this.contentListDiv.destroy(),this.contentListDiv=new Element("div.contentListDiv",{styles:this.css.contentListDiv}).inject(this.rightContentDiv),this.contentLeftDiv&&this.contentLeftDiv.destroy(),this.contentLeftDiv=new Element("div.contentLeftDiv",{styles:this.css.contentLeftDiv}).inject(this.contentListDiv),this.contentLeftInDiv&&this.contentLeftInDiv.destroy(),this.contentLeftInDiv=new Element("div.contentLeftInDiv",{styles:this.css.contentLeftInDiv}).inject(this.contentLeftDiv),this.contentLeftItemDiv&&this.contentLeftItemDiv.destroy(),this.contentLeftItemDiv=new Element("div.contentLeftItemDiv",{styles:this.css.contentLeftInDiv,text:"今日需联系客户"}).inject(this.contentLeftInDiv),this.contentLeftItemDiv2&&this.contentLeftItemDiv2.destroy(),this.contentLeftItemDiv2=new Element("div.contentLeftItemDiv",{styles:this.css.contentLeftInDiv,text:"分配给我的线索"}).inject(this.contentLeftInDiv),this.contentLeftItemDiv3&&this.contentLeftItemDiv3.destroy(),this.contentLeftItemDiv3=new Element("div.contentLeftItemDiv",{styles:this.css.contentLeftInDiv,text:"分配给我的客户"}).inject(this.contentLeftInDiv),this.contentLeftItemDiv4&&this.contentLeftItemDiv4.destroy(),this.contentLeftItemDiv4=new Element("div.contentLeftItemDiv",{styles:this.css.contentLeftInDiv,text:"待进入公海的客户"}).inject(this.contentLeftInDiv),this.contentListInDiv&&this.contentListInDiv.destroy(),this.contentListInDiv=new Element("div.contentListInDiv",{styles:this.css.contentListInDiv}).inject(this.contentListDiv);var t=this.rightContentDiv.getSize();this.contentListDiv&&this.contentListDiv.setStyles({height:t.y-this.headContentDiv.getHeight()-8+"px"}),this.contentListInDiv&&this.contentListInDiv.setStyles({height:this.contentListDiv.getHeight()+"px"}),this.contentLeftDiv&&this.contentLeftDiv.setStyles({height:this.contentListDiv.getHeight()-80+"px"}),jQuery(_self.contentLeftInDiv).find("div").click(function(){jQuery(this).attr("class","contentLeftItemSelectd");var t=jQuery(this).text();jQuery(this).siblings().attr("class","contentLeftItemDiv");var e=_self.path+"messageView.json",i={};switch(t){case"今日需联系客户":_self.customerView&&delete _self.customerView,jQuery(".contentListInDiv").empty(),_self.customerView=new MWF.xApplication.CRM.Message.CustomerView(_self.contentListInDiv,_self.openDiv,_self.app,_self,{templateUrl:e,filterData:i},{lp:_self.app.lp.customerView,isAdmin:_self.options.isAdmin}),_self.customerView.load();break;case"分配给我的线索":_self.allotClueView&&delete _self.allotClueView,_self.allotClueView=new MWF.xApplication.CRM.Message.AllotClueView(_self.contentListInDiv,_self.openDiv,_self.app,_self,{templateUrl:e,filterData:i},{lp:_self.app.lp.clueView,isAdmin:_self.options.isAdmin}),_self.allotClueView.load();break;case"分配给我的客户":_self.allotCustomerView&&delete _self.allotCustomerView,jQuery(".contentListInDiv").empty(),_self.allotCustomerView=new MWF.xApplication.CRM.Message.AllotCustomerView(_self.contentListInDiv,_self.openDiv,_self.app,_self,{templateUrl:e,filterData:i},{lp:_self.app.lp.customerView,isAdmin:_self.options.isAdmin}),_self.allotCustomerView.load();break;case"待进入公海的客户":_self.seaCustomerView&&delete _self.seaCustomerView,jQuery(".contentListInDiv").empty(),_self.seaCustomerView=new MWF.xApplication.CRM.Message.SeaCustomerView(_self.contentListInDiv,_self.openDiv,_self.app,_self,{templateUrl:e,filterData:i},{lp:_self.app.lp.customerView,isAdmin:_self.options.isAdmin}),_self.seaCustomerView.load()}}),jQuery(_self.contentLeftInDiv).children(":first").click()},resizeWindow:function(){var t=this.rightContentDiv.getSize();this.contentListDiv&&this.contentListDiv.setStyles({height:t.y-this.headContentDiv.getHeight()-8+"px"}),this.contentListInDiv&&this.contentListInDiv.setStyles({height:this.contentListDiv.getHeight()+"px"}),this.contentLeftDiv&&this.contentLeftDiv.setStyles({height:this.contentListDiv.getHeight()-80+"px"})}}),MWF.xApplication.CRM.Message.CustomerView=new Class({Extends:MWF.xApplication.CRM.Template.ComplexView,_createDocument:function(t){return new MWF.xApplication.CRM.Clue.Document(this.viewNode,t,this.explorer,this)},_getCurrentPageData:function(e,t,i,n,s){t||(t=15),i||(i=1);var o=this.formatDate(new Date),l=this.options.filterData;l={begintime:o+" 00:00:00",endtime:o+" 23:59:59"},this.actions.listNextTimePaginLike(i,t,l,function(t){e&&e(t)}.bind(this))},_create:function(){},_openDocument:function(t,e){MWF.xDesktop.requireApp("CRM","CustomerOpen",function(){this.explorer=new MWF.xApplication.CRM.CustomerOpen(this,this.actions,{},{openId:t,openName:e,openType:"single",onReloadView:function(){this.reload()}.bind(this)}),this.explorer.load()}.bind(this))},_queryCreateViewNode:function(){},_postCreateViewNode:function(t){},_queryCreateViewHead:function(){},_postCreateViewHead:function(t){}}),MWF.xApplication.CRM.Message.AllotClueView=new Class({Extends:MWF.xApplication.CRM.Template.ComplexView,_createDocument:function(t){return new MWF.xApplication.CRM.Clue.Document(this.viewNode,t,this.explorer,this)},_getCurrentPageData:function(e,t,i,n){this.category=this.options.category;t||(t=15),i||(i=1);this.items.length&&this.items[this.items.length-1].data.id;var s=this.options.filterData||{};n&&(s={key:n}),this.actions.ListMyDuty(i,t,s,function(t){e&&e(t)}.bind(this))},_create:function(){},_openDocument:function(t,e){MWF.xDesktop.requireApp("CRM","ClueOpen",function(){this.explorer=new MWF.xApplication.CRM.ClueOpen(this,this.actions,{},{clueId:t,clueName:e,openType:"single",onReloadView:function(){this.reload()}.bind(this)}),this.explorer.load()}.bind(this))},_queryCreateViewNode:function(){},_postCreateViewNode:function(t){},_queryCreateViewHead:function(){},_postCreateViewHead:function(t){}}),MWF.xApplication.CRM.Message.AllotCustomerView=new Class({Extends:MWF.xApplication.CRM.Template.ComplexView,_createDocument:function(t){return new MWF.xApplication.CRM.Clue.Document(this.viewNode,t,this.explorer,this)},_getCurrentPageData:function(e,t,i,n,s){t||(t=15),i||(i=1);this.items.length&&this.items[this.items.length-1].data.id;var o=this.options.filterData;o={key:n?n.trim():"",orderFieldName:"updateTime",orderType:"desc"},this.actions.ListMyDuty_customer(i,t,o,function(t){e&&e(t)}.bind(this))},_create:function(){},_openDocument:function(t,e){MWF.xDesktop.requireApp("CRM","CustomerOpen",function(){this.explorer=new MWF.xApplication.CRM.CustomerOpen(this,this.actions,{},{openId:t,openName:e,openType:"single",onReloadView:function(){this.reload()}.bind(this)}),this.explorer.load()}.bind(this))},_queryCreateViewNode:function(){},_postCreateViewNode:function(t){},_queryCreateViewHead:function(){},_postCreateViewHead:function(t){}}),MWF.xApplication.CRM.Message.SeaCustomerView=new Class({Extends:MWF.xApplication.CRM.Template.ComplexView,_createDocument:function(t){return new MWF.xApplication.CRM.Clue.Document(this.viewNode,t,this.explorer,this)},_getCurrentPageData:function(e,t,i,n,s){t||(t=15),i||(i=1);this.items.length&&this.items[this.items.length-1].data.id;var o=this.options.filterData;o={key:n?n.trim():"",orderFieldName:"updateTime",orderType:"desc"},this.actions.getCustomerListPageToPool(i,t,o,function(t){e&&e(t)}.bind(this))},_create:function(){},_openDocument:function(t,e){MWF.xDesktop.requireApp("CRM","CustomerOpen",function(){this.explorer=new MWF.xApplication.CRM.CustomerOpen(this,this.actions,{},{openId:t,openName:e,openType:"single",readOnly:"yes",onReloadView:function(){this.reload()}.bind(this)}),this.explorer.load()}.bind(this))},_queryCreateViewNode:function(){},_postCreateViewNode:function(t){},_queryCreateViewHead:function(){},_postCreateViewHead:function(t){}}),MWF.xApplication.CRM.Customer.Document=new Class({Extends:MWF.xApplication.Template.Explorer.ComplexDocument,_queryCreateDocumentNode:function(t){},_postCreateDocumentNode:function(i,t){this.view.template.items.each(function(t,e){t.head.width&&i.getElements("td")[e].set("width",t.head.width),e==i.getElements("td").length-1&&i.getElements("td")[e].set("width",this.view.lastTdWidth)}.bind(this))},open:function(t){this.view._openDocument(this.data,this.index)},edit:function(){var t="ForumDocument"+this.data.id;this.app.desktop.apps[t]?this.app.desktop.apps[t].setCurrent():this.app.desktop.openApplication(null,"ForumDocument",{sectionId:this.data.sectionId,id:this.data.id,appId:t,isEdited:!0,isNew:!1,index:this.index})}});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。