PurchaseController.js 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Ext.define('saas.view.purchase.report.PurchaseController', {
  2. extend: 'saas.view.core.report.ReportPanelController',
  3. alias: 'controller.purchase-report-purchase',
  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. }, {
  58. "text": "承付天数",
  59. "dataIndex": "ve_promisedays",
  60. "width": 100
  61. }, {
  62. "text": "纳税人识别号",
  63. "dataIndex": "ve_bankaccount",
  64. "width": 150
  65. }, {
  66. "text": "开户银行",
  67. "dataIndex": "ve_bankaccount",
  68. "width": 100
  69. }, {
  70. "text": "银行账户",
  71. "dataIndex": "ve_bankcode",
  72. "width": 100
  73. }]
  74. }) ;
  75. }
  76. }
  77. });
  78. }
  79. });