BasePanel.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. Ext.define('saas.view.document.product.BasePanel', {
  2. extend: 'saas.view.core.base.BasePanel',
  3. xtype: 'document-product-basepanel',
  4. controller: 'document-product-basepanel',
  5. viewModel: 'document-product-basepanel',
  6. searchField:[{
  7. xtype : "dbfindtrigger",
  8. name : "pr_code",
  9. emptyText : "物料编号",
  10. width:120
  11. },{
  12. xtype : "textfield",
  13. name : "pr_detail",
  14. emptyText : "物料名称",
  15. width:120
  16. },{
  17. xtype : "textfield",
  18. name : "pr_spec",
  19. emptyText : "规格",
  20. width:100
  21. },{
  22. editable:false,
  23. hiddenBtn:true,
  24. xtype : "remotecombo",
  25. storeUrl: '/api/document/producttype/getCombo',
  26. name : "pr_kind",
  27. emptyText : "物料类型",
  28. width:120
  29. },{
  30. xtype : "textfield",
  31. name : "pr_brand",
  32. emptyText : "品牌",
  33. width:100
  34. },{
  35. xtype : "textfield",
  36. name : "pr_orispeccode",
  37. emptyText : "型号",
  38. width:100
  39. }, {
  40. xtype: 'combobox',
  41. name: 'pr_statuscode',
  42. fieldLabel: '状态',
  43. queryMode: 'local',
  44. displayField: 'pr_status',
  45. valueField: 'pr_statuscode',
  46. emptyText :'全部',
  47. editable:false,
  48. store: Ext.create('Ext.data.ArrayStore', {
  49. fields: ['pr_statuscode', 'pr_status'],
  50. data: [
  51. ["ALL", "全部"],
  52. ["OPEN", "已开启"],
  53. ["CLOSE", "已关闭"]
  54. ]
  55. }),
  56. getCondition: function(value) {
  57. if(value == 'ALL') {
  58. return '1=1';
  59. }else {
  60. return 'pr_statuscode=\'' + value + '\'';
  61. }
  62. }
  63. }],
  64. //字段属性
  65. _formXtype:'document-product-formpanel',
  66. _title:'物料资料',
  67. _deleteUrl:'/api/document/product/delete/',
  68. _batchOpenUrl:'/api/document/product/batchOpen',
  69. _batchCloseUrl:'/api/document/product/batchClose',
  70. _batchDeleteUrl:'/api/document/product/batchDelete',
  71. gridConfig: {
  72. idField: 'id',
  73. codeField: 'pr_code',
  74. statusCodeField:'pr_statuscode',
  75. dataUrl: '/api/document/product/list',
  76. columns : [{
  77. text : "id",
  78. width : 0,
  79. dataIndex : "id",
  80. xtype : "numbercolumn",
  81. },{
  82. text : "物料编号",
  83. width : 200.0,
  84. dataIndex : "pr_code"
  85. }, {
  86. text : "物料名称",
  87. dataIndex : "pr_detail",
  88. width : 120.0
  89. }, {
  90. text : "规格",
  91. dataIndex : "pr_spec"
  92. }, {
  93. text : "类型",
  94. dataIndex : "pr_kind"
  95. }, {
  96. text : "单位",
  97. dataIndex : "pr_unit"
  98. }, {
  99. text : "总库存数",
  100. dataIndex : "po_onhand",
  101. xtype: 'numbercolumn'
  102. }, {
  103. text : "单位成本",
  104. dataIndex : "pr_standardprice",
  105. xtype: 'numbercolumn'
  106. }, {
  107. text : "最新采购单价",
  108. dataIndex : "pr_purcprice",
  109. xtype: 'numbercolumn',
  110. width : 200.0,
  111. }, {
  112. text : "最新出库单价",
  113. dataIndex : "pr_saleprice",
  114. xtype: 'numbercolumn',
  115. width : 200.0,
  116. }, {
  117. text : "型号",
  118. dataIndex : "pr_orispeccode"
  119. }, {
  120. text : "品牌",
  121. dataIndex : "pr_brand"
  122. }, {
  123. text : "供应商",
  124. dataIndex : "pr_vendname"
  125. }, {
  126. text : "最小包装",
  127. dataIndex : "pr_zxbzs",
  128. xtype: 'numbercolumn'
  129. }, {
  130. text : "L/T",
  131. dataIndex : "pr_leadtime",
  132. xtype: 'numbercolumn'
  133. }, {
  134. text : "状态",
  135. dataIndex : "pr_status"
  136. }]
  137. },
  138. refresh:function(){
  139. this.items.items[0].store.load()
  140. }
  141. });