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