FormPanel.js 5.6 KB

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