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