QueryPanelController.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. Ext.define('saas.view.money.othspendings.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.money-othspendings-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=os_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: 'id',
  16. to: 'os_vendid'
  17. }, {
  18. from: 've_code',
  19. to: 'os_vendcode'
  20. }, {
  21. from: 've_name',
  22. to: 'os_vendname'
  23. }],
  24. dbtpls: [{
  25. field: 've_code',
  26. width: 100
  27. }, {
  28. field: 've_name',
  29. width: 100
  30. }],
  31. defaultCondition: "ve_statuscode='OPEN'",
  32. dbSearchFields:[{
  33. emptyText:'输入供应商编号或名称',
  34. xtype : "textfield",
  35. name : "search",
  36. getCondition: function(v) {
  37. return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
  38. },
  39. allowBlank : true,
  40. columnWidth : 0.25
  41. }],
  42. dbColumns:[{
  43. "text": "供应商ID",
  44. "hidden": true,
  45. "dataIndex": "id",
  46. "width": 100,
  47. "xtype": "numbercolumn"
  48. },{
  49. "text": "供应商编号",
  50. "dataIndex": "ve_code",
  51. "width": 200
  52. }, {
  53. "text": "供应商名称",
  54. "dataIndex": "ve_name",
  55. "width": 200
  56. }, {
  57. "text": "供应商类型",
  58. "dataIndex": "ve_type",
  59. "width": 180,
  60. "items": null
  61. }, {
  62. "text": "税率",
  63. "dataIndex": "ve_taxrate",
  64. "width": 100
  65. }, {
  66. "text": "承付天数",
  67. "dataIndex": "ve_promisedays",
  68. "width": 100
  69. }, {
  70. "text": "纳税人识别号",
  71. "dataIndex": "ve_bankaccount",
  72. "width": 150
  73. }, {
  74. "text": "开户银行",
  75. "dataIndex": "ve_bankaccount",
  76. "width": 100
  77. }, {
  78. "text": "银行账户",
  79. "dataIndex": "ve_bankcode",
  80. "width": 100
  81. }]
  82. });
  83. }
  84. },
  85. //放大镜赋值关系 以及 tpl模板
  86. 'dbfindtrigger[name=os_bankname]':{
  87. beforerender:function(f){
  88. Ext.apply(f,{
  89. conditionCode:'os_bankcode',
  90. dataUrl:'/api/document/bankinformation/list',
  91. dbfinds:[{
  92. from:'bk_bankcode',to:'os_bankcode'
  93. },{
  94. from:'bk_bankname',to:'os_bankname'
  95. },{
  96. from:'id',to:'os_bankid'
  97. }],
  98. dbtpls:[{
  99. field:'bk_bankcode',width:100
  100. },{
  101. field:'bk_bankname',width:100
  102. }],
  103. dbColumns:[{
  104. "text": "账户ID",
  105. "flex": 0,
  106. "dataIndex": "id",
  107. "width": 0,
  108. "xtype": ""
  109. },{
  110. "text": "账户编号",
  111. "flex": 1,
  112. "dataIndex": "bk_bankcode",
  113. "width": 120,
  114. "xtype": ""
  115. }, {
  116. "text": "账户名称",
  117. "flex": 1,
  118. "dataIndex": "bk_bankname",
  119. "width": 150,
  120. "xtype": ""
  121. }, {
  122. "text": "账户类型",
  123. "flex": 1,
  124. "dataIndex": "bk_type",
  125. "width": 120,
  126. "xtype": ""
  127. }, {
  128. "text": "账户余额",
  129. "flex": 1,
  130. "dataIndex": "bk_thisamount",
  131. "width": 120,
  132. "xtype": ""
  133. }, {
  134. "text": "建帐日期",
  135. "flex": 1,
  136. "dataIndex": "bk_date",
  137. "width": 120,
  138. "xtype": "datecolumn"
  139. }]
  140. }) ;
  141. }
  142. }
  143. });
  144. }
  145. });