Bladeren bron

对账单代码提交

hy 6 jaren geleden
bovenliggende
commit
099c5e5b7b

+ 1 - 1
frontend/saas-web/app/view/purchase/reconciliation/DataList.js

@@ -6,7 +6,7 @@ Ext.define('saas.view.purchase.reconciliation.DataList', {
     autoScroll: true,
     frame:true,
     layout:'fit',
-    dataUrl:'http://10.1.80.35:8560/api/money/apcheck/list',   
+    dataUrl:'/api/money/apcheck/list',   
     
     plugins: [{
         ptype: 'cellediting',

+ 1 - 1
frontend/saas-web/app/view/purchase/reconciliation/FormPanel.js

@@ -12,7 +12,7 @@ Ext.define('saas.view.purchase.reconciliation.FormPanel', {
     _idField: 'id',
     _codeField: 'ac_code',
     _relationColumn: 'pd_puid',
-    _readUrl: 'http://10.1.80.35:8560/api/money/apcheck/read',
+    _readUrl: '/api/money/apcheck/read',
     initId: 0,
     toolBtns: [{
         xtype: 'button',

+ 28 - 0
frontend/saas-web/app/view/purchase/reconciliation/FormPanelController.js

@@ -4,5 +4,33 @@ Ext.define('saas.view.purchase.reconciliation.FormPanelController', {
     init: function (form) {
         var me = this;
         this.control({});
+    },
+    agree:function(){
+        var me = this;
+        var url = '/api/money/apcheck/agree/';
+        me.sendUrl(url)
+    },
+    disagree:function(){
+        var me = this;
+        var url = '/api/money/apcheck/reject/';
+        me.sendUrl(url)
+    },
+    sendUrl:function(url){
+        var me = this;
+        var id = me.getViewModel().getData().id;
+        saas.util.BaseUtil.request({
+            url: url + id,
+            params: '',
+            method: 'POST',
+        })
+        .then(function() {
+            //解析参数
+            saas.util.BaseUtil.showSuccessToast('操作成功');
+            me.refresh()
+        })
+        .catch(function(e) {
+            //失败
+            saas.util.BaseUtil.showErrorToast('操作失败: ' + e.message);
+        });
     }
 });