QueryPanel.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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_class',
  104. width: 0
  105. },{
  106. text: '单据日期',
  107. dataIndex: 'pi_date',
  108. xtype:'datecolumn',
  109. width: 110
  110. },{
  111. text: '客户',
  112. dataIndex: 'pi_custname',
  113. width: 250
  114. },{
  115. text: '状态',
  116. align: 'center',
  117. dataIndex: 'pi_status',
  118. width: 90
  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_class',
  137. width: 0
  138. },{
  139. text: '单据日期',
  140. dataIndex: 'pi_date',
  141. xtype:'datecolumn',
  142. width: 110
  143. },{
  144. text: '供应商',
  145. dataIndex: 'pi_vendname',
  146. width: 250
  147. },{
  148. text: '状态',
  149. align: 'center',
  150. dataIndex: 'pi_status',
  151. width: 90
  152. },{
  153. text: '序号',
  154. dataIndex: 'pd_pdno',
  155. width: 80
  156. },{
  157. text: '相关单号',
  158. dataIndex: 'pd_ordercode',
  159. width: 150
  160. },{
  161. text: '物料编号',
  162. dataIndex: 'pd_prodcode',
  163. width: 150
  164. },{
  165. text: '品牌',
  166. dataIndex: 'pr_brand',
  167. width: 150
  168. },{
  169. text: '名称',
  170. dataIndex: 'pr_detail',
  171. width: 200
  172. },{
  173. text: '型号',
  174. dataIndex: 'pr_orispeccode',
  175. width: 200
  176. },{
  177. text: '规格',
  178. dataIndex: 'pr_spce',
  179. width: 150
  180. },{
  181. text: '数量',
  182. dataIndex: 'pd_inqty',
  183. xtype:'numbercolumn',
  184. width: 10,
  185. renderer : function(v) {
  186. var arr = (v + '.').split('.');
  187. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  188. var format = '0,000.' + xr.join('');
  189. return Ext.util.Format.number(v, format);
  190. }
  191. },{
  192. text: '单位',
  193. dataIndex: 'pr_unit',
  194. width: 80
  195. },{
  196. text: '单价(元)',
  197. dataIndex: 'pd_orderprice',
  198. xtype:'numbercolumn',
  199. width: 110,
  200. renderer : function(v) {
  201. var arr = (v + '.').split('.');
  202. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  203. var format = '0.' + xr.join('');
  204. return Ext.util.Format.number(v, format);
  205. }
  206. },{
  207. text: '仓库',
  208. dataIndex: 'pd_whname',
  209. width: 150
  210. },{
  211. text: '税率',
  212. dataIndex: 'pd_taxrate',
  213. xtype:'numbercolumn',
  214. width: 80,
  215. renderer : function(v) {
  216. return Ext.util.Format.number(v, '0');
  217. },
  218. },{
  219. text: '金额',
  220. dataIndex: 'pd_ordertotal',
  221. xtype:'numbercolumn',
  222. width: 110,
  223. renderer : function(v) {
  224. var arr = (v + '.').split('.');
  225. var xr = (new Array(arr[1].length)).fill('0');
  226. var format = '0,000.' + xr.join('');
  227. return Ext.util.Format.number(v, format);
  228. }
  229. },{
  230. text: '备注',
  231. dataIndex: 'pd_remark',
  232. width:250
  233. }]
  234. }
  235. });