Browse Source

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

zhuth 7 years ago
parent
commit
d683858a0d

+ 17 - 16
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -36,9 +36,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name:'ck_name',
                 allowBlank:false,
                 fieldLabel:'类型'
-            }],
-            keyField:'id',
-            saveUrl:''
+            }]
         },
         vendorkind:{
             items:[{
@@ -49,7 +47,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name:'vk_name',
                 allowBlank:false,
                 fieldLabel:'类型'
-            }],
+            }]
         },
         productkind:{
             items:[{
@@ -60,7 +58,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name:'pt_name',
                 allowBlank:false,
                 fieldLabel:'类型'
-            }],
+            }]
         },
         bankinformation:{
             items:[{
@@ -86,7 +84,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name:'bk_thisamount',
                 allowBlank:false,
                 fieldLabel:'当前金额'
-            }],
+            }]
         },
         productbrand:{
             items:[{
@@ -97,7 +95,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name:'pb_name',
                 allowBlank:false,
                 fieldLabel:'类型'
-            }],
+            }]
         },
         inoutkind:{
             items:[{
@@ -142,16 +140,19 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
     onSave:function(){
         var belong = this.belong;
         var form=this.down('form');
-        var dataField = form.down('[name='+belong.dataField+']');
-        // if(!dataField.value){
-        //      Ext.Msg.alert('提示','数据有误');
-        //     return false;
-        // }
-        var keyField = form.down('[name='+belong.keyField+']');
-        //保存接口
         var params = {};
-        params[belong.dataField] = dataField.value;
-        params[belong.keyField] = keyField.value || 0;
+        var names = belong.columns.map(column => column.dataIndex);
+        Ext.Array.each(names,function(name) {
+            if(name){
+                var dataField = form.down('[name='+name+']');
+                if(dataField&&dataField.value){
+                    params[name] = dataField.value;
+                }
+            }
+        });
+        var idField = form.down('[name='+belong.keyField+']');
+        params[belong.keyField] = idField.value || 0;
+        //保存接口
         this.BaseUtil.request({
             url: belong.reqUrl,
             params: JSON.stringify(params),

+ 0 - 5
frontend/saas-web/app/view/document/kind/Kind.js

@@ -67,7 +67,6 @@ Ext.define('saas.view.document.kind.Kind', {
                 flex: 1
             }],
             keyField:'id',
-            dataField:'ck_name',
             reqUrl:basePath + 'document/customerkind/save',
             delUrl:basePath + 'document/customerkind/delete'
         },
@@ -78,7 +77,6 @@ Ext.define('saas.view.document.kind.Kind', {
                 flex: 1
             }],
             keyField:'id',
-            dataField:'vk_name',
             reqUrl:basePath + 'document/vendorkind/save',
             delUrl:basePath + 'document/vendorkind/delete'
         },
@@ -89,7 +87,6 @@ Ext.define('saas.view.document.kind.Kind', {
                 flex: 1
             }],
             keyField:'id',
-            dataField:'pt_name',
             reqUrl:basePath + 'document/producttype/save',
             delUrl:basePath + 'document/producttype/delete'
         },
@@ -100,7 +97,6 @@ Ext.define('saas.view.document.kind.Kind', {
                 flex: 1
             }],
             keyField:'id',
-            dataField:'pb_name',
             reqUrl:basePath + 'document/productbrand/save',
             delUrl:basePath + 'document/productbrand/delete'
         },
@@ -142,7 +138,6 @@ Ext.define('saas.view.document.kind.Kind', {
                 flex: 1
             }],
             keyField:'id',
-            dataField:'ft_name',
             reqUrl: 'http://192.168.253.31:9480/fundinouttype/save',
             delUrl: 'http://192.168.253.31:9480/fundinouttype/delete'
         }

+ 0 - 2
frontend/saas-web/app/view/document/kind/KindController.js

@@ -65,10 +65,8 @@ Ext.define('saas.view.document.kind.KindController', {
     },
     onEdit:function(grid,row,col){
         var me=this,
-            view=me.getView(),
             dataKind=me.getViewModel().getData()['dataKind'].value;
             rec = grid.getStore().getAt(row);
-        var keyField=rec.get(view.etc[dataKind].keyField);
         this.createDialog(dataKind,rec);
     },
     onDelete:function(grid,row,col){

+ 22 - 1
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -109,7 +109,7 @@ Ext.define('saas.view.document.kind.KindModel', {
             autoLoad: false
         },
         inoutkind:{ 
-        fields:[
+            fields:[
                 {name: 'id', type: 'int'},
                 {name: 'ft_type',  type: 'string'},
                 {name: 'ft_name',  type: 'string'}
@@ -128,5 +128,26 @@ Ext.define('saas.view.document.kind.KindModel', {
             pageSize: null,
             autoLoad: false
         },
+        storeinformation: {
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'wh_code',  type: 'string'},
+                {name: 'wh_description',  type: 'string'},
+                {name: 'wh_statuscode',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: basePath + 'document/customerkind/getAll',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: false
+        }
     }
 });

+ 20 - 0
frontend/saas-web/app/view/document/other/StoreInformation.js

@@ -0,0 +1,20 @@
+Ext.define('saas.view.document.other.StoreInformation', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'other-storeinformation',
+    autoScroll: true,
+    layout:'fit',
+    defaultType:'storeinformation',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }]
+})

+ 1 - 1
frontend/saas-web/app/view/document/vendor/panel/FormPanel.js

@@ -149,7 +149,7 @@ Ext.define('saas.view.document.vendor.panel.FormPanel', {
         xtype : "detailGridField", 
         detnoColumn:  'vc_detno',
         storeModel:'saas.model.document.vendorcontact',
-        _deleteDetailUrl:'http://192.168.253.31:9480/vendor/deletecontact/',
+        _deleteDetailUrl:'http://192.168.253.31:9480/vendor/deleteContact/',
         columns : [
             {
                 text : "ID",