Explorar el Código

动态获取companyId

zhuth hace 7 años
padre
commit
830ebbe724

+ 1 - 1
frontend/saas-web/app/util/BaseUtil.js

@@ -111,7 +111,7 @@ Ext.define('saas.util.BaseUtil', {
             return (/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/).test(str);
         },
 
-        getCurrentUse: function () {
+        getCurrentUser: function () {
             return saas.util.State.get('session').account;
         },
 

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

@@ -12,6 +12,7 @@ Ext.define('saas.view.core.form.ConDateField', {
     defaults: {
         margin: '0 0 0 0'
     },
+    columnWidth: 0.5,
     defaultBindProperty: 'value',
     initComponent : function(){
         this.cls = (this.cls || '') + ' x-form-field-multi';

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

@@ -203,8 +203,8 @@ Ext.define('saas.view.core.form.FormPanel', {
         viewModel.set(codeField, '');
         viewModel.set('createTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
         viewModel.set('updateTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
-        viewModel.set('creatorId', saas.util.BaseUtil.getCurrentUse().id);
-        viewModel.set('creator', saas.util.BaseUtil.getCurrentUse().realname);
+        viewModel.set('creatorId', saas.util.BaseUtil.getCurrentUser().id);
+        viewModel.set('creator', saas.util.BaseUtil.getCurrentUser().realname);
 
         if (statusCodeField) {
             var o = {};

+ 6 - 6
frontend/saas-web/app/view/home/InfoCard.js

@@ -36,37 +36,37 @@ Ext.define('saas.view.home.InfoCard', {
             title: '七天内待出货销售',
             color: 'yellow',
             viewType: 'sale-sale-querypanel',
-            condition: 'sale.companyid=1 and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail where sd_said=sa_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now()) <7)'
+            condition: 'sale.companyid=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail where sd_said=sa_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now()) <7)'
         },
         unstorage: {
             title: '七天内待入库采购',
             color: 'purple',
             viewType: 'purchase-purchase-querypanel',
-            condition: 'purchase.companyId=1 and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail where pd_puid=pu_id and IFNULL(pd_acceptqty,0)<ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <7)'
+            condition: 'purchase.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail where pd_puid=pu_id and IFNULL(pd_acceptqty,0)<ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <7)'
         },
         unpay: {
             title: '七天内待付款',
             color: 'red',
             viewType: 'purchase-purchasein-querypanel',
-            condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=1 and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now())<7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=1 and ifnull(sl_namount,0)<>0)'
+            condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now())<7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and ifnull(sl_namount,0)<>0)'
         },
         unreceive: {
             title: '七天内待收款',
             color: 'pink',
             viewType: 'sale-saleout-querypanel',
-            condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=1 and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now())<7and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=1 and ifnull(sl_namount,0)<>0)'
+            condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now())<7and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=1 and ifnull(sl_namount,0)<>0)'
         },
         unauditcheck: {
             title: '未审核验收',
             color: 'blue',
             viewType: 'purchase-purchasein-querypanel',
-            condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'采购验收单\' and prodinout.companyId=1'
+            condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'采购验收单\' and prodinout.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId
         },
         unauditship: {
             title: '未审核出货',
             color: 'default',
             viewType: 'purchase-purchasein-querypanel',
-            condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'出货单\' and prodinout.companyId=1'
+            condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'出货单\' and prodinout.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId
         }
     },
 

+ 3 - 0
frontend/saas-web/app/view/home/InfoCard.scss

@@ -41,6 +41,9 @@ $max-card-width: 235px;
                         }
             
                     }
+                    .x-box.x-view-item-focused {
+                        outline: none !important;
+                    }
                 }
             }
         }