QueryPanelController.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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:'/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. from:'pr_unit',to:'pd_unit'
  70. }],
  71. dbtpls:[{
  72. field:'pr_code',width:100
  73. },{
  74. field:'pr_detail',width:100
  75. }],
  76. defaultCondition: 'pr_statuscode="OPEN"',
  77. dbSearchFields:[{
  78. emptyText:'输入物料编号、名称或规格',
  79. xtype : "textfield",
  80. name : "search",
  81. width: 200,
  82. getCondition: function(v) {
  83. return "upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%'";
  84. },
  85. allowBlank : true,
  86. columnWidth : 0.25
  87. }],
  88. dbColumns:[{
  89. "text": "物料ID",
  90. "hidden": true,
  91. "dataIndex": "id",
  92. }, {
  93. "text": "物料编号",
  94. "flex": 1,
  95. "dataIndex": "pr_code",
  96. "width": 100,
  97. "xtype": "",
  98. "items": null
  99. }, {
  100. "text": "物料名称",
  101. "flex": 1,
  102. "dataIndex": "pr_detail",
  103. "xtype": "",
  104. "items": null
  105. }, {
  106. "text": "物料规格",
  107. "flex": 0,
  108. "dataIndex": "pr_spec",
  109. "width": 200,
  110. "xtype": "",
  111. "items": null
  112. }, {
  113. "text": "物料单位",
  114. "flex": 0,
  115. "dataIndex": "pr_unit",
  116. "width": 200,
  117. "xtype": "",
  118. "items": null
  119. }]
  120. }) ;
  121. }
  122. }
  123. });
  124. }
  125. });