QueryPanel.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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: 'pi_remark',
  143. width: 250
  144. },{
  145. text: '未含税金额',
  146. dataIndex: 'pi_nettotal',
  147. xtype:'numbercolumn',
  148. hidden :true
  149. },{
  150. text: '单据类型',
  151. dataIndex: 'pi_class',
  152. hidden :true
  153. }],
  154. relativeColumn: [{
  155. text: 'id',
  156. dataIndex: 'id',
  157. hidden:true,
  158. xtype: 'numbercolumn'
  159. }, {
  160. text: '出货单号',
  161. dataIndex: 'pi_inoutno',
  162. width: 150
  163. }, {
  164. text: '单据日期',
  165. dataIndex: 'pi_date',
  166. xtype:'datecolumn',
  167. width: 110
  168. },{
  169. text: '客户名称',
  170. dataIndex: 'pi_custname',
  171. width: 250
  172. }, {
  173. text: '单据状态',
  174. align: 'center',
  175. dataIndex: 'pi_status',
  176. width: 90
  177. }, {
  178. text: '明细序号',
  179. dataIndex: 'pd_pdno',
  180. xtype: 'numbercolumn',
  181. width: 100,
  182. renderer : function(v) {
  183. var format = '0'
  184. return Ext.util.Format.number(v, format);
  185. }
  186. }, {
  187. text: '关联销售单号',
  188. dataIndex: 'pd_ordercode',
  189. width: 150
  190. }, {
  191. text: '订单序号',
  192. dataIndex: 'pd_orderdetno',
  193. xtype:'numbercolumn',
  194. width: 100,
  195. renderer : function(v) {
  196. var format = '0'
  197. return Ext.util.Format.number(v, format);
  198. }
  199. }, {
  200. text: '物料编号',
  201. dataIndex: 'pd_prodcode',
  202. width: 150
  203. },{
  204. text: '品牌',
  205. dataIndex: 'pr_brand',
  206. width: 150
  207. },{
  208. text: '名称',
  209. dataIndex: 'pr_detail',
  210. width: 200
  211. },{
  212. text: '型号',
  213. dataIndex: 'pr_orispeccode',
  214. width: 200
  215. },{
  216. text: '规格',
  217. dataIndex: 'pr_spce',
  218. width: 150
  219. },{
  220. text: '出货数量',
  221. dataIndex: 'pd_outqty',
  222. xtype:'numbercolumn',
  223. width: 110,
  224. renderer : function(v) {
  225. var arr = (v + '.').split('.');
  226. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  227. var format = '0.' + xr.join('');
  228. return Ext.util.Format.number(v, format);
  229. }
  230. }, {
  231. text: '单位',
  232. dataIndex: 'pr_unit',
  233. width: 80
  234. }, {
  235. text: '销售单价(元)',
  236. dataIndex: 'pd_sendprice',
  237. xtype:'numbercolumn',
  238. width: 110,
  239. renderer : function(v) {
  240. var arr = (v + '.').split('.');
  241. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  242. var format = '0.' + xr.join('');
  243. return Ext.util.Format.number(v, format);
  244. }
  245. }, {
  246. text: '金额',
  247. dataIndex: 'pd_ordertotal',
  248. xtype:'numbercolumn',
  249. width: 110,
  250. renderer : function(v) {
  251. var arr = (v + '.').split('.');
  252. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  253. var format = '0.' + xr.join('');
  254. return Ext.util.Format.number(v, format);
  255. }
  256. }, {
  257. text: '税率',
  258. dataIndex: 'pd_taxrate',
  259. xtype:'numbercolumn',
  260. width: 80,
  261. renderer : function(v) {
  262. return Ext.util.Format.number(v, '0');
  263. }
  264. }, {
  265. text: '成本单价(元)',
  266. dataIndex: 'pd_price',
  267. xtype:'numbercolumn',
  268. width: 110,
  269. renderer : function(v) {
  270. var arr = (v + '.').split('.');
  271. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  272. var format = '0.' + xr.join('');
  273. return Ext.util.Format.number(v, format);
  274. }
  275. }, {
  276. text: '备注',
  277. dataIndex: 'pd_remark',
  278. width: 250
  279. }]
  280. }
  281. });