ProdCreateBarcode.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. Ext.define('erp.view.scm.reserve.ProdCreateBarcode',{
  2. extend: 'Ext.Viewport',
  3. alias: 'widget.erpProdCreateBarcode',
  4. hideBorders: true,
  5. id: 'ProdCreateBarcode',
  6. frame : true,
  7. layout : 'column',
  8. autoScroll : true,
  9. cls: 'u-form-default',
  10. fieldDefaults : {
  11. fieldStyle : "background:#FFFAFA;color:#515151;",
  12. focusCls: 'x-form-field-cir-focus',
  13. labelAlign : "right",
  14. msgTarget: 'side',
  15. blankText : $I18N.common.form.blankText
  16. },
  17. FormUtil: Ext.create('erp.util.FormUtil'),
  18. initComponent : function(){
  19. var me = this;
  20. Ext.apply(me, {
  21. items: [{
  22. layout: 'column',
  23. items: [{
  24. xtype: "window",
  25. autoShow: true,
  26. closable: true,
  27. maximizable : true,
  28. buttonAlign : 'center',
  29. width: '75%',
  30. height: '75%',
  31. layout: 'column',
  32. items: [
  33. { xtype: "textfield", name: "barCode", id:'barCode',labelAlign : "right",fieldLabel: '条码号', allowBlank: true,labelWidth:80,columnWidth: 0.83,margin: '20 0 0 0',maxLength:300,emptyText: '请采集条码信息',listeners:{
  34. 'render' : function() {
  35. Ext.getCmp('barCode').focus(false, 100);
  36. }
  37. }}, {xtype:'button' , text:'清空',columnWidth: 0.07,margin: '20 0 0 0',handler: function(view, rowIndex, colIndex) {
  38. Ext.getCmp('barCode').setValue("");
  39. Ext.getCmp('barCode').focus(false, 100);
  40. }} ,
  41. { xtype: 'dbfindtrigger',fieldLabel: '<font color="red">物料编号</font>',id: 'pr_code',name: 'pr_code',
  42. labelAlign : "right",allowBlank: false,labelWidth:80,columnWidth: 0.45,margin: '20 0 0 0'},
  43. { xtype: "textfield", name: "pr_partNumber", id:'pr_partNumber',labelAlign : "right",fieldLabel: '<font color="red">数量</font>', allowBlank: false,labelWidth:80,columnWidth: 0.45,margin: '20 0 0 0'},
  44. { xtype: "textfield", name: "batchCode", id:'batchCode',labelAlign : "right",fieldLabel: '批号', allowBlank: true,labelWidth:80,columnWidth: 0.45,margin: '20 0 0 0',maxLength:30},
  45. { xtype: "textarea", name: "errMsg", id:'errMsg',labelAlign : "right",fieldLabel: '提示信息', allowBlank: true,labelWidth:80,columnWidth: 0.6,margin: '60 0 0 0',emptyText: '提示信息'},
  46. ],
  47. buttons: [
  48. {xtype: 'erpGenerateBarcodeButton'},
  49. /*{
  50. xtype: 'checkboxfield',
  51. name: 'autoPrint',
  52. id:'autoPrint1',
  53. boxLabel: '自动打印条码',
  54. checked:true
  55. },*/
  56. {xtype: 'erpCloseButton'}
  57. ]
  58. }]
  59. }]
  60. });
  61. me.callParent(arguments);
  62. }
  63. });