Browse Source

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

heqinwei 7 years ago
parent
commit
6e09b9915b

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -695,6 +695,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
      */
     private void updateResAuditCustomer(VerificationDTO verificationDTO){
         String kind = verificationDTO.getVc_kind();
+        kind = transferKind(kind);
         if(kind.equals("receipts_offset_receivable")){
             Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(verificationDTO.getVc_custid());
             Double preamount = customerData.getCu_preamount()==null?new Double(0):customerData.getCu_preamount();
@@ -780,6 +781,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
      */
     private void updateResAuditVendor(VerificationDTO verificationDTO){
         String kind = verificationDTO.getVc_kind();
+        kind = transferKind(kind);
         if(kind.equals("prepaid_offset_payable")){
             Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(verificationDTO.getVc_vendid());
             Double preamount = vendorData.getVe_preamount()==null?new Double(0):vendorData.getVe_preamount();

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

@@ -183,7 +183,7 @@ Ext.define('saas.view.core.base.GridPanel', {
                     grid.saveDocumentAs({
                         type: 'xlsx',
                         title: grid.ownerCt._title + '列表',
-                        fileName: grid.ownerCt._title + '列表.xlsx'
+                        fileName: grid.ownerCt._title + '列表'+Ext.Date.format(new Date(),'Y-m-d_H-i-s')+'.xlsx'
                     });
                     grid.store.exportPageSize = null;
                     grid.store.exportNumber = null;

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

@@ -72,11 +72,12 @@ Ext.define('saas.view.core.form.DataMultiCombo', {
         if (!me.menu) {
 
             me.menu = Ext.create('Ext.menu.Menu',{
+                style:'max-height: 195px;overflow-y:scroll;',
                 hideOnParentHide: false,
                 items: me.getMenuItems(),
                 listeners:{
                     mouseleave:me.onMouseLeave,
-                    scope:me
+                    scope:me,
                 }
             });
         }

+ 1 - 1
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -338,7 +338,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     grid.saveDocumentAs({
                         type: 'xlsx',
                         title: grid.addTitle + '列表',
-                        fileName: grid.addTitle + '列表.xlsx'
+                        fileName: grid.addTitle + '列表'+ Ext.Date.format(new Date(),'Y-m-d_H-i-s') +'.xlsx'
                     });
                     grid.store.exportPageSize = null;
                     grid.store.exportNumber = null;

+ 1 - 1
frontend/saas-web/app/view/core/report/ReportPanelController.js

@@ -30,7 +30,7 @@ Ext.define('saas.view.core.report.ReportPanelController', {
                 }
                 //font:
             },
-            fileName: title + '.' + (btn.cfg.ext || btn.cfg.type)
+            fileName: title + Ext.Date.format(new Date(),'Y-m-d_H-i-s') +'.' + (btn.cfg.ext || btn.cfg.type)
         }, btn.cfg);
         grid.store.exportPageSize = 5000;
         grid.store.exportNumber = 1;

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

@@ -247,7 +247,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 beforeLabelTextTpl: "",
             },{
                 xtype:'textfield',
-                fieldLabel: '联系电话',
+                fieldLabel: '手机号码',
                 name: 'mobile',
                 readOnly:true,
                 editable:false,
@@ -256,7 +256,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 beforeLabelTextTpl: "",
             },{
                 xtype:'textfield',
-                fieldLabel: '联系邮件',
+                fieldLabel: '邮箱',
                 name: 'email',
                 readOnly:true,
                 editable:false,
@@ -265,6 +265,61 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 beforeLabelTextTpl: "",
             }]
         },
+        accountadd:{
+            items:[{
+                xtype:'textfield',
+                fieldLabel: '手机号码',
+                name: 'mobile',
+                hideTrigger:true,
+                allowBlank:false,
+                maxLength: 30,
+                regex:/^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/,
+                regexText:'请输入正确的手机号码',
+                listeners:{
+                    blur:function(f,a,b,c){
+                        if(f.value&&f.value!=''&&f.isValid()){
+                            // var url = 'https://sso.ubtob.com' + '/api/user/checkMobile?mobile='+f.value;
+                            // saas.util.BaseUtil.request({url })
+                            // .then(function(res) {
+                            //     if(res.success) {
+                            //     }
+                            // })
+                            // .catch(function(response) {
+                            // });
+                            // Ext.Ajax.request({
+                            //     url: Ext.manifest.server.accountPath + '/api/user/checkMobile',
+                            //     params: {
+                            //         mobile: f.value
+                            //     },
+                            //     method: 'GET',
+                            //     headers:{
+                            //         'Access-Control-Allow-Origin': '*',
+                            //         "Content-Type": 'application/json;charset=UTF-8'
+                            //     },
+                            //     success: function (response) {
+                            //         debugger
+                            //     },
+                            //     failure: function (response) {
+                            //         debugger
+                            //     }
+                            // });
+                        }
+                    }
+                }
+            },{
+                xtype:'textfield',
+                fieldLabel: '真实姓名',
+                name: 'realname',
+                allowBlank:false,
+                maxLength: 30,
+            },{
+                xtype:'textfield',
+                fieldLabel: '邮箱',
+                name: 'email',
+                allowBlank:false,
+                maxLength: 30,
+            }]
+        },
         warehouse:{
             items:[{
                 xtype:'hidden',

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

@@ -258,6 +258,16 @@ Ext.define('saas.view.document.kind.Kind', {
             }],
             reqUrl:'/api/account/account/bind/roles',
         },
+        accountadd:{
+            columns:[{
+                dataIndex:'realname',
+            },{
+                dataIndex: 'mobile',
+            },{
+                dataIndex: 'email',
+            }],
+            reqUrl: 'http://192.168.253.31:8560/api/account/account/register/add',
+        },
         employee:{
             columns: [{
                 text: '人员编号',

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

@@ -46,7 +46,18 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 ['receivable_offset_payable', '应收冲应付'],
                 ['receivable_to_receivable', '应收转应收'],
                 ['payable_to_payable', '应付转应付']
-            ]
+            ],
+            listeners:{
+                beforerender:function(f){
+                    f.firstLoad=true;
+                },
+                change:function(f){
+                    if(f.bindError){
+                        f.setValue(f.defaultValue);
+                        f.bindError = false
+                    }
+                }
+            }
         }],
 
         detail1: {

+ 14 - 3
frontend/saas-web/app/view/money/verification/FormPanelModel.js

@@ -7,10 +7,21 @@ Ext.define('saas.view.money.verification.FormPanelModel', {
             bind: '{vc_kind}',
             get: function(v) {
                 var form = this.getView();
+                var vc_kind = form.down('[name=vc_kind]');
                 form.acitveType = v;
-                //form.initFormItems();
-
-                return v;
+                if(form.initId==0||!vc_kind.firstLoad){
+                    form.initFormItems();
+                }
+                if(vc_kind.firstLoad){
+                    vc_kind.firstLoad = false;
+                    if(vc_kind.defaultValue!=v&&vc_kind.defaultValue==vc_kind.value){
+                        vc_kind.bindError = true;
+                        return vc_kind.value;
+                    }
+                }else{
+                    return v;
+                }
+                
             }
         }
     }

+ 1 - 1
frontend/saas-web/app/view/sale/report/SaleProfit.js

@@ -20,7 +20,7 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         columnWidth: 0.2
     }, {
         xtype: 'productDbfindTrigger',
-        name: 'pr_code',
+        name: 'pr_detail',
         fieldLabel: '物料',
         columnWidth: 0.2
     }, {

+ 2 - 5
frontend/saas-web/app/view/sale/report/SaleProfitController.js

@@ -21,13 +21,10 @@ Ext.define('saas.view.sale.report.SaleProfitController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pr_code]':{
+            'dbfindtrigger[name=pr_detail]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dbfinds:[
-                        {
-                            from:'pr_code',to:'pr_code'
-                        }, {
+                        dbfinds:[{
                             from:'pr_detail',to:'pr_detail'
                         }, {
                             from:'pr_spec',to:'pr_spec'

+ 52 - 2
frontend/saas-web/app/view/sys/account/DataList.js

@@ -42,7 +42,19 @@ Ext.define('saas.view.sys.account.DataList', {
                 grid.store.loadPage(1);
             }
         }
-    },'->'],
+    },'->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
 
     columns : [{
         text : 'id', 
@@ -84,7 +96,45 @@ Ext.define('saas.view.sys.account.DataList', {
     },{
         text : '关联角色', 
         dataIndex : 'roleNames', 
-        width : 110.0
+        width : 220.0
+    },{
+        text: '账户状态',
+        dataIndex: 'em_class',
+        width:90,
+        xtype: 'actioncolumn',
+        align : 'center',
+        items: [{
+            iconCls:'',
+            getClass: function(v, meta, rec) {
+                if(rec.get('em_class')=='正式'){
+                    return 'x-grid-checkcolumn-checked-btn';
+                }else{
+                    return 'x-grid-checkcolumn-btn';
+                }
+            },
+            handler: function(view, rowIndex, colIndex) {
+                var rec = view.getStore().getAt(rowIndex);
+                var type=rec.get('em_class')=='正式'?true:false;
+                //  禁用/启用
+                var form = this.ownerCt.ownerCt.ownerCt;
+                var grid = this.ownerCt.ownerCt;
+                saas.util.BaseUtil.request({
+                    url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
+                    params: '',
+                    method: 'POST',
+                })
+                .then(function(localJson) {
+                    if(localJson.success){
+                        saas.util.BaseUtil.showSuccessToast('操作成功');
+                        grid.store.load();
+                    }
+                })
+                .catch(function(res) {
+                    console.error(res);
+                    saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
+                });
+            }
+        }]
     }],
 
     dbSearchFields: [],

+ 22 - 1
frontend/saas-web/app/view/sys/account/DataListController.js

@@ -6,5 +6,26 @@ Ext.define('saas.view.sys.account.DataListController', {
         var me = this;
         this.control({
         });
-    }
+    },
+
+    onAdd:function(b){
+        var document = Ext.create('saas.view.document.kind.Kind',{});
+        var form = this.view;
+        this.dialog = form.add({
+            xtype: 'document-kind-childwin',
+            bind: {
+                title: '新增账户资料'
+            },
+            dataKind:'accountadd',
+            belong:document.etc['accountadd'],
+            _parent:form,
+            record:null,
+            session: true
+        });
+        this.dialog.show();
+    },
+    onRefresh:function(){
+        var me = this;
+        me.view.items.items[0].store.load();
+    },
 });