QueryPanel.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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: 'hidden',
  9. name: 'id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. columnWidth: 0
  13. },{
  14. xtype: 'textfield',
  15. name: 'pi_inoutno',
  16. emptyText:'请输入单号或物料',
  17. showDetail: true,
  18. getCondition: function(value) {
  19. if(value != '') {
  20. return ' (pi_inoutno like\'%' + value + '%\' or pd_prodcode like \'%'+value+'%\' ) ';
  21. }
  22. }
  23. }, {
  24. xtype: 'condatefield',
  25. name: 'pi_date',
  26. fieldLabel: '日期',
  27. allowBlank: true,
  28. columnWidth: 0.5
  29. }, {
  30. xtype: 'combobox',
  31. name: 'pi_statuscode',
  32. fieldLabel: '状态',
  33. allowBlank: true,
  34. editable:false,
  35. columnWidth: 0.25,
  36. showDetail: true,
  37. queryMode: 'local',
  38. emptyText :'全部',
  39. editable:false,
  40. displayField: 'pi_status',
  41. valueField: 'pi_statuscode',
  42. store: Ext.create('Ext.data.ArrayStore', {
  43. fields: ['pi_statuscode', 'pi_status'],
  44. data: [
  45. ["ALL", "全部"],
  46. ["AUDITED", "已审核"],
  47. ["UNAUDITED", "未审核"]
  48. ]
  49. }),
  50. getCondition: function(value) {
  51. if(value == 'ALL') {
  52. return '1=1';
  53. }else {
  54. return 'pi_statuscode=\'' + value + '\'';
  55. }
  56. }
  57. },{
  58. xtype: 'warehouseDbfindTrigger',
  59. name: 'pd_whcode',
  60. fieldLabel: '仓库',
  61. emptyText :'请输入仓库名或仓库编号',
  62. showDetail: true,
  63. getCondition: function(value) {
  64. if(value != '') {
  65. return ' (pd_whcode like\'%' + value + '%\' or pd_whname like \'%'+value+'%\' or pd_inwhcode like\'%' + value + '%\' or pd_inwhname like \'%'+value+'%\') ';
  66. }
  67. }
  68. }],
  69. moreQueryFormItems: [],
  70. queryGridConfig: {
  71. idField:'id',
  72. codeField:'pi_inoutno',
  73. addTitle:'调拨单',
  74. addXtype:'stock-appropriationinout-formpanel',
  75. defaultCondition:' pi_class = \'调拨单\'',
  76. baseVastUrl:'/api/storage/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_status',
  98. width: 90
  99. },{
  100. text: '录入人',
  101. dataIndex: 'creatorName',
  102. width: 110
  103. },{
  104. text: '审核人',
  105. dataIndex: 'pi_auditman',
  106. width: 110
  107. },{
  108. text: '备注',
  109. dataIndex: 'pi_remark',
  110. width: 250
  111. }],
  112. relativeColumn: [
  113. {
  114. text: 'id',
  115. dataIndex: 'pi_id',
  116. xtype: 'numbercolumn',
  117. hidden:true
  118. },{
  119. text: '调拨单号',
  120. dataIndex: 'pi_inoutno',
  121. width: 150
  122. },{
  123. text: '单据类型',
  124. dataIndex: 'pi_class',
  125. width: 0
  126. },{
  127. text: '单据日期',
  128. dataIndex: 'pi_date',
  129. xtype:'datecolumn',
  130. width: 110
  131. },{
  132. text: '状态',
  133. dataIndex: 'pi_status',
  134. width: 90
  135. },{
  136. text: '序号',
  137. dataIndex: 'pd_pdno',
  138. width: 80
  139. },{
  140. text: '相关单号',
  141. dataIndex: 'pd_ordercode',
  142. width: 150
  143. },{
  144. text: '物料编号',
  145. dataIndex: 'pd_prodcode',
  146. width: 150
  147. },{
  148. text: '物料名称',
  149. dataIndex: 'pr_detail',
  150. width: 200
  151. },{
  152. text: '物料规格',
  153. dataIndex: 'pr_spec',
  154. width: 150
  155. },{
  156. text: '单位',
  157. dataIndex: 'pr_unit',
  158. width: 80
  159. },{
  160. text: '数量',
  161. dataIndex: 'pd_inqty',
  162. xtype:'numbercolumn',
  163. width: 10
  164. },{
  165. text: '仓库',
  166. dataIndex: 'pd_whname',
  167. width: 150
  168. },{
  169. text: '单价',
  170. dataIndex: 'pd_orderprice',
  171. xtype:'numbercolumn',
  172. width: 110,
  173. renderer : function(v) {
  174. var arr = (v + '.').split('.');
  175. var xr = (new Array(arr[1].length)).fill('0');
  176. var format = '0,000.' + xr.join();
  177. return Ext.util.Format.number(v, format);
  178. }
  179. },{
  180. text: '税率',
  181. dataIndex: 'pd_taxrate',
  182. xtype:'numbercolumn',
  183. width: 80,
  184. renderer : function(v) {
  185. return Ext.util.Format.number(v, '0');
  186. },
  187. },{
  188. text: '金额',
  189. dataIndex: 'pd_total',
  190. xtype:'numbercolumn',
  191. width: 110,
  192. renderer : function(v) {
  193. var arr = (v + '.').split('.');
  194. var xr = (new Array(arr[1].length)).fill('0');
  195. var format = '0,000.' + xr.join();
  196. return Ext.util.Format.number(v, format);
  197. }
  198. },{
  199. text: '备注',
  200. dataIndex: 'pd_remark',
  201. width:250
  202. }]
  203. }
  204. });