QueryPanel.js 5.5 KB

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