DataList.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * Created by zhouy on 2018/10/18.
  3. */
  4. Ext.define('saas.view.document.currencys.DataList', {
  5. extend: 'saas.view.document.kind.Kind',
  6. xtype: 'document-currencys-datalist',
  7. viewModel: 'document-currencys-datalist',
  8. controller:'document-currencys-datalist',
  9. defaultType:'currencys',
  10. windowType:'document-currencys-window',
  11. tbar: ['->',{
  12. xtype:'button',
  13. text:'新增',
  14. listeners: {
  15. click: 'onAdd'
  16. }
  17. },{
  18. xtype:'button',
  19. text:'刷新',
  20. listeners: {
  21. click: 'onRefresh'
  22. }
  23. }],
  24. etc:{
  25. currencys:{
  26. columns: [{
  27. text: '币别',
  28. dataIndex: 'cr_name',
  29. flex: 1,
  30. renderer:function(a,b,c){
  31. if(c.get('cr_standard')==1){
  32. return a + '(本位币)'
  33. }
  34. return a;
  35. }
  36. },{
  37. text: '默认汇率',
  38. dataIndex: 'cr_rate',
  39. flex: 1
  40. }],
  41. keyField:'id',
  42. reqUrl:'/api/document/currency/save',
  43. delUrl:'/api/document/currency/delete'
  44. },
  45. currencysadd:{
  46. columns: [{
  47. text: '币别',
  48. dataIndex: 'cr_name',
  49. flex: 1
  50. },{
  51. text: '默认汇率',
  52. dataIndex: 'cr_rate',
  53. flex: 1
  54. }],
  55. keyField:'id',
  56. reqUrl:'/api/document/currency/save',
  57. delUrl:'/api/document/currency/delete'
  58. }
  59. },
  60. listeners:{
  61. afterrender:function(p){
  62. p.getViewModel().setData({title:'币别'});
  63. }
  64. }
  65. })