QueryPanel.js 6.3 KB

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