QueryPanel.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. Ext.define('make.view.osmake.reconciliation.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'osmake-reconciliation-querypanel',
  4. controller: 'osmake-reconciliation-querypanel',
  5. viewModel: {
  6. extend: 'saas.view.core.query.QueryPanelModel',
  7. data: {
  8. form: {}, // 查询字段记录
  9. addEnable: false, // 显示新增按钮
  10. auditEnable: true, // 显示审核按钮
  11. printEnable: false, // 显示打印按钮
  12. importEnable: false, // 显示导入按钮
  13. exportEnable: true, // 显示导出按钮
  14. closeEnable: false, // 显示关闭按钮
  15. deleteEnable: true, // 显示删除按钮
  16. deleteDisable:false, //删除按钮是否可使用
  17. openAudit:false,//单独显示审核按钮
  18. openUnAudit:false,//单独显示反审核按钮
  19. openEnable:false, //显示开启 针对已取消列表
  20. configurable: true, // 允许列设置
  21. }
  22. },
  23. viewName: 'osmake-reconciliation-querypanel',
  24. caller: 'APCHECKOS',
  25. initComponent: function () {
  26. var me=this;
  27. Ext.apply(this, {
  28. queryFormItems: [ {
  29. xtype: 'condatefield',
  30. name: 'ac_date',
  31. fieldLabel: '日期',
  32. columnWidth: 0.5,
  33. operation: 'between',
  34. showCurrentMonth: true,
  35.                 value:1
  36. },{
  37. xtype: 'multiqueryField',
  38. columnWidth: 0.4,
  39. name: 'multi_query',
  40. querys: {
  41. "BillCode": {"field": "ac_code" ,"desc": "对账单号"},
  42. "Vend":{"field": "ac_vendname", "dbfinds": [{//供应商
  43. from: 've_name',
  44. to: 'ac_vendname'
  45. }]}
  46. }
  47. }],
  48. moreQueryFormItems:[{
  49. xtype: 'condatefield',
  50. name: 'ac_date',
  51. fieldLabel: '单据日期',
  52. columnWidth: 1
  53. },{
  54. xtype: 'vendorDbfindTrigger',
  55. name: 'ac_vendname',
  56. fieldLabel: '供应商名称'
  57. },{
  58. xtype: 'combobox',
  59. name: 'ac_statuscode',
  60. fieldLabel: '审核状态',
  61. queryMode: 'local',
  62. displayField: 'ac_status',
  63. valueField: 'ac_statuscode',
  64. emptyText :'全部',
  65. editable:false,
  66. store: Ext.create('Ext.data.ArrayStore', {
  67. fields: ['ac_statuscode', 'ac_status'],
  68. data: [
  69. ["ALL", "全部"],
  70. ["AUDITED", "已审核"],
  71. ["UNAUDITED", "未审核"]
  72. ]
  73. }),
  74. getCondition: function(value) {
  75. if(value == 'ALL') {
  76. return '1=1';
  77. }else {
  78. return 'ac_statuscode=\'' + value + '\'';
  79. }
  80. }
  81. },{
  82. xtype: 'combobox',
  83. name: 'ac_currency',
  84. fieldLabel: '币别',
  85. queryMode: 'local',
  86. displayField: 'ac_currency',
  87. valueField: 'ac_currency',
  88. emptyText :'',
  89. editable:false,
  90. store: Ext.create('Ext.data.ArrayStore', {
  91. fields: ['ac_currency', 'ac_currency'],
  92. data: [
  93. ["RMB", "RMB"],
  94. ["USD", "USD"],
  95. ["HKD", "HKD"]
  96. ]
  97. }),
  98. getCondition: function(value) {
  99. if(!value) {
  100. return '1=1';
  101. }else {
  102. return 'ac_currency=\'' + value + '\'';
  103. }
  104. }
  105. }],
  106. queryGridConfig:{
  107. idField: 'id',
  108. codeField: 'ac_code',
  109. mainIdField:'_id',
  110. detailIdField:'ad_id',
  111. addTitle: '外协对账单',
  112. addXtype: 'osmake-reconciliation-formpanel',
  113. defaultCondition: me.defaultCondition,
  114. baseVastUrl: '/api/money/apcheck/',
  115. caller: 'APCHECK',
  116. baseColumn: [{
  117. text : 'id',
  118. hidden:true,
  119. dataIndex : 'id',
  120. xtype : 'numbercolumn',
  121. },{
  122. text : '对账单号',
  123. dataIndex : 'ac_code',
  124. width:150
  125. },{
  126. text : 'ac_b2bid',
  127. hidden:true,
  128. dataIndex : 'ac_b2bid',
  129. xtype : 'numbercolumn',
  130. },{
  131. text : 'accountId',
  132. hidden:true,
  133. dataIndex : 'accountId',
  134. xtype : 'numbercolumn',
  135. },{
  136. text : 'ac_sendstatus',
  137. hidden:true,
  138. dataIndex : 'ac_sendstatus'
  139. },{
  140. text : '供应商编号',
  141. dataIndex : 'ac_vendcode',
  142. hidden:true
  143. },{
  144. text : '供应商名称',
  145. dataIndex : 'ac_vendname',
  146. width:150
  147. },{
  148. text: '对账期间',
  149. dataIndex: 'period',
  150. width: 200
  151. }, {
  152. text: '对账时间',
  153. xtype: 'datecolumn',
  154. format: 'Y-m-d',
  155. dataIndex: 'ac_date',
  156. width: 110
  157. },{
  158. text : '币种',
  159. width : 90.0,
  160. dataIndex : 'ac_currency',
  161. },{
  162. text : '对账总额',
  163. dataIndex : 'ac_checkamount',
  164. xtype:'numbercolumn',
  165. width : 110.0,
  166. renderer: function(v, m, r) {
  167. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  168. }
  169. }, {
  170. text : '单据状态',
  171. textAlign: 'center',
  172. dataIndex : 'ac_status',
  173. }],
  174. relativeColumn: []
  175. }
  176. });
  177. this.callParent(arguments);
  178. }
  179. });