QueryPanel2.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. Ext.define('make.view.osmake.reconciliation.QueryPanel_2', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'osmake-reconciliation-querypanel-2',
  4. controller: 'osmake-reconciliation-querypanel',
  5. viewModel: {
  6. extend: 'saas.view.core.query.QueryPanelModel',
  7. data: {
  8. form: {}, // 查询字段记录
  9. addEnable: false, // 显示新增按钮
  10. auditEnable: false, // 显示审核按钮
  11. printEnable: false, // 显示打印按钮
  12. importEnable: false, // 显示导入按钮
  13. exportEnable: true, // 显示导出按钮
  14. closeEnable: false, // 显示关闭按钮
  15. deleteEnable: false, // 显示删除按钮
  16. deleteDisable:false, //删除按钮是否可使用
  17. openAudit:false,//单独显示审核按钮
  18. openUnAudit:true,//单独显示反审核按钮
  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_currency',
  60. fieldLabel: '币别',
  61. queryMode: 'local',
  62. displayField: 'ac_currency',
  63. valueField: 'ac_currency',
  64. emptyText :'',
  65. editable:false,
  66. store: Ext.create('Ext.data.ArrayStore', {
  67. fields: ['ac_currency', 'ac_currency'],
  68. data: [
  69. ["RMB", "RMB"],
  70. ["USD", "USD"],
  71. ["HKD", "HKD"]
  72. ]
  73. }),
  74. getCondition: function(value) {
  75. if(!value) {
  76. return '1=1';
  77. }else {
  78. return 'ac_currency=\'' + value + '\'';
  79. }
  80. }
  81. }],
  82. queryGridConfig:{
  83. idField: 'id',
  84. codeField: 'ac_code',
  85. mainIdField:'_id',
  86. detailIdField:'ad_id',
  87. addTitle: '外协对账单',
  88. addXtype: 'osmake-reconciliation-formpanel',
  89. defaultCondition: me.defaultCondition,
  90. baseVastUrl: '/api/money/apcheck/',
  91. caller: 'APCHECK',
  92. baseColumn: [{
  93. text : 'id',
  94. hidden:true,
  95. dataIndex : 'id',
  96. xtype : 'numbercolumn',
  97. },{
  98. text : '对账单号',
  99. dataIndex : 'ac_code',
  100. width:150
  101. },{
  102. text : 'ac_b2bid',
  103. hidden:true,
  104. dataIndex : 'ac_b2bid',
  105. xtype : 'numbercolumn',
  106. },{
  107. text : 'accountId',
  108. hidden:true,
  109. dataIndex : 'accountId',
  110. xtype : 'numbercolumn',
  111. },{
  112. text : 'ac_sendstatus',
  113. hidden:true,
  114. dataIndex : 'ac_sendstatus'
  115. },{
  116. text : '供应商编号',
  117. dataIndex : 'ac_vendcode',
  118. hidden:true
  119. },{
  120. text : '供应商名称',
  121. dataIndex : 'ac_vendname',
  122. width:150
  123. },{
  124. text: '对账期间',
  125. dataIndex: 'period',
  126. width: 200
  127. }, {
  128. text: '对账时间',
  129. xtype: 'datecolumn',
  130. format: 'Y-m-d',
  131. dataIndex: 'ac_date',
  132. width: 110
  133. },{
  134. text : '币种',
  135. width : 90.0,
  136. dataIndex : 'ac_currency',
  137. },{
  138. text : '对账总额',
  139. dataIndex : 'ac_checkamount',
  140. xtype:'numbercolumn',
  141. width : 110.0,
  142. renderer: function(v, m, r) {
  143. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  144. }
  145. }, {
  146. text : '单据状态',
  147. textAlign: 'center',
  148. dataIndex : 'ac_status',
  149. }],
  150. relativeColumn: []
  151. }
  152. });
  153. this.callParent(arguments);
  154. }
  155. });