QueryPanelController.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. Ext.define('saas.view.stock.make.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.stock-make-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": "pr_id",
  93. "width": 0,
  94. "xtype": "",
  95. "items": null
  96. },{
  97. "text": "物料编号",
  98. "flex": 1,
  99. "dataIndex": "pr_code",
  100. "width": 100,
  101. "xtype": "",
  102. "items": null
  103. }, {
  104. "text": "物料名称",
  105. "flex": 1,
  106. "dataIndex": "pr_detail",
  107. "xtype": "",
  108. "items": null
  109. }, {
  110. "text": "物料规格",
  111. "flex": 0,
  112. "dataIndex": "pr_spec",
  113. "width": 200,
  114. "xtype": "",
  115. "items": null
  116. }, {
  117. "text": "物料单位",
  118. "flex": 0,
  119. "dataIndex": "pr_unit",
  120. "width": 200,
  121. "xtype": "",
  122. "items": null
  123. }]
  124. }) ;
  125. }
  126. }
  127. });
  128. }
  129. });