QueryPanel.js 5.7 KB

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