QueryPanel.js 7.1 KB

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