QueryPanel.js 5.5 KB

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