QueryPanel.js 6.4 KB

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