QueryPanelController.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. Ext.define('saas.view.money.paybalance.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.money-paybalance-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:'/api/document/vendor/list',
  12. addXtype: 'document-vendor-formpanel',
  13. addTitle: '供应商资料',
  14. dbfinds:[{
  15. from:'ve_code',to:'pu_vendcode'
  16. },{
  17. from:'ve_name',to:'pu_vendname'
  18. }],
  19. dbtpls:[{
  20. field:'ve_code',width:100
  21. },{
  22. field:'ve_name',width:100
  23. }],
  24. dbColumns:[{
  25. conditionCode:'ve_id',
  26. "text": "供应商ID",
  27. "flex": 0,
  28. "dataIndex": "ve_id",
  29. "width": 0,
  30. "xtype": "",
  31. "items": null
  32. },{
  33. conditionCode:'ve_code',
  34. "text": "供应商编号",
  35. "flex": 1,
  36. "dataIndex": "ve_code",
  37. "width": 100,
  38. "xtype": "",
  39. "items": null
  40. }, {
  41. conditionCode:'ve_name',
  42. "text": "供应商名称",
  43. "flex": 1,
  44. "dataIndex": "ve_name",
  45. "xtype": "",
  46. "items": null
  47. }, {
  48. conditionCode:'ve_type',
  49. "text": "供应商类型",
  50. "flex": 0,
  51. "dataIndex": "ve_type",
  52. "width": 200,
  53. "xtype": "",
  54. "items": null
  55. }]
  56. }) ;
  57. }
  58. },
  59. //放大镜赋值关系 以及 tpl模板
  60. 'dbfindtrigger[name=pd_prodcode]':{
  61. beforerender:function(f){
  62. Ext.apply(f,{
  63. conditionCode:'pr_code',
  64. dataUrl:'/api/document/product/list',
  65. addXtype: 'document-product-formpanel',
  66. addTitle: '物料资料',
  67. dbfinds:[{
  68. from:'pr_code',to:'pd_prodcode',
  69. }, {
  70. from:'pr_detail',to:'pr_detail'
  71. }],
  72. dbtpls:[{
  73. field:'pr_code',width:100
  74. },{
  75. field:'pr_detail',width:100
  76. }],
  77. defaultCondition: "pr_statuscode='OPEN'",
  78. dbSearchFields:[{
  79. emptyText:'输入物料编号、名称或规格',
  80. xtype : "textfield",
  81. name : "search",
  82. width: 200,
  83. getCondition: function(v) {
  84. return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
  85. },
  86. allowBlank : true,
  87. columnWidth : 0.25
  88. }],
  89. dbColumns:[{
  90. "text": "物料ID",
  91. "hidden": true,
  92. "dataIndex": "id",
  93. }, {
  94. "text": "物料编号",
  95. "flex": 1,
  96. "dataIndex": "pr_code",
  97. "width": 100,
  98. "xtype": "",
  99. "items": null
  100. }, {
  101. "text": "物料名称",
  102. "flex": 1,
  103. "dataIndex": "pr_detail",
  104. "xtype": "",
  105. "items": null
  106. }, {
  107. "text": "物料规格",
  108. "flex": 0,
  109. "dataIndex": "pr_spec",
  110. "width": 200,
  111. "xtype": "",
  112. "items": null
  113. }, {
  114. "text": "物料单位",
  115. "flex": 0,
  116. "dataIndex": "pr_unit",
  117. "width": 200,
  118. "xtype": "",
  119. "items": null
  120. }]
  121. }) ;
  122. }
  123. }
  124. });
  125. }
  126. });