CustomerCheckController.js 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. Ext.define('saas.view.money.report.CustomerCheckController', {
  2. extend: 'saas.view.core.report.ReportPanelController',
  3. alias: 'controller.money-report-customercheck',
  4. init: function (form) {
  5. this.control({
  6. 'dbfindtrigger[name=pi_custname]':{
  7. beforerender:function(f){
  8. Ext.apply(f,{
  9. //数据接口
  10. dataUrl: '/api/document/customer/list',
  11. addXtype: 'document-customer-formpanel',
  12. addTitle: '客户资料',
  13. //赋值
  14. dbfinds:[{
  15. from: 'cu_name', to: 'pi_custname'
  16. }],
  17. //联想设置
  18. dbtpls:[{
  19. field:'cu_code',width:100
  20. },{
  21. field:'cu_name',width:100
  22. }],
  23. defaultCondition: 'cu_statuscode="OPEN"',
  24. dbSearchFields:[{
  25. emptyText:'输入客户编号或名称',
  26. xtype : "textfield",
  27. name : "search",
  28. getCondition: function(v) {
  29. return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
  30. },
  31. allowBlank : true,
  32. columnWidth : 0.25
  33. }],
  34. //放大镜窗口列表
  35. dbColumns:[{
  36. "text": "客户ID",
  37. "hidden": true,
  38. "dataIndex": "id",
  39. },{
  40. "text": "客户编号",
  41. "dataIndex": "cu_code",
  42. "width": 200,
  43. }, {
  44. "text": "客户名称",
  45. "dataIndex": "cu_name",
  46. "width": 200
  47. },{
  48. "text": "客户类型",
  49. "dataIndex": "cu_name",
  50. "width": 100
  51. },{
  52. "text": "业务员",
  53. "dataIndex": "cu_sellername",
  54. "width": 100
  55. },{
  56. "text": "应收款余额",
  57. "dataIndex": "cu_leftamount",
  58. "width": 100,
  59. xtype: 'numbercolumn',
  60. align:'end'
  61. },{
  62. "text": "税率",
  63. "dataIndex": "cu_taxrate",
  64. "width": 100,
  65. xtype: 'numbercolumn',
  66. align:'end'
  67. },{
  68. "text": "承付天数",
  69. "dataIndex": "cu_promisedays",
  70. "width": 100,
  71. xtype: 'numbercolumn',
  72. align:'end'
  73. },{
  74. "text": "额度",
  75. "dataIndex": "cu_credit",
  76. "width": 100,
  77. xtype: 'numbercolumn',
  78. align:'end'
  79. }]
  80. }) ;
  81. }
  82. }
  83. });
  84. }
  85. });