QueryPanel.js 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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. showDetail: true
  66. }, {
  67. xtype: 'textfield',
  68. name: 'pi_sacode',
  69. fieldLabel: '关联销售单号',
  70. emptyText: '输入单号',
  71. }, {
  72. xtype: 'accountDbfindTrigger',
  73. name: 'creatorName',
  74. fieldLabel: '录入人',
  75. emptyText: '输入人员编号或姓名',
  76. getCondition: function(value) {
  77. if(!value) {
  78. return '1=1';
  79. }else {
  80. return 'prodinout.creatorName like\'%' + value + '%\'';
  81. }
  82. }
  83. }, {
  84. xtype: 'accountDbfindTrigger',
  85. name: 'pi_auditman',
  86. fieldLabel: '审核人',
  87. emptyText: '输入人员编号或姓名',
  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. hidden :true
  140. }, {
  141. text: '录入人',
  142. dataIndex: 'creatorName',
  143. width :110
  144. },{
  145. text: '审核人',
  146. dataIndex: 'pi_auditman',
  147. width: 110
  148. }, {
  149. text: '备注',
  150. dataIndex: 'pi_remark',
  151. width: 250
  152. },{
  153. text: '未含税金额',
  154. dataIndex: 'pi_nettotal',
  155. xtype:'numbercolumn',
  156. hidden :true
  157. },{
  158. text: '单据类型',
  159. dataIndex: 'pi_class',
  160. hidden :true
  161. }],
  162. relativeColumn: [{
  163. text: 'id',
  164. dataIndex: 'id',
  165. hidden:true,
  166. xtype: 'numbercolumn'
  167. }, {
  168. text: '出货单号',
  169. dataIndex: 'pi_inoutno',
  170. width: 150
  171. }, {
  172. text: '单据日期',
  173. dataIndex: 'pi_date',
  174. xtype:'datecolumn',
  175. width: 110
  176. },{
  177. text: '客户名称',
  178. dataIndex: 'pi_custname',
  179. width: 250
  180. }, {
  181. text: '单据状态',
  182. align: 'center',
  183. dataIndex: 'pi_status',
  184. width: 90
  185. }, {
  186. text: '明细序号',
  187. dataIndex: 'pd_pdno',
  188. xtype: 'numbercolumn',
  189. width: 100,
  190. renderer : function(v) {
  191. var format = '0'
  192. return Ext.util.Format.number(v, format);
  193. }
  194. }, {
  195. text: '关联销售单号',
  196. dataIndex: 'pd_ordercode',
  197. width: 150
  198. }, {
  199. text: '订单序号',
  200. dataIndex: 'pd_orderdetno',
  201. xtype:'numbercolumn',
  202. width: 100,
  203. renderer : function(v) {
  204. var format = '0'
  205. return Ext.util.Format.number(v, format);
  206. }
  207. }, {
  208. text: '物料编号',
  209. dataIndex: 'pd_prodcode',
  210. width: 150
  211. }, {
  212. text: '物料名称',
  213. dataIndex: 'pr_detail',
  214. width: 150
  215. }, {
  216. text: '出货数量',
  217. dataIndex: 'pd_outqty',
  218. xtype:'numbercolumn',
  219. width: 110,
  220. renderer : function(v) {
  221. var arr = (v + '.').split('.');
  222. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  223. var format = '0.' + xr.join('');
  224. return Ext.util.Format.number(v, format);
  225. }
  226. }, {
  227. text: '销售单价',
  228. dataIndex: 'pd_sendprice',
  229. xtype:'numbercolumn',
  230. width: 110,
  231. renderer : function(v) {
  232. var arr = (v + '.').split('.');
  233. var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
  234. var format = '0.' + xr.join('');
  235. return Ext.util.Format.number(v, format);
  236. }
  237. }, {
  238. text: '金额',
  239. dataIndex: 'pd_ordertotal',
  240. xtype:'numbercolumn',
  241. width: 110,
  242. renderer : function(v) {
  243. var arr = (v + '.').split('.');
  244. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  245. var format = '0.' + xr.join('');
  246. return Ext.util.Format.number(v, format);
  247. }
  248. }, {
  249. text: '税率',
  250. dataIndex: 'pd_taxrate',
  251. xtype:'numbercolumn',
  252. width: 80,
  253. renderer : function(v) {
  254. return Ext.util.Format.number(v, '0');
  255. }
  256. }, {
  257. text: '成本单价',
  258. dataIndex: 'pd_price',
  259. xtype:'numbercolumn',
  260. width: 110,
  261. renderer : function(v) {
  262. var arr = (v + '.').split('.');
  263. var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
  264. var format = '0.' + xr.join('');
  265. return Ext.util.Format.number(v, format);
  266. }
  267. }, {
  268. text: '备注',
  269. dataIndex: 'pd_remark',
  270. width: 250
  271. }]
  272. }
  273. });