QueryPanel.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. Ext.define('saas.view.stock.otherOut.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-otherout-querypanel',
  4. controller: 'stock-otherout-querypanel',
  5. viewModel: 'stock-otherout-querypanel',
  6. viewName: 'stock-otherout-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: 'customerDbfindTrigger',
  32. name: 'pi_custname',
  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. emptyText:'请输入仓库编号或名称',
  65. showDetail: true
  66. }, {
  67. xtype: 'employeeDbfindTrigger',
  68. name: 'accountDbfindTrigger',
  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: 'employeeDbfindTrigger',
  80. name: 'accountDbfindTrigger',
  81. fieldLabel: '审核人',
  82. emptyText:'请输入人员编号或名称'
  83. }],
  84. queryGridConfig: {
  85. idField:'id',
  86. codeField:'pi_inoutno',
  87. addTitle:'其它出库单',
  88. addXtype:'stock-otherout-formpanel',
  89. defaultCondition:' pi_class = \'其它出库单\'',
  90. baseVastUrl:'/api/storage/prodinout/',
  91. caller: 'OtherOut',
  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. dataIndex: 'pi_custname',
  109. width: 200
  110. }, {
  111. text: '金额(元)',
  112. dataIndex: 'pi_nettotal',
  113. width: 110
  114. }, {
  115. text: '审核状态',
  116. align: 'center',
  117. dataIndex: 'pi_status',
  118. width: 80
  119. }, {
  120. text: '备注',
  121. dataIndex: 'pi_remark',
  122. width: 250
  123. }],
  124. relativeColumn: [
  125. {
  126. text: 'id',
  127. dataIndex: 'pi_id',
  128. xtype: 'numbercolumn',
  129. hidden:true
  130. }, {
  131. text: '出库单号',
  132. dataIndex: 'pi_inoutno',
  133. width: 150
  134. }, {
  135. text: '单据日期',
  136. dataIndex: 'pi_date',
  137. xtype:'datecolumn',
  138. width: 110
  139. }, {
  140. text: '客户名称',
  141. dataIndex: 'pi_vendname',
  142. width: 200
  143. }, {
  144. text: '审核状态',
  145. align: 'center',
  146. dataIndex: 'pi_status',
  147. width: 90
  148. }, {
  149. text: '物料编号',
  150. dataIndex: 'pd_prodcode',
  151. width: 150
  152. }, {
  153. text: '品牌',
  154. dataIndex: 'pr_brand',
  155. width: 100
  156. }, {
  157. text: '物料名称',
  158. dataIndex: 'pr_detail',
  159. width: 150
  160. }, {
  161. text: '型号',
  162. dataIndex: 'pr_orispeccode',
  163. width: 200
  164. }, {
  165. text: '规格',
  166. dataIndex: 'pr_spec',
  167. width: 200
  168. }, {
  169. text: '仓库',
  170. dataIndex: 'pd_whname',
  171. width: 80
  172. }, {
  173. text: '数量',
  174. dataIndex: 'pd_inqty',
  175. xtype:'numbercolumn',
  176. width: 110,
  177. renderer : function(v) {
  178. return saas.util.BaseUtil.numberFormat(v, 3, true);
  179. }
  180. }, {
  181. text: '单位',
  182. dataIndex: 'pr_unit',
  183. width: 65
  184. }, {
  185. text: '单价(元)',
  186. dataIndex: 'pd_price',
  187. xtype:'numbercolumn',
  188. width: 110,
  189. renderer : function(v) {
  190. return saas.util.BaseUtil.numberFormat(v, 4, true);
  191. }
  192. }, {
  193. text: '金额(元)',
  194. dataIndex: 'pd_total',
  195. xtype:'numbercolumn',
  196. width: 110,
  197. renderer : function(v) {
  198. return saas.util.BaseUtil.numberFormat(v, 2, true);
  199. }
  200. },{
  201. text: '备注',
  202. dataIndex: 'pd_remark',
  203. width:250
  204. }]
  205. }
  206. });