ShiftCheck.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Ext.define('erp.view.ma.ShiftCheck',{
  2. extend: 'Ext.Viewport',
  3. layout: 'anchor',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. xtype: 'grid',
  10. id: 'shift-check',
  11. anchor: '100% 100%',
  12. tbar: ['->',{
  13. cls: 'x-btn-blue',
  14. id: 'check',
  15. text: '检查',
  16. width: 80
  17. },{
  18. cls: 'x-btn-blue',
  19. id: 'close',
  20. text: $I18N.common.button.erpCloseButton,
  21. width: 80,
  22. margin: '0 0 0 5'
  23. },'->'],
  24. columns: [{
  25. text: '',
  26. dataIndex: 'check',
  27. flex: 1,
  28. renderer: function(val, meta, record) {
  29. meta.tdCls = val;
  30. return '';
  31. }
  32. },{
  33. text: '检测项',
  34. dataIndex: 'value',
  35. flex: 10,
  36. renderer: function(val, meta, record) {
  37. if(record.get('check') == 'error') {
  38. meta.style = 'color: gray';
  39. }
  40. return val;
  41. }
  42. },{
  43. text: '',
  44. dataIndex: 'link',
  45. flex: 1,
  46. renderer: function(val, meta, record) {
  47. if(record.get('check') == 'error') {
  48. meta.tdCls = 'detail';
  49. return '详细情况';
  50. }
  51. return '';
  52. }
  53. }],
  54. columnLines: true,
  55. features : [Ext.create('Ext.grid.feature.Grouping',{
  56. startCollapsed: false,
  57. groupHeaderTpl: '{name} (Count:{rows.length})'
  58. })],
  59. store: Ext.create('Ext.data.Store',{
  60. fields: ['action', 'type', 'group', 'value'],
  61. groupField: 'group',
  62. data: [{
  63. action: 'ma/shiftcheck/chk_a.action',
  64. type: 'ma_chk_a',
  65. group: '采购模块',
  66. value: '采购单数量与来源请购单已转数量一致'
  67. },{
  68. action: 'ma/shiftcheck/chk_b.action',
  69. type: 'ma_chk_b',
  70. group: '采购模块',
  71. value: '收料单数量与来源采购单已转收料数一致'
  72. },{
  73. action: 'ma/shiftcheck/chk_c.action',
  74. type: 'ma_chk_c',
  75. group: '采购模块',
  76. value: '检验单检验数量、合格数、不合格数与收料单的一致'
  77. },{
  78. action: 'ma/shiftcheck/chk_d.action',
  79. type: 'ma_chk_d',
  80. group: '采购模块',
  81. value: '采购验收单数量与检验单入良品仓数一致'
  82. },{
  83. action: 'ma/shiftcheck/chk_e.action',
  84. type: 'ma_chk_e',
  85. group: '采购模块',
  86. value: '采购验收单(已过账)数量与采购单已验收数量一致'
  87. },{
  88. action: 'ma/shiftcheck/chk_f.action',
  89. type: 'ma_chk_f',
  90. group: '采购模块',
  91. value: '不良品入库单数量与检验单入不良品仓数一致'
  92. },{
  93. action: 'ma/shiftcheck/chk_g.action',
  94. type: 'ma_chk_g',
  95. group: '采购模块',
  96. value: '不良品入库单(已过账)数量与采购单不良入库数一致'
  97. },{
  98. action: 'ma/shiftcheck/chk_h.action',
  99. type: 'ma_chk_h',
  100. group: '销售模块',
  101. value: '通知单数量与订单已转数量一致'
  102. },{
  103. action: 'ma/shiftcheck/chk_i.action',
  104. type: 'ma_chk_i',
  105. group: '销售模块',
  106. value: '出货单(包含未过账)数量与来源通知单已转数量一致'
  107. },{
  108. action: 'ma/shiftcheck/chk_j.action',
  109. type: 'ma_chk_j',
  110. group: '销售模块',
  111. value: '出货单(已过账)数量与来源订单已发货数量一致'
  112. },{
  113. action: 'ma/shiftcheck/chk_k.action',
  114. type: 'ma_chk_k',
  115. group: '生产模块',
  116. value: '领料单数量(未过账)与工单已转领料数一致'
  117. },{
  118. action: 'ma/shiftcheck/chk_l.action',
  119. type: 'ma_chk_l',
  120. group: '生产模块',
  121. value: '领料单数量(已过账)与工单已领料数一致'
  122. },{
  123. action: 'ma/shiftcheck/chk_m.action',
  124. type: 'ma_chk_m',
  125. group: '生产模块',
  126. value: '补料单数量(未过账)与工单已转补料数一致'
  127. },{
  128. action: 'ma/shiftcheck/chk_n.action',
  129. type: 'ma_chk_n',
  130. group: '生产模块',
  131. value: '补料单数量(已过账)与工单已补料数一致'
  132. }]
  133. })
  134. }]
  135. });
  136. me.callParent(arguments);
  137. }
  138. });