QueryPanel.js 5.3 KB

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