QueryPanel.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. Ext.define('saas.view.purchase.purchase.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'purchase-purchase-querypanel',
  4. controller: 'purchase-purchase-querypanel',
  5. viewModel: 'purchase-purchase-querypanel',
  6. viewName: 'purchase-purchase-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'pu_id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. getCondition: function(value) {
  13. return 'pu_id=' + value;
  14. }
  15. }, {
  16. xtype: 'textfield',
  17. name: 'pu_code',
  18. fieldLabel: '单据编号'
  19. }, {
  20. xtype: 'condatefield',
  21. name: 'pu_date',
  22. fieldLabel: '采购日期',
  23. columnWidth: 0.5,
  24. operation: 'between'
  25. }, {
  26. xtype: 'dbfindtrigger',
  27. name: 'pu_vendcode',
  28. fieldLabel: '供应商编号'
  29. }, {
  30. xtype: 'textfield',
  31. name: 'pu_vendname',
  32. fieldLabel: '供应商名称'
  33. }, {
  34. xtype: 'dbfindtrigger',
  35. name: 'pd_prodcode',
  36. fieldLabel: '物料编号',
  37. showDetail: true
  38. }, {
  39. xtype: 'textfield',
  40. name: 'pr_detail',
  41. fieldLabel: '物料名称',
  42. showDetail: true
  43. }, {
  44. xtype: 'combobox',
  45. name: 'pu_statuscode',
  46. fieldLabel: '审核状态',
  47. queryMode: 'local',
  48. displayField: 'pu_status',
  49. valueField: 'pu_statuscode',
  50. editable:false,
  51. store: Ext.create('Ext.data.ArrayStore', {
  52. fields: ['pu_statuscode', 'pu_status'],
  53. data: [
  54. ["ALL", "全部"],
  55. ["AUDITED", "已审核"],
  56. ["UNAUDITED", "未审核"]
  57. ]
  58. }),
  59. getCondition: function(value) {
  60. if(value == 'ALL') {
  61. return '1=1';
  62. }else {
  63. return 'pu_statuscode=\'' + value + '\'';
  64. }
  65. }
  66. }, {
  67. xtype: 'multicombo',
  68. name: 'pu_acceptstatuscode',
  69. fieldLabel: '入库状态',
  70. datas: [
  71. ["TURNIN", "已入库"],
  72. ["UNTURNIN", "未入库"],
  73. ["PARTIN", "部分入库"]
  74. ]
  75. }],
  76. moreQueryFormItems: [{
  77. xtype: 'textfield',
  78. name: 'pu_buyername',
  79. fieldLabel: '采购员'
  80. }, {
  81. xtype: 'textfield',
  82. name: 'pu_total',
  83. fieldLabel: '金额'
  84. }, {
  85. xtype: 'condatefield',
  86. name: 'pu_delivery',
  87. fieldLabel: '交货日期',
  88. columnWidth: 1
  89. }],
  90. queryGridConfig: {
  91. idField: 'pu_id',
  92. codeField: 'pu_code',
  93. addTitle: '采购单',
  94. addXtype: 'purchase-purchase-formpanel',
  95. defaultCondition:'',
  96. baseVastUrl: '/api/purchase/purchase/',
  97. baseColumn: [{
  98. text: 'id',
  99. dataIndex: 'pu_id',
  100. width: 100,
  101. xtype: 'numbercolumn'
  102. }, {
  103. text: '单据编号',
  104. dataIndex: 'pu_code',
  105. width: 200
  106. }, {
  107. text: '单据状态',
  108. dataIndex: 'pu_status',
  109. width: 120
  110. },{
  111. text: '业务状态',
  112. dataIndex: 'pu_acceptstatus',
  113. width: 120
  114. },{
  115. text: '单据日期',
  116. dataIndex: 'pu_indate',
  117. xtype: 'datecolumn',
  118. width: 200
  119. }, {
  120. text: '供应商名称',
  121. dataIndex: 'pu_vendname',
  122. width: 120
  123. }, {
  124. text: '含税金额',
  125. dataIndex: 'pu_taxtotal',
  126. xtype: 'numbercolumn',
  127. width: 120
  128. }, {
  129. text: '金额',
  130. dataIndex: 'pu_total',
  131. xtype: 'numbercolumn',
  132. width: 120,
  133. flex: 1
  134. }],
  135. relativeColumn: [{
  136. text: 'id',
  137. dataIndex: 'pu_id',
  138. width: 100,
  139. xtype: 'numbercolumn'
  140. }, {
  141. text: '单据编号',
  142. dataIndex: 'pu_code',
  143. width: 200
  144. }, {
  145. text: '单据状态',
  146. dataIndex: 'pu_status',
  147. width: 120
  148. }, {
  149. text: '单据日期',
  150. dataIndex: 'pu_indate',
  151. xtype: 'datecolumn',
  152. width: 200
  153. }, {
  154. text: '供应商名称',
  155. dataIndex: 'pu_vendname',
  156. width: 120
  157. }, {
  158. text: '采购序号',
  159. dataIndex: 'pd_detno',
  160. xtype: 'numbercolumn',
  161. width: 120
  162. }, {
  163. text: '物料编号',
  164. dataIndex: 'pd_prodcode',
  165. width: 120
  166. }, {
  167. text: '数量',
  168. dataIndex: 'pd_qty',
  169. xtype: 'numbercolumn',
  170. width: 120
  171. }, {
  172. text: '单价',
  173. dataIndex: 'pd_price',
  174. xtype: 'numbercolumn',
  175. width: 120
  176. }, {
  177. text: '已转数',
  178. dataIndex: 'pd_ytqy',
  179. xtype: 'numbercolumn',
  180. width: 120,
  181. flex: 1
  182. }]
  183. }
  184. });