Browse Source

Merge remote-tracking branch 'origin/dev' into dev

heqinwei 7 years ago
parent
commit
44c88dba42

+ 5 - 3
frontend/saas-web/app/view/core/base/GridPanel.js

@@ -12,9 +12,11 @@ Ext.define('saas.view.core.base.GridPanel', {
     requires: [
         'Ext.grid.plugin.Exporter'
     ],
-    plugins: {
-        gridexporter: true
-    },
+    plugins: [{
+        ptype: 'gridexporter',
+    }, {
+        ptype: 'menuclipboard'
+    }],
 
     cls:'core-base-gridpanel',
     

+ 6 - 44
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -139,9 +139,11 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 sortableColumns: false,
                 enableColumnHide: false,
                 rowLines: false,
-                plugins: {
-                    gridexporter: true
-                },
+                plugins: [{
+                    ptype: 'gridexporter',
+                }, {
+                    ptype: 'menuclipboard'
+                }],
                 features: [{
                     ftype: 'groupingsummary',
                     hideGroupedHeader: false,
@@ -159,15 +161,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
                     displayInfo: true,
                     store: store
                 }],
-                actions: {
-                    copy: {
-                        iconCls: 'x-fa fa-copy',
-                        text: '复制单元格',
-                        handler: function() {
-                            me.onCopy(me.selectedData);
-                        }
-                    }
-                },
                 viewConfig: {
                     deferEmptyText: false,
                     emptyText: '无数据',
@@ -217,7 +210,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
             proxy: {
                 type: 'ajax',
                 url: me.listUrl,
-                // url: 'http://192.168.253.58:8560/api/sale/report/saleDetail',
                 timeout: 8000,
                 actionMethods: {
                     read: 'GET'
@@ -276,10 +268,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 }
             },
             listeners: {
-                load: function() {
-                    var grid = me.items.items[1];
-                    grid.fireEvent('mysummarychange', grid);
-                },
                 beforeload: function (store, op) {
                     var condition = me.getConditions(),
                     defaultCondition = me.defaultCondition,
@@ -578,31 +566,5 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
     applyParams: function(p) {
         return p;
-    },
-
-    getContextMenu: function() {
-        var me = this,
-        grid = me.items.items[1];
-
-        return grid.contextMenu || (grid.contextMenu = grid.add({
-            xtype: 'menu',
-            items: [
-                // Actions can be converted into MenuItems
-                '@copy',
-            ]
-        }));
-    },
-
-    onCopy: function(text) {
-		var target = Ext.DomHelper.append(document.body, {
-			tag: 'textarea',
-			style: 'opacity: 0;position: absolute;top: -10000px;right: 0;',
-			html: text
-		});
-		target.focus();
-		target.select();
-	    document.execCommand('Copy');
-	    target.blur();
-	    document.body.removeChild(target);
-	},
+    }
 });

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

@@ -64,6 +64,9 @@ Ext.define('saas.view.document.kind.Kind', {
         margin: '10 0 0 0',
         flex: 1,
         frame:true,
+        plugins: [{
+            ptype: 'menuclipboard'
+        }],
         bind:{
             selection: '{selectedCompany}'
         },

+ 8 - 6
frontend/saas-web/app/view/main/Navigation.scss

@@ -127,16 +127,17 @@ $nav-font-color-over: #fff;
         border-bottom-right-radius: 4px;
 
         .menu {
+            width: 200px;
+            letter-spacing: 1px;
+            display: flex;
+            flex-direction: column;
 
-            &:first-child {
+            &:nth-child(2) {
                 .menu-content {
-                    border-right: 1px dashed #dce2e4;
+                    border-left: 1px dashed #dce2e4;
                 }
             }
 
-            width: 200px;
-            letter-spacing: 1px;
-
             .menu-title {
                 padding-left: 30px;
                 background: #EEF9FE;
@@ -152,7 +153,8 @@ $nav-font-color-over: #fff;
             }
 
             .menu-content {
-
+                height: 100%;
+                
                 .menuitem {
                     padding-left: 25px;
                     margin: 6px;

+ 1 - 1
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -30,7 +30,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         name: 'id',
         fieldLabel: 'id'
     }, {
-        xtype: 'textfield',
+        xtype: 'hidden',
         name: 'pb_kind',
         fieldLabel: '单据类型',
         defaultValue: '付款单',

+ 1 - 1
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -33,7 +33,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         name: 'rb_custid',
         fieldLabel: '客户ID'
     }, {
-        xtype: 'textfield',
+        xtype: 'hidden',
         name: 'rb_kind',
         fieldLabel: '单据类型',
         defaultValue: '收款单',

+ 4 - 0
frontend/saas-web/app/view/money/report/PayDetail.js

@@ -137,5 +137,9 @@ Ext.define('saas.view.money.report.PayDetail', {
             text: '备注',
             dataIndex: 'pi_remark',
             width: 250
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pi_vendname',
+            hidden:true
         }]
 });

+ 5 - 0
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -54,6 +54,7 @@ Ext.define('saas.view.money.report.RecDetail', {
             width: 110
         }, {
             text: '单据日期',
+            xtype: 'datecolumn',
             dataIndex: 'rb_date',
             width: 110
         }, {
@@ -134,5 +135,9 @@ Ext.define('saas.view.money.report.RecDetail', {
             text: '备注',
             dataIndex: 'pd_unit',
             width: 250
+        }, {
+            text: '客户名称',
+            dataIndex: 'pi_custname',
+            hidden:true
         }]
 });

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -41,7 +41,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         allowBlank: true,
         columnWidth: 0
     },{
-        xtype : "textfield", 
+        xtype : "hidden", 
         name : "pi_class", 
         fieldLabel : "单据类型", 
         readOnly:true,

+ 1 - 0
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -66,6 +66,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         name: 'pd_whname',
         fieldLabel: '仓库',
         emptyText:'请输入仓库编号或名称',
+        showDetail: true
     }, {
         xtype: 'textfield',
         name: 'pi_pucode',

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -35,7 +35,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         name: 'pi_ioid',
         fieldLabel: 'pi_ioid'
     },{
-        xtype : "textfield", 
+        xtype : "hidden", 
         name : "pi_class", 
         fieldLabel : "单据类型", 
         readOnly:true,

+ 2 - 23
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -64,30 +64,9 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         allowBlank : false
     }, {
         name : "sa_toplace", 
-        editable:false,
-        xtype : "remotecombo", 
-        storeUrl:'/api/document/address/getCombo',
+        xtype : "textfield", 
         fieldLabel : "交货地址", 
-        allowBlank : false, 
-        columnWidth : 0.5,
-        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',
-                bind: {
-                    title: '新增交货地址'
-                },
-                dataKind:'address',
-                belong:document.etc['address'],
-                _parent:form,
-                _combo:this.ownerCmp,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }
+        columnWidth : 0.5
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 

+ 1 - 1
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -30,7 +30,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         name: 'id',
         fieldLabel: 'id'
     }, {
-        xtype : "textfield", 
+        xtype : "hidden", 
         name : "pi_class", 
         fieldLabel : "单据类型", 
         readOnly:true,

+ 1 - 1
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -40,7 +40,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
         name: 'id',
         fieldLabel: 'id'
     }, {
-        xtype : "textfield", 
+        xtype : "hidden", 
         name : "pi_class", 
         fieldLabel : "单据类型", 
         readOnly:true,

+ 1 - 1
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -31,7 +31,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
         allowBlank: true,
         columnWidth: 0
     },{
-        xtype : "textfield", 
+        xtype : "hidden", 
         name : "pi_class", 
         fieldLabel : "单据类型", 
         readOnly:true,

+ 14 - 15
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -17,17 +17,17 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         'Ext.selection.CellModel',
         'Ext.grid.plugin.Exporter'
     ],
-    plugins: {
-        cellediting: {
-            clicksToEdit: 1,
-            listeners: {
-                // edit: function(editor, context, eOpts) {
-                //     context.column.fireEvent('edit', context.value);
-                // }
-            }
-        },
-        gridexporter: true
+    plugins: [ 
+    {
+        ptype: 'cellediting',
+        clicksToEdit: 1
     },
+    {
+        ptype: 'gridexporter',
+    },
+    {
+        ptype: 'menuclipboard'
+    }],
     tbar: [{
         xtype: 'warehouseDbfindTrigger',
         name: 'wh_description',
@@ -44,8 +44,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         name : "pr_kind",
         bind: '{form.pr_kind}',
         emptyText : "类型",
-        hiddenBtn:true, 
-        allowBlank : false,
+        hiddenBtn:true,
         width:150
     },{
         // xtype: 'productDbfindTrigger',
@@ -54,9 +53,9 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         emptyText:'输入物料编号或名称',
         width:200,
         bind: '{form.pr_detail}',
-        getCondition: function(value) {
-            if(value) {
-                return 'pr_detail like %' + value + '% or pr_code like%' + value + '%';
+        getCondition: function(v) {
+            if(v) {
+                return "(upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
             }else {
                 return '1 = 1';
             }

+ 10 - 8
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -391,14 +391,16 @@ Ext.define('saas.view.stock.make.FormPanel', {
         controller = me.getController(),
         viewModel = me.getViewModel(),
         grid = me.down('detailGridField'),
-        data = grid.getTrueData()
-        str='';
-        Ext.Array.each(data,function(item){
-            if(item.mm_price==0){     
-                str=str+item.mm_detno+'行'+item.mm_prodcode+'物料成本单价为0!'+'<br>'
-            }
-        });
-    
+        data = grid.getTrueData(),
+        str='',
+        type = viewModel.get('ma_type');
+        if ('拆件' == type) {
+            Ext.Array.each(data,function(item){
+                if(item.mm_price==0){     
+                    str=str+item.mm_detno+'行'+item.mm_prodcode+'物料成本单价为0!'+'<br>'
+                }
+            });
+        }
         if(str!=''){
             saas.util.BaseUtil.showConfirm('提示',str)
             .then(function(y) {

+ 0 - 53
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -101,59 +101,6 @@ Ext.define('saas.view.stock.make.FormPanelController', {
 
         });
     },
-    initCopyData: function (formData) {
-        var me = this;
-        var form = this.getView();
-        var detailCount = form.detailCount;
-        var main = formData.main;
-        var auditTexts = form.auditTexts;
-
-        // 单号、id清空
-        main[form._idField] = 0;
-        main[form._codeField] = '';
-        // 单据状态为录入状态(未审核)
-        main[form._statusCodeField] = auditTexts.unAuditCode;
-        main[form._statusField] = auditTexts.unAuditText;
-        //录入人,录入日期,审核人,审核日期清空
-        main['creatorId'] = null;
-        main['creatorName'] = null;
-        main['createTime'] = null;
-        main['updaterId'] = null;
-        main['updaterName'] = null;
-        main['updateTime'] = null;
-        main[form._auditmanField] = null;
-        main[form._auditdateField] = null;
-        //数量,单价,金额(主表)
-        main['ma_qty'] = 0;
-        main['ma_price'] = 0;
-        main['ma_total'] = 0;
-        for (var k in main) {
-            // 主表日期改为当前日期
-            if (saas.util.BaseUtil.isDateString(main[k])) {
-                main[k] = Ext.Date.format(new Date, 'Y-m-d H:i:s');
-            }
-        }
-
-        for (var j = 0; j < detailCount; j++) {
-            var detail = formData['detail' + j];
-            for (var x = 0; x < detail.length; x++) {
-                var d = detail[x];
-
-                for (var k in d) {
-                    // 从表id清空
-                    delete d['id'];
-                    delete d['mm_price'];
-                    delete d['mm_qty'];
-                    delete d['mm_amount'];
-                    // 从表日期清空
-                    if (saas.util.BaseUtil.isDateString(d[k])) {
-                        d[k] = '';
-                    }
-                }
-            }
-        }
-        return me.myInitCopyData(formData);;
-    },
     price_change: function (v) {
         var me = this,
             viewModel = me.getViewModel(),

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -34,7 +34,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
         allowBlank: true,
         columnWidth: 0
     },{
-        xtype : "textfield", 
+        xtype : "hidden", 
         name : "pi_class", 
         fieldLabel : "单据类型", 
         readOnly:true,

+ 1 - 1
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -33,7 +33,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
         allowBlank: true,
         columnWidth: 0
     }, {
-        xtype: "textfield",
+        xtype: "hidden",
         name: "pi_class",
         fieldLabel: "单据类型",
         readOnly: true,

+ 4 - 0
frontend/saas-web/ext/packages/ux/src/feature/MySummary.js

@@ -30,6 +30,10 @@ Ext.define('Ext.ux.feature.MySummary', {
 
         me.callParent([grid]);
 
+        grid.store.on('load', function() {
+            this.fireEvent('mysummarychange', grid);
+        }, grid);
+
         grid.on({
             mysummarychange: me.refreshData,
             scope: me