QueryPanel.js 6.5 KB

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