Browse Source

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

rainco 7 years ago
parent
commit
4a8aac49a2

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

@@ -36,6 +36,7 @@ Ext.define('saas.view.core.form.RemoteCombo', {
         var me = this,
             picker,
             pickerCfg = Ext.apply({
+                height: 180,
                 hiddenBtn:me.hiddenBtn,
                 xtype: 'boundlistadd',
                 id: me.id + '-picker',

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

@@ -255,7 +255,7 @@ Ext.define('saas.view.core.view.BoundListAdd', {
             id: me.id + '-toolbar',
             border: true,
             ownerCt: me,
-            hidden:me.hiddenBtn,
+            height:me.hiddenBtn?0:50,
             items:[{
                 text:'新增',
                 handler:me.addHandler,

+ 7 - 28
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -6,39 +6,13 @@ Ext.define('saas.view.document.customer.BasePanel', {
     viewModel: 'document-customer-basepanel',
 
     searchField:[{
+        editable:false,
         hiddenBtn:true,
         xtype : "remotecombo", 
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
         emptyText : "请选择客户类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
-        columnWidth : 0.25,
-        etc:{
-            customerkind:{
-                keyField:'id',
-                dataField:'ck_name',
-                reqUrl:'/api/document/customerkind/save',
-                delUrl:'/api/document/customerkind/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增客户类型'
-                },
-                dataKind:'customerkind',
-                belong:this.ownerCmp.etc['customerkind'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
+        columnWidth : 0.25
     }],
 
     //字段属性
@@ -84,6 +58,11 @@ Ext.define('saas.view.document.customer.BasePanel', {
             dataIndex : "cu_uu", 
             width : 120.0, 
         }, 
+        {
+            text : "客户类型", 
+            dataIndex : "cu_type", 
+            width : 120.0, 
+        }, 
         {
             text : "默认客户地址", 
             dataIndex : "ca_address", 

+ 5 - 13
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -55,20 +55,11 @@ Ext.define('saas.view.document.customer.FormPanel', {
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
         fieldLabel : "客户类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            customerkind:{
-                keyField:'id',
-                dataField:'ck_name',
-                reqUrl:'/api/document/customerkind/save',
-                delUrl:'/api/document/customerkind/delete'
-            }
-        },
+        hiddenBtn:false,//true 则会关闭新增按钮功能
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
@@ -76,8 +67,9 @@ Ext.define('saas.view.document.customer.FormPanel', {
                     title: '新增客户类型'
                 },
                 dataKind:'customerkind',
-                belong:this.ownerCmp.etc['customerkind'],
+                belong:document.etc['customerkind'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });

+ 81 - 9
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -25,7 +25,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         vendorkind:{
             fields:[
@@ -44,7 +52,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         productkind:{
             fields:[
@@ -63,7 +79,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         productbrand:{
             fields:[
@@ -82,7 +106,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         bankinformation:{
             fields:[
@@ -106,7 +138,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         inoutkind:{ 
             fields:[
@@ -126,7 +166,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         warehouse: {
             fields:[
@@ -148,7 +196,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         address: {
             fields:[
@@ -168,7 +224,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         productunit: {
             fields:[
@@ -187,7 +251,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         }
     }
 });

+ 2 - 29
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -6,39 +6,12 @@ Ext.define('saas.view.document.product.BasePanel', {
     viewModel: 'document-product-basepanel',
 
     searchField:[{
+        editable:false,
         hiddenBtn:true,
         xtype : "remotecombo", 
         storeUrl: '/api/document/producttype/getCombo',
         name : "pr_type", 
-        emptyText : "请选择物料类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
-        columnWidth : 0.25,
-        etc:{
-            producttype:{
-                keyField:'id',
-                dataField:'pr_name',
-                reqUrl:'/api/document/producttype/save',
-                delUrl:'/api/document/producttype/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增物料类型'
-                },
-                dataKind:'producttype',
-                belong:this.ownerCmp.etc['producttype'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
+        emptyText : "请选择物料类型"
     }],
 
     //字段属性

+ 20 - 45
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -51,92 +51,66 @@ Ext.define('saas.view.document.product.FormPanel', {
         allowBlank: true,
         columnWidth: 0.25
     },{
+        editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/producttype/getCombo',
         name : "pr_type", 
         fieldLabel : "物料类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            producttype:{
-                keyField:'id',
-                dataField:'pr_name',
-                reqUrl:'/api/document/producttype/save',
-                delUrl:'/api/document/producttype/delete'
-            }
-        },
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料类型'
+                    title: '新增供应商类型'
                 },
                 dataKind:'producttype',
-                belong:this.ownerCmp.etc['producttype'],
+                belong:document.etc['producttype'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });
             this.dialog.show();
         }
     },{
+        editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/product/getProdUnit',
+        storeUrl:'/api/document/productunit/getCombo',
         name : "pr_unit", 
-        bind : "{pr_unit}", 
         fieldLabel : "物料单位", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            produnit:{
-                keyField:'id',
-                dataField:'vk_name',
-                reqUrl:'/api/document/produnit/save',
-                delUrl:'/api/document/produnit/delete'
-            }
-        },
+        editable:false,
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
                     title: '新增物料单位'
                 },
-                dataKind:'vendorkind',
-                belong:this.ownerCmp.etc['vendorkind'],
+                dataKind:'productunit',
+                belong:document.etc['productunit'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });
             this.dialog.show();
         }
     },{
+        editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/product/getProdBrand',
+        storeUrl:'/api/document/productbrand/getCombo',
         name : "pr_brand", 
-        bind : "{pr_brand}", 
         fieldLabel : "物料品牌", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            productbrand:{
-                keyField:'id',
-                dataField:'pb_name',
-                reqUrl:'/api/document/productbrand/save',
-                delUrl:'/api/document/productbrand/delete'
-            }
-        },
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
@@ -144,8 +118,9 @@ Ext.define('saas.view.document.product.FormPanel', {
                     title: '新增物料单位'
                 },
                 dataKind:'productbrand',
-                belong:this.ownerCmp.etc['productbrand'],
+                belong:document.etc['productbrand'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });

+ 8 - 26
frontend/saas-web/app/view/document/vendor/BasePanel.js

@@ -5,37 +5,13 @@ Ext.define('saas.view.document.vendor.BasePanel', {
     viewModel: 'document-vendor-basepanel',
 
     searchField:[{
+        editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/vendorkind/getCombo',
         name : "ve_type", 
         emptyText : "请选择供应商类型", 
         columnWidth : 0.25,
-        hiddenBtn:true,
-        etc:{
-            vendorkind:{
-                keyField:'id',
-                dataField:'vk_name',
-                reqUrl:'/api/document/vendorkind/save',
-                delUrl:'/api/document/vendorkind/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            var document = Ext.create('document-kind',{});
-            debugger
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增供应商类型'
-                },
-                dataKind:'vendorkind',
-                belong:this.ownerCmp.etc['vendorkind'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
+        hiddenBtn:true
     }],
 
     //字段属性
@@ -69,6 +45,12 @@ Ext.define('saas.view.document.vendor.BasePanel', {
             width : 120.0, 
             xtype : "", 
         }, 
+        {
+            text : "供应商类型", 
+            dataIndex : "ve_type", 
+            width : 120.0, 
+            xtype : "", 
+        }, 
         {
             text : "供应商状态", 
             dataIndex : "ve_status", 

+ 6 - 19
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -78,32 +78,19 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:'/api/document/fundinoutType/list',
-                    name : "ord_type", 
-                    fieldLabel : "收入类别", 
-                    allowBlank : true, 
-                    queryMode: 'local',
-                    displayField: 'display',
-                    valueField: 'value',
-                    columnWidth : 0.25,
-                    etc:{
-                        inoutkind:{
-                            keyField:'id',
-                            dataField:'ft_name',
-                            reqUrl:'/api/document/fundinoutType/save',
-                            delUrl:'/api/document/fundinoutType/delete'
-                        }
-                    },
+                    storeUrl:'/api/document/inoutkind/getCombo',
                     addHandler:function(b){
-                        var form = this.ownerCmp.ownerCt.ownerCmp.ownerCt;
+                        var document = Ext.create('saas.view.document.kind.Kind',{});
+                        var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
                         this.dialog = form.getController().getView().add({
                             xtype: 'document-kind-childwin',
                             bind: {
-                                title: '新增收入类型'
+                                title: '新增收入类别类型'
                             },
                             dataKind:'inoutkind',
-                            belong:this.ownerCmp.etc['inoutkind'],
+                            belong:document.etc['inoutkind'],
                             _parent:form,
+                            _combo:this.ownerCmp,
                             record:null,
                             session: true
                         });

+ 6 - 19
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -78,32 +78,19 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:'/api/document/fundinoutType/list',
-                    name : "osd_type", 
-                    fieldLabel : "支出类别", 
-                    allowBlank : true, 
-                    queryMode: 'local',
-                    displayField: 'display',
-                    valueField: 'value',
-                    columnWidth : 0.25,
-                    etc:{
-                        inoutkind:{
-                            keyField:'id',
-                            dataField:'ft_name',
-                            reqUrl:'/api/document/fundinoutType/save',
-                            delUrl:'/api/document/fundinoutType/delete'
-                        }
-                    },
+                    storeUrl:'/api/document/inoutkind/getCombo',
                     addHandler:function(b){
-                        var form = this.ownerCmp.ownerCt.ownerCmp.ownerCt;
+                        var document = Ext.create('saas.view.document.kind.Kind',{});
+                        var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
                         this.dialog = form.getController().getView().add({
                             xtype: 'document-kind-childwin',
                             bind: {
-                                title: '新增收入类型'
+                                title: '新增收入类别类型'
                             },
                             dataKind:'inoutkind',
-                            belong:this.ownerCmp.etc['inoutkind'],
+                            belong:document.etc['inoutkind'],
                             _parent:form,
+                            _combo:this.ownerCmp,
                             record:null,
                             session: true
                         });