QueryPanel.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. Ext.define('saas.view.stock.otherIn.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-otherin-querypanel',
  4. controller: 'stock-otherin-querypanel',
  5. viewModel: 'stock-otherin-querypanel',
  6. viewName: 'stock-otherin-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. fieldMode: 'DETAIL',
  49. queryType:'VAG',
  50. hidden:true,
  51. allowBlank: true,
  52. columnWidth: 0.25
  53. }, {
  54. xtype: 'dbfindtrigger',
  55. name: 'pr_detail#pd_prodcode',
  56. bind: '{pr_detail}',
  57. fieldLabel: '物料名称',
  58. allowBlank: true,
  59. columnWidth: 0.25
  60. }, {
  61. xtype: 'combobox',
  62. name: 'pi_statuscode',
  63. bind: '{pi_statuscode}',
  64. fieldLabel: '审核状态',
  65. allowBlank: true,
  66. columnWidth: 0.25,
  67. queryMode: 'local',
  68. displayField: 'pi_status',
  69. valueField: 'pi_statuscode',
  70. store: Ext.create('Ext.data.ArrayStore', {
  71. fields: ['pi_statuscode', 'pi_status'],
  72. data: [
  73. ["ALL", "全部"],
  74. ["AUDITED", "已审核"],
  75. ["UNAUDITED", "未审核"]
  76. ]
  77. }),
  78. getCondition: function(value) {
  79. if(value == 'ALL') {
  80. return '1=1';
  81. }else {
  82. return 'pi_statuscode=\'' + value + '\'';
  83. }
  84. }
  85. }],
  86. moreQueryFormItems: [],
  87. queryGridConfig: {
  88. idField: 'id',
  89. codeField: 'pi_inoutno',
  90. addTitle: '其它入库单',
  91. addXtype: 'stock-otherin-formpanel',
  92. defaultCondition:' pi_class = \'其它入库单\'',
  93. baseVastUrl: basePath+'storage/prodinout/',
  94. baseColumn: [{
  95. text: 'id',
  96. dataIndex: 'id',
  97. width: 100,
  98. xtype: 'numbercolumn'
  99. }, {
  100. text: '单据编号',
  101. dataIndex: 'pi_inoutno',
  102. width: 120
  103. }, {
  104. text: '单据状态',
  105. dataIndex: 'pi_status',
  106. width: 120
  107. }, {
  108. text: '单据类型',
  109. dataIndex: 'pi_class',
  110. width: 120
  111. }, {
  112. text: '下单日期',
  113. dataIndex: 'pi_date',
  114. xtype:'datecolumn',
  115. width: 200
  116. },{
  117. text: '供应商名称',
  118. dataIndex: 'pi_vendname',
  119. width: 120
  120. },{
  121. text: '含税金额',
  122. dataIndex: 'pi_total',
  123. xtype:'numbercolumn',
  124. width: 120
  125. },{
  126. text: '不含税金额',
  127. dataIndex: 'pi_nettotal',
  128. xtype:'numbercolumn',
  129. width: 120,
  130. flex: 1
  131. }],
  132. relativeColumn: [{
  133. text: 'id',
  134. dataIndex: 'pu_id',
  135. width: 0,
  136. xtype: 'numbercolumn'
  137. }, {
  138. text: '单据编号',
  139. dataIndex: 'pd_inoutno',
  140. width: 120
  141. }, {
  142. text: '单据状态',
  143. dataIndex: 'pi_status',
  144. width: 120
  145. }, {
  146. text: '下单日期',
  147. dataIndex: 'pi_date',
  148. xtype:'datecolumn',
  149. width: 200
  150. },{
  151. text: '供应商名称',
  152. dataIndex: 'pi_vendname',
  153. width: 120
  154. },{
  155. text: '物料编号',
  156. dataIndex: 'pd_prodcode',
  157. width: 120
  158. },{
  159. text: '入库数量',
  160. dataIndex: 'pd_inqty',
  161. xtype:'numbercolumn',
  162. width: 120
  163. },{
  164. text: '成本单价',
  165. dataIndex: 'pd_price',
  166. xtype:'numbercolumn',
  167. width: 120,
  168. flex: 1
  169. },{
  170. text: '金额',
  171. dataIndex: 'pd_total',
  172. xtype:'numbercolumn',
  173. width: 120
  174. },{
  175. text: '税率',
  176. dataIndex: 'pd_taxrate',
  177. xtype:'numbercolumn',
  178. width: 120
  179. }]
  180. }
  181. });