QueryPanel.js 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'purchase-purchaseout-querypanel',
  4. controller: 'purchase-purchaseout-querypanel',
  5. viewModel: 'purchase-purchaseout-querypanel',
  6. viewName: 'purchase-purchaseout-querypanel',
  7. queryFormItems: [{
  8. xtype: 'textfield',
  9. name: 'pi_inoutno',
  10. emptyText:'请输入单号或供应商',
  11. getCondition: function(value) {
  12. return ' (pi_inoutno like\'%' + value + '%\' or pi_vendcode like \'%'+value+'%\' or pi_vendname like \'%'+value+'%\') ';
  13. }
  14. }, {
  15. xtype: 'condatefield',
  16. name: 'pi_date',
  17. fieldLabel: '日期',
  18. columnWidth: 0.5,
  19. operation: 'between'
  20. }, {
  21. xtype: 'productDbfindTrigger',
  22. name: 'pr_detail',
  23. fieldLabel: '物料',
  24. emptyText:'输入物料编号或名称',
  25. showDetail: true,
  26. getCondition: function(value) {
  27. if(!value) {
  28. return '1=1';
  29. }else {
  30. return ' pr_detail = \'' + value + '\' ';
  31. }
  32. }
  33. }, {
  34. xtype: 'combobox',
  35. name: 'pi_statuscode',
  36. fieldLabel: '单据状态',
  37. allowBlank: true,
  38. emptyText :'全部',
  39. editable:false,
  40. queryMode: 'local',
  41. displayField: 'pi_status',
  42. valueField: 'pi_statuscode',
  43. store: Ext.create('Ext.data.ArrayStore', {
  44. fields: ['pi_statuscode', 'pi_status'],
  45. data: [
  46. ["ALL", "全部"],
  47. ["AUDITED", "已审核"],
  48. ["UNAUDITED", "未审核"]
  49. ]
  50. }),
  51. getCondition: function(value) {
  52. if(value == 'ALL') {
  53. return '1=1';
  54. }else {
  55. return 'pi_statuscode=\'' + value + '\'';
  56. }
  57. }
  58. }, {
  59. xtype: 'multicombo',
  60. name: 'pi_prstatuscode',
  61. fieldLabel: '付款状态',
  62. emptyText :'全部',
  63. datas: [
  64. ["PAYNONE", "未付款"],
  65. ["PAYPART", "部分付款"],
  66. ["PAYALL", "已付款"]
  67. ]
  68. }, {
  69. xtype: 'warehouseDbfindTrigger',
  70. name: 'pd_whname',
  71. fieldLabel: '仓库',
  72. emptyText:'请输入仓库编号或名称',
  73. showDetail: true,
  74. getCondition: function(value) {
  75. if(!value) {
  76. return '1=1';
  77. }else {
  78. return 'prodiodetail.pd_whname like\'%' + value + '%\'';
  79. }
  80. }
  81. }, {
  82. xtype: 'textfield',
  83. name: 'pi_iocode',
  84. fieldLabel: '关联验收单号',
  85. emptyText: '请输入采购验收单号',
  86. }, {
  87. xtype: 'accountDbfindTrigger',
  88. name: 'creatorName',
  89. fieldLabel: '录入人',
  90. emptyText:'请输入账户名称或姓名',
  91. getCondition: function(value) {
  92. if(!value) {
  93. return '1=1';
  94. }else {
  95. return 'prodinout.creatorName like\'%' + value + '%\'';
  96. }
  97. }
  98. }, {
  99. xtype: 'accountDbfindTrigger',
  100. name: 'pi_auditman',
  101. fieldLabel: '审核人',
  102. emptyText:'请输入账户名称或姓名'
  103. }],
  104. queryGridConfig: {
  105. idField:'id',
  106. codeField:'pi_inoutno',
  107. addTitle:'采购验退单',
  108. addXtype:'purchase-purchaseout-formpanel',
  109. defaultCondition:' pi_class = \'采购验退单\'',
  110. baseVastUrl:'/api/purchase/prodinout/',
  111. caller:'PurchaseOut',
  112. baseColumn: [{
  113. text: 'id',
  114. dataIndex: 'id',
  115. hidden:true,
  116. xtype: 'numbercolumn'
  117. }, {
  118. text: '验退单号',
  119. dataIndex: 'pi_inoutno',
  120. width: 150
  121. },{
  122. text: '单据类型',
  123. dataIndex: 'pi_class',
  124. width: 0
  125. },{
  126. text: '单据日期',
  127. dataIndex: 'pi_date',
  128. xtype:'datecolumn',
  129. width: 110
  130. },{
  131. text: '供应商名称',
  132. dataIndex: 'pi_vendname',
  133. width: 150
  134. },{
  135. text: '关联验收单号',
  136. dataIndex: 'pi_iocode',
  137. width: 150
  138. },{
  139. text: '总金额',
  140. dataIndex: 'pi_total',
  141. width: 110
  142. },{
  143. text: '单据状态',
  144. align: 'center',
  145. dataIndex: 'pi_status',
  146. width: 90
  147. },{
  148. text: '付款状态',
  149. align: 'center',
  150. dataIndex: 'pi_prstatus',
  151. width: 90
  152. },{
  153. text: '备注',
  154. dataIndex: 'pi_remark',
  155. width: 250
  156. }],
  157. relativeColumn: [
  158. {
  159. text: 'id',
  160. dataIndex: 'pu_id',
  161. xtype: 'numbercolumn',
  162. hidden:true
  163. }, {
  164. text: '单据编号',
  165. dataIndex: 'pi_inoutno',
  166. width: 150
  167. }, {
  168. text: '单据类型',
  169. dataIndex: 'pd_piclass',
  170. width: 0
  171. },{
  172. text: '单据日期',
  173. dataIndex: 'pi_date',
  174. xtype:'datecolumn',
  175. width: 110
  176. },{
  177. text: '供应商编号',
  178. dataIndex: 'pi_vendcode',
  179. width: 0
  180. },{
  181. text: '供应商名称',
  182. dataIndex: 'pi_vendname',
  183. width: 250
  184. },{
  185. text: '审核状态',
  186. align: 'center',
  187. dataIndex: 'pi_status',
  188. width: 90
  189. },{
  190. text: '序号',
  191. dataIndex: 'pd_pdno',
  192. width: 80,
  193. renderer : function(v) {
  194. return Ext.util.Format.number(v, '0');
  195. }
  196. },{
  197. text: '关联验收单号',
  198. dataIndex: 'pi_iocode',
  199. width: 150
  200. },{
  201. text: '关联验收序号',
  202. dataIndex: 'iodetno',
  203. width: 150
  204. },{
  205. text: '物料编号',
  206. dataIndex: 'pd_prodcode',
  207. width: 150,
  208. renderer : function(v) {
  209. return Ext.util.Format.number(v, '0');
  210. }
  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: 'pr_spec',
  226. width: 150
  227. },{
  228. text: '数量',
  229. dataIndex: 'pd_outqty',
  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,000.' + xr.join('');
  236. return Ext.util.Format.number(v, format);
  237. },
  238. }, {
  239. text: '单位',
  240. dataIndex: 'pr_unit',
  241. width: 80
  242. }, {
  243. text: '单价(元)',
  244. dataIndex: 'pd_orderprice',
  245. xtype:'numbercolumn',
  246. renderer : function(v) {
  247. var arr = (v + '.').split('.');
  248. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  249. var format = '0,000.' + xr.join('');
  250. return Ext.util.Format.number(v, format);
  251. },
  252. width: 110
  253. },{
  254. text: '仓库',
  255. dataIndex: 'pd_whname',
  256. width: 150
  257. },{
  258. text: '税率',
  259. dataIndex: 'pd_taxrate',
  260. xtype:'numbercolumn',
  261. width: 80,
  262. renderer : function(v) {
  263. return Ext.util.Format.number(v, '0');
  264. },
  265. },{
  266. text: '金额',
  267. dataIndex: 'pd_ordertotal',
  268. xtype:'numbercolumn',
  269. width: 110,
  270. renderer : function(v) {
  271. var arr = (v + '.').split('.');
  272. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  273. var format = '0,000.' + xr.join('');
  274. return Ext.util.Format.number(v, format);
  275. },
  276. }]
  277. }
  278. });