QueryPanelController.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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:'/api/document/customer/list',
  12. addXtype: 'document-customer-formpanel',
  13. addTitle: '客户资料',
  14. dbfinds:[
  15. {
  16. from:'id',to:'pi_custid'
  17. },{
  18. from:'cu_code',to:'pi_custcode'
  19. },{
  20. from:'cu_name',to:'pi_custname'
  21. }],
  22. dbtpls:[
  23. {
  24. field:'cu_code',width:100
  25. },{
  26. field:'cu_name',width:100
  27. }],
  28. dbColumns:[
  29. {
  30. conditionCode:'id',
  31. "text": "客户ID",
  32. "flex": 0,
  33. "dataIndex": "id",
  34. "width": 100,
  35. "xtype": "",
  36. "items": null
  37. },{
  38. conditionCode:'cu_code',
  39. "text": "客户编号",
  40. "flex": 1,
  41. "dataIndex": "cu_code",
  42. "width": 100,
  43. "xtype": "",
  44. "items": null
  45. }, {
  46. conditionCode:'cu_name',
  47. "text": "客户名称",
  48. "flex": 1,
  49. "dataIndex": "cu_name",
  50. "xtype": "",
  51. "items": null
  52. }, {
  53. conditionCode:'cu_type',
  54. "text": "客户类型",
  55. "flex": 0,
  56. "dataIndex": "cu_type",
  57. "width": 200,
  58. "xtype": "",
  59. "items": null
  60. }]
  61. }) ;
  62. }
  63. },
  64. 'dbfindtrigger[name=pd_prodcode]':{
  65. beforerender:function(f){
  66. Ext.apply(f,{
  67. conditionCode:'pr_code',
  68. dataUrl:'/api/document/product/list',
  69. addXtype: 'document-product-formpanel',
  70. addTitle: '物料资料',
  71. dbfinds:[{
  72. from:'pr_code',to:'pd_prodcode'
  73. }, {
  74. from:'pr_detail',to:'pr_detail'
  75. }],
  76. dbtpls:[
  77. {
  78. field:'pr_code',width:100
  79. },{
  80. field:'pr_detail',width:100
  81. }],
  82. dbColumns:[
  83. {
  84. "text": "物料ID",
  85. "flex": 0,
  86. "dataIndex": "id",
  87. "width": 0,
  88. "xtype": "",
  89. "items": null
  90. },{
  91. "text": "物料编号",
  92. "flex": 1,
  93. "dataIndex": "pr_code",
  94. "width": 100,
  95. "xtype": "",
  96. "items": null
  97. }, {
  98. "text": "物料名称",
  99. "flex": 1,
  100. "dataIndex": "pr_detail",
  101. "xtype": "",
  102. "items": null
  103. }, {
  104. "text": "物料规格",
  105. "flex": 0,
  106. "dataIndex": "pr_spec",
  107. "width": 200,
  108. "xtype": "",
  109. "items": null
  110. }, {
  111. "text": "物料单位",
  112. "flex": 0,
  113. "dataIndex": "pr_unit",
  114. "width": 200,
  115. "xtype": "",
  116. "items": null
  117. }]
  118. }) ;
  119. }
  120. }
  121. });
  122. }
  123. });