Kind.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. reqUrl:basePath + 'document/customerkind/save',
  71. delUrl:basePath + 'document/customerkind/delete'
  72. },
  73. vendorkind:{
  74. columns: [{
  75. text: '供应商类型',
  76. dataIndex: 'vk_name',
  77. flex: 1
  78. }],
  79. keyField:'id',
  80. reqUrl:basePath + 'document/vendorkind/save',
  81. delUrl:basePath + 'document/vendorkind/delete'
  82. },
  83. productkind:{
  84. columns: [{
  85. text: '物料类型',
  86. dataIndex: 'pt_name',
  87. flex: 1
  88. }],
  89. keyField:'id',
  90. reqUrl:basePath + 'document/producttype/save',
  91. delUrl:basePath + 'document/producttype/delete'
  92. },
  93. productbrand:{
  94. columns: [{
  95. text: '物料品牌',
  96. dataIndex: 'pb_name',
  97. flex: 1
  98. }],
  99. keyField:'id',
  100. reqUrl:basePath + 'document/productbrand/save',
  101. delUrl:basePath + 'document/productbrand/delete'
  102. },
  103. bankinformation:{
  104. columns: [{
  105. text: '账户编号',
  106. dataIndex: 'bk_bankcode',
  107. flex: 1
  108. },{
  109. text: '账户名称',
  110. dataIndex: 'bk_bankname',
  111. flex: 1
  112. },{
  113. xtype:'datecolumn',
  114. text: '日期',
  115. dataIndex: 'bk_date',
  116. flex: 1
  117. },{
  118. text: '账户类型',
  119. dataIndex: 'bk_type',
  120. flex: 1
  121. },{
  122. text: '账户期初金额',
  123. dataIndex: 'bk_beginamount',
  124. flex: 1
  125. },{
  126. text: '账户期末余额',
  127. dataIndex: 'bk_thisamount',
  128. flex: 1
  129. }],
  130. keyField:'id',
  131. reqUrl: 'http://192.168.253.129:9480/bankinformation/save',
  132. delUrl: 'http://192.168.253.129:9480/bankinformation/delete'
  133. },
  134. inoutkind:{
  135. columns: [{
  136. text: '收支类型',
  137. dataIndex: 'ft_name',
  138. flex: 1
  139. }],
  140. keyField:'id',
  141. reqUrl: 'http://192.168.253.31:9480/fundinouttype/save',
  142. delUrl: 'http://192.168.253.31:9480/fundinouttype/delete'
  143. }
  144. }
  145. })