QueryPanel.js 5.4 KB

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