Browse Source

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

heqinwei 7 years ago
parent
commit
7f9c1a0cc1

+ 3 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java

@@ -40,7 +40,7 @@ public enum  BillCodeSeq {
 
     RECBALANCE("收款单", "RecBalance"),
 
-    VERIFICATION("核单", "Verification"),
+    VERIFICATION("核单", "Verification"),
 
     OTHRECEIPTS("其它收入单","OthReceipts"),
 
@@ -50,6 +50,8 @@ public enum  BillCodeSeq {
 
     BOM("BOM资料", "Bom");
 
+
+
     BillCodeSeq(String name, String caller) {
         this.name = name;
         this.caller = caller;

+ 3 - 3
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java

@@ -414,9 +414,9 @@ public class AccountController {
     public Result enableAccount(@RequestParam long accountId) {
         accountService.enable(accountId);
         //同步到优软云
-        Long userUU = accountService.findByPrimaryKey(accountId).getUu();
-        Long companyUU = companyService.findByPrimaryKey(BaseContextHolder.getCompanyId()).getUu();
-        String result = ssoUserApi.bind("bind", "trade-app", userUU, companyUU);
+//        Long userUU = accountService.findByPrimaryKey(accountId).getUu();
+//        Long companyUU = companyService.findByPrimaryKey(BaseContextHolder.getCompanyId()).getUu();
+//        String result = ssoUserApi.bind("bind", "trade-app", userUU, companyUU);
         accountService.clearCache(accountId);
         return Result.success();
     }

+ 3 - 2
base-servers/account/account-server/src/main/resources/application.yml

@@ -53,7 +53,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 8580
   tomcat:
@@ -82,7 +82,8 @@ mybatis:
 auth:
   public-key: auth/pub.key
 sso:
-  base-url: https://sso.ubtob.com
+#  base-url: https://sso.ubtob.com
+  base-url: http://192.168.253.12:32323
 ribbon:
   ReadTimeout: 6000
   ConnectTimeout: 2000

+ 0 - 8
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/api/SsoUserApi.java

@@ -60,9 +60,6 @@ public interface SsoUserApi {
     @PostMapping("")
     String unbind(@RequestParam("_operate") String _operate, @RequestParam("userUU") Long userUU, @RequestParam("spaceUU") Long spaceUU);
 
-    @PostMapping("")
-    String bind(@RequestParam("_operate") String _operate, @RequestParam("appId") String appId, @RequestParam("userUU") Long userUU, @RequestParam("spaceUU") Long spaceUU);
-
     @Component
     class DefaultFallback implements SsoUserApi{
         @Override
@@ -85,10 +82,5 @@ public interface SsoUserApi {
             return null;
         }
 
-        @Override
-        public String bind(String _operate, String appId, Long userUU, Long spaceUU) {
-            return null;
-        }
-
     }
 }

+ 6 - 5
frontend/saas-web/app/view/core/form/DataMultiCombo.js

@@ -49,11 +49,11 @@ Ext.define('saas.view.core.form.DataMultiCombo', {
     },
     listeners:{
         afterrender:function(f){
-            this.mon(f.el,{
-                mouseover: this.onMouseOver,
-                mouseleave:this.onMouseLeave,
-                scope:this
-            });
+            // this.mon(f.el,{
+            //     mouseover: this.onMouseOver,
+            //     mouseleave:this.onMouseLeave,
+            //     scope:this
+            // });
         }
 
     },
@@ -91,6 +91,7 @@ Ext.define('saas.view.core.form.DataMultiCombo', {
             itemsLn = me.datas.length,
             menuItems = [],
             value = me.value;
+        if(value=='') value = []
         for (; i < itemsLn; i++) {
             item = items[i];
             var checked = !!value.find(function(v) {

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

@@ -448,7 +448,7 @@ Ext.define('saas.view.core.form.FormPanel', {
 
     isDirty: function () {
         var me = this,
-        formItems = me.formItems,
+        formItems = me.formItems || [],
         detailGrids = me.query('detailGridField'),
         dirty = false;
 

+ 19 - 3
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -389,10 +389,10 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                                     form.setLoading(false);
                                     var localJson = Ext.decode(response.responseText);
                                     if(localJson.success){
-                                        if(localJson.data.hasRegister){
-                                            saas.util.BaseUtil.showSuccessToast('校验成功:手机号已在优软云注册');
+                                        if(!localJson.data){
+                                            saas.util.BaseUtil.showSuccessToast('校验成功:邮箱未注册');
                                         }else{
-                                            saas.util.BaseUtil.showErrorToast('校验失败:手机号未在优软云注册');
+                                            saas.util.BaseUtil.showErrorToast('校验失败:该邮箱已被注册');
                                             f.setValue('');
                                         }
                                     }else{
@@ -411,6 +411,13 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                         }
                     }
                 }
+            },{
+                xtype:'datamulticombo',
+                dataUrl:'/api/account/role/list',
+                fieldLabel: '关联角色',
+                name: 'roleIds',
+                allowBlank:false,
+                maxLength: 20,
             }]
         },
         warehouse:{
@@ -737,8 +744,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 }
             }
         });
+
+        //更改参数
+        var o = '';
+        var dataField = form.down('[name=roleIds]');
+        Ext.Array.each(dataField.value,function(item) {
+            o+=item.value+','
+        });
+        o = o.substring(0,o.length-1);
         params['username'] = params['mobile'];
         params['type'] = 1;
+        params['roleIds'] = o;
         //保存接口
         saas.util.BaseUtil.request({
             url: belong.reqUrl,

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

@@ -313,14 +313,14 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
+                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + 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 xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }

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

@@ -239,14 +239,14 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
+                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + 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 xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }
@@ -274,14 +274,14 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
+                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + 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 xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }

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

@@ -210,21 +210,16 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 xtype: 'numbercolumn',
                 dataIndex: "pd_total",
                 width: 110.0,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 2,
-                    editable:false
-                },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
+                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + 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 xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }
@@ -245,21 +240,16 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 xtype: 'numbercolumn',
                 dataIndex: "pd_nettotal", 
                 width : 110.0,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 2,
-                    editable:false
-                },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
+                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + 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 xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }

+ 4 - 4
frontend/saas-web/app/view/sys/power/FormPanelController.js

@@ -111,15 +111,15 @@ Ext.define('saas.view.sys.power.FormPanelController', {
         if((typeof modified.fileExport) == 'boolean'){
             powerSetList.push({
                 groupId:groupId,
-                classify:'fileExport',
-                checked:data['fileExport']
+                classify:'export',
+                checked:data['export']
             })
         }
         if((typeof modified.fileImport) == 'boolean'){
             powerSetList.push({
                 groupId:groupId,
-                classify:'fileImport',
-                checked:data['fileImport']
+                classify:'import',
+                checked:data['import']
             })
         }
         if((typeof modified.print) == 'boolean'){

+ 2 - 2
frontend/saas-web/app/view/sys/power/GroupGrid.js

@@ -25,7 +25,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
                 }
             }
         )
-	})],
+    })],
     dataUrl:'/api/account/role/power/resource',
     selModel: {
         showHeaderCheckbox:false,
@@ -79,7 +79,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
             header: '单据名称',
             dataIndex: 'groupName',
             xtype: '',
-            flex: 2,
+            flex: 2.7,
             stopSelection: false,
             menuDisabled:true,
         },{

+ 112 - 0
frontend/saas-web/overrides/grid/buffer/BufferedRenderer.js

@@ -0,0 +1,112 @@
+Ext.define('saas.override.grid.buffer.BufferedRenderer', {
+    override: 'Ext.grid.plugin.BufferedRenderer',
+
+    setViewSize: function(viewSize, fromLockingPartner) {
+        var me = this,
+            store = me.store,
+            view = me.view,
+            ownerGrid,
+            rows = view.all,
+            elCount = rows.getCount(),
+            storeCount = store.getCount(),
+            start, end,
+            lockingPartner = me.view.lockingPartner && me.view.lockingPartner.bufferedRenderer,
+            diff = elCount - viewSize,
+            oldTop = 0,
+            maxIndex = Math.max(0, storeCount - 1),
+            // This is which end is closer to being visible therefore must be the first to have rows added
+            // or the opposite end from which rows get removed if shrinking the view.
+            pointyEnd = Ext.Number.sign((me.getFirstVisibleRowIndex() - rows.startIndex) - (rows.endIndex - me.getLastVisibleRowIndex()));
+        // Synchronize view sizes
+        if (lockingPartner && !fromLockingPartner) {
+            lockingPartner.setViewSize(viewSize, true);
+        }
+        diff = elCount - viewSize;
+        if (diff) {
+            // Must be set for getFirstVisibleRowIndex to work
+            me.scrollTop = me.scroller ? me.scroller.getPosition().y : 0;
+            me.viewSize = viewSize;
+            if (store.isBufferedStore) {
+                store.setViewSize(viewSize);
+            }
+            // If a store loads before we have calculated a viewSize, it loads me.defaultViewSize records.
+            // This may be larger or smaller than the final viewSize so the store needs adjusting when the view size is calculated.
+            if (elCount) {
+                // New start index should be current start index unless that's now too close to the end of the store
+                // to yield a full view, in which case work back from the end of the store.
+                // Ensure we don't go negative.
+                start = Math.max(0, Math.min(rows.startIndex, storeCount - viewSize));
+                // New end index works forward from the new start index ensuring we don't walk off the end
+                end = Math.min(start + viewSize - 1, maxIndex);
+                // Only do expensive adding or removal if range is not already correct
+                if (start === rows.startIndex && end === rows.endIndex) {
+                    // Needs rows adding to or bottom depending on which end is closest
+                    // to being visible (The pointy end)
+                    if (diff < 0) {
+                        me.handleViewScroll(pointyEnd);
+                    }
+                } else {
+                    // While changing our visible range, the locking partner must not sync
+                    if (lockingPartner) {
+                        lockingPartner.disable();
+                    }
+                    // View must expand
+                    if (diff < 0) {
+                        // If it's *possible* to add rows...
+                        if (storeCount > viewSize && storeCount > elCount) {
+                            // Grab the render range with a view to appending and prepending
+                            // nodes to the top and bottom as necessary.
+                            // Store's getRange API always has been inclusive of endIndex.
+                            store.getRange(start, end, {
+                                callback: function(newRecords, start, end) {
+                                    ownerGrid = view.ownerGrid;
+                                    // Append if necessary
+                                    if (end > rows.endIndex) {
+                                        rows.scroll(Ext.Array.slice(newRecords, rows.endIndex + 1, Infinity), 1, 0);
+                                    }
+                                    // Prepend if necessary
+                                    if (start < rows.startIndex) {
+                                        oldTop = rows.first(true);
+                                        rows.scroll(Ext.Array.slice(newRecords, 0, rows.startIndex - start), -1, 0);
+                                        // We just added some rows to the top of the rendered block
+                                        // We have to bump it up to keep the view stable.
+                                        me.bodyTop -= oldTop.offsetTop;
+                                    }
+                                    me.setBodyTop(me.bodyTop);
+                                    // The newly added rows must sync the row heights
+                                    if (lockingPartner && !fromLockingPartner && (ownerGrid.syncRowHeight || ownerGrid.syncRowHeightOnNextLayout)) {
+                                        lockingPartner.setViewSize(viewSize, true);
+                                        ownerGrid.syncRowHeights();
+                                    }
+                                }
+                            });
+                        } else // If not possible just refresh
+                        {
+                            me.refreshView(0);
+                        }
+                    } else // View size is contracting
+                    {
+                        // If removing from top, we have to bump the rendered block downwards
+                        // by the height of the removed rows.
+                        if (pointyEnd === 1) {
+                            oldTop = rows.item(rows.startIndex + diff, true).offsetTop;
+                        }
+                        // Clip the rows off the required end
+                        rows.clip(pointyEnd, diff);
+                        me.setBodyTop(me.bodyTop + oldTop);
+                    }
+                    if (lockingPartner) {
+                        lockingPartner.enable();
+                    }
+                }
+            }
+            // Update scroll range
+            me.refreshSize();
+        }
+        if(this.grid.xtype=='power-grid'){
+            viewSize = 61
+        }
+        return viewSize;
+    },
+});
+