QueryPanel.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. align: 'center',
  97. dataIndex: 'pi_status',
  98. width: 90
  99. },{
  100. text: '收款状态',
  101. align: 'center',
  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. hidden :true
  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. align: 'center',
  147. dataIndex: 'pi_status',
  148. width: 90
  149. }, {
  150. text: '明细序号',
  151. dataIndex: 'pd_detno',
  152. xtype: 'numbercolumn',
  153. width: 100
  154. }, {
  155. text: '关联销售单号',
  156. dataIndex: 'pd_ordercode',
  157. width: 150
  158. }, {
  159. text: '订单序号',
  160. dataIndex: 'pd_orderdetno',
  161. xtype:'numbercolumn',
  162. width: 100,
  163. renderer : function(v) {
  164. var format = '0'
  165. return Ext.util.Format.number(v, format);
  166. }
  167. }, {
  168. text: '物料编号',
  169. dataIndex: 'pd_prodcode',
  170. width: 150
  171. }, {
  172. text: '退货数量',
  173. dataIndex: 'pd_inqty',
  174. xtype:'numbercolumn',
  175. width: 110
  176. }, {
  177. text: '销售单价',
  178. dataIndex: 'pd_sendprice',
  179. xtype:'numbercolumn',
  180. width: 110
  181. }, {
  182. text: '金额',
  183. dataIndex: 'pd_total',
  184. xtype:'numbercolumn',
  185. width: 110
  186. }, {
  187. text: '税率',
  188. dataIndex: 'pd_taxrate',
  189. xtype:'numbercolumn',
  190. width: 80
  191. }, {
  192. text: '成本单价',
  193. dataIndex: 'pd_price',
  194. xtype:'numbercolumn',
  195. width: 110
  196. }, {
  197. text: '备注',
  198. dataIndex: 'pd_remark',
  199. width: 250
  200. }]
  201. }
  202. });