QueryPanel.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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: 'productDbfindTrigger',
  20. name: 'pr_detail',
  21. emptyText:'输入物料编号或名称',
  22. margin:'0 0 0 20',
  23. showDetail: true
  24. }, {
  25. xtype: 'condatefield',
  26. name: 'pi_date',
  27. fieldLabel: '日期',
  28. columnWidth: 0.5,
  29. operation: 'between'
  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_date',
  104. xtype:'datecolumn',
  105. width: 110
  106. }, {
  107. text: '金额(元)',
  108. xtype: 'numbercolumn',
  109. dataIndex: 'pi_costtotal',
  110. width: 110,
  111. renderer : function(v) {
  112. return saas.util.BaseUtil.numberFormat(v, 2, true);
  113. },
  114. }, {
  115. text: '审核状态',
  116. align: 'center',
  117. dataIndex: 'pi_status',
  118. width: 80
  119. }, {
  120. text: '供应商名称',
  121. dataIndex: 'pi_vendname',
  122. width: 200
  123. },{
  124. text: '备注',
  125. dataIndex: 'pi_remark',
  126. width: 250
  127. }],
  128. relativeColumn: [
  129. {
  130. text: 'id',
  131. dataIndex: 'pi_id',
  132. xtype: 'numbercolumn',
  133. hidden:true
  134. }, {
  135. text: '入库单号',
  136. dataIndex: 'pi_inoutno',
  137. width: 150
  138. }, {
  139. text: '单据日期',
  140. dataIndex: 'pi_date',
  141. xtype:'datecolumn',
  142. width: 110
  143. }, {
  144. text: '供应商名称',
  145. dataIndex: 'pi_vendname',
  146. width: 200
  147. }, {
  148. text: '审核状态',
  149. align: 'center',
  150. dataIndex: 'pi_status',
  151. width: 80
  152. }, {
  153. text: '物料编号',
  154. dataIndex: 'pd_prodcode',
  155. width: 150
  156. }, {
  157. text: '品牌',
  158. dataIndex: 'pr_brand',
  159. width: 100
  160. }, {
  161. text: '物料名称',
  162. dataIndex: 'pr_detail',
  163. width: 150
  164. }, {
  165. text: '型号',
  166. dataIndex: 'pr_orispeccode',
  167. width: 200
  168. }, {
  169. text: '规格',
  170. dataIndex: 'pr_spec',
  171. width: 200
  172. }, {
  173. text: '仓库',
  174. dataIndex: 'pd_whname',
  175. width: 80
  176. }, {
  177. text: '数量',
  178. dataIndex: 'pd_inqty',
  179. xtype:'numbercolumn',
  180. width: 110,
  181. renderer : function(v) {
  182. return saas.util.BaseUtil.numberFormat(v, 3, false);
  183. },
  184. }, {
  185. text: '单位',
  186. dataIndex: 'pr_unit',
  187. width: 65
  188. },{
  189. text: '单价(元)',
  190. dataIndex: 'pd_price',
  191. xtype:'numbercolumn',
  192. width: 110,
  193. renderer : function(v) {
  194. return saas.util.BaseUtil.numberFormat(v, 4, true);
  195. }
  196. },{
  197. text: '金额(元)',
  198. dataIndex: 'pd_total',
  199. xtype:'numbercolumn',
  200. width: 110,
  201. renderer : function(v) {
  202. return saas.util.BaseUtil.numberFormat(v, 2, true);
  203. }
  204. },{
  205. text: '备注',
  206. dataIndex: 'pd_remark',
  207. width:250
  208. }]
  209. }
  210. });