| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- Ext.QuickTips.init();
- Ext.define('erp.controller.fa.fp.ProduceFKBudgetBill', {
- extend: 'Ext.app.Controller',
- FormUtil: Ext.create('erp.util.FormUtil'),
- BaseUtil: Ext.create('erp.util.BaseUtil'),
- views:[
- 'fa.fp.ProduceFKBudgetBillForm','fa.fp.ProduceFKBudgetBill','core.button.Close','core.button.ProduceFKBudgetBill','core.form.MonthDateField'
- ] ,
- init:function(){
- var me = this;
- this.control({
- 'erpCloseButton': {
- click: function(btn){
- me.FormUtil.onClose();
- }
- },
- 'erpProduceFKBudgetBillButton' : {
- click : function(btn) {
- Ext.Ajax.request({
- url : basePath
- + "fa/fp/ProduceFKBudgetBill.action",
- params:{
- yearmonth:Ext.getCmp('date').value,
- },
- method : 'post',
- timeout : 300000,
- callback : function(options, success, response) {
- var res = Ext.decode(response.responseText);
- if (res.exceptionInfo) {
- showError(res.exceptionInfo);
- return;
- }
- if (res.success) {
- showMessage("提示", "生成付款预算单成功!");
- }
- }
- });
- }
- },
- 'monthdatefield': {
- afterrender: function(f) {
- me.getCurrentYearmonth(f);
- }
- }
- });
- },
- getForm: function(btn){
- return btn.ownerCt.ownerCt;
- },
- getCurrentYearmonth: function(f) {
- Ext.Ajax.request({
- url: basePath + 'fa/fp/getCurrentYearmonth.action',
- method: 'GET',
- callback: function(opt, s, r) {
- var rs = Ext.decode(r.responseText);
- if(rs.exceptionInfo) {
- showError(rs.exceptionInfo);
- } else if(rs.data) {
- f.setValue(rs.data);
- }
- }
- });
- }
- });
|