QueryPanel.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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_vendname',
  118. width: 120
  119. },{
  120. text: '制单人',
  121. dataIndex: 'pi_recordman',
  122. width: 120
  123. },{
  124. text: '审核人',
  125. dataIndex: 'pi_auditman',
  126. width: 120
  127. },{
  128. text: '备注',
  129. dataIndex: 'pi_remark',
  130. width: 200
  131. }],
  132. relativeColumn: [{
  133. text: 'id',
  134. dataIndex: 'pu_id',
  135. xtype: 'numbercolumn',
  136. hidden:true
  137. }, {
  138. text: '单据编号',
  139. dataIndex: 'pd_inoutno',
  140. width: 200
  141. }, {
  142. text: '单据状态',
  143. dataIndex: 'pi_status',
  144. width: 120
  145. }, {
  146. text: '下单日期',
  147. dataIndex: 'pi_date',
  148. xtype:'datecolumn',
  149. width: 200
  150. },{
  151. text: '供应商名称',
  152. dataIndex: 'pi_vendname',
  153. width: 120
  154. },{
  155. text: '采购单号',
  156. dataIndex: 'pd_ordercode',
  157. width: 120
  158. },{
  159. text: '采购序号',
  160. dataIndex: 'pd_orderdetno',
  161. xtype:'numbercolumn',
  162. width: 120
  163. },{
  164. text: '物料编号',
  165. dataIndex: 'pd_prodcode',
  166. width: 120
  167. },{
  168. text: '验收数量',
  169. dataIndex: 'pd_inqty',
  170. xtype:'numbercolumn',
  171. width: 120
  172. },{
  173. text: '采购单价',
  174. dataIndex: 'pd_orderprice',
  175. xtype:'numbercolumn',
  176. width: 120
  177. },{
  178. text: '金额',
  179. dataIndex: 'pd_total',
  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_price',
  190. xtype:'numbercolumn',
  191. width: 120
  192. }]
  193. }
  194. });