QueryPanel.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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_brand',
  214. width: 150
  215. },{
  216. text: '名称',
  217. dataIndex: 'pr_detail',
  218. width: 200
  219. },{
  220. text: '型号',
  221. dataIndex: 'pr_orispeccode',
  222. width: 200
  223. },{
  224. text: '出货数量',
  225. dataIndex: 'pd_outqty',
  226. xtype:'numbercolumn',
  227. width: 110,
  228. renderer : function(v) {
  229. var arr = (v + '.').split('.');
  230. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  231. var format = '0.' + xr.join('');
  232. return Ext.util.Format.number(v, format);
  233. }
  234. }, {
  235. text: '单位',
  236. dataIndex: 'pr_unit',
  237. width: 80
  238. }, {
  239. text: '销售单价(元)',
  240. dataIndex: 'pd_sendprice',
  241. xtype:'numbercolumn',
  242. width: 110,
  243. renderer : function(v) {
  244. var arr = (v + '.').split('.');
  245. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  246. var format = '0.' + xr.join('');
  247. return Ext.util.Format.number(v, format);
  248. }
  249. }, {
  250. text: '金额(元)',
  251. dataIndex: 'pd_ordertotal',
  252. xtype:'numbercolumn',
  253. width: 110,
  254. renderer : function(v) {
  255. var arr = (v + '.').split('.');
  256. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  257. var format = '0.' + xr.join('');
  258. return Ext.util.Format.number(v, format);
  259. }
  260. }, {
  261. text: '税率',
  262. dataIndex: 'pd_taxrate',
  263. xtype:'numbercolumn',
  264. width: 80,
  265. renderer : function(v) {
  266. return Ext.util.Format.number(v, '0');
  267. }
  268. }, {
  269. text: '成本单价(元)',
  270. dataIndex: 'pd_price',
  271. xtype:'numbercolumn',
  272. width: 110,
  273. renderer : function(v) {
  274. var arr = (v + '.').split('.');
  275. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  276. var format = '0.' + xr.join('');
  277. return Ext.util.Format.number(v, format);
  278. }
  279. }, {
  280. text: '备注',
  281. dataIndex: 'pd_remark',
  282. width: 250
  283. }]
  284. }
  285. });