QueryPanel.js 5.4 KB

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