QueryPanel.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. Ext.define('saas.view.purchase.purchasein.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'purchase-purchasein-querypanel',
  4. controller: 'purchase-purchasein-queryformcontroller',
  5. viewModel: 'purchase-purchasein-queryformmodel',
  6. _baseVastUrl:'http://192.168.253.58:8800/purchase/',
  7. _idField:'id',
  8. _codeField:'pi_inoutno',
  9. queryFormItems: [{
  10. xtype: 'hidden',
  11. name: 'id',
  12. bind: '{id}',
  13. fieldLabel: 'ID',
  14. allowBlank: true,
  15. columnWidth: 0
  16. }, {
  17. xtype: 'textfield',
  18. name: 'pi_inoutno',
  19. bind: '{pi_inoutno}',
  20. fieldLabel: '单据编号',
  21. allowBlank: true,
  22. columnWidth: 0.25
  23. }, {
  24. xtype: 'condatefield',
  25. name: 'pi_date',
  26. bind: '{pi_date}',
  27. fieldLabel: '单据日期',
  28. allowBlank: true,
  29. columnWidth: 0.5
  30. }, {
  31. xtype: 'textfield',
  32. name: 'pi_vendcode',
  33. bind: '{pi_vendcode}',
  34. fieldLabel: '供应商编号',
  35. allowBlank: true,
  36. hidden:true,
  37. columnWidth: 0.25
  38. }, {
  39. xtype: 'textfield',
  40. name: 'pi_vendname',
  41. bind: '{pi_vendname}',
  42. fieldLabel: '供应商名称',
  43. allowBlank: true,
  44. columnWidth: 0.25
  45. }, {
  46. xtype: 'dbfindtrigger',
  47. name: 'pd_prodcode',
  48. bind: '{pd_prodcode}',
  49. fieldLabel: '物料编号',
  50. fieldMode: 'DETAIL',
  51. queryType:'VAG',
  52. hidden:true,
  53. allowBlank: true,
  54. columnWidth: 0.25
  55. }, {
  56. xtype: 'dbfindtrigger',
  57. name: 'pr_detail#pd_prodcode',
  58. bind: '{pr_detail}',
  59. fieldLabel: '物料名称',
  60. allowBlank: true,
  61. columnWidth: 0.25
  62. }, {
  63. xtype: 'combobox',
  64. name: 'pi_statuscode',
  65. bind: '{pi_statuscode}',
  66. fieldLabel: '审核状态',
  67. allowBlank: true,
  68. columnWidth: 0.25,
  69. queryMode: 'local',
  70. displayField: 'pi_status',
  71. valueField: 'pi_statuscode',
  72. store: Ext.create('Ext.data.ArrayStore', {
  73. fields: ['pi_statuscode', 'pi_status'],
  74. data: [
  75. ["$ALL", "全部"],
  76. ["AUDITED", "已审核"],
  77. ["UNAUDITED", "未审核"]
  78. ]
  79. })
  80. }],
  81. moreQueryFormItems: [{
  82. xtype: 'textfield',
  83. name: 'pu_buyername',
  84. bind: '{pu_buyername}',
  85. fieldLabel: '采购员',
  86. allowBlank: true
  87. }, {
  88. xtype: 'textfield',
  89. name: 'pu_total',
  90. bind: '{pu_total}',
  91. fieldLabel: '金额',
  92. allowBlank: true
  93. }, {
  94. xtype: 'condatefield',
  95. name: 'pu_delivery',
  96. bind: '{pu_delivery}',
  97. fieldLabel: '交货日期',
  98. allowBlank: true,
  99. columnWidth: 1
  100. }],
  101. queryGridConfig: {
  102. _idField:'id',
  103. _codeField:'pi_inoutno',
  104. _title:'采购验收单',
  105. _defaultCondition:' pi_class = \'采购验收单\'',
  106. _addXtype:'purchase-purchasein-formpanel',
  107. _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
  108. _baseColumn: [{
  109. text: '序号',
  110. width: 80,
  111. xtype: 'rownumberer'
  112. }, {
  113. text: 'id',
  114. dataIndex: 'id',
  115. width: 100,
  116. xtype: 'numbercolumn'
  117. }, {
  118. text: '单据编号',
  119. dataIndex: 'pi_inoutno',
  120. width: 120
  121. }, {
  122. text: '单据状态',
  123. dataIndex: 'pi_status',
  124. width: 120
  125. }, {
  126. text: '单据类型',
  127. dataIndex: 'pi_class',
  128. width: 120
  129. }, {
  130. text: '下单日期',
  131. dataIndex: 'pi_date',
  132. xtype:'datecolumn',
  133. width: 200
  134. },{
  135. text: '采购单号',
  136. dataIndex: 'pi_pucode',
  137. width: 200
  138. },{
  139. text: '供应商名称',
  140. dataIndex: 'pi_vendname',
  141. width: 120
  142. },{
  143. text: '含税金额',
  144. dataIndex: 'pi_total',
  145. xtype:'numbercolumn',
  146. width: 120
  147. },{
  148. text: '不含税金额',
  149. dataIndex: 'pi_nettotal',
  150. xtype:'numbercolumn',
  151. width: 120,
  152. flex: 1
  153. }],
  154. _relativeColumn: [{
  155. text : "序号",
  156. dataIndex : "pd_pdno",
  157. width : 100,
  158. xtype : "numbercolumn",
  159. align : 'center'
  160. }, {
  161. text: 'id',
  162. dataIndex: 'pu_id',
  163. width: 0,
  164. xtype: 'numbercolumn'
  165. }, {
  166. text: '单据编号',
  167. dataIndex: 'pd_inoutno',
  168. width: 120
  169. }, {
  170. text: '单据状态',
  171. dataIndex: 'pi_status',
  172. width: 120
  173. }, {
  174. text: '下单日期',
  175. dataIndex: 'pi_date',
  176. xtype:'datecolumn',
  177. width: 200
  178. },{
  179. text: '供应商名称',
  180. dataIndex: 'pi_vendname',
  181. width: 120
  182. },{
  183. text: '采购单号',
  184. dataIndex: 'pd_ordercode',
  185. width: 120
  186. },{
  187. text: '采购序号',
  188. dataIndex: 'pd_orderdetno',
  189. xtype:'numbercolumn',
  190. width: 120
  191. },{
  192. text: '物料编号',
  193. dataIndex: 'pd_prodcode',
  194. width: 120
  195. },{
  196. text: '验收数量',
  197. dataIndex: 'pd_inqty',
  198. xtype:'numbercolumn',
  199. width: 120
  200. },{
  201. text: '采购单价',
  202. dataIndex: 'pd_orderprice',
  203. xtype:'numbercolumn',
  204. width: 120
  205. },{
  206. text: '金额',
  207. dataIndex: 'pd_total',
  208. xtype:'numbercolumn',
  209. width: 120
  210. },{
  211. text: '税率',
  212. dataIndex: 'pd_taxrate',
  213. xtype:'numbercolumn',
  214. width: 120
  215. },{
  216. text: '成本单价',
  217. dataIndex: 'pd_price',
  218. xtype:'numbercolumn',
  219. width: 120,
  220. flex: 1
  221. }]
  222. }
  223. });