QueryPanelController.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Ext.define('saas.view.sale.saleIn.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.sale-salein-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=pu_vendname]':{
  9. beforerender:function(f){
  10. //Todo
  11. }
  12. },
  13. //放大镜赋值关系 以及 tpl模板
  14. 'dbfindtrigger[name=pd_prodcode]':{
  15. beforerender:function(f){
  16. Ext.apply(f,{
  17. conditionCode:'pr_code',
  18. dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
  19. dbfinds:[{
  20. from:'pr_code',to:'pd_prodcode',
  21. from:'pr_unit',to:'pd_unit'
  22. }],
  23. dbtpls:[{
  24. field:'pr_code',width:100
  25. },{
  26. field:'pr_detail',width:100
  27. }],
  28. dbColumns:[{
  29. "text": "物料ID",
  30. "flex": 0,
  31. "dataIndex": "pr_id",
  32. "width": 0,
  33. "xtype": "",
  34. "items": null
  35. },{
  36. "text": "物料编号",
  37. "flex": 1,
  38. "dataIndex": "pr_code",
  39. "width": 100,
  40. "xtype": "",
  41. "items": null
  42. }, {
  43. "text": "物料名称",
  44. "flex": 1,
  45. "dataIndex": "pr_detail",
  46. "xtype": "",
  47. "items": null
  48. }, {
  49. "text": "物料规格",
  50. "flex": 0,
  51. "dataIndex": "pr_spec",
  52. "width": 200,
  53. "xtype": "",
  54. "items": null
  55. }, {
  56. "text": "物料单位",
  57. "flex": 0,
  58. "dataIndex": "pr_unit",
  59. "width": 200,
  60. "xtype": "",
  61. "items": null
  62. }]
  63. }) ;
  64. }
  65. }
  66. });
  67. }
  68. });