⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dc0059.js

📁 extjs+oracle+ erpcrm
💻 JS
📖 第 1 页 / 共 2 页
字号:
       this.fields.add("CREATEDON", new Ext.form.DateField ({xtype: "datefield",name:"CREATEDON",id:"DC0059F_CREATEDON",dataIndex:"CREATEDON",width:80,allowBlank:false,labelSeparator:":*" ,fieldLabel: this.resourceBundle.FieldLabel.CREATEDON||"Created on",disabled:true,format:Ext.DATE_FORMAT})   );
       this.fields.add("CREATEDBY", new Ext.form.TextField ({xtype: "textfield",name:"CREATEDBY",id:"DC0059F_CREATEDBY",dataIndex:"CREATEDBY",width:100,allowBlank:false,labelSeparator:":*" ,fieldLabel: this.resourceBundle.FieldLabel.CREATEDBY||"Createdby",disabled:true})   );
       this.fields.add("MODIFIEDON", new Ext.form.DateField ({xtype: "datefield",name:"MODIFIEDON",id:"DC0059F_MODIFIEDON",dataIndex:"MODIFIEDON",width:80,allowBlank:false,labelSeparator:":*" ,fieldLabel: this.resourceBundle.FieldLabel.MODIFIEDON||"Modifiedon",disabled:true,format:Ext.DATE_FORMAT})   );
       this.fields.add("MODIFIEDBY", new Ext.form.TextField ({xtype: "textfield",name:"MODIFIEDBY",id:"DC0059F_MODIFIEDBY",dataIndex:"MODIFIEDBY",width:100,allowBlank:false,labelSeparator:":*" ,fieldLabel: this.resourceBundle.FieldLabel.MODIFIEDBY||"Modifiedby",disabled:true})   );
       this.fields.add("BILL_BPARTNER_ID", new Ext.form.Hidden ({xtype: "hidden",name:"BILL_BPARTNER_ID",id:"DC0059F_BILL_BPARTNER_ID",dataIndex:"BILL_BPARTNER_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.BILL_BPARTNER_ID||"Bill_bpartner_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("BILL_BPARTNER_NAME", new N21.DataComp.LOV0041({xtype: "LOV0041",fieldMapping: [{column:"ID",field:"DC0059F_BILL_BPARTNER_ID"}],selectOnFocus:true,name:"BILL_BPARTNER_NAME",id:"DC0059F_BILL_BPARTNER_NAME",dataIndex:"BILL_BPARTNER_NAME",width:200,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.BILL_BPARTNER_NAME||"Invoice to",insert_allowed:true,update_allowed:true})   );
       this.fields.add("DELIV_BPARTNER_NAME", new N21.DataComp.LOV0041({xtype: "LOV0041",fieldMapping: [{column:"ID",field:"DC0059F_DELIV_BPARTNER_ID"}],selectOnFocus:true,name:"DELIV_BPARTNER_NAME",id:"DC0059F_DELIV_BPARTNER_NAME",dataIndex:"DELIV_BPARTNER_NAME",width:200,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.DELIV_BPARTNER_NAME||"Deliver to",insert_allowed:true,update_allowed:true})   );
       this.fields.add("DELIV_BPARTNER_ID", new Ext.form.Hidden ({xtype: "hidden",name:"DELIV_BPARTNER_ID",id:"DC0059F_DELIV_BPARTNER_ID",dataIndex:"DELIV_BPARTNER_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.DELIV_BPARTNER_ID||"Deliv_bpartner_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("PAY_BPARTNER_NAME", new N21.DataComp.LOV0041({xtype: "LOV0041",fieldMapping: [{column:"ID",field:"DC0059F_PAY_BPARTNER_ID"}],selectOnFocus:true,name:"PAY_BPARTNER_NAME",id:"DC0059F_PAY_BPARTNER_NAME",dataIndex:"PAY_BPARTNER_NAME",width:200,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.PAY_BPARTNER_NAME||"Pay by",insert_allowed:true,update_allowed:true})   );
       this.fields.add("PAY_BPARTNER_ID", new Ext.form.Hidden ({xtype: "hidden",name:"PAY_BPARTNER_ID",id:"DC0059F_PAY_BPARTNER_ID",dataIndex:"PAY_BPARTNER_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.PAY_BPARTNER_ID||"Pay_bpartner_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("BPARTNER_CONTACT_ID", new Ext.form.Hidden ({xtype: "hidden",name:"BPARTNER_CONTACT_ID",id:"DC0059F_BPARTNER_CONTACT_ID",dataIndex:"BPARTNER_CONTACT_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.BPARTNER_CONTACT_ID||"Bpartner_contact_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("BILL_BPARTNER_CONTACT_ID", new Ext.form.Hidden ({xtype: "hidden",name:"BILL_BPARTNER_CONTACT_ID",id:"DC0059F_BILL_BPARTNER_CONTACT_ID",dataIndex:"BILL_BPARTNER_CONTACT_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.BILL_BPARTNER_CONTACT_ID||"Bill_bpartner_contact_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("DELIV_BPARTNER_CONTACT_ID", new Ext.form.Hidden ({xtype: "hidden",name:"DELIV_BPARTNER_CONTACT_ID",id:"DC0059F_DELIV_BPARTNER_CONTACT_ID",dataIndex:"DELIV_BPARTNER_CONTACT_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.DELIV_BPARTNER_CONTACT_ID||"Deliv_bpartner_contact_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("PAY_BPARTNER_CONTACT_ID", new Ext.form.Hidden ({xtype: "hidden",name:"PAY_BPARTNER_CONTACT_ID",id:"DC0059F_PAY_BPARTNER_CONTACT_ID",dataIndex:"PAY_BPARTNER_CONTACT_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.PAY_BPARTNER_CONTACT_ID||"Pay_bpartner_contact_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("REF_SORDER_ID", new Ext.form.Hidden ({xtype: "hidden",name:"REF_SORDER_ID",id:"DC0059F_REF_SORDER_ID",dataIndex:"REF_SORDER_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.REF_SORDER_ID||"Ref_order_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("CURRENCY", new N21.DataComp.LOV0001({xtype: "LOV0001",selectOnFocus:true,name:"CURRENCY",id:"DC0059F_CURRENCY",dataIndex:"CURRENCY",width:80,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.CURRENCY||"Currency",insert_allowed:true,update_allowed:true})   );
       this.fields.add("PAYMETHOD_CODE", new Ext.form.TextField ({xtype: "textfield",name:"PAYMETHOD_CODE",id:"DC0059F_PAYMETHOD_CODE",dataIndex:"PAYMETHOD_CODE",width:80,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.PAYMETHOD_CODE||"Paymethod_code",insert_allowed:true,update_allowed:true})   );
       this.fields.add("SALESREP_ID", new Ext.form.Hidden ({xtype: "hidden",name:"SALESREP_ID",id:"DC0059F_SALESREP_ID",dataIndex:"SALESREP_ID",width:100,allowBlank:true,fieldLabel: this.resourceBundle.FieldLabel.SALESREP_ID||"Salesrep_id",insert_allowed:true,update_allowed:true})   );
       this.fields.add("TOTAL_AMOUNT", new Ext.form.NumberField ({xtype: "numberfield",name:"TOTAL_AMOUNT",id:"DC0059F_TOTAL_AMOUNT",dataIndex:"TOTAL_AMOUNT",width:100,allowBlank:false,labelSeparator:":*" ,fieldLabel: this.resourceBundle.FieldLabel.TOTAL_AMOUNT||"Total amount",insert_allowed:true,update_allowed:true,decimalPrecision:2,style: "text-align:right;"})   );

       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("C2",
             { layout:"form",columnWidth:.3, items:[ this.layoutItems.get("Modified")]}); 
       this.layoutItems.add("DocHeader",
             { xtype:"fieldset", title:this.resourceBundle.FieldsetTitle.DocHeader||"DocHeader",autoHeight:true,collapsible: true,width:"90%",items:[ this.fields.get("CLIENT_CODE"),this.fields.get("CLIENT_ID"),this.fields.get("DOC_NO"),this.fields.get("DOC_DATE"),this.fields.get("BPARTNER_NAME"),this.fields.get("BPARTNER_ID"),this.fields.get("REF_SORDER_ID"),this.fields.get("CURRENCY"),this.fields.get("TOTAL_AMOUNT")]});
       this.layoutItems.add("ThirdParties",
             { xtype:"fieldset", title:this.resourceBundle.FieldsetTitle.ThirdParties||"ThirdParties",autoHeight:true,collapsible: true,width:"90%",items:[ this.fields.get("BILL_BPARTNER_ID"),this.fields.get("BILL_BPARTNER_NAME"),this.fields.get("DELIV_BPARTNER_ID"),this.fields.get("DELIV_BPARTNER_NAME"),this.fields.get("PAY_BPARTNER_ID"),this.fields.get("PAY_BPARTNER_NAME")]});
       this.layoutItems.add("C1",
             { layout:"form",columnWidth:.4, items:[ this.fields.get("ID"),this.layoutItems.get("DocHeader"),this.layoutItems.get("ThirdParties")]}); 
       this.layoutItems.add("DC0060",
             new Ext.Window({ xtype:"window", modal:true, title:N21.DataComp.DC0060.prototype.resourceBundle.DcProperty.Title,  closeAction:"hide",closable:true,layout:"fit", width:700, height:450, items:{xtype:"DC0060",id:"DC0060", parentDcRelation:{name:"DC0059F",relation:[{parent:"ID",child:"SORDER_ID"}]}         }} ) ); 


       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:"DC0059F"
          ,firstFocusFieldName:"DOC_NO"
          ,childDCs: [{name:"DC0060",relation:[{parent:"ID",child:"SORDER_ID"}]}]
          ,buttons: [{xtype:"button",text:"Order lines",scope:this,handler:function() {this.show_window("DC0060");}  }]
          ,buttonAlign:"left"
          ,toolbarConfig:"STANDARD"
        });

        
       N21.DataComp.DC0059F.superclass.initComponent.apply(this, arguments);
     }

    ,onRender:function() {
       N21.DataComp.DC0059F.superclass.onRender.apply(this, arguments);
     }

    ,newDataRecord:function() {
       return new this.dataRecordMeta({_p_record_status:"insert"
              ,ID:""
              ,CLIENT_CODE:""
              ,CLIENT_ID:""
              ,DOC_NO:""
              ,DOC_DATE:""
              ,BPARTNER_ID:""
              ,BPARTNER_NAME:""
              ,CREATEDON:""
              ,CREATEDBY:""
              ,MODIFIEDON:""
              ,MODIFIEDBY:""
              ,BILL_BPARTNER_ID:""
              ,BILL_BPARTNER_NAME:""
              ,DELIV_BPARTNER_NAME:""
              ,DELIV_BPARTNER_ID:""
              ,PAY_BPARTNER_NAME:""
              ,PAY_BPARTNER_ID:""
              ,BPARTNER_CONTACT_ID:""
              ,BILL_BPARTNER_CONTACT_ID:""
              ,DELIV_BPARTNER_CONTACT_ID:""
              ,PAY_BPARTNER_CONTACT_ID:""
              ,REF_SORDER_ID:""
              ,CURRENCY:""
              ,PAYMETHOD_CODE:""
              ,SALESREP_ID:""
              ,TOTAL_AMOUNT:""});
     }


  });
  Ext.reg("DC0059F", N21.DataComp.DC0059F);

/** 
 * DataControl: Grid with Edit Form
 * Code: DC0059
 * Title: Sales orders
 */ 

  Ext.ns("N21.DataComp");
  N21.DataComp.DC0059 = Ext.extend(N21.Base.GridEditForm, {

     initComponent:function() {
       Ext.apply(this, {
           autoScroll:false
          ,layout:"border"
          ,dataComponentName:"DC0059"
          ,masterName:"DC0059G"
          ,detailName:"DC0059F"
          ,mdLayout:"card"
          ,border: false
          ,items: [
              {
                xtype:"panel"
               ,layout:"card"
               ,id:"MDTab"
               ,region:"center"
               ,defaults:{layout:"fit"}
               ,activeItem:0
               ,tabPosition: "bottom"
               ,items: [{
                            xtype: "DC0059G"
                           ,id: "DC0059G"
                           ,height:350
                       },{
                           xtype:"DC0059F"
                          ,id:"DC0059F"
                          ,height:350
                          ,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.DC0059.superclass.initComponent.apply(this, arguments);
     } 
  });
  Ext.reg("DC0059", N21.DataComp.DC0059);



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -