OverStationGet.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. Ext.define('erp.view.pm.mes.OverStationGet',{
  2. extend: 'Ext.Viewport',
  3. layout: 'anchor',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. id:'form',
  10. title:'过站采集',
  11. xtype: 'form',
  12. anchor: '100% 35%',
  13. bodyStyle: 'background: #f1f1f1;',
  14. bodyPadding:5,
  15. autoScroll: true,
  16. scrollable: true,
  17. items:[{
  18. xtype: 'fieldcontainer',
  19. defaults: {
  20. width: 250,
  21. fieldStyle : 'background:#f0f0f0;border: 0px solid #8B8970;font-color:blue'
  22. },
  23. layout: {
  24. type: 'table',
  25. columns: 4
  26. },
  27. items: [{
  28. xtype: 'textfield',
  29. fieldLabel: '资源编号',
  30. allowBlank:false,
  31. id:'sc_code',
  32. name:'sc_code',
  33. readOnly:true
  34. },{
  35. xtype: 'textfield',
  36. fieldLabel: '资源名称',
  37. readOnly:true,
  38. id:'sc_name',
  39. name:'sc_name'
  40. },{
  41. xtype: 'textfield',
  42. fieldLabel: '工序编号',
  43. readOnly:true,
  44. id:'st_code',
  45. name:'st_code'
  46. },{
  47. xtype: 'textfield',
  48. fieldLabel: '工序名称',
  49. readOnly:true,
  50. id:'st_name',
  51. name:'st_name'
  52. },{
  53. xtype: 'textfield',
  54. fieldLabel: '作业单号',
  55. id:'mc_code' ,
  56. name:'mc_code',
  57. readOnly:true
  58. },{
  59. xtype: 'textfield',
  60. fieldLabel: '工单数量',
  61. readOnly:true,
  62. id:'mc_qty',
  63. name:'mc_qty'
  64. },{
  65. xtype: 'textfield',
  66. fieldLabel: '计数',
  67. readOnly : true,
  68. id:'mcd_inqty'
  69. },{
  70. xtype: 'textfield',
  71. fieldLabel: '剩余',
  72. readOnly : true,
  73. id:'mcd_restqty'
  74. },{
  75. xtype: 'checkbox',
  76. boxLabel : '拼板采集',
  77. name : 'getCombine',
  78. checked : false,
  79. id : 'getCombine',
  80. fieldStyle:''
  81. },{
  82. xtype: 'textfield',
  83. fieldLabel: '序列号',
  84. id:'sn_code',
  85. name:'sn_code',
  86. colspan:2,
  87. fieldStyle : "background:rgb(224, 224, 255);",
  88. labelStyle:"color:red;",
  89. emptyText:'请录入序列号'
  90. }]
  91. }]
  92. },{
  93. xtype: 'dataview',
  94. anchor: '100% 50%',
  95. id: 't_result',
  96. autoScroll: true,
  97. scrollable: true,
  98. store: new Ext.data.Store({
  99. fields: ['type', 'text']
  100. }),
  101. cls: 'msg-body',
  102. tpl: new Ext.XTemplate(
  103. '<audio id="audio-success" src="' + basePath + 'resource/audio/success.wav"></audio>',
  104. '<audio id="audio-error" src="' + basePath + 'resource/audio/error.wav"></audio>',
  105. '<tpl for=".">',
  106. '<div class="msg-item">',
  107. '<tpl if="type == \'success\'"><span class="text-info">{text}</span></tpl>',
  108. '<tpl if="type == \'error\'"><span class="text-warning">{text}</span></tpl>',
  109. '</div>',
  110. '</tpl>'
  111. ),
  112. itemSelector: 'div.msg-item',
  113. emptyText: '提示信息',
  114. deferEmptyText: false,
  115. autoScroll: true,
  116. append: function(text, type) {
  117. type = type || 'success';
  118. this.getStore().add({text: text, type: type});
  119. this.getEl().scroll("b", this.getEl().getHeight(), true);
  120. var el = Ext.get('audio-' + type).dom;
  121. el.play();
  122. }
  123. }]
  124. });
  125. me.callParent(arguments);
  126. }
  127. });