QueryPanel.js 5.9 KB

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