QueryPanel.js 6.6 KB

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