QueryPanel.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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#pd_prodcode',
  86. bind: '{pd_prodcode}',
  87. fieldLabel: '物料编号',
  88. fieldMode: 'DETAIL',
  89. queryType:'VAG',
  90. allowBlank: true,
  91. columnWidth: 0.25,
  92. configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
  93. dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
  94. }, {
  95. xtype: 'textfield',
  96. name: 'pr_detail',
  97. bind: '{pr_detail}',
  98. fieldLabel: '物料名称',
  99. allowBlank: true,
  100. columnWidth: 0.25
  101. }, {
  102. xtype: 'combobox',
  103. name: 'pr_statuscode',
  104. bind: '{pr_statuscode}',
  105. fieldLabel: '审核状态',
  106. allowBlank: true,
  107. columnWidth: 0.25,
  108. store: Ext.create('Ext.data.Store', {
  109. fields: ['pr_statuscode', 'pr_status'],
  110. queryMode: 'local',
  111. displayField: 'pr_status',
  112. valueField: 'pr_statuscode',
  113. data: [
  114. ["$ALL", "全部"],
  115. ["=AUDITED", "已审核"],
  116. ["<>AUDITED", "未审核"]
  117. ]
  118. })
  119. }, {
  120. xtype: 'combobox',
  121. name: 'pu_acceptstatuscode',
  122. bind: '{pu_acceptstatuscode}',
  123. fieldLabel: '入库状态',
  124. allowBlank: true,
  125. columnWidth: 0.25,
  126. store: Ext.create('Ext.data.Store', {
  127. fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
  128. queryMode: 'local',
  129. displayField: 'pu_acceptstatus',
  130. valueField: 'pu_acceptstatuscode',
  131. data: [
  132. ["$ALL", "全部"],
  133. ["=TURNOUT", "已入库"],
  134. ["=NULL", "未入库"],
  135. ["=PARTOUT", "部分入库"]
  136. ]
  137. })
  138. }],
  139. moreQueryFormItems: [{
  140. xtype: 'textfield',
  141. name: 'pu_buyername',
  142. bind: '{pu_buyername}',
  143. fieldLabel: '采购员',
  144. allowBlank: true
  145. }, {
  146. xtype: 'textfield',
  147. name: 'pu_total',
  148. bind: '{pu_total}',
  149. fieldLabel: '金额',
  150. allowBlank: true
  151. }, {
  152. xtype: 'condatefield',
  153. name: 'pu_delivery',
  154. bind: '{pu_delivery}',
  155. fieldLabel: '交货日期',
  156. allowBlank: true,
  157. columnWidth: 1
  158. }],
  159. queryGridConfig: {
  160. _idField:'pu_id',
  161. _codeField:'pu_code',
  162. _title:'采购单',
  163. _addXtype:'test-order-formpanel',
  164. _baseVastUrl:'http://192.168.253.58:8800/purchase/',
  165. _baseColumn: [{
  166. text: '序号',
  167. width: 80,
  168. xtype: 'rownumberer'
  169. }, {
  170. text: 'id',
  171. dataIndex: 'pu_id',
  172. width: 100,
  173. xtype: 'numbercolumn'
  174. }, {
  175. text: '单据编号',
  176. dataIndex: 'pu_code',
  177. width: 120
  178. }, {
  179. text: '单据状态',
  180. dataIndex: 'pu_status',
  181. width: 120
  182. }, {
  183. text: '下单日期',
  184. dataIndex: 'pu_indate',
  185. xtype:'datecolumn',
  186. width: 200
  187. },{
  188. text: '供应商名称',
  189. dataIndex: 'pu_vendname',
  190. width: 120
  191. },{
  192. text: '含税金额',
  193. dataIndex: 'pu_taxtotal',
  194. xtype:'numbercolumn',
  195. width: 120
  196. },{
  197. text: '金额',
  198. dataIndex: 'pu_total',
  199. xtype:'numbercolumn',
  200. width: 120
  201. }],
  202. _relativeColumn: [{
  203. text: '序号',
  204. width: 80,
  205. xtype: 'rownumberer'
  206. }, {
  207. text: 'id',
  208. dataIndex: 'pu_id',
  209. width: 100,
  210. xtype: 'numbercolumn'
  211. }, {
  212. text: '单据编号',
  213. dataIndex: 'pu_code',
  214. width: 120
  215. }, {
  216. text: '单据状态',
  217. dataIndex: 'pu_status',
  218. width: 120
  219. }, {
  220. text: '下单日期',
  221. dataIndex: 'pu_indate',
  222. xtype:'datecolumn',
  223. width: 200
  224. },{
  225. text: '供应商名称',
  226. dataIndex: 'pu_vendname',
  227. width: 120
  228. },{
  229. text: '采购序号',
  230. dataIndex: 'pd_detno',
  231. xtype:'numbercolumn',
  232. width: 120
  233. },{
  234. text: '物料编号',
  235. dataIndex: 'pd_prodcode',
  236. width: 120
  237. },{
  238. text: '数量',
  239. dataIndex: 'pd_qty',
  240. xtype:'numbercolumn',
  241. width: 120
  242. },{
  243. text: '单价',
  244. dataIndex: 'pd_price',
  245. xtype:'numbercolumn',
  246. width: 120
  247. },{
  248. text: '已转数',
  249. dataIndex: 'pd_ytqy',
  250. xtype:'numbercolumn',
  251. width: 120
  252. }]
  253. }
  254. });