QueryPanel.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. Ext.define('saas.view.sale.saleout.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'sale-saleout-querypanel',
  4. controller: 'sale-saleout-querypanel',
  5. viewModel: 'sale-saleout-querypanel',
  6. viewName: 'sale-saleout-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'pi_id',
  10. fieldLabel: 'ID',
  11. columnWidth: 0
  12. },{
  13. xtype: 'textfield',
  14. name: 'pi_inoutno',
  15. emptyText:'请输入单号或客户或关联单号',
  16. style:{paddingLeft: '95px'},
  17. getCondition: function(value) {
  18. return ' (pi_inoutno like\'%' + value + '%\' or pi_custcode like \'%'+value+'%\' or pi_custname like \'%'+value+'%\' or pi_iocode like \'%'+value+'%\') ';
  19. }
  20. }, {
  21. xtype: 'hidden',
  22. name: 'pd_prodcode',
  23. fieldLabel: '物料编号',
  24. showDetail: true
  25. }, {
  26. xtype: 'productDbfindTrigger',
  27. name: 'pr_detail',
  28. fieldLabel: '物料',
  29. showDetail: true
  30. }, {
  31. xtype: 'condatefield',
  32. name: 'pi_date',
  33. fieldLabel: '日期',
  34. allowBlank: true,
  35. columnWidth: 0.5
  36. }, {
  37. xtype: 'combobox',
  38. name: 'pi_statuscode',
  39. fieldLabel: '单据状态',
  40. queryMode: 'local',
  41. emptyText :'全部',
  42. editable:false,
  43. displayField: 'pi_status',
  44. valueField: 'pi_statuscode',
  45. store: Ext.create('Ext.data.ArrayStore', {
  46. fields: ['pi_statuscode', 'pi_status'],
  47. data: [
  48. ["ALL", "全部"],
  49. ["AUDITED", "已审核"],
  50. ["UNAUDITED", "未审核"]
  51. ]
  52. }),
  53. getCondition: function(value) {
  54. if(value == 'ALL') {
  55. return '1=1';
  56. }else {
  57. return 'pi_statuscode=\'' + value + '\'';
  58. }
  59. }
  60. }],
  61. moreQueryFormItems: [],
  62. queryGridConfig: {
  63. idField:'id',
  64. codeField:'pi_inoutno',
  65. addTitle:'出货单',
  66. addXtype:'sale-saleout-formpanel',
  67. defaultCondition:' pi_class = \'出货单\'',
  68. baseVastUrl: '/api/sale/prodinout/',
  69. baseColumn: [{
  70. text: 'id',
  71. dataIndex: 'id',
  72. hidden:true,
  73. xtype: 'numbercolumn'
  74. }, {
  75. text: '出货单号',
  76. dataIndex: 'pi_inoutno',
  77. width: 150
  78. }, {
  79. text: '单据日期',
  80. dataIndex: 'pi_date',
  81. xtype:'datecolumn',
  82. width: 110
  83. },{
  84. text: '客户名称',
  85. dataIndex: 'pi_custname',
  86. width: 250
  87. },{
  88. text: '关联销售单号',
  89. dataIndex: 'pi_sacode',
  90. width: 150
  91. },{
  92. text: '总金额',
  93. dataIndex: 'pi_total',
  94. xtype:'numbercolumn',
  95. width: 110
  96. }, {
  97. text: '单据状态',
  98. dataIndex: 'pi_status',
  99. width: 90
  100. },{
  101. text: '收款状态',
  102. dataIndex: 'pi_prstatus',
  103. width: 90
  104. },{
  105. text: '业务员',
  106. dataIndex: 'sa_seller',
  107. width: 90
  108. },{
  109. text: '审核人',
  110. dataIndex: 'pi_auditman',
  111. width: 110
  112. }, {
  113. text: '备注',
  114. dataIndex: 'pi_remark',
  115. width: 250
  116. },{
  117. text: '未含税金额',
  118. dataIndex: 'pi_nettotal',
  119. xtype:'numbercolumn',
  120. width: 0
  121. },{
  122. text: '单据类型',
  123. dataIndex: 'pi_class',
  124. width: 0
  125. }],
  126. relativeColumn: [{
  127. text: 'id',
  128. dataIndex: 'id',
  129. hidden:true,
  130. xtype: 'numbercolumn'
  131. }, {
  132. text: '出货单号',
  133. dataIndex: 'pi_inoutno',
  134. width: 150
  135. }, {
  136. text: '单据日期',
  137. dataIndex: 'pi_date',
  138. xtype:'datecolumn',
  139. width: 110
  140. },{
  141. text: '客户名称',
  142. dataIndex: 'pi_custname',
  143. width: 250
  144. }, {
  145. text: '单据状态',
  146. dataIndex: 'pi_status',
  147. width: 90
  148. }, {
  149. text: '明细序号',
  150. dataIndex: 'pd_detno',
  151. xtype: 'numbercolumn',
  152. width: 100
  153. }, {
  154. text: '关联销售单号',
  155. dataIndex: 'pd_ordercode',
  156. width: 150
  157. }, {
  158. text: '订单序号',
  159. dataIndex: 'pd_orderdetno',
  160. xtype:'numbercolumn',
  161. width: 100,
  162. renderer : function(v) {
  163. var format = '0'
  164. return Ext.util.Format.number(v, format);
  165. }
  166. }, {
  167. text: '物料编号',
  168. dataIndex: 'pd_prodcode',
  169. width: 150
  170. }, {
  171. text: '出货数量',
  172. dataIndex: 'pd_outqty',
  173. xtype:'numbercolumn',
  174. width: 110
  175. }, {
  176. text: '销售单价',
  177. dataIndex: 'pd_sendprice',
  178. xtype:'numbercolumn',
  179. width: 110
  180. }, {
  181. text: '金额',
  182. dataIndex: 'pd_total',
  183. xtype:'numbercolumn',
  184. width: 110
  185. }, {
  186. text: '税率',
  187. dataIndex: 'pd_taxrate',
  188. xtype:'numbercolumn',
  189. width: 80
  190. }, {
  191. text: '成本单价',
  192. dataIndex: 'pd_price',
  193. xtype:'numbercolumn',
  194. width: 110
  195. }, {
  196. text: '备注',
  197. dataIndex: 'pd_remark',
  198. width: 250
  199. }]
  200. }
  201. });