QueryPanelController.js 4.6 KB

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