Sfoglia il codice sorgente

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

guq 7 anni fa
parent
commit
8d14dc38fe

+ 1 - 1
frontend/saas-web/app/view/core/form/SettingWin.js

@@ -208,7 +208,7 @@ Ext.define('saas.view.core.form.SettingWin', {
                     style: {
                         color: '#4A4A4A'
                     },
-                    text: '* 拖动行以调整字段顺序',
+                    text: '* 拖动行以调整顺序',
                 }, '->', {
                     text: '重置',
                     handler: 'onReset'

+ 33 - 40
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -61,36 +61,41 @@ Ext.define('saas.view.money.verification.FormPanel', {
             me.fireEvent('afterSetItems', me, items);
         })
         .then(function () {
-            if(!me._loaded) {
-                me._loaded = true;
+            if(me.initId != 0) {
                 FormUtil.loadData(me);
             }else {
-                let viewModel = me.getViewModel();
-                let code = viewModel.get(me._codeField);
-                let detailGrids = me.query('detailGridField');
-
-                let o = {};
-                o[me._codeField] = code;
-
-                let formData = {main: {}};
-                Ext.apply(formData.main, o);
-                Ext.Array.each(detailGrids, function(grid, index) {
-                    let detno = 0;
-                    let detnoColumn = grid.detnoColumn;
-                    let datas = [];
-                    let emptyRows = grid.emptyRows;
-                    
-                    Ext.Array.each(new Array(emptyRows), function() {
-                        detno += 1;
-                        let data = {};
-                        data[detnoColumn] = detno;
-                        datas.push(data);
-                    })
-                    formData['detail' + index] = datas;
-                });
-
-                me.initFormData(formData);
-                me.fireEvent('load', me, formData);
+                // 防止新增打开界面取两次编号
+                if(!me._loaded) {
+                    me._loaded = true;
+                    FormUtil.loadData(me);
+                }else {
+                    let viewModel = me.getViewModel();
+                    let code = viewModel.get(me._codeField);
+                    let detailGrids = me.query('detailGridField');
+    
+                    let o = {};
+                    o[me._codeField] = code;
+    
+                    let formData = {main: {}};
+                    Ext.apply(formData.main, o);
+                    Ext.Array.each(detailGrids, function(grid, index) {
+                        let detno = 0;
+                        let detnoColumn = grid.detnoColumn;
+                        let datas = [];
+                        let emptyRows = grid.emptyRows;
+                        
+                        Ext.Array.each(new Array(emptyRows), function() {
+                            detno += 1;
+                            let data = {};
+                            data[detnoColumn] = detno;
+                            datas.push(data);
+                        })
+                        formData['detail' + index] = datas;
+                    });
+    
+                    me.initFormData(formData);
+                    me.fireEvent('load', me, formData);
+                }
             }
         })
     },
@@ -117,18 +122,6 @@ Ext.define('saas.view.money.verification.FormPanel', {
         return items;
     },
 
-    listeners: {
-        afterSetItems: function (form) {
-            var viewModel = form.getViewModel();
-            var init_vc_kind = form.init_vc_kind;
-
-            if (init_vc_kind) {
-                viewModel.set('vc_kind', init_vc_kind);
-                form.init_vc_kind = null;
-            }
-        }
-    },
-
     initEtcConfig: function () {
         Ext.apply(this, {
             etc: {

+ 0 - 2
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -444,11 +444,9 @@ Ext.define('saas.view.money.verification.FormPanelController', {
     refresh: function() {
         var me = this,
         form = me.getView(),
-        viewModel = me.getViewModel(),
         xtype = form.xtype,
         _config = {
             initId: form.initId,
-            init_vc_kind: viewModel.get('vc_kind'),
         },
         currentTab = saas.util.BaseUtil.getCurrentTab();
         

+ 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);
+        });
     }
 });

+ 2 - 2
frontend/saas-web/app/view/sale/b2b/Business.js

@@ -18,8 +18,8 @@ Ext.define('saas.view.sale.b2b.Business', {
             searchField: [{
                 xtype: 'textfield',
                 name: 'keyword',
-                columnWidth: 0.15,
-                emptyText:'请输入物料编号/名称/型号/品牌'
+                columnWidth: 0.2,
+                emptyText:'物料编号/名称/型号/品牌'
             }, {
                 xtype: 'condatefield',
                 name: 'date',

+ 1 - 1
frontend/saas-web/app/view/sale/b2b/Product.js

@@ -17,7 +17,7 @@ Ext.define('saas.view.sale.b2b.Product', {
                 xtype: 'textfield',
                 name: 'keyword',
                 columnWidth: 0.2,
-                emptyText:'请输入物料编号/名称/型号/品牌',
+                emptyText:'物料编号/名称/型号/品牌',
                 getCondition: function(value) {
                     return  ' (prodCode like\'%' + value + '%\' or prodBrand like \'%'+value+'%\' or prodName like \'%'+value+'%\' or prodSpeccode like \'%'+value+'%\') ';
                 }