QueryPanel.js 5.0 KB

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