QueryPanel.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. Ext.define('saas.view.sale.saleIn.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'sale-salein-querypanel',
  4. controller: 'sale-salein-querypanel',
  5. viewModel: 'sale-salein-querypanel',
  6. viewName: 'sale-salein-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_custcode',
  31. bind: '{pi_custcode}',
  32. fieldLabel: '客户编号',
  33. allowBlank: true,
  34. hidden:true,
  35. columnWidth: 0.25
  36. }, {
  37. xtype: 'textfield',
  38. name: 'pi_custname',
  39. bind: '{pi_custname}',
  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:'sale-salein-formpanel',
  92. defaultCondition:' pi_class = \'销售退货单\'',
  93. baseVastUrl: basePath+'sale/prodinout/',
  94. baseColumn: [{
  95. text: 'id',
  96. dataIndex: 'id',
  97. width: 0,
  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_pucode',
  119. width: 200
  120. },{
  121. text: '客户名称',
  122. dataIndex: 'pi_custname',
  123. width: 120
  124. },{
  125. text: '含税金额',
  126. dataIndex: 'pi_total',
  127. xtype:'numbercolumn',
  128. width: 120
  129. },{
  130. text: '不含税金额',
  131. dataIndex: 'pi_nettotal',
  132. xtype:'numbercolumn',
  133. width: 120,
  134. flex: 1
  135. }],
  136. relativeColumn: [{
  137. text: 'id',
  138. dataIndex: 'pu_id',
  139. width: 0,
  140. xtype: 'numbercolumn'
  141. }, {
  142. text: '单据编号',
  143. dataIndex: 'pd_inoutno',
  144. width: 120
  145. }, {
  146. text: '单据状态',
  147. dataIndex: 'pi_status',
  148. width: 120
  149. }, {
  150. text: '单据日期',
  151. dataIndex: 'pi_date',
  152. xtype:'datecolumn',
  153. width: 200
  154. },{
  155. text: '客户名称',
  156. dataIndex: 'pi_custname',
  157. width: 120
  158. },{
  159. text: '销售单号',
  160. dataIndex: 'pd_ordercode',
  161. width: 120
  162. },{
  163. text: '销售序号',
  164. dataIndex: 'pd_orderdetno',
  165. xtype:'numbercolumn',
  166. width: 120
  167. },{
  168. text: '物料编号',
  169. dataIndex: 'pd_prodcode',
  170. width: 120
  171. },{
  172. text: '验收数量',
  173. dataIndex: 'pd_inqty',
  174. xtype:'numbercolumn',
  175. width: 120
  176. },{
  177. text: '销售单价',
  178. dataIndex: 'pd_sendprice',
  179. xtype:'numbercolumn',
  180. width: 120
  181. },{
  182. text: '金额',
  183. dataIndex: 'pd_total',
  184. xtype:'numbercolumn',
  185. width: 120
  186. },{
  187. text: '税率',
  188. dataIndex: 'pd_taxrate',
  189. xtype:'numbercolumn',
  190. width: 120
  191. },{
  192. text: '成本单价',
  193. dataIndex: 'pd_price',
  194. xtype:'numbercolumn',
  195. width: 120,
  196. flex: 1
  197. }]
  198. }
  199. });