QueryPanel.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. Ext.define('saas.view.test.query.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'test-query-querypanel',
  4. // controller: 'test-query-formcontroller',
  5. // viewModel: 'test-query-formmodel',
  6. viewName: 'test-query-formpanel',
  7. _baseVastUrl:'http://192.168.253.58:8800/purchase/',
  8. _idField:'pu_id',
  9. _codeField:'pu_code',
  10. queryFormItems: [{
  11. xtype: 'hidden',
  12. name: 'pu_id',
  13. bind: '{pu_id}',
  14. fieldLabel: 'ID',
  15. allowBlank: true,
  16. columnWidth: 0
  17. }, {
  18. xtype: 'dbfindtrigger',
  19. name: 'pu_code',
  20. bind: '{pu_code}',
  21. fieldLabel: '单据编号',
  22. allowBlank: true,
  23. columnWidth: 0.25,
  24. configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
  25. dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
  26. }, {
  27. xtype: 'condatefield',
  28. name: 'pu_date',
  29. bind: '{pu_date}',
  30. fieldLabel: '采购日期',
  31. allowBlank: true,
  32. columnWidth: 0.5
  33. }, {
  34. xtype: 'dbfindtrigger',
  35. name: 'pu_vendcode',
  36. bind: '{pu_vendcode}',
  37. fieldLabel: '供应商编号',
  38. allowBlank: true,
  39. columnWidth: 0.25,
  40. configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
  41. dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
  42. }, {
  43. xtype: 'textfield',
  44. name: 'pu_vendname',
  45. bind: '{pu_vendname}',
  46. fieldLabel: '供应商名称',
  47. allowBlank: true,
  48. columnWidth: 0.25
  49. }, {
  50. xtype: 'dbfindtrigger',
  51. name: 'pd_prodcode',
  52. bind: '{pd_prodcode}',
  53. fieldLabel: '物料编号',
  54. fieldMode: 'DETAIL',
  55. allowBlank: true,
  56. columnWidth: 0.25,
  57. configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
  58. dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
  59. }, {
  60. xtype: 'textfield',
  61. name: 'pr_detail',
  62. bind: '{pr_detail}',
  63. fieldLabel: '物料名称',
  64. allowBlank: true,
  65. columnWidth: 0.25
  66. }, {
  67. xtype: 'remotecombo',
  68. name: 'pr_statuscode',
  69. bind: '{pr_statuscode}',
  70. fieldLabel: '审核状态',
  71. allowBlank: true,
  72. columnWidth: 0.25,
  73. store: Ext.create('Ext.data.Store', {
  74. fields: ['pr_statuscode', 'pr_status'],
  75. queryMode: 'local',
  76. displayField: 'pr_status',
  77. valueField: 'pr_statuscode',
  78. data: [
  79. ["$ALL", "全部"],
  80. ["=AUDITED", "已审核"],
  81. ["<>AUDITED", "未审核"]
  82. ]
  83. })
  84. }, {
  85. xtype: 'remotecombo',
  86. name: 'pu_acceptstatuscode',
  87. bind: '{pu_acceptstatuscode}',
  88. fieldLabel: '入库状态',
  89. allowBlank: true,
  90. columnWidth: 0.25,
  91. store: Ext.create('Ext.data.Store', {
  92. fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
  93. queryMode: 'local',
  94. displayField: 'pu_acceptstatus',
  95. valueField: 'pu_acceptstatuscode',
  96. data: [
  97. ["$ALL", "全部"],
  98. ["=TURNOUT", "已入库"],
  99. ["=NULL", "未入库"],
  100. ["=PARTOUT", "部分入库"]
  101. ]
  102. })
  103. }],
  104. moreQueryFormItems: [{
  105. xtype: 'textfield',
  106. name: 'pu_buyername',
  107. bind: '{pu_buyername}',
  108. fieldLabel: '采购员',
  109. allowBlank: true
  110. }, {
  111. xtype: 'textfield',
  112. name: 'pu_total',
  113. bind: '{pu_total}',
  114. fieldLabel: '金额',
  115. allowBlank: true
  116. }, {
  117. xtype: 'condatefield',
  118. name: 'pu_delivery',
  119. bind: '{pu_delivery}',
  120. fieldLabel: '交货日期',
  121. allowBlank: true,
  122. columnWidth: 1
  123. }],
  124. queryGridConfig: {
  125. _idField:'pu_id',
  126. _codeField:'pu_code',
  127. columns: [{
  128. text: '序号',
  129. width: 80,
  130. xtype: 'rownumberer'
  131. }, {
  132. text: 'id',
  133. dataIndex: 'pu_id',
  134. width: 100,
  135. xtype: 'numbercolumn'
  136. }, {
  137. text: '单据编号',
  138. dataIndex: 'pu_code',
  139. width: 120
  140. }, {
  141. text: '单据状态',
  142. dataIndex: 'pu_status',
  143. width: 120
  144. }, {
  145. text: '下单日期',
  146. dataIndex: 'pu_indate',
  147. xtype:'datecolumn',
  148. width: 200
  149. },{
  150. text: '供应商名称',
  151. dataIndex: 'pu_vendname',
  152. width: 120
  153. },{
  154. text: '含税金额',
  155. dataIndex: 'pu_taxtotal',
  156. xtype:'numbercolumn',
  157. width: 120
  158. },{
  159. text: '金额',
  160. dataIndex: 'pu_total',
  161. xtype:'numbercolumn',
  162. width: 120
  163. }]
  164. }
  165. });