QueryPanel.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'purchase-purchasein-querypanel',
  4. controller: 'purchase-purchasein-querypanel',
  5. viewModel: 'purchase-purchasein-querypanel',
  6. viewName: 'purchase-purchasein-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'id',
  10. bind: '{id}',
  11. fieldLabel: 'ID',
  12. allowBlank: true,
  13. columnWidth: 0
  14. }, {
  15. xtype: 'textfield',
  16. name: 'pi_inoutno',
  17. bind: '{pi_inoutno}',
  18. fieldLabel: '单据编号',
  19. allowBlank: true,
  20. columnWidth: 0.25
  21. }, {
  22. xtype: 'condatefield',
  23. name: 'pi_date',
  24. bind: '{pi_date}',
  25. fieldLabel: '单据日期',
  26. allowBlank: true,
  27. columnWidth: 0.5
  28. }, {
  29. xtype: 'textfield',
  30. name: 'pi_vendcode',
  31. bind: '{pi_vendcode}',
  32. fieldLabel: '供应商编号',
  33. allowBlank: true,
  34. hidden:true,
  35. columnWidth: 0.25
  36. }, {
  37. xtype: 'textfield',
  38. name: 'pi_vendname',
  39. bind: '{pi_vendname}',
  40. fieldLabel: '供应商名称',
  41. allowBlank: true,
  42. columnWidth: 0.25
  43. }, {
  44. xtype: 'dbfindtrigger',
  45. name: 'pd_prodcode',
  46. bind: '{pd_prodcode}',
  47. fieldLabel: '物料编号',
  48. showDetail: true
  49. }, {
  50. xtype: 'textfield',
  51. name: 'pr_detail',
  52. bind: '{pr_detail}',
  53. fieldLabel: '物料名称',
  54. showDetail: true
  55. }, {
  56. xtype: 'combobox',
  57. name: 'pi_statuscode',
  58. bind: '{pi_statuscode}',
  59. fieldLabel: '审核状态',
  60. allowBlank: true,
  61. columnWidth: 0.25,
  62. queryMode: 'local',
  63. displayField: 'pi_status',
  64. valueField: 'pi_statuscode',
  65. store: Ext.create('Ext.data.ArrayStore', {
  66. fields: ['pi_statuscode', 'pi_status'],
  67. data: [
  68. ["ALL", "全部"],
  69. ["AUDITED", "已审核"],
  70. ["UNAUDITED", "未审核"]
  71. ]
  72. }),
  73. getCondition: function(value) {
  74. if(value == 'ALL') {
  75. return '1=1';
  76. }else {
  77. return 'pi_statuscode=\'' + value + '\'';
  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. addTitle:'采购验收单',
  105. addXtype:'purchase-purchasein-formpanel',
  106. defaultCondition:' pi_class = \'采购验收单\'',
  107. baseVastUrl:'/api/purchase/prodinout/',
  108. // baseVastUrl:"http://localhost:8800/prodinout/",
  109. baseColumn: [{
  110. text: 'id',
  111. dataIndex: 'id',
  112. width: 100,
  113. xtype: 'numbercolumn'
  114. }, {
  115. text: '单据编号',
  116. dataIndex: 'pi_inoutno',
  117. width: 200
  118. }, {
  119. text: '单据状态',
  120. dataIndex: 'pi_status',
  121. width: 120
  122. }, {
  123. text: '单据类型',
  124. dataIndex: 'pi_class',
  125. width: 120
  126. }, {
  127. text: '下单日期',
  128. dataIndex: 'pi_date',
  129. xtype:'datecolumn',
  130. width: 200
  131. },{
  132. text: '采购单号',
  133. dataIndex: 'pi_pucode',
  134. width: 200
  135. },{
  136. text: '供应商名称',
  137. dataIndex: 'pi_vendname',
  138. width: 120
  139. },{
  140. text: '含税金额',
  141. dataIndex: 'pi_total',
  142. xtype:'numbercolumn',
  143. width: 120
  144. },{
  145. text: '未税金额',
  146. dataIndex: 'pi_nettotal',
  147. xtype:'numbercolumn',
  148. width: 120,
  149. flex: 1
  150. }],
  151. relativeColumn: [{
  152. text: 'id',
  153. dataIndex: 'pu_id',
  154. width: 0,
  155. xtype: 'numbercolumn'
  156. }, {
  157. text: '单据编号',
  158. dataIndex: 'pd_inoutno',
  159. width: 200
  160. }, {
  161. text: '单据状态',
  162. dataIndex: 'pi_status',
  163. width: 120
  164. }, {
  165. text: '下单日期',
  166. dataIndex: 'pi_date',
  167. xtype:'datecolumn',
  168. width: 200
  169. },{
  170. text: '供应商名称',
  171. dataIndex: 'pi_vendname',
  172. width: 120
  173. },{
  174. text: '采购单号',
  175. dataIndex: 'pd_ordercode',
  176. width: 120
  177. },{
  178. text: '采购序号',
  179. dataIndex: 'pd_orderdetno',
  180. xtype:'numbercolumn',
  181. width: 120
  182. },{
  183. text: '物料编号',
  184. dataIndex: 'pd_prodcode',
  185. width: 120
  186. },{
  187. text: '验收数量',
  188. dataIndex: 'pd_inqty',
  189. xtype:'numbercolumn',
  190. width: 120
  191. },{
  192. text: '采购单价',
  193. dataIndex: 'pd_orderprice',
  194. xtype:'numbercolumn',
  195. width: 120
  196. },{
  197. text: '金额',
  198. dataIndex: 'pd_total',
  199. xtype:'numbercolumn',
  200. width: 120
  201. },{
  202. text: '税率',
  203. dataIndex: 'pd_taxrate',
  204. xtype:'numbercolumn',
  205. width: 120
  206. },{
  207. text: '成本单价',
  208. dataIndex: 'pd_price',
  209. xtype:'numbercolumn',
  210. width: 120,
  211. flex: 1
  212. }]
  213. }
  214. });