QueryPanel.js 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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. caller:'SaleOut',
  98. baseColumn: [{
  99. text: 'id',
  100. dataIndex: 'id',
  101. hidden:true,
  102. xtype: 'numbercolumn'
  103. }, {
  104. text: '出货单号',
  105. dataIndex: 'pi_inoutno',
  106. width: 150
  107. }, {
  108. text: '单据日期',
  109. dataIndex: 'pi_date',
  110. xtype:'datecolumn',
  111. width: 110
  112. },{
  113. text: '客户名称',
  114. dataIndex: 'pi_custname',
  115. width: 250
  116. },{
  117. text: '关联销售单号',
  118. dataIndex: 'pi_sacode',
  119. width: 150
  120. },{
  121. text: '总金额',
  122. dataIndex: 'pi_total',
  123. xtype:'numbercolumn',
  124. width: 110
  125. }, {
  126. text: '单据状态',
  127. align: 'center',
  128. dataIndex: 'pi_status',
  129. width: 90
  130. },{
  131. text: '收款状态',
  132. align: 'center',
  133. dataIndex: 'pi_prstatus',
  134. width: 90
  135. },{
  136. text: '业务员',
  137. dataIndex: 'sa_seller',
  138. width: 90
  139. },{
  140. text: '审核人',
  141. dataIndex: 'pi_auditman',
  142. width: 110
  143. }, {
  144. text: '备注',
  145. dataIndex: 'pi_remark',
  146. width: 250
  147. },{
  148. text: '未含税金额',
  149. dataIndex: 'pi_nettotal',
  150. xtype:'numbercolumn',
  151. hidden :true
  152. },{
  153. text: '单据类型',
  154. dataIndex: 'pi_class',
  155. hidden :true
  156. }],
  157. relativeColumn: [{
  158. text: 'id',
  159. dataIndex: 'id',
  160. hidden:true,
  161. xtype: 'numbercolumn'
  162. }, {
  163. text: '出货单号',
  164. dataIndex: 'pi_inoutno',
  165. width: 150
  166. }, {
  167. text: '单据日期',
  168. dataIndex: 'pi_date',
  169. xtype:'datecolumn',
  170. width: 110
  171. },{
  172. text: '客户名称',
  173. dataIndex: 'pi_custname',
  174. width: 250
  175. }, {
  176. text: '单据状态',
  177. align: 'center',
  178. dataIndex: 'pi_status',
  179. width: 90
  180. }, {
  181. text: '明细序号',
  182. dataIndex: 'pd_pdno',
  183. xtype: 'numbercolumn',
  184. width: 100,
  185. renderer : function(v) {
  186. var format = '0'
  187. return Ext.util.Format.number(v, format);
  188. }
  189. }, {
  190. text: '关联销售单号',
  191. dataIndex: 'pd_ordercode',
  192. width: 150
  193. }, {
  194. text: '订单序号',
  195. dataIndex: 'pd_orderdetno',
  196. xtype:'numbercolumn',
  197. width: 100,
  198. renderer : function(v) {
  199. var format = '0'
  200. return Ext.util.Format.number(v, format);
  201. }
  202. }, {
  203. text: '物料编号',
  204. dataIndex: 'pd_prodcode',
  205. width: 150
  206. }, {
  207. text: '物料名称',
  208. dataIndex: 'pr_detail',
  209. width: 150
  210. }, {
  211. text: '出货数量',
  212. dataIndex: 'pd_outqty',
  213. xtype:'numbercolumn',
  214. width: 110,
  215. renderer : function(v) {
  216. var arr = (v + '.').split('.');
  217. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  218. var format = '0.' + xr.join();
  219. return Ext.util.Format.number(v, format);
  220. }
  221. }, {
  222. text: '销售单价',
  223. dataIndex: 'pd_sendprice',
  224. xtype:'numbercolumn',
  225. width: 110,
  226. renderer : function(v) {
  227. var arr = (v + '.').split('.');
  228. var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
  229. var format = '0.' + xr.join();
  230. return Ext.util.Format.number(v, format);
  231. }
  232. }, {
  233. text: '金额',
  234. dataIndex: 'pd_ordertotal',
  235. xtype:'numbercolumn',
  236. width: 110,
  237. renderer : function(v) {
  238. var arr = (v + '.').split('.');
  239. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  240. var format = '0.' + xr.join();
  241. return Ext.util.Format.number(v, format);
  242. }
  243. }, {
  244. text: '税率',
  245. dataIndex: 'pd_taxrate',
  246. xtype:'numbercolumn',
  247. width: 80,
  248. renderer : function(v) {
  249. return Ext.util.Format.number(v, '0');
  250. }
  251. }, {
  252. text: '成本单价',
  253. dataIndex: 'pd_price',
  254. xtype:'numbercolumn',
  255. width: 110,
  256. renderer : function(v) {
  257. var arr = (v + '.').split('.');
  258. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  259. var format = '0.' + xr.join();
  260. return Ext.util.Format.number(v, format);
  261. }
  262. }, {
  263. text: '备注',
  264. dataIndex: 'pd_remark',
  265. width: 250
  266. }]
  267. }
  268. });