QueryPanel.js 8.6 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: 'creatorName',
  155. width: 110
  156. },{
  157. text: '审核人',
  158. dataIndex: 'pi_auditman',
  159. width: 110
  160. },{
  161. text: '备注',
  162. dataIndex: 'pi_remark',
  163. width: 250
  164. }],
  165. relativeColumn: [
  166. {
  167. text: 'id',
  168. dataIndex: 'pu_id',
  169. xtype: 'numbercolumn',
  170. hidden:true
  171. }, {
  172. text: '单据编号',
  173. dataIndex: 'pi_inoutno',
  174. width: 150
  175. }, {
  176. text: '单据类型',
  177. dataIndex: 'pd_piclass',
  178. width: 0
  179. },{
  180. text: '单据日期',
  181. dataIndex: 'pi_date',
  182. xtype:'datecolumn',
  183. width: 110
  184. },{
  185. text: '供应商编号',
  186. dataIndex: 'pi_vendcode',
  187. width: 0
  188. },{
  189. text: '供应商名称',
  190. dataIndex: 'pi_vendname',
  191. width: 250
  192. },{
  193. text: '审核状态',
  194. align: 'center',
  195. dataIndex: 'pi_status',
  196. width: 90
  197. },{
  198. text: '序号',
  199. dataIndex: 'pd_pdno',
  200. width: 80,
  201. renderer : function(v) {
  202. return Ext.util.Format.number(v, '0');
  203. }
  204. },{
  205. text: '关联验收单号',
  206. dataIndex: 'pi_iocode',
  207. width: 150
  208. },{
  209. text: '关联验收序号号',
  210. dataIndex: 'iodetno',
  211. width: 150
  212. },{
  213. text: '物料编号',
  214. dataIndex: 'pd_prodcode',
  215. width: 150,
  216. renderer : function(v) {
  217. return Ext.util.Format.number(v, '0');
  218. }
  219. },{
  220. text: '物料名称',
  221. dataIndex: 'pr_detail',
  222. width: 200
  223. },{
  224. text: '物料规格',
  225. dataIndex: 'pr_spec',
  226. width: 150
  227. },{
  228. text: '单位',
  229. dataIndex: 'pr_unit',
  230. width: 80
  231. },{
  232. text: '数量',
  233. dataIndex: 'pd_outqty',
  234. xtype:'numbercolumn',
  235. width: 110,
  236. renderer : function(v) {
  237. var arr = (v + '.').split('.');
  238. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  239. var format = '0,000.' + xr.join('');
  240. return Ext.util.Format.number(v, format);
  241. },
  242. },{
  243. text: '仓库',
  244. dataIndex: 'pd_whname',
  245. width: 150
  246. },{
  247. text: '单价',
  248. dataIndex: 'pd_orderprice',
  249. xtype:'numbercolumn',
  250. renderer : function(v) {
  251. var arr = (v + '.').split('.');
  252. var xr = (new Array(arr[1].length)).fill('0');
  253. var format = '0,000.' + xr.join('');
  254. return Ext.util.Format.number(v, format);
  255. },
  256. width: 110
  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. });