Kind.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /**
  2. * Created by zhouy on 2018/10/18.
  3. */
  4. Ext.define('saas.view.document.kind.Kind', {
  5. extend: 'Ext.panel.Panel',
  6. xtype: 'document-kind',
  7. autoScroll: true,
  8. layout:'fit',
  9. controller:'document-kind',
  10. viewModel: {
  11. type: 'document-kind'
  12. },
  13. defaultType:'',
  14. tbar: [{
  15. xtype: 'segmentedbutton',
  16. reference: 'dataKind',
  17. value: 'customerkind',
  18. bind:'{segmented}',
  19. items: [{
  20. text: '客户',
  21. value: 'customerkind'
  22. }, {
  23. text: '供应商',
  24. value: 'vendorkind'
  25. }, {
  26. text: '商品',
  27. value: 'productkind'
  28. }, {
  29. text: '收支',
  30. value: 'inoutkind'
  31. }],
  32. listeners: {
  33. toggle: 'onKindToggle'
  34. }
  35. },'->',
  36. {
  37. xtype:'button',
  38. text:'新增',
  39. listeners: {
  40. click: 'onAdd'
  41. }
  42. },{
  43. xtype:'button',
  44. text:'刷新',
  45. listeners: {
  46. click: 'onRefresh'
  47. }
  48. }],
  49. items:[{
  50. xtype:'grid',
  51. reference: 'document-kind-Grid',
  52. margin: '10 0 0 0',
  53. flex: 1,
  54. frame:true,
  55. bind:{
  56. selection: '{selectedCompany}'
  57. },
  58. listeners:{
  59. render:'loadDefualt'
  60. }
  61. }],
  62. etc:{
  63. customerkind:{
  64. columns: [{
  65. text: '客户类型',
  66. dataIndex: 'ck_name',
  67. flex: 1
  68. }],
  69. keyField:'id',
  70. dataField:'ck_name',
  71. reqUrl:'http://192.168.253.41:9480/customerkind/save',
  72. delUrl:'http://192.168.253.41:9480/customerkind/delete'
  73. },
  74. vendorkind:{
  75. columns: [{
  76. text: '供应商类型',
  77. dataIndex: 'vk_name',
  78. flex: 1
  79. }],
  80. keyField:'id',
  81. dataField:'vk_name',
  82. reqUrl:'http://192.168.253.41:9480/vendorkind/save',
  83. delUrl:'http://192.168.253.41:9480/vendorkind/delete'
  84. },
  85. productkind:{
  86. columns: [{
  87. text: '物料类型',
  88. dataIndex: 'pt_name',
  89. flex: 1
  90. }],
  91. keyField:'id',
  92. dataField:'pt_name',
  93. reqUrl:'http://192.168.253.41:9480/producttype/save',
  94. delUrl:'http://192.168.253.41:9480/producttype/delete'
  95. },
  96. productbrand:{
  97. columns: [{
  98. text: '物料类型',
  99. dataIndex: 'pb_name',
  100. flex: 1
  101. }],
  102. keyField:'id',
  103. dataField:'pb_name',
  104. reqUrl:'http://192.168.253.41:9480/productbrand/save',
  105. delUrl:'http://192.168.253.41:9480/productbrand/delete'
  106. },
  107. inoutkind:{
  108. columns: [{
  109. text: '收支类型',
  110. dataIndex: 'io_kind',
  111. flex: 1
  112. }],
  113. keyField:'io_id'
  114. }
  115. }
  116. })