QueryPanel.js 7.9 KB

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