QueryPanel.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-appropriationinout-querypanel',
  4. controller: 'stock-appropriationinout-querypanel',
  5. viewModel: 'stock-appropriationinout-querypanel',
  6. viewName: 'stock-appropriationinout-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: 'hidden',
  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. allowBlank: true,
  37. columnWidth: 0.25
  38. },{
  39. xtype: 'textfield',
  40. name: 'pi_custcode',
  41. fieldLabel: '客户编号',
  42. allowBlank: true,
  43. hidden:true,
  44. columnWidth: 0.25
  45. }, {
  46. xtype: 'dbfindtrigger',
  47. name: 'pi_custname',
  48. fieldLabel: '客户名称',
  49. allowBlank: true,
  50. columnWidth: 0.25
  51. }, {
  52. xtype: 'hidden',
  53. name: 'pd_prodcode',
  54. fieldLabel: '物料编号',
  55. showDetail: true
  56. }, {
  57. xtype: 'dbfindtrigger',
  58. name: 'pr_detail',
  59. fieldLabel: '物料名称',
  60. showDetail: true
  61. }, {
  62. xtype: 'combobox',
  63. name: 'pi_statuscode',
  64. fieldLabel: '审核状态',
  65. allowBlank: true,
  66. editable:false,
  67. columnWidth: 0.25,
  68. queryMode: 'local',
  69. emptyText :'全部',
  70. editable:false,
  71. displayField: 'pi_status',
  72. valueField: 'pi_statuscode',
  73. store: Ext.create('Ext.data.ArrayStore', {
  74. fields: ['pi_statuscode', 'pi_status'],
  75. data: [
  76. ["ALL", "全部"],
  77. ["AUDITED", "已审核"],
  78. ["UNAUDITED", "未审核"]
  79. ]
  80. }),
  81. getCondition: function(value) {
  82. if(value == 'ALL') {
  83. return '1=1';
  84. }else {
  85. return 'pi_statuscode=\'' + value + '\'';
  86. }
  87. }
  88. }],
  89. moreQueryFormItems: [],
  90. queryGridConfig: {
  91. idField:'id',
  92. codeField:'pi_inoutno',
  93. addTitle:'调拨单',
  94. addXtype:'stock-appropriationinout-formpanel',
  95. defaultCondition:' pi_class = \'调拨单\'',
  96. baseVastUrl:'/api/storage/prodinout/',
  97. baseColumn: [{
  98. text: 'id',
  99. dataIndex: 'id',
  100. hidden:true,
  101. xtype: 'numbercolumn'
  102. }, {
  103. text: '单据编号',
  104. dataIndex: 'pi_inoutno',
  105. width: 200
  106. },{
  107. text: '单据类型',
  108. dataIndex: 'pi_class',
  109. width: 120
  110. },{
  111. text: '单据日期',
  112. dataIndex: 'pi_date',
  113. xtype:'datecolumn',
  114. width: 200
  115. },{
  116. text: '审核状态',
  117. dataIndex: 'pi_status',
  118. width: 120
  119. },{
  120. text: '供应商名称',
  121. dataIndex: 'pi_vendname',
  122. width: 120
  123. },{
  124. text: '客户名称',
  125. dataIndex: 'pi_custname',
  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. xtype: 'numbercolumn',
  144. hidden:true
  145. }, {
  146. text: '单据编号',
  147. dataIndex: 'pi_inoutno',
  148. width: 200
  149. }, {
  150. text: '单据类型',
  151. dataIndex: 'pd_piclass',
  152. width: 200
  153. },{
  154. text: '审核状态',
  155. dataIndex: 'pi_status',
  156. width: 120
  157. },{
  158. text: '客户编号',
  159. dataIndex: 'pi_custcode',
  160. width: 120
  161. },{
  162. text: '客户名称',
  163. dataIndex: 'pi_custname',
  164. width: 120
  165. },{
  166. text: '物料编号',
  167. dataIndex: 'pd_prodcode',
  168. width: 120
  169. },{
  170. text: '物料名称',
  171. dataIndex: 'pr_detail',
  172. width: 120
  173. },{
  174. text: '物料规格',
  175. dataIndex: 'pr_spec',
  176. width: 120
  177. },{
  178. text: '单位',
  179. dataIndex: 'pr_unit',
  180. width: 120
  181. },{
  182. text: '数量',
  183. dataIndex: 'pd_inqty',
  184. xtype:'numbercolumn',
  185. width: 120
  186. },{
  187. text: '仓库',
  188. dataIndex: 'pd_whname',
  189. width: 120
  190. },{
  191. text: '单位成本',
  192. dataIndex: 'pd_orderprice',
  193. xtype:'numbercolumn',
  194. width: 120
  195. },{
  196. text: '税率',
  197. dataIndex: 'pd_taxrate',
  198. xtype:'numbercolumn',
  199. width: 120
  200. },{
  201. text: '金额',
  202. dataIndex: 'pd_total',
  203. xtype:'numbercolumn',
  204. width: 120
  205. },{
  206. text: '相关单号',
  207. dataIndex: 'pd_ordercode',
  208. xtype:'numbercolumn',
  209. width: 120
  210. }]
  211. }
  212. });