QueryPanel.js 5.1 KB

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