Просмотр исходного кода

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

zhuth 7 лет назад
Родитель
Сommit
58aaeaa141

+ 5 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonController.java

@@ -19,6 +19,11 @@ public class CommonController {
         return Result.success();
         return Result.success();
     }
     }
 
 
+    @GetMapping("/{caller}/import")
+    public Result importExcel(){
+        return Result.success();
+    }
+
     @GetMapping("/{caller}/print")
     @GetMapping("/{caller}/print")
     public Result print() {
     public Result print() {
         return Result.success();
         return Result.success();

+ 2 - 2
applications/commons/commons-server/src/main/resources/mapper/HomePageMapper.xml

@@ -121,7 +121,7 @@
         select concat('[',five_profit,',',other_profit,']') from (
         select concat('[',five_profit,',',other_profit,']') from (
       (
       (
         #前5数据
         #前5数据
-        select group_concat('{"x":"',custname,'","y":',profit,',"z":"',shortname,'"}') five_profit   from (
+        select group_concat('{"x":"',custname,'","y":',profit/10000,',"z":"',shortname,'"}') five_profit   from (
         select sum((ifnull(pd_netprice,0)- ifnull(pd_price,0))*(ifnull(pd_outqty,0) - ifnull(pd_inqty,0))) profit,
         select sum((ifnull(pd_netprice,0)- ifnull(pd_price,0))*(ifnull(pd_outqty,0) - ifnull(pd_inqty,0))) profit,
         pi_custcode,max(pi_custname) custname,max(ifnull(cu_shortname,'')) shortname  from prodinout left join prodiodetail on pi_id=pd_piid left join customer on cu_id=pi_custid
         pi_custcode,max(pi_custname) custname,max(ifnull(cu_shortname,'')) shortname  from prodinout left join prodiodetail on pi_id=pd_piid left join customer on cu_id=pi_custid
         where
         where
@@ -130,7 +130,7 @@
         )five_profit_,
         )five_profit_,
 	  (
 	  (
 	    #其它的数据
 	    #其它的数据
-		select concat('{"z":"其它","x":"其它","y":',all_profit - five_profit,'}') other_profit from (
+		select concat('{"z":"其它","x":"其它","y":',(all_profit - five_profit)/10000,'}') other_profit from (
         #总共
         #总共
         (
         (
         select sum((ifnull(pd_netprice,0)- ifnull(pd_price,0))*(ifnull(pd_outqty,0) - ifnull(pd_inqty,0))) all_profit
         select sum((ifnull(pd_netprice,0)- ifnull(pd_price,0))*(ifnull(pd_outqty,0) - ifnull(pd_inqty,0))) all_profit

+ 2 - 2
applications/money/money-server/src/main/resources/mapper/ProfitdetailMapper.xml

@@ -60,7 +60,7 @@ FROM
       </if>
       </if>
     </where>
     </where>
 		and	pi_id = pd_piid
 		and	pi_id = pd_piid
-		AND pi_custid = cu_id and
+		AND pi_custid = cu_id and pi_status = '已审核' and
 prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodinout.companyid
 prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodinout.companyid
 		GROUP BY
 		GROUP BY
 			pi_custcode,
 			pi_custcode,
@@ -106,7 +106,7 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 			</if>
 			</if>
 		</where>
 		</where>
 		and	pi_id = pd_piid
 		and	pi_id = pd_piid
-		AND pi_custid = cu_id and
+		AND pi_custid = cu_id and pi_status = '已审核' and
 		prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodinout.companyid
 		prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodinout.companyid
 		GROUP BY
 		GROUP BY
 		pi_custcode,
 		pi_custcode,

+ 12 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/RoleDTO.java

@@ -25,6 +25,18 @@ public class RoleDTO extends CommonBaseDTO implements Serializable{
      * 描述
      * 描述
      */
      */
     private String description;
     private String description;
+    /**
+     * 角色
+     */
+    private Integer type;
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
 
 
     public Long getCompanyId() {
     public Long getCompanyId() {
         return companyId;
         return companyId;

+ 1 - 0
frontend/saas-web/app/view/document/bom/BasePanel.js

@@ -51,6 +51,7 @@ Ext.define('saas.view.document.bom.BasePanel', {
     //字段属性
     //字段属性
     _formXtype:'document-bom-formpanel',
     _formXtype:'document-bom-formpanel',
     _title:'BOM资料',
     _title:'BOM资料',
+    caller:'Bom',
     _deleteUrl:'/api/document/bom/delete',
     _deleteUrl:'/api/document/bom/delete',
     _batchOpenUrl:'/api/document/bom/batchOpen',
     _batchOpenUrl:'/api/document/bom/batchOpen',
     _batchCloseUrl:'/api/document/bom/batchClose',
     _batchCloseUrl:'/api/document/bom/batchClose',

+ 14 - 12
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -44,22 +44,15 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 xtype : "customerDbfindTrigger", 
                 xtype : "customerDbfindTrigger", 
                 name : "sa_custname", 
                 name : "sa_custname", 
                 fieldLabel : "客户名称",
                 fieldLabel : "客户名称",
-                allowBlank : false
-            }, {
-                name : "sa_toplace", 
-                xtype : "remotecombo", 
-                fieldLabel : "交货地址", 
-                editable:false,
-                allowBlank : false, 
-                columnWidth : 0.5,
-                storeUrl:'/api/document/customer/getAddressCombo',
-                hiddenBtn:true,//true 则会关闭新增按钮功能
+                allowBlank : false,
                 setValue:function(value){
                 setValue:function(value){
                     var me = this,bind, valueBind;
                     var me = this,bind, valueBind;
+                    var form = me.ownerCt;
+                    var c = form.down('[name=sa_toplace]');
                     if(value&&value!=''){
                     if(value&&value!=''){
-                        me.setDisabled(false);
+                        c.setDisabled(false);
                     }else{
                     }else{
-                        me.setDisabled(true);
+                        c.setDisabled(true);
                     }
                     }
                     if (me.hasFocus) {
                     if (me.hasFocus) {
                         bind = me.getBind();
                         bind = me.getBind();
@@ -87,6 +80,15 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                     }
                     }
                     return me;
                     return me;
                 }
                 }
+            }, {
+                name : "sa_toplace", 
+                xtype : "remotecombo", 
+                fieldLabel : "交货地址", 
+                editable:false,
+                allowBlank : false, 
+                columnWidth : 0.5,
+                storeUrl:'/api/document/customer/getAddressCombo',
+                hiddenBtn:true,//true 则会关闭新增按钮功能
             }, {
             }, {
                 name : "detailGridField", 
                 name : "detailGridField", 
                 xtype : "detailGridField", 
                 xtype : "detailGridField", 

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

@@ -50,6 +50,50 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         name : "pi_custname", 
         name : "pi_custname", 
         fieldLabel : "客户名称",
         fieldLabel : "客户名称",
         allowBlank:false,
         allowBlank:false,
+        setValue:function(value){
+            var me = this,bind, valueBind;
+            var form = me.ownerCt;
+            var c = form.down('[name=pi_address]');
+            if(value&&value!=''){
+                c.setDisabled(false);
+            }else{
+                c.setDisabled(true);
+            }
+            if (me.hasFocus) {
+                bind = me.getBind();
+                valueBind = bind && bind.value;
+                if (valueBind && valueBind.syncing) {
+                    if ((Ext.isEmpty(value) && Ext.isEmpty(me.value)) || value === me.value) {
+                        return me;
+                    } else if (Ext.isArray(value) && Ext.isArray(me.value) && Ext.Array.equals(value, me.value)) {
+                        return me;
+                    }
+                }
+            } else {
+                me.lastSelectedRecords = null;
+            }
+    
+            if (value != null) {
+                me.doSetValue(value);
+            }
+            else {
+                me.suspendEvent('select');
+                me.valueCollection.beginUpdate();
+                me.pickerSelectionModel.deselectAll();
+                me.valueCollection.endUpdate();
+                me.resumeEvent('select');
+            }
+            return me;
+        }
+    }, {
+        columnWidth : 0.5,
+        name : "pi_address", 
+        xtype : "remotecombo", 
+        fieldLabel : "交货地址", 
+        editable:false,
+        allowBlank : false, 
+        storeUrl:'/api/document/customer/getAddressCombo',
+        hiddenBtn:true,//true 则会关闭新增按钮功能
     }, {
     }, {
         xtype : "datefield", 
         xtype : "datefield", 
         name : "pi_date", 
         name : "pi_date", 
@@ -57,11 +101,6 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         allowBlank : false, 
         allowBlank : false, 
         columnWidth : 0.25,
         columnWidth : 0.25,
         defaultValue: new Date()
         defaultValue: new Date()
-    }, {
-        xtype : "textfield", 
-        name : "pi_address", 
-        fieldLabel : "交货地址", 
-        columnWidth : 0.5
     }, {
     }, {
         name : "detailGridField", 
         name : "detailGridField", 
         xtype : "detailGridField", 
         xtype : "detailGridField", 

+ 20 - 0
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -67,6 +67,26 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                     });
                     });
 
 
                 }
                 }
+            },
+            'remotecombo[name=pi_address]':{
+                focus:function(f){
+                    //获取客户ID
+                    var pi_custid = f.ownerCt.down('[name=pi_custid]').value;
+                    if(pi_custid&&pi_custid!=""){
+                        Ext.apply(f.store.proxy.extraParams, {
+                            id:pi_custid
+                        });
+                        f.store.load();
+                    }else{
+                        saas.util.BaseUtil.showErrorToast('请先选择客户后在维护交货地址');
+                        f.setDisabled(true);
+                    }
+                },
+                expand:function(f){
+                    if(f.picker&&f.isExpanded){
+                        f.picker.setHeight(33*f.store.getCount())
+                    }
+                }
             }
             }
         });
         });
     }
     }

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

@@ -59,6 +59,50 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
         name : "pi_custname", 
         name : "pi_custname", 
         fieldLabel : "客户名称",
         fieldLabel : "客户名称",
         allowBlank:false,
         allowBlank:false,
+        setValue:function(value){
+            var me = this,bind, valueBind;
+            var form = me.ownerCt;
+            var c = form.down('[name=pi_address]');
+            if(value&&value!=''){
+                c.setDisabled(false);
+            }else{
+                c.setDisabled(true);
+            }
+            if (me.hasFocus) {
+                bind = me.getBind();
+                valueBind = bind && bind.value;
+                if (valueBind && valueBind.syncing) {
+                    if ((Ext.isEmpty(value) && Ext.isEmpty(me.value)) || value === me.value) {
+                        return me;
+                    } else if (Ext.isArray(value) && Ext.isArray(me.value) && Ext.Array.equals(value, me.value)) {
+                        return me;
+                    }
+                }
+            } else {
+                me.lastSelectedRecords = null;
+            }
+    
+            if (value != null) {
+                me.doSetValue(value);
+            }
+            else {
+                me.suspendEvent('select');
+                me.valueCollection.beginUpdate();
+                me.pickerSelectionModel.deselectAll();
+                me.valueCollection.endUpdate();
+                me.resumeEvent('select');
+            }
+            return me;
+        }
+    }, {
+        columnWidth : 0.5,
+        name : "pi_address", 
+        xtype : "remotecombo", 
+        fieldLabel : "交货地址", 
+        editable:false,
+        allowBlank : false, 
+        storeUrl:'/api/document/customer/getAddressCombo',
+        hiddenBtn:true,//true 则会关闭新增按钮功能
     }, {
     }, {
         xtype : "datefield", 
         xtype : "datefield", 
         name : "pi_date", 
         name : "pi_date", 
@@ -66,11 +110,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
         allowBlank : false, 
         allowBlank : false, 
         columnWidth : 0.25,
         columnWidth : 0.25,
         defaultValue: new Date()
         defaultValue: new Date()
-    }, {
-        xtype : "textfield", 
-        name : "pi_address", 
-        fieldLabel : "交货地址", 
-        columnWidth : 0.5
     }, {
     }, {
         name : "detailGridField", 
         name : "detailGridField", 
         xtype : "detailGridField", 
         xtype : "detailGridField", 

+ 20 - 0
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -59,6 +59,26 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                     }) ;   
                     }) ;   
 
 
                 }
                 }
+            },
+            'remotecombo[name=pi_address]':{
+                focus:function(f){
+                    //获取客户ID
+                    var pi_custid = f.ownerCt.down('[name=pi_custid]').value;
+                    if(pi_custid&&pi_custid!=""){
+                        Ext.apply(f.store.proxy.extraParams, {
+                            id:pi_custid
+                        });
+                        f.store.load();
+                    }else{
+                        saas.util.BaseUtil.showErrorToast('请先选择客户后在维护交货地址');
+                        f.setDisabled(true);
+                    }
+                },
+                expand:function(f){
+                    if(f.picker&&f.isExpanded){
+                        f.picker.setHeight(33*f.store.getCount())
+                    }
+                }
             }
             }
         });
         });
     },
     },