QueryPanelController.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. xtype: 'numbercolumn',
  66. align: 'end'
  67. }, {
  68. "text": "承付天数",
  69. "dataIndex": "ve_promisedays",
  70. "width": 100,
  71. xtype: 'numbercolumn',
  72. align: 'end'
  73. }, {
  74. "text": "纳税人识别号",
  75. "dataIndex": "ve_bankaccount",
  76. "width": 150
  77. }, {
  78. "text": "开户银行",
  79. "dataIndex": "ve_bankaccount",
  80. "width": 100
  81. }, {
  82. "text": "银行账户",
  83. "dataIndex": "ve_bankcode",
  84. "width": 100
  85. }]
  86. });
  87. }
  88. },
  89. //放大镜赋值关系 以及 tpl模板
  90. 'dbfindtrigger[name=os_bankname]':{
  91. beforerender:function(f){
  92. Ext.apply(f,{
  93. conditionCode:'os_bankcode',
  94. dataUrl:'/api/document/bankinformation/list',
  95. dbfinds:[{
  96. from:'bk_bankcode',to:'os_bankcode'
  97. },{
  98. from:'bk_bankname',to:'os_bankname'
  99. },{
  100. from:'id',to:'os_bankid'
  101. }],
  102. dbtpls:[{
  103. field:'bk_bankcode',width:100
  104. },{
  105. field:'bk_bankname',width:100
  106. }],
  107. dbColumns:[{
  108. "text": "账户ID",
  109. "flex": 0,
  110. "dataIndex": "id",
  111. "width": 0,
  112. "xtype": ""
  113. },{
  114. "text": "账户编号",
  115. "flex": 1,
  116. "dataIndex": "bk_bankcode",
  117. "width": 120,
  118. "xtype": ""
  119. }, {
  120. "text": "账户名称",
  121. "flex": 1,
  122. "dataIndex": "bk_bankname",
  123. "width": 150,
  124. "xtype": ""
  125. }, {
  126. "text": "账户类型",
  127. "flex": 1,
  128. "dataIndex": "bk_type",
  129. "width": 120,
  130. "xtype": ""
  131. }, {
  132. "text": "账户余额",
  133. "flex": 1,
  134. "dataIndex": "bk_thisamount",
  135. "width": 120,
  136. xtype: 'numbercolumn',
  137. }, {
  138. "text": "建帐日期",
  139. "flex": 1,
  140. "dataIndex": "bk_date",
  141. "width": 120,
  142. "xtype": "datecolumn"
  143. }]
  144. }) ;
  145. }
  146. }
  147. });
  148. }
  149. });