Browse Source

代码提交

hy 7 years ago
parent
commit
daeb60b0d5

+ 0 - 1
frontend/saas-web/app/view/core/baseform/FormPanel.js

@@ -12,7 +12,6 @@ Ext.define('saas.view.core.baseform.FormPanel', {
     layout: 'column',
     autoScroll: true,
     border: 1,
-    bodyPadding: 5,
     searchField:[],
 
     fieldDefaults: {

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.core.baseform.GridPanel', {
             me.store = Ext.create('Ext.data.Store',{
                 fields:fields,
                 autoLoad: true,
-                pageSize: 6,
+                pageSize: 10,
                 data: [],
                 proxy: {
                     type: 'ajax',

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

@@ -12,7 +12,6 @@ Ext.define('saas.view.document.customer.FormPanel', {
     layout: 'fit',
     autoScroll: true,
     border: 1,
-    bodyPadding: 5,
 
     fieldDefaults: {
         margin: '0 5 5 0',
@@ -23,7 +22,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
 
     //字段属性
     _title:'客户管理',
-    _dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+    _dataUrl:'http://192.168.253.228:9480/customer/list',
     _saveUrl:'http://192.168.253.228:8800/api/document/vendor/save',
     _deleteUrl:'http://192.168.253.228:8800/api/document/vendor/delete',
 
@@ -34,6 +33,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 name : "vendorGrid", 
                 xtype : "core-baseform-gridpanel", 
                 layout:'fit',
+                margin:'',
                 dataUrl:me._dataUrl,
                 columns : [
                     {

+ 13 - 2
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -54,10 +54,21 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         productkind:{
             items:[{
                 xtype:'hidden',
-                name:'pk_id'
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'pt_name',
+                allowBlank:false,
+                fieldLabel:'类型'
+            }],
+        },
+        productbrand:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
             },{
                 xtype:'textfield',
-                name:'pk_kind',
+                name:'pb_name',
                 allowBlank:false,
                 fieldLabel:'类型'
             }],

+ 19 - 4
frontend/saas-web/app/view/document/kind/Kind.js

@@ -10,6 +10,7 @@ Ext.define('saas.view.document.kind.Kind', {
     viewModel: {
         type: 'document-kind'
     },
+    defaultType:'',
     tbar: [{
         xtype: 'segmentedbutton',
         reference: 'dataKind',
@@ -78,16 +79,30 @@ Ext.define('saas.view.document.kind.Kind', {
             }],
             keyField:'id',
             dataField:'vk_name',
-            reqUrl:'http://192.168.253.41:9480/api/document/vendorkind/save',
-            delUrl:'http://192.168.253.41:9480/api/document/vendorkind/delete'
+            reqUrl:'http://192.168.253.41:9480/vendorkind/save',
+            delUrl:'http://192.168.253.41:9480/vendorkind/delete'
         },
         productkind:{
             columns: [{
                 text: '物料类型',
-                dataIndex: 'pk_kind',
+                dataIndex: 'pt_name',
                 flex: 1
             }],
-            keyField:'pk_id',
+            keyField:'id',
+            dataField:'pt_name',
+            reqUrl:'http://192.168.253.41:9480/producttype/save',
+            delUrl:'http://192.168.253.41:9480/producttype/delete'
+        },
+        productbrand:{
+            columns: [{
+                text: '物料类型',
+                dataIndex: 'pb_name',
+                flex: 1
+            }],
+            keyField:'id',
+            dataField:'pb_name',
+            reqUrl:'http://192.168.253.41:9480/productbrand/save',
+            delUrl:'http://192.168.253.41:9480/productbrand/delete'
         },
         inoutkind:{
             columns: [{

+ 9 - 6
frontend/saas-web/app/view/document/kind/KindController.js

@@ -8,12 +8,15 @@ Ext.define('saas.view.document.kind.KindController', {
     FormUtil: Ext.create('saas.util.FormUtil'),
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     loadDefualt:function(grid){
-        var me=this,
-            view = me.getView(),
-            vm = me.getViewModel(),
-            defaultKind=vm.getData()['dataKind'].value,
-            etc = view.etc[defaultKind];
-
+        var me=this,view = me.getView(),vm = me.getViewModel(),defaultKind;
+        if(view.defaultType!=''){
+            defaultKind = view.defaultType  //其他单表界面
+            vm.setData({'dataKind':{'value':defaultKind}});
+            debugger
+        }else{
+            defaultKind=vm.getData()['dataKind'].value  //类别合并界面
+        }
+        var etc = view.etc[defaultKind];
         grid.reconfigure(vm.getStore(defaultKind), me.insertActionColumn(etc.columns));
     },
     onKindToggle:function(container, button, pressed){

+ 36 - 5
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -34,7 +34,7 @@ Ext.define('saas.view.document.kind.KindModel', {
             ],
             proxy: {
                 type: 'ajax',
-                url: 'http://192.168.253.41:9480/api/document/vendorkind/getAll',
+                url: 'http://192.168.253.41:9480/vendorkind/getAll',
                 actionMethods: {
                     read: 'GET'
                 },
@@ -44,14 +44,45 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: true
         },
         productkind:{
             fields:[
-                {name: 'pk_id', type: 'int'},
-                {name: 'pk_kind',  type: 'string'}
+                {name: 'id', type: 'int'},
+                {name: 'pt_name',  type: 'string'}
             ],
-            data:[]
+            proxy: {
+                type: 'ajax',
+                url: 'http://192.168.253.41:9480/producttype/getAll',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: true
+        },
+        productbrand:{
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'pb_name',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: 'http://192.168.253.41:9480/productbrand/getAll',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: true
         },
         inoutkind:{
             fields:[

+ 25 - 0
frontend/saas-web/app/view/document/other/ProductBrand.js

@@ -0,0 +1,25 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.other.ProductBrand', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'other-productbrand',
+    autoScroll: true,
+    layout:'fit',
+    defaultType:'productbrand',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }]
+})
+
+

+ 4 - 0
frontend/saas-web/resources/json/navigation.json

@@ -214,6 +214,10 @@
             "text": "收入类别",
             "viewType": "document-kind",
             "leaf": true
+        }, {
+            "text": "物料品牌",
+            "viewType": "other-productbrand",
+            "leaf": true
         }, {
             "text": "计量单位",
             "viewType": "mainlist",