📄 dc0014.js
字号:
this.fields.add("IS_EMPLOYEE", new Ext.ux.form.XCheckbox ({xtype: "xcheckbox",name:"IS_EMPLOYEE",id:"DC0014F_IS_EMPLOYEE",dataIndex:"IS_EMPLOYEE",width:50,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.IS_EMPLOYEE||"Employee?",insert_allowed:true,update_allowed:true}) );
this.layoutItems.add("DC0058",
new Ext.Window({ xtype:"window", modal:true, title:N21.DataComp.DC0058.prototype.resourceBundle.DcProperty.Title, closeAction:"hide",closable:true,layout:"fit", width:300, height:300, items:{xtype:"DC0058",id:"DC0058", parentDcRelation:{name:"DC0014F",relation:[{parent:"ID",child:"BPARTNER_ID"}]} }} ) );
this.layoutItems.add("Modified",
{ xtype:"fieldset", title:this.resourceBundle.FieldsetTitle.Modified||"Modified",autoHeight:true,collapsible: true,collapsed:true,width:"90%",items:[ this.fields.get("CREATEDON"),this.fields.get("CREATEDBY"),this.fields.get("MODIFIEDON"),this.fields.get("MODIFIEDBY")]});
this.layoutItems.add("Communication",
{ xtype:"fieldset", title:this.resourceBundle.FieldsetTitle.Communication||"Communication",autoHeight:true,collapsible: true,width:"90%",items:[ this.fields.get("PHONE"),this.fields.get("EMAIL"),this.fields.get("FAX")]});
this.layoutItems.add("C2",
{ layout:"form",columnWidth:.3, items:[ this.layoutItems.get("Communication"),this.layoutItems.get("Modified")]});
this.layoutItems.add("DC0056",
{ xtype:"DC0056",id:"DC0056",width:"100%",height:200, parentDcRelation:{name:"DC0014F",relation:[{parent:"ID",child:"BPARTNER_ID"}]} });
this.layoutItems.add("TabCustomerAcct",
{ layout:"form", title:"Customer Account", items:[ this.layoutItems.get("DC0056")] });
this.layoutItems.add("DC0057",
{ xtype:"DC0057",id:"DC0057",width:"100%",height:200, parentDcRelation:{name:"DC0014F",relation:[{parent:"ID",child:"BPARTNER_ID"}]} });
this.layoutItems.add("TabContactPerson",
{ layout:"form", title:"Contact Person", items:[ this.layoutItems.get("DC0057")] });
this.layoutItems.add("DC0018",
{ xtype:"DC0018",id:"DC0018",width:"100%",height:200, parentDcRelation:{name:"DC0014F",relation:[{parent:"ID",child:"BPARTNER_ID"}]} });
this.layoutItems.add("TabBankAccount",
{ layout:"form", title:"Bank account", items:[ this.layoutItems.get("DC0018")] });
this.layoutItems.add("DC0015",
{ xtype:"DC0015",id:"DC0015",width:"100%",height:200, parentDcRelation:{name:"DC0014F",relation:[{parent:"ID",child:"BPARTNER_ID"}]} });
this.layoutItems.add("TabAdress",
{ layout:"form", title:"Adress", items:[ this.layoutItems.get("DC0015")] });
this.layoutItems.add("Tabs",
{ xtype:"tabpanel", plain:true,layoutOnTabChange :true,activeItem:0,width:"100%", items:[ this.layoutItems.get("TabAdress"),this.layoutItems.get("TabBankAccount"),this.layoutItems.get("TabContactPerson"),this.layoutItems.get("TabCustomerAcct")]});
this.layoutItems.add("C1_2",
{ layout:"form",columnWidth:1, items:[ this.layoutItems.get("Tabs")]});
this.layoutItems.add("C1_1_2",
{ layout:"form",columnWidth:.4, items:[ this.fields.get("TAX_NUMBER_TYPE"),this.fields.get("TAX_NUMBER"),this.fields.get("COMPANY_REG_NR")]});
this.layoutItems.add("C1_1_1",
{ layout:"form",columnWidth:.6, items:[ this.fields.get("ID"),this.fields.get("CLIENT_ID"),this.fields.get("CLIENT_CODE"),this.fields.get("CODE"),this.fields.get("NAME"),this.fields.get("IS_CUSTOMER"),this.fields.get("IS_VENDOR"),this.fields.get("IS_EMPLOYEE")]});
this.layoutItems.add("C1_1",
{ layout:"form",columnWidth:1, items:[ this.layoutItems.get("C1_1_1"),this.layoutItems.get("C1_1_2")]});
this.layoutItems.add("C1",
{ layout:"form",columnWidth:.7, items:[ this.layoutItems.get("C1_1"),this.layoutItems.get("C1_2")]});
Ext.apply(this, {
items:[this.fields.get("_p_record_status"),this.layoutItems.get("C1"),this.layoutItems.get("C2")]
,border:false
,layout:"column"
,defaults:{labelWidth:110}
,frame:true
,width: "100%"
,dataComponentName:"DC0014F"
,firstFocusFieldName:"NAME"
,childDCs: [{name:"DC0057",relation:[{parent:"ID",child:"BPARTNER_ID"}]},{name:"DC0015",relation:[{parent:"ID",child:"BPARTNER_ID"}]},{name:"DC0018",relation:[{parent:"ID",child:"BPARTNER_ID"}]},{name:"DC0056",relation:[{parent:"ID",child:"BPARTNER_ID"}]},{name:"DC0058",relation:[{parent:"ID",child:"BPARTNER_ID"}]}]
,toolbarConfig:"STANDARD"
});
this.layoutItems.get("Communication").items[this.layoutItems.get("Communication").items.length] = {xtype:"button",text:"More...",scope:this,handler:function() {this.show_window("DC0058");} };
N21.DataComp.DC0014F.superclass.initComponent.apply(this, arguments);
}
,onRender:function() {
N21.DataComp.DC0014F.superclass.onRender.apply(this, arguments);
}
,newDataRecord:function() {
return new this.dataRecordMeta({_p_record_status:"insert"
,CLIENT_CODE:""
,CLIENT_ID:""
,ID:""
,CODE:""
,NAME:""
,TAX_NUMBER_TYPE:""
,TAX_NUMBER:""
,COMPANY_REG_NR:""
,PHONE:""
,EMAIL:""
,FAX:""
,BPARTNER_TYPE:""
,BPARTNER_ID:""
,COPIED_FROM_BPARTNER_ID:""
,CREATEDON:""
,CREATEDBY:""
,MODIFIEDON:""
,MODIFIEDBY:""
,CUSTGROUP_CODE:""
,CREDITCLASS_CODE:""
,PAYMETHOD_CODE:""
,PAYTERMCLASS_CODE:""
,MAX_CREDIT_LIMIT:""
,MAX_PAYMENT_TERM:""
,IS_CUSTOMER:""
,IS_VENDOR:""
,IS_EMPLOYEE:""
,IS_ONETIME:""});
}
});
Ext.reg("DC0014F", N21.DataComp.DC0014F);
/**
* DataControl: Grid with Edit Form
* Code: DC0014
* Title: Business partners
*/
Ext.ns("N21.DataComp");
N21.DataComp.DC0014 = Ext.extend(N21.Base.GridEditForm, {
initComponent:function() {
Ext.apply(this, {
autoScroll:false
,layout:"border"
,dataComponentName:"DC0014"
,masterName:"DC0014G"
,detailName:"DC0014F"
,mdLayout:"card"
,border: false
,items: [
{
xtype:"panel"
,layout:"card"
,id:"MDTab"
,region:"center"
,defaults:{layout:"fit"}
,activeItem:0
,tabPosition: "bottom"
,items: [{
xtype: "DC0014G"
,id: "DC0014G"
,height:300
},{
xtype:"DC0014F"
,id:"DC0014F"
,height:300
,frame:true
,autoScroll:true
,layout:"form"
}]
}
]
,tbar: new Array(
new Ext.Toolbar.Button({ id:"tlb_FILTER" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/g_rec_src.png" ,tooltip:"Apply filter" ,handler: this.executeQuery ,scope :this})
,new Ext.Toolbar.Separator()
,new Ext.Toolbar.Button({ id:"tlb_SAVE" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/g_rec_commit.png" ,tooltip:"Save changes <Ctrl+S>" ,handler: this.commitForm ,scope :this})
,new Ext.Toolbar.Button({ id:"tlb_NEW" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/g_rec_new.png" ,tooltip:"Create new record <Ctrl+N>" ,handler: this.createNewRecord ,scope :this})
,new Ext.Toolbar.Button({ id:"tlb_DELETE" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/g_rec_del.png" ,tooltip:"Delete record <Ctrl+D>" ,handler: this.deleteRecord ,scope :this})
,new Ext.Toolbar.Separator()
,new Ext.Toolbar.Button({ id:"tlb_LIST_EDITOR_MODE" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/g_rec_upd.png" ,tooltip:"Editor<Enter>, List<Ctrl+Q>" ,handler: this.toggleEditMode ,scope :this})
,new Ext.Toolbar.Button({ id:"tlb_REFRESH_RECORD" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/g_rec_refresh.gif" ,tooltip:"Refresh record" ,handler: this.reloadRecord ,scope :this})
,new Ext.Toolbar.Separator()
,new Ext.Toolbar.Button({ id:"tlb_PREV_REC" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/f_rec_prev.gif" ,tooltip:"Previous record" ,handler: this.goToPrevRecord ,scope :this})
,new Ext.Toolbar.Button({ id:"tlb_NEXT_REC" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/f_rec_next.gif" ,tooltip:"Next record" ,handler: this.goToNextRecord ,scope :this})
,new Ext.Toolbar.Separator()
,new Ext.Toolbar.Button({ id:"tlb_PRINT" ,xtype:"button" ,cls:"x-btn-icon" ,icon:"_static/icon/print.png" ,tooltip:"Print list" ,handler: this.exportList ,scope :this})
)
});
N21.DataComp.DC0014.superclass.initComponent.apply(this, arguments);
}
});
Ext.reg("DC0014", N21.DataComp.DC0014);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -