QueryPanelController.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.purchase-purchaseout-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:basePath+'document/vendor/getVendorsByCondition',
  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:basePath+'document/product/getProductsByCondition',
  63. dbfinds:[{
  64. from:'pr_code',to:'pd_prodcode',
  65. from:'pr_unit',to:'pd_unit'
  66. }],
  67. dbtpls:[{
  68. field:'pr_code',width:100
  69. },{
  70. field:'pr_detail',width:100
  71. }],
  72. dbColumns:[{
  73. "text": "物料ID",
  74. "flex": 0,
  75. "dataIndex": "pr_id",
  76. "width": 0,
  77. "xtype": "",
  78. "items": null
  79. },{
  80. "text": "物料编号",
  81. "flex": 1,
  82. "dataIndex": "pr_code",
  83. "width": 100,
  84. "xtype": "",
  85. "items": null
  86. }, {
  87. "text": "物料名称",
  88. "flex": 1,
  89. "dataIndex": "pr_detail",
  90. "xtype": "",
  91. "items": null
  92. }, {
  93. "text": "物料规格",
  94. "flex": 0,
  95. "dataIndex": "pr_spec",
  96. "width": 200,
  97. "xtype": "",
  98. "items": null
  99. }, {
  100. "text": "物料单位",
  101. "flex": 0,
  102. "dataIndex": "pr_unit",
  103. "width": 200,
  104. "xtype": "",
  105. "items": null
  106. }]
  107. }) ;
  108. }
  109. }
  110. });
  111. }
  112. });