FreezeCheck.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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: 'value',
  41. flex: 10,
  42. renderer: function(val, meta, record) {
  43. if(record.get('check') == 'error') {
  44. meta.style = 'color: gray';
  45. }
  46. return val;
  47. }
  48. },{
  49. text: '',
  50. dataIndex: 'link',
  51. flex: 1,
  52. renderer: function(val, meta, record) {
  53. if(record.get('check') == 'error') {
  54. meta.tdCls = 'detail';
  55. return '详细情况';
  56. }
  57. return '';
  58. }
  59. }],
  60. columnLines: true,
  61. store: Ext.create('Ext.data.Store',{
  62. fields: [{name: 'action', type: 'string'}, {name: 'type', type: 'string'}, {name: 'value', type: 'string'}],
  63. data: [{
  64. action: 'scm/reserve/chk_k.action',
  65. type: 'scm_chk_k',
  66. value: '其它出入库单据的单据类型+小类+部门是否设置了对方科目'
  67. },{
  68. action: 'scm/reserve/chk_l.action',
  69. type: 'scm_chk_l',
  70. value: '其它出入库基础科目设置是否有重复的'
  71. },{
  72. action: 'scm/reserve/chk_m.action',
  73. type: 'scm_chk_m',
  74. value: '是否有出入库单据出、入数量都不为0'
  75. },{
  76. action: 'scm/reserve/chk_n.action',
  77. type: 'scm_chk_n',
  78. value: '是否有出入库单据料号不存在'
  79. },{
  80. action: 'scm/reserve/chk_o.action',
  81. type: 'scm_chk_o',
  82. value: '是否有当月发生出入库单据明细物料/仓库存货科目未设置'
  83. },{
  84. action: 'scm/reserve/chk_p.action',
  85. type: 'scm_chk_p',
  86. value: '当期是否有未过账的出入库单据'
  87. },{
  88. action: 'scm/reserve/chk_y.action',
  89. type: 'scm_chk_y',
  90. value: '当月所有生产报废单是否审核'
  91. },{
  92. action: 'scm/reserve/chk_z.action',
  93. type: 'scm_chk_z',
  94. value: '是否有工单已完工未结案的'
  95. }]
  96. }),
  97. bbar: [{
  98. xtype: 'checkbox',
  99. boxLabel: '知道错误了,我要继续冻结',
  100. id : 'allow',
  101. hidden : true,
  102. margin: '0 5 0 20'
  103. },'->',{
  104. cls: 'x-btn-blue',
  105. id: 'check',
  106. text: '冻结检查',
  107. width: 80,
  108. margin: '0 0 0 50'
  109. },{
  110. cls: 'x-btn-blue',
  111. id: 'accoutover',
  112. text: '冻 结',
  113. width: 80,
  114. disabled : true,
  115. margin: '0 0 0 5'
  116. },{
  117. cls: 'x-btn-blue',
  118. id: 'resaccoutover',
  119. text: '反冻结',
  120. width: 80,
  121. margin: '0 0 0 5'
  122. },{
  123. cls: 'x-btn-blue',
  124. id: 'close',
  125. text: $I18N.common.button.erpCloseButton,
  126. width: 80,
  127. margin: '0 175 0 5'
  128. }]
  129. }]
  130. });
  131. me.callParent(arguments);
  132. }
  133. });