FreezeCheck.js.svn-base 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. Ext.define('erp.view.scm.reserve.FreezeCheck',{
  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: 'account-check',
  11. anchor: '100% 100%',
  12. tbar: [{
  13. xtype: 'monthdatefield',
  14. fieldLabel: '日期',
  15. allowBlank: false,
  16. labelWidth: 50,
  17. width: 150,
  18. id: 'yearmonth'
  19. },{
  20. xtype: 'tbtext',
  21. text:'当前冻结期间:',
  22. margin: '0 0 0 15'
  23. }, {
  24. xtype: 'displayfield',
  25. height: 23,
  26. id: 'date',
  27. name:'date',
  28. margin: '0 0 0 10'
  29. },'->'],
  30. columns: [{
  31. text: '',
  32. dataIndex: 'check',
  33. flex: 1,
  34. renderer: function(val, meta, record) {
  35. meta.tdCls = val;
  36. return '';
  37. }
  38. },{
  39. text: '序号',
  40. dataIndex: 'detno',
  41. flex: 0.7,
  42. renderer: function(val, meta, record) {
  43. return val;
  44. }
  45. },{
  46. text: '检测项',
  47. dataIndex: 'value',
  48. flex: 10,
  49. renderer: function(val, meta, record) {
  50. if(record.get('check') == 'error') {
  51. meta.style = 'color: gray';
  52. }
  53. return val;
  54. }
  55. },{
  56. text: '',
  57. dataIndex: 'link',
  58. flex: 1,
  59. renderer: function(val, meta, record) {
  60. if(record.get('check') == 'error') {
  61. meta.tdCls = 'detail';
  62. return '详细情况';
  63. }
  64. return '';
  65. }
  66. }],
  67. columnLines: true,
  68. store: Ext.create('Ext.data.Store',{
  69. fields: [{name: 'action', type: 'string'}, {name: 'detno', type : 'number'}, {name: 'type', type: 'string'}, {name: 'value', type: 'string'}],
  70. data: [{
  71. action: 'scm/reserve/chk_k.action',
  72. detno: 1,
  73. type: 'scm_chk_k',
  74. value: '其它出入库单据的单据类型+小类+部门是否设置了对方科目'
  75. },{
  76. action: 'scm/reserve/chk_l.action',
  77. detno: 2,
  78. type: 'scm_chk_l',
  79. value: '其它出入库基础科目设置是否有重复的'
  80. },{
  81. action: 'scm/reserve/chk_m.action',
  82. detno: 3,
  83. type: 'scm_chk_m',
  84. value: '是否有出入库单据出、入数量都不为0'
  85. },{
  86. action: 'scm/reserve/chk_n.action',
  87. detno: 4,
  88. type: 'scm_chk_n',
  89. value: '是否有出入库单据料号不存在'
  90. },{
  91. action: 'scm/reserve/chk_o.action',
  92. detno: 5,
  93. type: 'scm_chk_o',
  94. value: '是否有当月发生出入库单据明细物料/仓库存货科目未设置'
  95. },{
  96. action: 'scm/reserve/chk_p.action',
  97. detno: 6,
  98. type: 'scm_chk_p',
  99. value: '当期是否有未过账的出入库单据'
  100. },{
  101. action: 'scm/reserve/chk_y.action',
  102. detno: 7,
  103. type: 'scm_chk_y',
  104. value: '当月所有生产报废单是否审核'
  105. },{
  106. action: 'scm/reserve/chk_z.action',
  107. detno: 8,
  108. type: 'scm_chk_z',
  109. value: '是否有工单已完工未结案的'
  110. }]
  111. }),
  112. bbar: [{
  113. xtype: 'checkbox',
  114. boxLabel: '知道错误了,我要继续冻结',
  115. id : 'allow',
  116. hidden : true,
  117. margin: '0 5 0 20'
  118. },'->',{
  119. cls: 'x-btn-blue',
  120. id: 'check',
  121. text: '冻结检查',
  122. width: 80,
  123. margin: '0 0 0 50'
  124. },{
  125. cls: 'x-btn-blue',
  126. id: 'accoutover',
  127. text: '冻 结',
  128. width: 80,
  129. disabled : true,
  130. margin: '0 0 0 5'
  131. },{
  132. cls: 'x-btn-blue',
  133. id: 'resaccoutover',
  134. text: '反冻结',
  135. width: 80,
  136. margin: '0 0 0 5'
  137. },{
  138. cls: 'x-btn-blue',
  139. id: 'close',
  140. text: $I18N.common.button.erpCloseButton,
  141. width: 80,
  142. margin: '0 175 0 5'
  143. }]
  144. }]
  145. });
  146. me.callParent(arguments);
  147. }
  148. });