Ext.define('saas.view.sys.guide.FormPanel', { extend: 'Ext.panel.Panel', xtype: 'sys-guide-formpanel', layout:'fit', bodyCls:'x-guide-background', //工具类 FormUtil: Ext.create('saas.util.FormUtil'), BaseUtil: Ext.create('saas.util.BaseUtil'), dataUrl:'/api/commons/init/check', initComponent: function () { var me = this; showInformation = function(type,value) { me.showInformation(type,value) } var view = new Ext.DataView({ style:"margin:7% 0 7% 0;", store : Ext.create('Ext.data.Store', { fields: [{ name:'baseSet',type:'boolean' },{ name:'warehouse',type:'boolean' },{ name:'product',type:'boolean' },{ name:'customer',type:'boolean' },{ name:'vendor',type:'boolean' },{ name:'begin',type:'boolean' }], autoLoad: false, pageSize: 10, data: [{ baseSet:false, warehouse:false, product:false, customer:false, vendor:false, begin:false, }], proxy: { timeout:8000, type: 'ajax', url: me.dataUrl, actionMethods: { read: 'GET' }, reader: { type: 'json', rootProperty: 'data', totalProperty: 'data', } }, }), tpl : new Ext.XTemplate( '', '
', '
', '
', 'x-guide-mask ', '" src="resources/images/guide/baseSet.png" align ="center" width="135" height="90" alt="基础设置" >', '
', '公司信息、权限和账户管理', '
', '
', '
', 'x-guide-mask ', '"src="resources/images/guide/warehouse.png" align ="center" width="135" height="90" alt="仓库资料" >', '
', '仓库信息管理', '
', '
', '
', 'x-guide-mask ', '"src="resources/images/guide/product.png" align ="center" width="135" height="90" alt="物料资料" >', '
', '物料信息管理', '
', '
', '
', '
', 'x-guide-mask ', '"src="resources/images/guide/1.png" style="cursor: pointer;position: absolute;margin: -16px 290px 0 -339px;z-index: 100;" align ="center" width="32" height="32" onClick="showInformation(\'baseSet\')" >', 'x-guide-mask ', '"src="resources/images/guide/2.png" style="cursor: pointer;position: absolute;margin: -16px 0 0 -16px;z-index: 100;" align ="center" width="32" height="32" onClick="showInformation(\'warehouse\')" >', 'x-guide-mask ', '"src="resources/images/guide/3.png" style="cursor: pointer;position: absolute;margin: -16px 0 0 305px;z-index: 100;" align ="center" width="32" height="32" onClick="showInformation(\'product\')" >', '
', '
', '基础设置', '仓库资料', '物料资料', '
', '
', 'x-guide-mask ', '"src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >', 'x-guide-mask ', '"src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >', 'x-guide-mask ', '"src="resources/images/guide/point.png" style="margin: 2px 0px 0 0;" align ="center" width="16" height="16" >', "
", '
', '
', '
', '
', 'x-guide-mask ', '"src="resources/images/guide/customer.png" align ="center" width="135" height="90" alt="客户资料" >', '
', '客户信息管理', '
', '
', '
', 'x-guide-mask ', '"src="resources/images/guide/vendor.png" align ="center" width="135" height="90" alt="供应商资料" >', '
', '供应商信息管理', '
', '
', '
', 'x-guide-mask ', '" src="resources/images/guide/begin.png" align ="center" width="135" height="90" alt="开始使用" >', '
', '开启U企云服务', '
', '
', '
', '
', 'x-guide-mask ', '" src="resources/images/guide/4.png" style="cursor: pointer;position: absolute;margin: -16px 290px 0 -339px;z-index: 100;" align ="center" width="32" height="32" onClick="showInformation(\'customer\')" >', 'x-guide-mask ', '" src="resources/images/guide/5.png" style="cursor: pointer;position: absolute;margin: -16px 0 0 -16px;z-index: 100;" align ="center" width="32" height="32" onClick="showInformation(\'vendor\')">', 'x-guide-mask ', '" src="resources/images/guide/6.png" style="cursor: pointer;position: absolute;margin: -16px 0 0 305px;z-index: 100;" align ="center" width="32" height="32" onClick="showInformation(\'begin\',\'{begin}\')" >', '
', '
', '客户资料', '供应商资料', '开始使用', '
', '
', 'x-guide-mask ', '" src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >', 'x-guide-mask ', '" src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >', 'x-guide-mask ', '" src="resources/images/guide/point.png" style="margin: 2px 0px 0 0;" align ="center" width="16" height="16" >', "
", '
', '
', '
', '
' ), trackOver: true, overItemCls : 'x-module-over', selectedClass : 'selected', singleSelect : true, itemSelector : '.x-module-item' }); Ext.apply(me,{ items:[view] }); me.view = view; me.callParent(arguments); }, refresh:function(){ this.ownerCt.setTitle('新手导航'); //刷新store数据 this.view.store.load(); //刷新窗口 var win = this.down('[name=messagebox]'); if(win){ win.show({ title : '模块介绍', msg : win.msg.html, icon : win._icon }); } }, showInformation:function(type,value){ var message = ''; var xtype = ''; var icon = 'x-gudie-information'; var title = ''; if(type=='baseSet'){ message = '您可以在参数设置中编辑公司的信息。
'+ '录入完成后切换到“新手导航”页签继续下一步。
'; xtype = 'sys-manager-formpanel'; } if(type=='warehouse'){ message = '因为新增物料时需要告知该物料所属仓库是哪里,所以需要首先进行仓库管理。
'+ '录入完成后切换到“新手导航”页签继续下一步。
'; xtype = 'document-warehouse-datalist'; title = '仓库资料' } if(type=='product'){ message = '录入物料及其期初数量;开账后也可通过录采购单对物料库存进行增加,
录销售单物料库存相应减少。
'+ '录入完成后切换到“新手导航”页签继续下一步。
'; xtype = 'document-product-basepanel'; title = '物料资料' } if(type=='customer'){ message = '对客户资料进行录入及管理。
'+ '录入完成后切换到“新手导航”页签继续下一步。
'; xtype = 'document-customer-basepanel'; title = '客户资料' } if(type=='vendor'){ message = '录采购单时需选择供应商,在单据页面选择供应商时
也提供供应商新增功能,您也可以跳过此步。
'+ '录入完成后切换到“新手导航”页签继续下一步。
'; xtype = 'document-vendor-basepanel'; title = '供应商资料' } if(type=='begin'){ message = '欢迎您使用U企云进销存!
'+ '温馨提示:开账后您还是可以通过左侧菜单栏对基础资料进行维护。
'; xtype = "begin"; icon = 'x-gudie-end'; if(value=='false'){ icon = 'x-gudie-information'; message = '

请激活所有模块后再使用系统!

'; } } var me = this; var form = this.view.ownerCt; var panelEl = form.getEl() var box = panelEl.getBox(); var height = box.height; var width = box.width; var win = form.add(Ext.create('Ext.window.MessageBox', { name:'messagebox', closeAction:'destroy', _icon:icon, msg:message, buttonAlign : 'right', height:0.5*height, width:0.5*width, buttons: [{ text: '我知道了', cls:'x-formpanel-btn-blue', handler: function(b) { var scope = b.ownerCt.ownerCt; if(xtype=='begin'&&value=='false'){ scope.close(); return true; }else if(xtype=='begin'&&value=='true'){ me.ownerCt.close(); return true; } saas.util.BaseUtil.openTab(xtype, title, xtype+'_add'); scope.close(); } },{ text: '取消', cls:'x-formpanel-btn-blue', handler: function(b) { var scope = b.ownerCt.ownerCt; scope.close(); } }] })); win.show({ title : '模块介绍', msg : message, icon : icon }); } });