QueryPanel.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. Ext.define('saas.view.stock.otherIn.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-otherin-querypanel',
  4. controller: 'stock-otherin-querypanel',
  5. viewModel: 'stock-otherin-querypanel',
  6. viewName: 'stock-otherin-querypanel',
  7. queryFormItems: [{
  8. xtype: 'textfield',
  9. name: 'pi_inoutno',
  10. emptyText:'请输入单号',
  11. getCondition: function(value) {
  12. if(value == 'ALL') {
  13. return '1=1';
  14. }else {
  15. return ' (pi_inoutno like\'%' + value + '%\') ';
  16. }
  17. }
  18. }, {
  19. xtype: 'condatefield',
  20. name: 'pi_date',
  21. fieldLabel: '日期',
  22. columnWidth: 0.5,
  23. operation: 'between'
  24. }, {
  25. xtype: 'productDbfindTrigger',
  26. name: 'pr_detail',
  27. fieldLabel: '物料',
  28. emptyText:'输入物料编号或名称',
  29. showDetail: true
  30. }, {
  31. xtype: 'vendorDbfindTrigger',
  32. name: 'pi_vendcode',
  33. fieldLabel: '供应商',
  34. emptyText:'输入供应商编号或名称'
  35. }, {
  36. xtype: 'combobox',
  37. name: 'pi_statuscode',
  38. fieldLabel: '单据状态',
  39. allowBlank: true,
  40. emptyText :'全部',
  41. editable:false,
  42. queryMode: 'local',
  43. displayField: 'pi_status',
  44. valueField: 'pi_statuscode',
  45. store: Ext.create('Ext.data.ArrayStore', {
  46. fields: ['pi_statuscode', 'pi_status'],
  47. data: [
  48. ["ALL", "全部"],
  49. ["AUDITED", "已审核"],
  50. ["UNAUDITED", "未审核"]
  51. ]
  52. }),
  53. getCondition: function(value) {
  54. if(value == 'ALL') {
  55. return '1=1';
  56. }else {
  57. return 'pi_statuscode=\'' + value + '\'';
  58. }
  59. }
  60. }, {
  61. xtype: 'warehouseDbfindTrigger',
  62. name: 'pd_whname',
  63. fieldLabel: '仓库',
  64. showDetail: true,
  65. emptyText:'请输入仓库编号或名称'
  66. }, {
  67. xtype: 'accountDbfindTrigger',
  68. name: 'creatorName',
  69. fieldLabel: '录入人',
  70. emptyText:'请输入人员编号或名称',
  71. getCondition: function(value) {
  72. if(!value) {
  73. return '1=1';
  74. }else {
  75. return 'prodinout.creatorName like \'%' + value + '%\'';
  76. }
  77. }
  78. }, {
  79. xtype: 'accountDbfindTrigger',
  80. name: 'pi_auditman',
  81. fieldLabel: '审核人',
  82. emptyText:'请输入人员编号或名称'
  83. }],
  84. queryGridConfig: {
  85. idField:'id',
  86. codeField:'pi_inoutno',
  87. addTitle:'其它入库单',
  88. addXtype:'stock-otherin-formpanel',
  89. defaultCondition:' pi_class = \'其它入库单\'',
  90. baseVastUrl:'/api/storage/prodinout/',
  91. caller:'OtherIn',
  92. baseColumn: [{
  93. text: 'id',
  94. dataIndex: 'id',
  95. hidden:true,
  96. xtype: 'numbercolumn'
  97. }, {
  98. text: '其它入库单号',
  99. dataIndex: 'pi_inoutno',
  100. width: 150
  101. },{
  102. text: '单据类型',
  103. dataIndex: 'pi_class',
  104. width: 0
  105. },{
  106. text: '单据日期',
  107. dataIndex: 'pi_date',
  108. xtype:'datecolumn',
  109. width: 110
  110. },{
  111. text: '供应商',
  112. dataIndex: 'pi_vendname',
  113. width: 250
  114. },{
  115. text: '状态',
  116. align: 'center',
  117. dataIndex: 'pi_status',
  118. width: 90
  119. },{
  120. text: '录入人',
  121. dataIndex: 'creatorName',
  122. width: 110
  123. },{
  124. text: '审核人',
  125. dataIndex: 'pi_auditman',
  126. width: 110
  127. },{
  128. text: '备注',
  129. dataIndex: 'pi_remark',
  130. width: 250
  131. }],
  132. relativeColumn: [
  133. {
  134. text: 'id',
  135. dataIndex: 'pi_id',
  136. xtype: 'numbercolumn',
  137. hidden:true
  138. },{
  139. text: '其它入库单号',
  140. dataIndex: 'pi_inoutno',
  141. width: 150
  142. },{
  143. text: '单据类型',
  144. dataIndex: 'pi_class',
  145. width: 0
  146. },{
  147. text: '单据日期',
  148. dataIndex: 'pi_date',
  149. xtype:'datecolumn',
  150. width: 110
  151. },{
  152. text: '供应商',
  153. dataIndex: 'pi_vendname',
  154. width: 250
  155. },{
  156. text: '状态',
  157. align: 'center',
  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_brand',
  175. width: 150
  176. },{
  177. text: '名称',
  178. dataIndex: 'pr_detail',
  179. width: 200
  180. },{
  181. text: '型号',
  182. dataIndex: 'pr_orispeccode',
  183. width: 200
  184. },{
  185. text: '数量',
  186. dataIndex: 'pd_inqty',
  187. xtype:'numbercolumn',
  188. width: 10,
  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: 'pr_unit',
  198. width: 80
  199. },{
  200. text: '单价(元)',
  201. dataIndex: 'pd_orderprice',
  202. xtype:'numbercolumn',
  203. width: 110,
  204. renderer : function(v) {
  205. var arr = (v + '.').split('.');
  206. var xr = (new Array(arr[1].length)).fill('0');
  207. var format = '0,000.' + xr.join('');
  208. return Ext.util.Format.number(v, format);
  209. }
  210. },{
  211. text: '仓库',
  212. dataIndex: 'pd_whname',
  213. width: 150
  214. },{
  215. text: '税率',
  216. dataIndex: 'pd_taxrate',
  217. xtype:'numbercolumn',
  218. width: 80,
  219. renderer : function(v) {
  220. return Ext.util.Format.number(v, '0');
  221. },
  222. },{
  223. text: '金额(元)',
  224. dataIndex: 'pd_ordertotal',
  225. xtype:'numbercolumn',
  226. width: 110,
  227. renderer : function(v) {
  228. var arr = (v + '.').split('.');
  229. var xr = (new Array(arr[1].length)).fill('0');
  230. var format = '0,000.' + xr.join('');
  231. return Ext.util.Format.number(v, format);
  232. }
  233. },{
  234. text: '备注',
  235. dataIndex: 'pd_remark',
  236. width:250
  237. }]
  238. }
  239. });