QueryPanel.js 8.1 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: '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. emptyText: '输入物料编号或名称',
  25. showDetail: true
  26. }, {
  27. xtype: 'combobox',
  28. name: 'pi_statuscode',
  29. fieldLabel: '单据状态',
  30. queryMode: 'local',
  31. emptyText :'全部',
  32. editable:false,
  33. displayField: 'pi_status',
  34. valueField: 'pi_statuscode',
  35. store: Ext.create('Ext.data.ArrayStore', {
  36. fields: ['pi_statuscode', 'pi_status'],
  37. data: [
  38. ["ALL", "全部"],
  39. ["AUDITED", "已审核"],
  40. ["UNAUDITED", "未审核"]
  41. ]
  42. }),
  43. getCondition: function(value) {
  44. if(value == 'ALL') {
  45. return '1=1';
  46. }else {
  47. return 'pi_statuscode=\'' + value + '\'';
  48. }
  49. }
  50. }, {
  51. xtype: 'multicombo',
  52. name: 'pi_prstatuscode',
  53. fieldLabel: '收款状态',
  54. emptyText :'全部',
  55. datas: [
  56. ["RECNONE", "未收款"],
  57. ["RECPART", "部分收款"],
  58. ["RECALL", "已收款"]
  59. ]
  60. }, {
  61. xtype: 'warehouseDbfindTrigger',
  62. name: 'pd_whname',
  63. emptyText:'请输入物料编号或名称',
  64. fieldLabel: '仓库'
  65. }, {
  66. xtype: 'textfield',
  67. name: 'pi_sacode',
  68. fieldLabel: '关联销售单号',
  69. emptyText: '输入单号',
  70. }, {
  71. xtype: 'employeeDbfindTrigger',
  72. name: 'creatorName',
  73. fieldLabel: '录入人',
  74. emptyText: '输入人员编号或姓名',
  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. emptyText: '输入人员编号或姓名',
  87. }],
  88. moreQueryFormItems: [],
  89. queryGridConfig: {
  90. idField:'id',
  91. codeField:'pi_inoutno',
  92. addTitle:'出货单',
  93. addXtype:'sale-saleout-formpanel',
  94. defaultCondition:' pi_class = \'出货单\'',
  95. baseVastUrl: '/api/sale/prodinout/',
  96. caller:'SaleOut',
  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. hidden :true
  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 > 8 ? 8 : 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. });