QueryPanel.js 6.8 KB

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