BasePanel.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. Ext.define('saas.view.document.vendor.BasePanel', {
  2. extend: 'saas.view.core.base.BasePanel',
  3. xtype: 'document-vendor-basepanel',
  4. controller: 'document-vendor-basepanel',
  5. viewModel: 'document-vendor-basepanel',
  6. searchField:[{
  7. xtype : "dbfindtrigger",
  8. name : "ve_code",
  9. emptyText : "供应商编号",
  10. columnWidth : 0.25,
  11. },{
  12. xtype : "textfield",
  13. name : "ve_name",
  14. emptyText : "供应商名称",
  15. columnWidth : 0.25,
  16. },{
  17. xtype : "remotecombo",
  18. storeUrl:'/api/document/vendorkind/getCombo',
  19. name : "ve_type",
  20. emptyText : "请选择供应商类型",
  21. columnWidth : 0.25,
  22. hiddenBtn:true
  23. },{
  24. xtype : "textfield",
  25. name : "ve_promisedays",
  26. emptyText : "承付天数",
  27. columnWidth : 0.25,
  28. getCondition: function(value) {
  29. if(value.indexOf("=")>=0||value.indexOf("<")>=0||value.indexOf(">")>=0){
  30. return ' ve_promisedays '+value;
  31. }else if(value){
  32. return ' ve_promisedays = '+value;
  33. }else{
  34. return '1=1';
  35. }
  36. }
  37. },{
  38. xtype: 'combobox',
  39. name: 've_statuscode',
  40. fieldLabel: '状态',
  41. queryMode: 'local',
  42. displayField: 've_status',
  43. valueField: 've_statuscode',
  44. emptyText :'全部',
  45. editable:false,
  46. store: Ext.create('Ext.data.ArrayStore', {
  47. fields: ['ve_statuscode', 've_status'],
  48. data: [
  49. ["ALL", "全部"],
  50. ["OPEN", "已开启"],
  51. ["CLOSE", "已关闭"]
  52. ]
  53. }),
  54. getCondition: function(value) {
  55. if(value == 'ALL'||value == null) {
  56. return '1=1';
  57. }else {
  58. return 've_statuscode=\'' + value + '\'';
  59. }
  60. }
  61. }],
  62. //字段属性
  63. _formXtype:'document-vendor-formpanel',
  64. _title:'供应商资料',
  65. // _dataUrl:'/api/ducument/vendor/list',
  66. _deleteUrl:'/api/document/vendor/delete/',
  67. _batchOpenUrl:'/api/document/vendor/batchOpen',
  68. _batchCloseUrl:'/api/document/vendor/batchClose',
  69. _batchDeleteUrl:'/api/document/vendor/batchDelete',
  70. gridConfig: {
  71. idField: 'id',
  72. codeField: 've_code',
  73. statusCodeField:'ve_statuscode',
  74. dataUrl: '/api/document/vendor/list',
  75. //dataUrl: 'http://192.168.253.31:8560/api/document/vendor/list',
  76. columns : [{
  77. text : "供应商id",
  78. width : 0,
  79. dataIndex : "id",
  80. xtype : "numbercolumn",
  81. },{
  82. text : "供应商编号",
  83. width : 200.0,
  84. dataIndex : "ve_code",
  85. xtype : "",
  86. },
  87. {
  88. text : "供应商名称",
  89. dataIndex : "ve_name",
  90. width : 120.0,
  91. xtype : "",
  92. },
  93. {
  94. text : "类型",
  95. dataIndex : "ve_type",
  96. width : 120.0,
  97. xtype : "",
  98. },
  99. {
  100. text : "供应商状态码",
  101. dataIndex : "ve_statuscode",
  102. width : 0,
  103. xtype : ""
  104. },
  105. {
  106. text : "税率",
  107. dataIndex : "ve_taxrate",
  108. width : 120.0,
  109. xtype : "",
  110. align:'end'
  111. }, {
  112. text : "承付天数",
  113. xtype: 'numbercolumn',
  114. dataIndex : "ve_promisedays",
  115. width : 120.0,
  116. align:'end',
  117. renderer : function(v) {
  118. return Ext.util.Format.number(v, '0');
  119. }
  120. }, {
  121. text : "纳税人识别号",
  122. dataIndex : "ve_nsrzh",
  123. width : 120.0,
  124. xtype : ""
  125. }, {
  126. text : "开户银行",
  127. dataIndex : "ve_bankcode",
  128. width : 120.0,
  129. xtype : ""
  130. }, {
  131. text : "银行账户",
  132. dataIndex : "ve_bankaccount",
  133. width : 120.0,
  134. xtype : ""
  135. }, {
  136. text : "状态",
  137. dataIndex : "ve_status",
  138. width : 120.0,
  139. xtype : ""
  140. }]
  141. },
  142. refresh:function(){
  143. this.items.items[0].store.load()
  144. }
  145. });