QueryPanelController.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. renderer : function(v) {
  74. return Ext.util.Format.number(v, '0');
  75. }
  76. }, {
  77. "text": "纳税人识别号",
  78. "dataIndex": "ve_bankaccount",
  79. "width": 150
  80. }, {
  81. "text": "开户银行",
  82. "dataIndex": "ve_bankaccount",
  83. "width": 100
  84. }, {
  85. "text": "银行账户",
  86. "dataIndex": "ve_bankcode",
  87. "width": 100
  88. }]
  89. });
  90. }
  91. },
  92. //放大镜赋值关系 以及 tpl模板
  93. 'dbfindtrigger[name=os_bankname]':{
  94. beforerender:function(f){
  95. Ext.apply(f,{
  96. conditionCode:'os_bankcode',
  97. dataUrl:'/api/document/bankinformation/list',
  98. addXtype: 'other-bankinformation',
  99. addTitle: '资金账户',
  100. dbfinds:[{
  101. from:'bk_bankcode',to:'os_bankcode'
  102. },{
  103. from:'bk_bankname',to:'os_bankname'
  104. },{
  105. from:'id',to:'os_bankid'
  106. }],
  107. dbtpls:[{
  108. field:'bk_bankcode',width:100
  109. },{
  110. field:'bk_bankname',width:100
  111. }],
  112. dbSearchFields: [{
  113. emptyText: '查找资金账户',
  114. xtype: "textfield",
  115. name: "search",
  116. getCondition: function (v) {
  117. return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
  118. },
  119. allowBlank: true,
  120. columnWidth: 0.25
  121. }],
  122. dbColumns: [{
  123. "text": "账户ID",
  124. "flex": 0,
  125. "dataIndex": "id",
  126. "width": 0,
  127. "xtype": ""
  128. }, {
  129. "text": "资金账户",
  130. "flex": 1,
  131. "dataIndex": "bk_bankcode",
  132. "width": 120,
  133. "xtype": ""
  134. }, {
  135. "text": "账户名称",
  136. "flex": 1,
  137. "dataIndex": "bk_bankname",
  138. "width": 150,
  139. "xtype": ""
  140. }, {
  141. "text": "账户类别",
  142. "flex": 1,
  143. "dataIndex": "bk_type",
  144. "width": 120,
  145. "xtype": ""
  146. }, {
  147. "text": "账户余额",
  148. "flex": 1,
  149. "dataIndex": "bk_thisamount",
  150. "width": 120,
  151. xtype: 'numbercolumn',
  152. }, {
  153. "text": "建帐日期",
  154. "flex": 1,
  155. "dataIndex": "bk_date",
  156. "width": 120,
  157. "xtype": "datecolumn"
  158. }]
  159. });
  160. }
  161. }
  162. });
  163. }
  164. });