QueryPanel.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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-querypanel',
  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. dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
  25. dbfinds:[{
  26. from:'ve_code',to:'pu_code'
  27. }],
  28. dbColumns:[{
  29. conditionCode:'ve_id',
  30. "text": "供应商ID",
  31. "flex": 0,
  32. "dataIndex": "ve_id",
  33. "width": 0,
  34. "xtype": "",
  35. "items": null
  36. },{
  37. conditionCode:'ve_code',
  38. "text": "供应商编号",
  39. "flex": 1,
  40. "dataIndex": "ve_code",
  41. "width": 100,
  42. "xtype": "",
  43. "items": null
  44. }, {
  45. conditionCode:'ve_name',
  46. "text": "供应商名称",
  47. "flex": 1,
  48. "dataIndex": "ve_name",
  49. "xtype": "",
  50. "items": null
  51. }, {
  52. conditionCode:'ve_type',
  53. "text": "供应商类型",
  54. "flex": 0,
  55. "dataIndex": "ve_type",
  56. "width": 200,
  57. "xtype": "",
  58. "items": null
  59. }]
  60. }, {
  61. xtype: 'condatefield',
  62. name: 'pu_date',
  63. bind: '{pu_date}',
  64. fieldLabel: '采购日期',
  65. allowBlank: true,
  66. columnWidth: 0.5
  67. }, {
  68. xtype: 'dbfindtrigger',
  69. name: 'pu_vendcode',
  70. bind: '{pu_vendcode}',
  71. fieldLabel: '供应商编号',
  72. allowBlank: true,
  73. columnWidth: 0.25,
  74. configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
  75. dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
  76. }, {
  77. xtype: 'textfield',
  78. name: 'pu_vendname',
  79. bind: '{pu_vendname}',
  80. fieldLabel: '供应商名称',
  81. allowBlank: true,
  82. columnWidth: 0.25
  83. }, {
  84. xtype: 'dbfindtrigger',
  85. name: 'pd_prodcode',
  86. bind: '{pd_prodcode}',
  87. fieldLabel: '物料编号',
  88. fieldMode: 'DETAIL',
  89. allowBlank: true,
  90. columnWidth: 0.25,
  91. configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
  92. dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
  93. }, {
  94. xtype: 'textfield',
  95. name: 'pr_detail',
  96. bind: '{pr_detail}',
  97. fieldLabel: '物料名称',
  98. allowBlank: true,
  99. columnWidth: 0.25
  100. }, {
  101. xtype: 'remotecombo',
  102. name: 'pr_statuscode',
  103. bind: '{pr_statuscode}',
  104. fieldLabel: '审核状态',
  105. allowBlank: true,
  106. columnWidth: 0.25,
  107. store: Ext.create('Ext.data.Store', {
  108. fields: ['pr_statuscode', 'pr_status'],
  109. queryMode: 'local',
  110. displayField: 'pr_status',
  111. valueField: 'pr_statuscode',
  112. data: [
  113. ["$ALL", "全部"],
  114. ["=AUDITED", "已审核"],
  115. ["<>AUDITED", "未审核"]
  116. ]
  117. })
  118. }, {
  119. xtype: 'remotecombo',
  120. name: 'pu_acceptstatuscode',
  121. bind: '{pu_acceptstatuscode}',
  122. fieldLabel: '入库状态',
  123. allowBlank: true,
  124. columnWidth: 0.25,
  125. store: Ext.create('Ext.data.Store', {
  126. fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
  127. queryMode: 'local',
  128. displayField: 'pu_acceptstatus',
  129. valueField: 'pu_acceptstatuscode',
  130. data: [
  131. ["$ALL", "全部"],
  132. ["=TURNOUT", "已入库"],
  133. ["=NULL", "未入库"],
  134. ["=PARTOUT", "部分入库"]
  135. ]
  136. })
  137. }],
  138. moreQueryFormItems: [{
  139. xtype: 'textfield',
  140. name: 'pu_buyername',
  141. bind: '{pu_buyername}',
  142. fieldLabel: '采购员',
  143. allowBlank: true
  144. }, {
  145. xtype: 'textfield',
  146. name: 'pu_total',
  147. bind: '{pu_total}',
  148. fieldLabel: '金额',
  149. allowBlank: true
  150. }, {
  151. xtype: 'condatefield',
  152. name: 'pu_delivery',
  153. bind: '{pu_delivery}',
  154. fieldLabel: '交货日期',
  155. allowBlank: true,
  156. columnWidth: 1
  157. }],
  158. queryGridConfig: {
  159. _idField:'pu_id',
  160. _codeField:'pu_code',
  161. columns: [{
  162. text: '序号',
  163. width: 80,
  164. xtype: 'rownumberer'
  165. }, {
  166. text: 'id',
  167. dataIndex: 'pu_id',
  168. width: 100,
  169. xtype: 'numbercolumn'
  170. }, {
  171. text: '单据编号',
  172. dataIndex: 'pu_code',
  173. width: 120
  174. }, {
  175. text: '单据状态',
  176. dataIndex: 'pu_status',
  177. width: 120
  178. }, {
  179. text: '下单日期',
  180. dataIndex: 'pu_indate',
  181. xtype:'datecolumn',
  182. width: 200
  183. },{
  184. text: '供应商名称',
  185. dataIndex: 'pu_vendname',
  186. width: 120
  187. },{
  188. text: '含税金额',
  189. dataIndex: 'pu_taxtotal',
  190. xtype:'numbercolumn',
  191. width: 120
  192. },{
  193. text: '金额',
  194. dataIndex: 'pu_total',
  195. xtype:'numbercolumn',
  196. width: 120
  197. }]
  198. }
  199. });