QueryPanel.js 6.0 KB

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