QueryPanel.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. dataIndex: 'pi_status',
  110. width: 90
  111. },{
  112. text: '付款状态',
  113. dataIndex: 'pi_prstatus',
  114. width: 90
  115. },{
  116. text: '录入人',
  117. dataIndex: 'creatorName',
  118. width: 110
  119. },{
  120. text: '审核人',
  121. dataIndex: 'pi_auditman',
  122. width: 110
  123. },{
  124. text: '备注',
  125. dataIndex: 'pi_remark',
  126. width: 250
  127. }],
  128. relativeColumn: [
  129. {
  130. text: 'id',
  131. dataIndex: 'pu_id',
  132. xtype: 'numbercolumn',
  133. hidden:true
  134. }, {
  135. text: '单据编号',
  136. dataIndex: 'pi_inoutno',
  137. width: 150
  138. }, {
  139. text: '单据类型',
  140. dataIndex: 'pd_piclass',
  141. width: 0
  142. },{
  143. text: '单据日期',
  144. dataIndex: 'pi_date',
  145. xtype:'datecolumn',
  146. width: 110
  147. },{
  148. text: '供应商编号',
  149. dataIndex: 'pi_vendcode',
  150. width: 0
  151. },{
  152. text: '供应商名称',
  153. dataIndex: 'pi_vendname',
  154. width: 150
  155. },{
  156. text: '审核状态',
  157. dataIndex: 'pi_status',
  158. width: 90
  159. },{
  160. text: '序号',
  161. dataIndex: 'pd_pdno',
  162. width: 80
  163. },{
  164. text: '相关单号',
  165. dataIndex: 'pd_ordercode',
  166. width: 150
  167. },{
  168. text: '物料编号',
  169. dataIndex: 'pd_prodcode',
  170. width: 150
  171. },{
  172. text: '物料名称',
  173. dataIndex: 'pr_detail',
  174. width: 200
  175. },{
  176. text: '物料规格',
  177. dataIndex: 'pr_spec',
  178. width: 150
  179. },{
  180. text: '单位',
  181. dataIndex: 'pr_unit',
  182. width: 80
  183. },{
  184. text: '数量',
  185. dataIndex: 'pd_outqty',
  186. xtype:'numbercolumn',
  187. width: 110,
  188. renderer : function(v) {
  189. var arr = (v + '.').split('.');
  190. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  191. var format = '0,000.' + xr.join();
  192. return Ext.util.Format.number(v, format);
  193. },
  194. },{
  195. text: '仓库',
  196. dataIndex: 'pd_whname',
  197. width: 150
  198. },{
  199. text: '单价',
  200. dataIndex: 'pd_orderprice',
  201. xtype:'numbercolumn',
  202. renderer : function(v) {
  203. var arr = (v + '.').split('.');
  204. var xr = (new Array(arr[1].length)).fill('0');
  205. var format = '0,000.' + xr.join();
  206. return Ext.util.Format.number(v, format);
  207. },
  208. width: 110
  209. },{
  210. text: '税率',
  211. dataIndex: 'pd_taxrate',
  212. xtype:'numbercolumn',
  213. width: 80,
  214. renderer : function(v) {
  215. return Ext.util.Format.number(v, '0');
  216. },
  217. },{
  218. text: '金额',
  219. dataIndex: 'pd_total',
  220. xtype:'numbercolumn',
  221. width: 110,
  222. renderer : function(v) {
  223. var arr = (v + '.').split('.');
  224. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  225. var format = '0,000.' + xr.join();
  226. return Ext.util.Format.number(v, format);
  227. },
  228. }]
  229. }
  230. });