QueryPanel.js 7.9 KB

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