QueryPanel3.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. Ext.define('make.view.osmake.reconciliation.QueryPanel_3', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'osmake-reconciliation-querypanel-3',
  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: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: 'pi_date',
  31. fieldLabel: '日期',
  32. columnWidth: 0.5,
  33. value:1,
  34. operation: 'between',
  35. showCurrentMonth:true
  36. },{
  37. xtype: 'multiqueryField',
  38. columnWidth: 0.4,
  39. name: 'multi_query',
  40. querys: {
  41. "Vend":{"field": "pi_vendname", "dbfinds": [{//供应商
  42. from: 've_name',
  43. to: 'pi_vendname'
  44. }]},
  45. "Currency":{"field": "pi_currency", "dbfinds": [{
  46. from: 'cr_name',
  47. to: 'pi_currency'
  48. }]}
  49. }
  50. }],
  51. moreQueryFormItems:[{
  52. xtype: 'condatefield',
  53. name: 'pi_date',
  54. fieldLabel: '单据日期',
  55. columnWidth: 1
  56. },{
  57. xtype: 'vendorDbfindTrigger',
  58. name: 'pi_vendname',
  59. fieldLabel: '供应商名称'
  60. },{
  61. xtype: 'combobox',
  62. name: 'pi_currency',
  63. fieldLabel: '币别',
  64. queryMode: 'local',
  65. displayField: 'pi_currency',
  66. valueField: 'pi_currency',
  67. emptyText :'',
  68. editable:false,
  69. store: Ext.create('Ext.data.ArrayStore', {
  70. fields: ['pi_currency', 'pi_currency'],
  71. data: [
  72. ["RMB", "RMB"],
  73. ["USD", "USD"],
  74. ["HKD", "HKD"]
  75. ]
  76. }),
  77. getCondition: function(value) {
  78. if(!value) {
  79. return '1=1';
  80. }else {
  81. return 'pi_currency=\'' + value + '\'';
  82. }
  83. }
  84. }],
  85. queryGridConfig:{
  86. idField: 'id',
  87. codeField: '',
  88. mainIdField:'_id',
  89. detailIdField:'ad_id',
  90. addTitle: '外协对账单',
  91. addXtype: 'osmake-reconciliation-formpanel',
  92. defaultCondition: me.defaultCondition,
  93. baseVastUrl: '/api/money/apcheck/',
  94. caller: 'APCHECKOS',
  95. selModel: {
  96. type: 'cellmodel'
  97. },
  98. baseColumn: [{
  99. text : 'id',
  100. hidden:true,
  101. dataIndex : 'id',
  102. xtype : 'numbercolumn',
  103. },{
  104. text : '对账单号',
  105. dataIndex : 'ac_code',
  106. width:150
  107. },{
  108. text : 'ac_b2bid',
  109. hidden:true,
  110. dataIndex : 'ac_b2bid',
  111. xtype : 'numbercolumn',
  112. },{
  113. text : 'accountId',
  114. hidden:true,
  115. dataIndex : 'accountId',
  116. xtype : 'numbercolumn',
  117. },{
  118. text : 'ac_sendstatus',
  119. hidden:true,
  120. dataIndex : 'ac_sendstatus'
  121. },{
  122. text : '供应商编号',
  123. dataIndex : 'ac_vendcode',
  124. hidden:true
  125. },{
  126. text : '供应商名称',
  127. dataIndex : 'ac_vendname',
  128. width:150
  129. },{
  130. text: '对账期间',
  131. dataIndex: 'period',
  132. width: 200
  133. }, {
  134. text: '对账时间',
  135. xtype: 'datecolumn',
  136. format: 'Y-m-d',
  137. dataIndex: 'ac_date',
  138. width: 110
  139. },{
  140. text : '币种',
  141. width : 90.0,
  142. dataIndex : 'ac_currency',
  143. },{
  144. text : '对账总额',
  145. dataIndex : 'ac_checkamount',
  146. xtype:'numbercolumn',
  147. width : 110.0,
  148. renderer: function(v, m, r) {
  149. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  150. }
  151. }, {
  152. text : '单据状态',
  153. textAlign: 'center',
  154. dataIndex : 'ac_status',
  155. }],
  156. relativeColumn: [{
  157. text : '供应商名称',
  158. dataIndex : 'ac_vendname',
  159. width:300
  160. },{
  161. text : '币种',
  162. width : 90.0,
  163. dataIndex : 'ac_currency',
  164. },{
  165. text : '本期入库金额(元)',
  166. dataIndex : 'ac_thissend',
  167. xtype:'numbercolumn',
  168. width : 170.0,
  169. renderer: function(v, m, r) {
  170. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  171. }
  172. },{
  173. text : '本期未对账(元)',
  174. dataIndex : 'ac_thisuncheck',
  175. xtype:'numbercolumn',
  176. width : 170.0,
  177. renderer: function(v, m, r) {
  178. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  179. }
  180. },{
  181. text : '本期已对账(元)',
  182. dataIndex : 'ac_thischeck',
  183. xtype:'numbercolumn',
  184. width : 170.0,
  185. renderer: function(v, m, r) {
  186. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  187. }
  188. }, {
  189. text: '操作',
  190. xtype:'buttoncolumn',
  191. align: 'center',
  192. vertical: true,
  193. dataIndex:'ac_confirmstatuscode',
  194. ignoreExport: true,
  195. width: 120,
  196. buttons: [{
  197. text: '明细',
  198. handler: 'showDetail'
  199. }]
  200. }]
  201. }
  202. });
  203. this.callParent(arguments);
  204. },
  205. getQueryMode: function () {
  206. return 'PRODIO';
  207. }
  208. });