PurchasePayController.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. Ext.define('saas.view.purchase.report.PurchasePayController', {
  2. extend: 'saas.view.core.report.ReportPanelController',
  3. alias: 'controller.purchase-report-purchasepay',
  4. init: function (form) {
  5. this.control({
  6. // 供应商编号
  7. 'dbfindtrigger[name=pu_vendname]':{
  8. beforerender:function(f){
  9. Ext.apply(f,{
  10. dataUrl:'/api/document/vendor/list',
  11. addXtype: 'document-vendor-formpanel',
  12. addTitle: '供应商资料',
  13. dbfinds:[{
  14. from:'ve_code',to:'pu_vendcode'
  15. },{
  16. from:'ve_name',to:'pu_vendname'
  17. }],
  18. dbtpls:[{
  19. field:'ve_code',width:100
  20. },{
  21. field:'ve_name',width:100
  22. }],
  23. defaultCondition: "ve_statuscode='OPEN'",
  24. dbSearchFields:[{
  25. emptyText:'输入供应商编号或名称',
  26. xtype : "textfield",
  27. name : "search",
  28. getCondition: function(v) {
  29. return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
  30. },
  31. allowBlank : true,
  32. columnWidth : 0.25
  33. }],
  34. dbColumns:[{
  35. "text": "供应商ID",
  36. "hidden": true,
  37. "dataIndex": "id",
  38. "width": 100,
  39. "xtype": "numbercolumn"
  40. },{
  41. "text": "供应商编号",
  42. "dataIndex": "ve_code",
  43. "width": 200
  44. }, {
  45. "text": "供应商名称",
  46. "dataIndex": "ve_name",
  47. "width": 200
  48. }, {
  49. "text": "供应商类型",
  50. "dataIndex": "ve_type",
  51. "width": 180,
  52. "items": null
  53. }, {
  54. "text": "税率",
  55. "dataIndex": "ve_taxrate",
  56. "width": 100,
  57. xtype: 'numbercolumn',
  58. align: 'end'
  59. }, {
  60. "text": "承付天数",
  61. "dataIndex": "ve_promisedays",
  62. "width": 100,
  63. xtype: 'numbercolumn',
  64. align: 'end'
  65. }, {
  66. "text": "纳税人识别号",
  67. "dataIndex": "ve_bankaccount",
  68. "width": 150
  69. }, {
  70. "text": "开户银行",
  71. "dataIndex": "ve_bankaccount",
  72. "width": 100
  73. }, {
  74. "text": "银行账户",
  75. "dataIndex": "ve_bankcode",
  76. "width": 100
  77. }]
  78. }) ;
  79. }
  80. }
  81. });
  82. }
  83. });