QueryPanel.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-appropriationinout-querypanel',
  4. controller: 'stock-appropriationinout-querypanel',
  5. viewModel: 'stock-appropriationinout-querypanel',
  6. viewName: 'stock-appropriationinout-querypanel',
  7. queryFormItems: [{
  8. xtype: 'textfield',
  9. name: 'pi_inoutno',
  10. emptyText:'请输入单号',
  11. getCondition: function(value) {
  12. if(value == ''|| value ==null) {
  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. allowBlank: true,
  23. columnWidth: 0.5
  24. }, {
  25. xtype: 'productDbfindTrigger',
  26. name: 'pr_detail',
  27. fieldLabel: '物料',
  28. emptyText:'请输入物料编号或名称',
  29. getCondition: function(value) {
  30. if(value == ''|| value ==null) {
  31. return '1=1';
  32. }else {
  33. return ' (pr_detail like\'%' + value + '%\' or ) ';
  34. }
  35. }
  36. }, {
  37. xtype: 'combobox',
  38. name: 'pi_statuscode',
  39. fieldLabel: '单据状态',
  40. allowBlank: true,
  41. editable:false,
  42. columnWidth: 0.25,
  43. queryMode: 'local',
  44. emptyText :'全部',
  45. editable:false,
  46. showDetail: true,
  47. displayField: 'pi_status',
  48. valueField: 'pi_statuscode',
  49. store: Ext.create('Ext.data.ArrayStore', {
  50. fields: ['pi_statuscode', 'pi_status'],
  51. data: [
  52. ["ALL", "全部"],
  53. ["AUDITED", "已审核"],
  54. ["UNAUDITED", "未审核"]
  55. ]
  56. }),
  57. getCondition: function(value) {
  58. if(value == 'ALL') {
  59. return '1=1';
  60. }else {
  61. return 'pi_statuscode=\'' + value + '\'';
  62. }
  63. }
  64. },{
  65. xtype: 'warehouseDbfindTrigger',
  66. name: 'pd_whname',
  67. fieldLabel: '拨出仓',
  68. emptyText :'请输入仓库名或仓库编号',
  69. showDetail: true,
  70. getCondition: function(value) {
  71. if(value == '' || value == null) {
  72. return '1=1';
  73. }else {
  74. return ' (pd_whcode like\'%' + value + '%\' or pd_whname like \'%'+value+'%\' ) ';
  75. }
  76. }
  77. },{
  78. xtype: 'warehouseDbfindTrigger',
  79. name: 'pd_inwhname',
  80. fieldLabel: '拨入仓',
  81. emptyText :'请输入仓库名或仓库编号',
  82. showDetail: true,
  83. getCondition: function(value) {
  84. if(value == '' || value == null) {
  85. return '1=1';
  86. }else {
  87. return ' (pd_inwhcode like\'%' + value + '%\' or pd_inwhname like \'%'+value+'%\') ';
  88. }
  89. }
  90. }, {
  91. xtype: 'accountDbfindTrigger',
  92. name: 'creatorName',
  93. fieldLabel: '录入人',
  94. emptyText:'请输入账户名称或姓名',
  95. getCondition: function(value) {
  96. if(!value) {
  97. return '1=1';
  98. }else {
  99. return 'prodinout.creatorName like\'%' + value + '%\'';
  100. }
  101. }
  102. }, {
  103. xtype: 'accountDbfindTrigger',
  104. name: 'pi_auditman',
  105. fieldLabel: '审核人',
  106. emptyText:'请输入账户名称或姓名'
  107. }],
  108. moreQueryFormItems: [],
  109. queryGridConfig: {
  110. idField:'id',
  111. codeField:'pi_inoutno',
  112. addTitle:'调拨单',
  113. addXtype:'stock-appropriationinout-formpanel',
  114. defaultCondition:' pi_class = \'调拨单\'',
  115. baseVastUrl:'/api/storage/prodinout/',
  116. caller:'AppropriationInOut',
  117. baseColumn: [{
  118. text: 'id',
  119. dataIndex: 'id',
  120. hidden:true,
  121. xtype: 'numbercolumn'
  122. }, {
  123. text: '调拨单号',
  124. dataIndex: 'pi_inoutno',
  125. width: 150
  126. }, {
  127. text: '单据类型',
  128. dataIndex: 'pi_class',
  129. width: 0
  130. }, {
  131. text: '单据日期',
  132. dataIndex: 'pi_date',
  133. xtype:'datecolumn',
  134. width: 110
  135. }, {
  136. text: '状态',
  137. align: 'center',
  138. dataIndex: 'pi_status',
  139. width: 90
  140. }, {
  141. text: '备注',
  142. dataIndex: 'pi_remark',
  143. width: 250
  144. }],
  145. relativeColumn: [{
  146. text: 'id',
  147. dataIndex: 'pi_id',
  148. xtype: 'numbercolumn',
  149. hidden:true
  150. }, {
  151. text: '调拨单号',
  152. dataIndex: 'pi_inoutno',
  153. width: 150
  154. }, {
  155. text: '单据日期',
  156. dataIndex: 'pi_date',
  157. xtype:'datecolumn',
  158. width: 110
  159. },{
  160. text: '审核状态',
  161. align: 'center',
  162. dataIndex: 'pi_status',
  163. width: 80
  164. },{
  165. text: '序号',
  166. dataIndex: 'pd_pdno',
  167. hidden: true
  168. },{
  169. text: '物料编号',
  170. dataIndex: 'pd_prodcode',
  171. width: 150
  172. },{
  173. text: '品牌',
  174. dataIndex: 'pr_brand',
  175. width: 100
  176. },{
  177. text: '物料名称',
  178. dataIndex: 'pr_detail',
  179. width: 150
  180. },{
  181. text: '型号',
  182. dataIndex: 'pr_orispeccode',
  183. width: 200
  184. },{
  185. text: '规格',
  186. dataIndex: 'pr_spec',
  187. width: 200
  188. },{
  189. text: '数量',
  190. dataIndex: 'pd_outqty',
  191. xtype:'numbercolumn',
  192. width: 110,
  193. renderer : function(v) {
  194. return saas.util.BaseUtil.numberFormat(v, 3, false);
  195. }
  196. }, {
  197. text: '单位',
  198. dataIndex: 'pr_unit',
  199. width: 65
  200. }, {
  201. text: '拨出仓库',
  202. dataIndex: 'pd_whname',
  203. width: 80
  204. },{
  205. text: '拨入仓库',
  206. dataIndex: 'pd_inwhname',
  207. width: 80
  208. },{
  209. text: '备注',
  210. dataIndex: 'pd_remark',
  211. width:250
  212. }]
  213. },
  214. getQueryMode: function() {
  215. return 'DETAIL';
  216. }
  217. });