QueryPanelController.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. Ext.define('saas.view.money.recBalance.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.money-recbalance-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=pu_vendname]':{
  9. beforerender:function(f){
  10. Ext.apply(f,{
  11. dataUrl:'http://192.168.253.41:9480/api/document/vendor/list',
  12. dbfinds:[{
  13. from:'ve_code',to:'pu_vendcode'
  14. },{
  15. from:'ve_name',to:'pu_vendname'
  16. }],
  17. dbtpls:[{
  18. field:'ve_code',width:100
  19. },{
  20. field:'ve_name',width:100
  21. }],
  22. dbColumns:[{
  23. conditionCode:'ve_id',
  24. "text": "供应商ID",
  25. "flex": 0,
  26. "dataIndex": "ve_id",
  27. "width": 0,
  28. "xtype": "",
  29. "items": null
  30. },{
  31. conditionCode:'ve_code',
  32. "text": "供应商编号",
  33. "flex": 1,
  34. "dataIndex": "ve_code",
  35. "width": 100,
  36. "xtype": "",
  37. "items": null
  38. }, {
  39. conditionCode:'ve_name',
  40. "text": "供应商名称",
  41. "flex": 1,
  42. "dataIndex": "ve_name",
  43. "xtype": "",
  44. "items": null
  45. }, {
  46. conditionCode:'ve_type',
  47. "text": "供应商类型",
  48. "flex": 0,
  49. "dataIndex": "ve_type",
  50. "width": 200,
  51. "xtype": "",
  52. "items": null
  53. }]
  54. }) ;
  55. }
  56. },
  57. //放大镜赋值关系 以及 tpl模板
  58. 'dbfindtrigger[name=pd_prodcode]':{
  59. beforerender:function(f){
  60. Ext.apply(f,{
  61. conditionCode:'pr_code',
  62. dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
  63. dbfinds:[{
  64. from:'pr_code',to:'pd_prodcode',
  65. }, {
  66. from:'pr_detail',to:'pr_detail'
  67. }],
  68. dbtpls:[{
  69. field:'pr_code',width:100
  70. },{
  71. field:'pr_detail',width:100
  72. }],
  73. dbColumns:[{
  74. "text": "物料ID",
  75. "flex": 0,
  76. "dataIndex": "pr_id",
  77. "width": 0,
  78. "xtype": "",
  79. "items": null
  80. },{
  81. "text": "物料编号",
  82. "flex": 1,
  83. "dataIndex": "pr_code",
  84. "width": 100,
  85. "xtype": "",
  86. "items": null
  87. }, {
  88. "text": "物料名称",
  89. "flex": 1,
  90. "dataIndex": "pr_detail",
  91. "xtype": "",
  92. "items": null
  93. }, {
  94. "text": "物料规格",
  95. "flex": 0,
  96. "dataIndex": "pr_spec",
  97. "width": 200,
  98. "xtype": "",
  99. "items": null
  100. }, {
  101. "text": "物料单位",
  102. "flex": 0,
  103. "dataIndex": "pr_unit",
  104. "width": 200,
  105. "xtype": "",
  106. "items": null
  107. }]
  108. }) ;
  109. }
  110. }
  111. });
  112. }
  113. });