|
|
@@ -4,35 +4,172 @@ Ext.define('saas.view.core.base.ImportWindow', {
|
|
|
layout:'fit',
|
|
|
|
|
|
requires: [
|
|
|
+ 'Ext.form.field.File',
|
|
|
'Ext.container.ButtonGroup'
|
|
|
],
|
|
|
|
|
|
- items:[{
|
|
|
- xtype:'panel',
|
|
|
- layout:'column',
|
|
|
- defaults:{
|
|
|
- columnWidth:1
|
|
|
- },
|
|
|
- tbar:['->',{
|
|
|
- width:300,
|
|
|
- text:'下载模板并填写'
|
|
|
- },{
|
|
|
- width:300,
|
|
|
- text:'上传导入文件'
|
|
|
- },'->'],
|
|
|
- items:[{
|
|
|
- xtype:'container',
|
|
|
- html:'asddddddddddddddddddddd',
|
|
|
- },{
|
|
|
- xtype:'fieldset',
|
|
|
- items:[{
|
|
|
- text:'asddddddddddddddddddddd'
|
|
|
- }]
|
|
|
- }]
|
|
|
+ bbar:['->',{
|
|
|
+ hidden:true,
|
|
|
+ name:'prev',
|
|
|
+ text:'上一步',
|
|
|
+ handler:function(b){
|
|
|
+ var p = this.ownerCt.ownerCt.items.items[0];
|
|
|
+ var tbar = p.dockedItems.items[0];
|
|
|
+ //first
|
|
|
+ var first = tbar.down('[name=first]').el.dom;
|
|
|
+ first.classList.add('x-btn-import-first');
|
|
|
+ first.style.background = '#34baf6';
|
|
|
+ first.childNodes[0].childNodes[0].childNodes[1].style.color = '#fff';
|
|
|
+ //middle
|
|
|
+ var middle = tbar.down('[name=middle]').el.dom;
|
|
|
+ middle.classList.add('x-btn-import-middle');
|
|
|
+ middle.classList.remove('x-btn-import-middle-next');
|
|
|
+ middle.style.background = '#fff';
|
|
|
+ //last
|
|
|
+ var last = tbar.down('[name=last]').el.dom;
|
|
|
+ last.classList.add('x-btn-import-last');
|
|
|
+ last.style.background = '#fff';
|
|
|
+ last.childNodes[0].childNodes[0].childNodes[1].style.color = '#34baf6';
|
|
|
+ //按钮逻辑
|
|
|
+ b.hide();
|
|
|
+ b.ownerCt.down('[name=next]').show();
|
|
|
+ b.ownerCt.down('[name=over]').hide();
|
|
|
+ //字段逻辑
|
|
|
+ p.down('[name=download]').show();
|
|
|
+ p.down('[name=upload]').hide();
|
|
|
+ p.down('[name=detail]').show();
|
|
|
+ p.down('[name=message]').hide();
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ name:'next',
|
|
|
+ text:'下一步',
|
|
|
+ handler:function(b){
|
|
|
+ var p = this.ownerCt.ownerCt.items.items[0];
|
|
|
+ var tbar = p.dockedItems.items[0];
|
|
|
+ //first
|
|
|
+ var first = tbar.down('[name=first]').el.dom;
|
|
|
+ first.classList.remove('x-btn-import-first');
|
|
|
+ first.style.background = '#fff';
|
|
|
+ first.childNodes[0].childNodes[0].childNodes[1].style.color = '#34baf6';
|
|
|
+ //middle
|
|
|
+ var middle = tbar.down('[name=middle]').el.dom;
|
|
|
+ middle.classList.remove('x-btn-import-middle');
|
|
|
+ middle.classList.add('x-btn-import-middle-next');
|
|
|
+ middle.style.background = '#34baf6';
|
|
|
+ //last
|
|
|
+ var last = tbar.down('[name=last]').el.dom;
|
|
|
+ last.classList.remove('x-btn-import-last');
|
|
|
+ last.style.background = '#34baf6';
|
|
|
+ last.childNodes[0].childNodes[0].childNodes[1].style.color = '#fff';
|
|
|
+ //按钮逻辑
|
|
|
+ b.hide();
|
|
|
+ b.ownerCt.down('[name=prev]').show();
|
|
|
+ b.ownerCt.down('[name=over]').show();
|
|
|
+ //字段逻辑
|
|
|
+ p.down('[name=download]').hide();
|
|
|
+ p.down('[name=upload]').show();
|
|
|
+ p.down('[name=detail]').hide();
|
|
|
+ p.down('[name=message]').show();
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ hidden:true,
|
|
|
+ name:'over',
|
|
|
+ text:'完成',
|
|
|
+ handler:function(b){
|
|
|
+ b.ownerCt.ownerCt.close()
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ name:'close',
|
|
|
+ text:'关闭',
|
|
|
+ handler:function(b){
|
|
|
+ b.ownerCt.ownerCt.close()
|
|
|
+ }
|
|
|
}],
|
|
|
|
|
|
initComponent: function() {
|
|
|
var me = this;
|
|
|
+ Ext.apply(me, {
|
|
|
+ items:[{
|
|
|
+ cls:'x-panel-import',
|
|
|
+ padding:'10px 100px 10px 100px',
|
|
|
+ xtype:'panel',
|
|
|
+ layout:'vbox',
|
|
|
+ tbar:['->',{
|
|
|
+ name:'first',
|
|
|
+ cls:'x-btn-import-first',
|
|
|
+ style:'background: #34baf6;border-color: #35baf6; opacity: 1;',
|
|
|
+ focusable:false,
|
|
|
+ disabled:true,
|
|
|
+ width:300,
|
|
|
+ text:'下载模板并填写',
|
|
|
+ },{
|
|
|
+ name:'middle',
|
|
|
+ disabled:true,
|
|
|
+ focusable:false,
|
|
|
+ style:'width: 20px;margin: 0px;margin-left: -16px;border-width: 1px 0px;min-width: 0px;border-style: solid;border-color: rgb(53, 186, 246); opacity: 1; background-color: #fff;',
|
|
|
+ width:20,
|
|
|
+ cls:'x-btn-import-middle'
|
|
|
+ },{
|
|
|
+ name:'last',
|
|
|
+ disabled:true,
|
|
|
+ cls:'x-btn-import-last',
|
|
|
+ style:'border-left-width: 0px;background: #fff;border-color: #35baf6;opacity:1;background-color: #fff;',
|
|
|
+ focusable:false,
|
|
|
+ margin:'0 0 0 -1',
|
|
|
+ width:300,
|
|
|
+ text:'上传导入文件',
|
|
|
+ },'->'],
|
|
|
+ items:[{
|
|
|
+ margin:'15px 0 0 0',
|
|
|
+ width: 240,
|
|
|
+ labelWidth:160,
|
|
|
+ buttonOnly:true,
|
|
|
+ fieldLabel:'客户导入模板下载',
|
|
|
+ name:'download',
|
|
|
+ xtype: 'filefield',
|
|
|
+ buttonText: '下载模板',
|
|
|
+ buttonConfig:{
|
|
|
+ xtype:'button',
|
|
|
+ handler:function(b){
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ margin:'10px 0 0 45px',
|
|
|
+ xtype: 'fieldset',
|
|
|
+ title: '导入说明',
|
|
|
+ name:'detail',
|
|
|
+ collapsible: false,
|
|
|
+ items: [{
|
|
|
+ xtype : 'fieldcontainer',
|
|
|
+ html: me.showDetail?me.showDetail:'请配置showDetail属性',
|
|
|
+ }]
|
|
|
+ },{
|
|
|
+ hidden:true,
|
|
|
+ margin:'15px 0 0 0',
|
|
|
+ width: 180,
|
|
|
+ labelWidth:100,
|
|
|
+ buttonOnly:true,
|
|
|
+ fieldLabel:'上传文件',
|
|
|
+ name:'upload',
|
|
|
+ xtype: 'filefield',
|
|
|
+ buttonText: '选择文件',
|
|
|
+ buttonConfig:{
|
|
|
+ xtype:'button',
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ hidden:true,
|
|
|
+ margin:'10px 0 0 45px',
|
|
|
+ xtype: 'fieldset',
|
|
|
+ title: '导入详情',
|
|
|
+ name:'message',
|
|
|
+ collapsible: false,
|
|
|
+ items: [{
|
|
|
+ xtype : 'fieldcontainer',
|
|
|
+ html: '暂无',
|
|
|
+ }]
|
|
|
+ }]
|
|
|
+ }]
|
|
|
+ });
|
|
|
me.callParent(arguments);
|
|
|
}
|
|
|
|