QueryPanel.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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. baseColumn: [{
  104. text: 'id',
  105. dataIndex: 'id',
  106. hidden:true,
  107. xtype: 'numbercolumn'
  108. }, {
  109. text: '其它入库单号',
  110. dataIndex: 'pi_inoutno',
  111. width: 150
  112. },{
  113. text: '单据类型',
  114. dataIndex: 'pi_class',
  115. width: 0
  116. },{
  117. text: '单据日期',
  118. dataIndex: 'pi_date',
  119. xtype:'datecolumn',
  120. width: 110
  121. },{
  122. text: '供应商',
  123. dataIndex: 'pi_vendname',
  124. width: 250
  125. },{
  126. text: '状态',
  127. align: 'center',
  128. dataIndex: 'pi_status',
  129. width: 90
  130. },{
  131. text: '录入人',
  132. dataIndex: 'creatorName',
  133. width: 110
  134. },{
  135. text: '审核人',
  136. dataIndex: 'pi_auditman',
  137. width: 110
  138. },{
  139. text: '备注',
  140. dataIndex: 'pi_remark',
  141. width: 250
  142. }],
  143. relativeColumn: [
  144. {
  145. text: 'id',
  146. dataIndex: 'pi_id',
  147. xtype: 'numbercolumn',
  148. hidden:true
  149. },{
  150. text: '其它入库单号',
  151. dataIndex: 'pi_inoutno',
  152. width: 150
  153. },{
  154. text: '单据类型',
  155. dataIndex: 'pi_class',
  156. width: 0
  157. },{
  158. text: '单据日期',
  159. dataIndex: 'pi_date',
  160. xtype:'datecolumn',
  161. width: 110
  162. },{
  163. text: '供应商',
  164. dataIndex: 'pi_vendname',
  165. width: 250
  166. },{
  167. text: '状态',
  168. align: 'center',
  169. dataIndex: 'pi_status',
  170. width: 90
  171. },{
  172. text: '序号',
  173. dataIndex: 'pd_pdno',
  174. width: 80
  175. },{
  176. text: '相关单号',
  177. dataIndex: 'pd_ordercode',
  178. width: 150
  179. },{
  180. text: '物料编号',
  181. dataIndex: 'pd_prodcode',
  182. width: 150
  183. },{
  184. text: '物料名称',
  185. dataIndex: 'pr_detail',
  186. width: 200
  187. },{
  188. text: '物料规格',
  189. dataIndex: 'pr_spec',
  190. width: 150
  191. },{
  192. text: '单位',
  193. dataIndex: 'pr_unit',
  194. width: 80
  195. },{
  196. text: '数量',
  197. dataIndex: 'pd_inqty',
  198. xtype:'numbercolumn',
  199. width: 10
  200. },{
  201. text: '仓库',
  202. dataIndex: 'pd_whname',
  203. width: 150
  204. },{
  205. text: '单价',
  206. dataIndex: 'pd_orderprice',
  207. xtype:'numbercolumn',
  208. width: 110,
  209. renderer : function(v) {
  210. var arr = (v + '.').split('.');
  211. var xr = (new Array(arr[1].length)).fill('0');
  212. var format = '0,000.' + xr.join();
  213. return Ext.util.Format.number(v, format);
  214. }
  215. },{
  216. text: '税率',
  217. dataIndex: 'pd_taxrate',
  218. xtype:'numbercolumn',
  219. width: 80,
  220. renderer : function(v) {
  221. return Ext.util.Format.number(v, '0');
  222. },
  223. },{
  224. text: '金额',
  225. dataIndex: 'pd_total',
  226. xtype:'numbercolumn',
  227. width: 110,
  228. renderer : function(v) {
  229. var arr = (v + '.').split('.');
  230. var xr = (new Array(arr[1].length)).fill('0');
  231. var format = '0,000.' + xr.join();
  232. return Ext.util.Format.number(v, format);
  233. }
  234. },{
  235. text: '备注',
  236. dataIndex: 'pd_remark',
  237. width:250
  238. }]
  239. }
  240. });