QueryPanel.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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. align: 'center',
  98. dataIndex: 'pi_status',
  99. width: 90
  100. },{
  101. text: '收款状态',
  102. align: 'center',
  103. dataIndex: 'pi_prstatus',
  104. width: 90
  105. },{
  106. text: '业务员',
  107. dataIndex: 'sa_seller',
  108. width: 90
  109. },{
  110. text: '审核人',
  111. dataIndex: 'pi_auditman',
  112. width: 110
  113. }, {
  114. text: '备注',
  115. dataIndex: 'pi_remark',
  116. width: 250
  117. },{
  118. text: '未含税金额',
  119. dataIndex: 'pi_nettotal',
  120. xtype:'numbercolumn',
  121. width: 0
  122. },{
  123. text: '单据类型',
  124. dataIndex: 'pi_class',
  125. width: 0
  126. }],
  127. relativeColumn: [{
  128. text: 'id',
  129. dataIndex: 'id',
  130. hidden:true,
  131. xtype: 'numbercolumn'
  132. }, {
  133. text: '出货单号',
  134. dataIndex: 'pi_inoutno',
  135. width: 150
  136. }, {
  137. text: '单据日期',
  138. dataIndex: 'pi_date',
  139. xtype:'datecolumn',
  140. width: 110
  141. },{
  142. text: '客户名称',
  143. dataIndex: 'pi_custname',
  144. width: 250
  145. }, {
  146. text: '单据状态',
  147. align: 'center',
  148. dataIndex: 'pi_status',
  149. width: 90
  150. }, {
  151. text: '明细序号',
  152. dataIndex: 'pd_detno',
  153. xtype: 'numbercolumn',
  154. width: 100
  155. }, {
  156. text: '关联销售单号',
  157. dataIndex: 'pd_ordercode',
  158. width: 150
  159. }, {
  160. text: '订单序号',
  161. dataIndex: 'pd_orderdetno',
  162. xtype:'numbercolumn',
  163. width: 100,
  164. renderer : function(v) {
  165. var format = '0'
  166. return Ext.util.Format.number(v, format);
  167. }
  168. }, {
  169. text: '物料编号',
  170. dataIndex: 'pd_prodcode',
  171. width: 150
  172. }, {
  173. text: '出货数量',
  174. dataIndex: 'pd_outqty',
  175. xtype:'numbercolumn',
  176. width: 110
  177. }, {
  178. text: '销售单价',
  179. dataIndex: 'pd_sendprice',
  180. xtype:'numbercolumn',
  181. width: 110
  182. }, {
  183. text: '金额',
  184. dataIndex: 'pd_total',
  185. xtype:'numbercolumn',
  186. width: 110
  187. }, {
  188. text: '税率',
  189. dataIndex: 'pd_taxrate',
  190. xtype:'numbercolumn',
  191. width: 80
  192. }, {
  193. text: '成本单价',
  194. dataIndex: 'pd_price',
  195. xtype:'numbercolumn',
  196. width: 110
  197. }, {
  198. text: '备注',
  199. dataIndex: 'pd_remark',
  200. width: 250
  201. }]
  202. }
  203. });