QueryPanel.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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: 'hidden',
  9. name: 'id',
  10. fieldLabel: 'ID',
  11. columnWidth: 0,
  12. getCondition: function(value) {
  13. return 'pi_id=' + value;
  14. }
  15. },{
  16. xtype: 'textfield',
  17. name: 'pi_inoutno',
  18. emptyText:'请输入单号或供应商',
  19. getCondition: function(value) {
  20. return ' (pi_inoutno like\'%' + value + '%\' or pi_vendcode like \'%'+value+'%\' or pi_vendname like \'%'+value+'%\') ';
  21. }
  22. }, {
  23. xtype: 'textfield',
  24. name: 'pd_prodcode',
  25. fieldLabel: '物料编号',
  26. hidden:true,
  27. showDetail: true
  28. }, {
  29. xtype: 'productDbfindTrigger',
  30. name: 'pr_detail',
  31. fieldLabel: '物料',
  32. emptyText:'输入物料编号或名称',
  33. showDetail: true
  34. }, {
  35. xtype: 'textfield',
  36. name: 'pi_pucode',
  37. fieldLabel: '关联单号'
  38. }, {
  39. xtype: 'condatefield',
  40. name: 'pi_date',
  41. fieldLabel: '日期',
  42. columnWidth: 0.5,
  43. operation: 'between'
  44. }, {
  45. xtype: 'combobox',
  46. name: 'pi_statuscode',
  47. fieldLabel: '单据状态',
  48. allowBlank: true,
  49. emptyText :'全部',
  50. editable:false,
  51. queryMode: 'local',
  52. displayField: 'pi_status',
  53. valueField: 'pi_statuscode',
  54. store: Ext.create('Ext.data.ArrayStore', {
  55. fields: ['pi_statuscode', 'pi_status'],
  56. data: [
  57. ["ALL", "全部"],
  58. ["AUDITED", "已审核"],
  59. ["UNAUDITED", "未审核"]
  60. ]
  61. }),
  62. getCondition: function(value) {
  63. if(value == 'ALL') {
  64. return '1=1';
  65. }else {
  66. return 'pi_statuscode=\'' + value + '\'';
  67. }
  68. }
  69. }],
  70. queryGridConfig: {
  71. idField:'id',
  72. codeField:'pi_inoutno',
  73. addTitle:'采购验退单',
  74. addXtype:'purchase-purchaseout-formpanel',
  75. defaultCondition:' pi_class = \'采购验退单\'',
  76. baseVastUrl:'/api/purchase/prodinout/',
  77. baseColumn: [{
  78. text: 'id',
  79. dataIndex: 'id',
  80. hidden:true,
  81. xtype: 'numbercolumn'
  82. }, {
  83. text: '验退单号',
  84. dataIndex: 'pi_inoutno',
  85. width: 150
  86. },{
  87. text: '单据类型',
  88. dataIndex: 'pi_class',
  89. width: 0
  90. },{
  91. text: '单据日期',
  92. dataIndex: 'pi_date',
  93. xtype:'datecolumn',
  94. width: 110
  95. },{
  96. text: '供应商名称',
  97. dataIndex: 'pi_vendname',
  98. width: 150
  99. },{
  100. text: '关联验收单号',
  101. dataIndex: 'pi_iocode',
  102. width: 150
  103. },{
  104. text: '总金额',
  105. dataIndex: 'pi_total',
  106. width: 110
  107. },{
  108. text: '单据状态',
  109. align: 'center',
  110. dataIndex: 'pi_status',
  111. width: 90
  112. },{
  113. text: '付款状态',
  114. align: 'center',
  115. dataIndex: 'pi_prstatus',
  116. width: 90
  117. },{
  118. text: '录入人',
  119. dataIndex: 'creatorName',
  120. width: 110
  121. },{
  122. text: '审核人',
  123. dataIndex: 'pi_auditman',
  124. width: 110
  125. },{
  126. text: '备注',
  127. dataIndex: 'pi_remark',
  128. width: 250
  129. }],
  130. relativeColumn: [
  131. {
  132. text: 'id',
  133. dataIndex: 'pu_id',
  134. xtype: 'numbercolumn',
  135. hidden:true
  136. }, {
  137. text: '单据编号',
  138. dataIndex: 'pi_inoutno',
  139. width: 150
  140. }, {
  141. text: '单据类型',
  142. dataIndex: 'pd_piclass',
  143. width: 0
  144. },{
  145. text: '单据日期',
  146. dataIndex: 'pi_date',
  147. xtype:'datecolumn',
  148. width: 110
  149. },{
  150. text: '供应商编号',
  151. dataIndex: 'pi_vendcode',
  152. width: 0
  153. },{
  154. text: '供应商名称',
  155. dataIndex: 'pi_vendname',
  156. width: 150
  157. },{
  158. text: '审核状态',
  159. align: 'center',
  160. dataIndex: 'pi_status',
  161. width: 90
  162. },{
  163. text: '序号',
  164. dataIndex: 'pd_pdno',
  165. width: 80
  166. },{
  167. text: '相关单号',
  168. dataIndex: 'pd_ordercode',
  169. width: 150
  170. },{
  171. text: '物料编号',
  172. dataIndex: 'pd_prodcode',
  173. width: 150
  174. },{
  175. text: '物料名称',
  176. dataIndex: 'pr_detail',
  177. width: 200
  178. },{
  179. text: '物料规格',
  180. dataIndex: 'pr_spec',
  181. width: 150
  182. },{
  183. text: '单位',
  184. dataIndex: 'pr_unit',
  185. width: 80
  186. },{
  187. text: '数量',
  188. dataIndex: 'pd_outqty',
  189. xtype:'numbercolumn',
  190. width: 110,
  191. renderer : function(v) {
  192. var arr = (v + '.').split('.');
  193. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  194. var format = '0,000.' + xr.join();
  195. return Ext.util.Format.number(v, format);
  196. },
  197. },{
  198. text: '仓库',
  199. dataIndex: 'pd_whname',
  200. width: 150
  201. },{
  202. text: '单价',
  203. dataIndex: 'pd_orderprice',
  204. xtype:'numbercolumn',
  205. renderer : function(v) {
  206. var arr = (v + '.').split('.');
  207. var xr = (new Array(arr[1].length)).fill('0');
  208. var format = '0,000.' + xr.join();
  209. return Ext.util.Format.number(v, format);
  210. },
  211. width: 110
  212. },{
  213. text: '税率',
  214. dataIndex: 'pd_taxrate',
  215. xtype:'numbercolumn',
  216. width: 80,
  217. renderer : function(v) {
  218. return Ext.util.Format.number(v, '0');
  219. },
  220. },{
  221. text: '金额',
  222. dataIndex: 'pd_total',
  223. xtype:'numbercolumn',
  224. width: 110,
  225. renderer : function(v) {
  226. var arr = (v + '.').split('.');
  227. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  228. var format = '0,000.' + xr.join();
  229. return Ext.util.Format.number(v, format);
  230. },
  231. }]
  232. }
  233. });