QueryPanel.js 7.8 KB

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