Ver Fonte

代码提交

hy há 7 anos atrás
pai
commit
f457aae23d

+ 15 - 0
frontend/saas-web/app/model/document/ProductDetail.js

@@ -0,0 +1,15 @@
+Ext.define('saas.model.document.ProductDetail', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'pd_prodid', type: 'int' },
+        { name: 'pd_prodcode', type: 'string' },
+        { name: 'pd_detno', type: 'int' },
+        { name: 'pd_whcode', type: 'string' },
+        { name: 'pd_whname', type: 'string' },
+        { name: 'pd_whid', type: 'int' },
+        { name: 'pd_price', type: 'string' },
+        { name: 'pd_amount', type: 'int' },
+        { name: 'pd_num', type: 'int' }
+    ]
+});

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

@@ -215,7 +215,6 @@ Ext.define('saas.view.document.customer.FormPanel', {
         hidden:true,
         columnWidth : 0
     }, {
-        height: 169,
         xtype : "detailGridField", 
         storeModel:'saas.model.document.customercontact',
         detnoColumn: 'cc_detno',
@@ -321,7 +320,6 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 }
             }]
     } ,{
-        height: 169,
         xtype : "detailGridField", 
         storeModel:'saas.model.document.customeraddress',
         detnoColumn: 'ca_detno',

+ 65 - 0
frontend/saas-web/app/view/document/product/FormController.js

@@ -133,6 +133,71 @@ Ext.define('saas.view.document.product.FormController', {
                     }) ;   
 
                 }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_whname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/warehouse/list',
+                        addXtype: 'other-warehouse',
+                        addTitle: '仓库资料',
+                        defaultCondition:"wh_statuscode='OPEN'",
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'pd_whid',ignore:true
+                        }, {
+                            from: 'wh_code',
+                            to: 'pd_whcode'
+                        }, {
+                            from: 'wh_description',
+                            to: 'pd_whname'
+                        }],
+                        dbtpls: [{
+                            field: 'pd_whcode',
+                            width: 100
+                        }, {
+                            field: 'pd_whname',
+                            width: 100
+                        }],
+                        dbSearchFields:[{
+                            emptyText:'输入仓库编号或名称',
+                            xtype : "textfield", 
+                            name : "wh_code", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(wh_code) like '%"+v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%')";
+                            }
+                        }],                        
+                        dbColumns: [{
+                            "text": "仓库ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库编号",
+                            "flex": 1,
+                            "dataIndex": "wh_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库名称",
+                            "flex": 1,
+                            "dataIndex": "wh_description",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库类型",
+                            "flex": 1,
+                            "dataIndex": "wh_type",
+                            "xtype": "",
+                            "items": null
+                        }]
+                    });
+                },
             }
         });
 

+ 124 - 0
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -197,6 +197,130 @@ Ext.define('saas.view.document.product.FormPanel', {
         xtype : "datefield", 
         name : "updateTime", 
         fieldLabel : "更新时间"
+    },{
+        xtype : "detailGridField", 
+        storeModel:'saas.model.document.ProductDetail',
+        detnoColumn: 'pd_detno',
+        showCount: false,
+        deleteDetailUrl:'/api/document/customer/delete/',
+        columns : [{
+            text : "ID", 
+            dataIndex : "id", 
+            hidden : true,  
+            xtype : "numbercolumn"
+        },
+        {
+            text : "物料ID", 
+            dataIndex : "pd_prodid", 
+            hidden : true,  
+            xtype : "numbercolumn"
+        },
+        {
+            allowBlank:false,
+            text : "仓库编号", 
+            editor : {
+                displayField : "display", 
+                editable : true, 
+                format : "", 
+                hideTrigger : false, 
+                maxLength : 100.0, 
+                minValue : null, 
+                positiveNum : false, 
+                queryMode : "local", 
+                store : null, 
+                valueField : "value", 
+                xtype : "dbfindtrigger"
+            },
+            dataIndex : "pd_whcode", 
+            xtype : "", 
+            items : null
+        },
+        {
+            allowBlank:true,
+            readOnly:true,
+            editable:false,
+            text : "仓库名称", 
+            dataIndex : "pd_whname", 
+            xtype : "", 
+        },{
+            allowBlank:true,
+            hidden:true,
+            text : "仓库ID", 
+            dataIndex : "pd_whid", 
+            xtype : "numberfield", 
+        },
+        {
+            allowBlank:true,
+            text : "期初数量", 
+            dataIndex : "pd_num", 
+            xtype: 'numbercolumn',
+            width : 120.0,
+            allowBlank : false,
+            editor : {
+                xtype : "numberfield",
+                decimalPrecision: 0,
+                minValue:0
+            },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
+        },
+        {
+            text : "单位成本", 
+            dataIndex : "pd_price", 
+            allowBlank:false,
+            xtype: 'numbercolumn',
+            width : 120.0,
+            allowBlank : false,
+            editor : {
+                xtype : "numberfield",
+                decimalPrecision: 8,
+                minValue:0
+            },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
+        },
+        {
+            text : "期初总价", 
+            dataIndex : "pd_amount", 
+            xtype: 'numbercolumn',
+            width : 120.0,
+            allowBlank : true,
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
+        }]
     }],
 
     defaultButtons:[{

+ 3 - 5
frontend/saas-web/app/view/main/Main.js

@@ -68,7 +68,7 @@ Ext.define('saas.view.main.Main', {
                     iconCls:'x-fa fa-question',
                     ui: 'header',
                     arrowVisible: false,
-                    //tooltip: '帮助',
+                    tooltip: '帮助',
                     width:50, 
                     listeners:{
                         'mouseover':function(){
@@ -82,9 +82,10 @@ Ext.define('saas.view.main.Main', {
                             }
                         },'mouseleave':function(enu){
                             this.hide();
-                        } 
+                        }
                     },
                     menu: {
+                        cls:'x-main-menu',
                         items: [{
                             text: '新手导航',
                             iconCls:'x-fa icon-userGuite',
@@ -125,9 +126,6 @@ Ext.define('saas.view.main.Main', {
                     cls: 'header-right-profile-image',
                     height: 70,
                     width: 70,
-                   /*  bind: {
-                        src: '{avatarUrl}'
-                    }, */
                     menu: {
                         items: [ {  
                             text: '账户中心',

+ 27 - 0
frontend/saas-web/app/view/main/Main.scss

@@ -217,6 +217,12 @@ body > .x-mask {
     background-size: 16px 16px;
     background-position: center;
 } 
+.user-icon{
+    margin-top: 0px;
+    background: url(../../../../resources/images/default/user-icon.png) 0 0 no-repeat; 
+    background-size: 32px 32px;
+    background-position: center;
+}
 .x-guide-mask{
     -webkit-filter: grayscale(100%);
     -moz-filter: grayscale(100%);
@@ -225,3 +231,24 @@ body > .x-mask {
     filter: grayscale(100%);
     filter: gray;
 }
+.x-main-menu::before{
+    content: ' ';
+    display: block;
+    border-style: solid;
+    box-shadow: 0px 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(15, 136, 232, 0.6);
+    box-shadow: aliceblue;
+    border-width: 17px;
+    border-color: #cccccc;
+    /* border-color: #cccccc #6e838e #9c9d9e #bdc3c5; */
+    position: fixed;
+    /* left: 100%; */
+    top: 26px;
+    -moz-clip-path: polygon(100% 0px, 0 50%, 100% 100%);
+    -webkit-clip-path: polygon(100% 0px, 0 50%, 100% 100%);
+    -o-clip-path: polygon(100% 0px, 0 50%, 100% 100%);
+    -ms-clip-path: polygon(100% 0px, 0 50%, 100% 100%);
+    -khtml-clip-path: polygon(100% 0px, 0 50%, 100% 100%);
+    clip-path: polygon(0 100%, 50% 0, 100% 100%);
+    margin-top: 17px;
+    margin-left: 7px;
+}

+ 4 - 21
frontend/saas-web/app/view/sys/guide/FormPanel.js

@@ -31,7 +31,7 @@ Ext.define('saas.view.sys.guide.FormPanel', {
                 },{
                     name:'begin',type:'boolean'
                 }],
-				autoLoad: true,
+				autoLoad: false,
                 pageSize: 10,
                 data: [{
                     baseSet:false,
@@ -157,30 +157,12 @@ Ext.define('saas.view.sys.guide.FormPanel', {
     },
 
     refresh:function(){
+        debugger
         this.ownerCt.setTitle('新手指引');
+        this.view.store.load();
         //刷新store数据
     },
 
-    getData:function(store){
-        var me = this;
-        //获取数据
-        me.BaseUtil.request({
-            url: me.dataUrl,
-            params: '',
-            method: 'GET',
-        })
-        .then(function(localJson) {
-            if(localJson.success){
-                store;
-                debugger
-            }
-        })
-        .catch(function(res) {
-            console.error(res);
-            showToast('读取初始化信息失败: ' + res.message);
-        });
-    },
-
     showInformation:function(type,value){
         var message = '';
         var xtype = '';
@@ -233,6 +215,7 @@ Ext.define('saas.view.sys.guide.FormPanel', {
         var width = box.width;
 
         var win = form.add(Ext.create('Ext.window.MessageBox', {
+            msg:message,
             buttonAlign : 'right',
             height:0.5*height,
             width:0.5*width,

+ 47 - 0
frontend/saas-web/app/view/sys/manager/FormPanel.js

@@ -0,0 +1,47 @@
+Ext.define('saas.view.sys.manager.FormPanel', {
+    extend: 'Ext.tab.Panel',
+    xtype: 'sys-manager-formpanel',
+    
+    layout:'fit',
+
+    bodyCls:'x-manager-background',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+
+    tabBar: {
+        layout: {
+            pack: 'left'
+        },
+        border: false
+    },
+
+    defaults: {
+        iconAlign: 'left',
+        bodyPadding: 15
+    },
+
+    items: [{
+        icon:'x-fa fa-key',
+        title: '公司设置',
+        xtype:'sys-config-formpanel'
+    }, {
+        icon:'x-fa fa-key',
+        title: '账户设置',
+        xtype:'panel' 
+    }, {
+        icon:'x-fa fa-key',
+        title: '权限设置',
+        xtype:'sys-power-formpanel'
+    }],
+
+    initComponent: function () {
+        var me = this;
+        me.callParent(arguments);
+    },
+
+    refresh:function(){
+        this.ownerCt.setTitle('系统管理');
+    },
+
+});

BIN
frontend/saas-web/resources/images/default/user-icon.png


+ 7 - 2
frontend/saas-web/resources/json/navigation.json

@@ -288,9 +288,14 @@
             "text": "新手导航",
             "viewType": "sys-guide-formpanel",
             "leaf": true
-        }, {
+        },{  
+            "id":"sys-manager-formpanel",
+            "text": "系统管理",
+            "viewType": "sys-manager-formpanel",
+            "leaf": true
+        }, {  
             "id":"sys-config-formpanel",
-            "text": "系统参数",
+            "text": "公司设置",
             "viewType": "sys-config-formpanel",
             "leaf": true
         }, {