BasePanel.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. editable:false,
  8. hiddenBtn:true,
  9. xtype : "remotecombo",
  10. storeUrl: '/api/document/producttype/getCombo',
  11. name : "pr_kind",
  12. emptyText : "物料类型",
  13. width:120
  14. },{
  15. xtype : "textfield",
  16. name : "pr_detail",
  17. emptyText : "物料名称",
  18. width:120
  19. },{
  20. xtype : "textfield",
  21. name : "pr_code",
  22. emptyText : "物料编号",
  23. width:120
  24. },{
  25. xtype : "textfield",
  26. name : "pr_unit",
  27. emptyText : "单位",
  28. width:100
  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. //字段属性
  41. _formXtype:'document-product-formpanel',
  42. _title:'物料资料',
  43. _deleteUrl:'/api/document/product/delete/',
  44. _batchOpenUrl:'/api/document/product/batchOpen',
  45. _batchCloseUrl:'/api/document/product/batchClose',
  46. _batchDeleteUrl:'/api/document/product/batchDelete',
  47. gridConfig: {
  48. idField: 'id',
  49. codeField: 'pr_code',
  50. statusCodeField:'pr_statuscode',
  51. dataUrl: '/api/document/product/list',
  52. columns : [{
  53. text : "id",
  54. width : 0,
  55. dataIndex : "id",
  56. xtype : "numbercolumn",
  57. },{
  58. text : "物料编号",
  59. width : 200.0,
  60. dataIndex : "pr_code"
  61. }, {
  62. text : "物料名称",
  63. dataIndex : "pr_detail",
  64. width : 120.0
  65. }, {
  66. text : "规格",
  67. dataIndex : "pr_spec"
  68. }, {
  69. text : "类型",
  70. dataIndex : "pr_kind"
  71. }, {
  72. text : "单位",
  73. dataIndex : "pr_unit"
  74. }, {
  75. text : "总库存数",
  76. dataIndex : "po_onhand",
  77. xtype: 'numbercolumn'
  78. }, {
  79. text : "单位成本",
  80. dataIndex : "pr_standardprice",
  81. xtype: 'numbercolumn'
  82. }, {
  83. text : "最新采购单价",
  84. dataIndex : "pr_purcprice",
  85. xtype: 'numbercolumn'
  86. }, {
  87. text : "最新出库单价",
  88. dataIndex : "pr_saleprice",
  89. xtype: 'numbercolumn'
  90. }, {
  91. text : "型号",
  92. dataIndex : "pr_orispeccode"
  93. }, {
  94. text : "品牌",
  95. dataIndex : "pr_brand"
  96. }, {
  97. text : "最小包装",
  98. dataIndex : "pr_zxbzs",
  99. xtype: 'numbercolumn'
  100. }, {
  101. text : "L/T",
  102. dataIndex : "pr_leadtime",
  103. xtype: 'numbercolumn'
  104. }, {
  105. text : "状态",
  106. dataIndex : "pr_status"
  107. }]
  108. },
  109. refresh:function(){
  110. this.items.items[0].store.load()
  111. }
  112. });