Browse Source

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

zhoudw 7 years ago
parent
commit
c74bb587c7

+ 1 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -86,7 +86,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BANK_AMOUNT_NOTENOUGH(74004, "资金账号不足"),
     SUBLEDGER_NOT_EXIS(74005,"来源单据不存在"),
     CHECK_SETACOUNT_EXIS(74006, "不能删除单据日期小于等于结账期间<u>%s</u>的单据"),
-    VERIFICATION_CHECK_BALANCE(74007,"保存失败,本次核销金额不相等!"),
+    VERIFICATION_CHECK_BALANCE(74007,"本次核销金额不相等!"),
     DELETE_NOT_EXIS(74008,"删除失败,当前单据不存在!"),
     DOCUMENTS_AUDITED(74009,"存在已审核单据:%S"),
     DOCUMENTS_UNAUDITED(74009,"存在未审核单据:%S"),

+ 2 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -69,6 +69,8 @@
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
+    <result column="pi_prstatus" jdbcType="VARCHAR" property="pi_prstatus" />
+    <result column="pi_prstatuscode" jdbcType="VARCHAR" property="pi_prstatuscode" />
   </resultMap>
 
 

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -166,4 +166,6 @@ public class ProdInOutList extends CommonBaseEntity{
     private String pr_text2;
     private String pr_text3;
     private String pr_text4;
+    private String pi_prstatus;
+    private String pi_prstatuscode;
 }

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

@@ -438,7 +438,7 @@ Ext.define('saas.view.core.form.FormPanel', {
     isValid: function() {
         var me = this;
         var viewModel = me.getViewModel();
-        var formItems = me.formItems;
+        var formItems = me.formItems || [];
         var valid = !Ext.Array.findBy(formItems, function(f) {
             return !f.isValid();
         });

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

@@ -166,7 +166,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             dockedItems: [{
                 xtype: 'toolbar',
                 dock: 'top',
-                hidden: !me.showtool,
+                hidden: me.simpleMode,
                 defaults: { // defaults 将会应用所有的子组件上,而不是父容器
                     listeners: {
                         'mouseover':function(){
@@ -270,6 +270,11 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         me.callParent(arguments);
     },
     listeners: {
+        afterrender: function(grid) {
+            if(grid.simpleMode) {
+                grid.headerCt.child('gridcolumn[isCheckerHd]').hide();
+            }
+        },
         boxready: function(grid, width, height, eOpts) {
             var store = grid.getStore(),
             gridBodyBox = grid.body.dom.getBoundingClientRect(),

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

@@ -129,7 +129,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
         }
 
         me.queryGridConfig['columns']=columns;
-        me.queryGridConfig['showtool'] = !me.simpleMode;
+        me.queryGridConfig['simpleMode'] = me.simpleMode;
         Ext.apply(queryGrid,me.queryGridConfig);
     },
 

+ 16 - 0
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -390,6 +390,22 @@ Ext.define('saas.view.core.report.ReportPanel', {
             if(defaultValue) {
                 viewModel.set('form.' + bind, defaultValue);
             }
+
+            item.enableKeyEvents = true;
+            item.listeners = item.listeners || {};
+            Ext.applyIf(item.listeners, {
+                keydown: {
+                    fn: function(th, e, eOpts) {
+                        if(e.keyCode == 13) {
+                            if(!th.fireEvent('beforequery', th)) {
+                                return;
+                            }else {
+                                me.getController().onQuery()
+                            }
+                        }
+                    }
+                }
+            });
         });
 
         return items;

+ 1 - 1
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -159,7 +159,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         name : "cu_sellername", 
         fieldLabel : "业务员", 
         editable:false,
-        allowBlank : true, 
+        allowBlank : false, 
         columnWidth : 0.25
     },{
         xtype : "hidden", 

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

@@ -39,31 +39,31 @@ Ext.define('saas.view.home.InfoCard', {
         Ext.apply(me, {
             cards: {
                 unship: {
-                    title: '未出货销售订单',
+                    title: '待出货销售',
                     color: 'yellow',
                     viewType: 'sale-sale-querypanel',
                     condition: 'sale.companyid=' + companyId + ' and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail detail where sd_id=saledetail.sd_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now())<= 7)'
                 },
                 unstorage: {
-                    title: '未入库采购订单',
+                    title: '待入库采购',
                     color: 'purple',
                     viewType: 'purchase-purchase-querypanel',
                     condition: 'purchase.companyId=' + companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail detail where pd_id=purchasedetail.pd_id and IFNULL(pd_acceptqty,0) < ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <= 7)'
                 },
                 unpay: {
-                    title: '未付款验收单',
+                    title: '待付款',
                     color: 'red',
                     viewType: 'purchase-purchasein-querypanel',
                     condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + 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=' + companyId + ' and ifnull(sl_namount,0)<>0)'
                 },
                 unreceive: {
-                    title: '未收款出货',
+                    title: '待收款',
                     color: 'pink',
                     viewType: 'sale-saleout-querypanel',
                     condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(cu_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=' + companyId + ' and ifnull(sl_namount,0)<>0)'
                 },
                 unauditcheck: {
-                    title: '未审核验收',
+                    title: '未审核验收',
                     color: 'blue',
                     viewType: 'purchase-purchasein-querypanel',
                     condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'采购验收单\' and prodinout.companyId=' + companyId

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

@@ -31,6 +31,7 @@ $max-card-width: 235px;
                         }
 
                         h3 {
+                            text-align: center;
                             font-size: 16px;
                         }
             

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

@@ -20,6 +20,11 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
         fieldLabel: '客户名称',
         columnWidth: 0.2,
         allowBlank: false,
+        listeners: {
+            beforequery: function(f) {
+                return !!f.value;
+            }
+        }
     }, {
         xtype: 'monthdatefield',
         name: 'ym',

+ 6 - 1
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -19,7 +19,12 @@ Ext.define('saas.view.money.report.VendorCheck', {
         name: 'pi_vendname',
         fieldLabel: '供应商名称',
         columnWidth: 0.2,
-        allowBlank:false
+        allowBlank:false,
+        listeners: {
+            beforequery: function(f) {
+                return !!f.value;
+            }
+        }
     }, {
         xtype: 'monthdatefield',
         name: 'ym',

+ 21 - 9
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -590,18 +590,30 @@ Ext.define('saas.view.money.verification.FormPanel', {
         },
 
         defaultConditions: {
-            receipts_offset_receivable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)<>0 and ifnull(sl_namount,0)<>0',
+            receipts_offset_receivable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)<>0 and ifnull(sl_namount,0)<>0 ' +
+            ' and ((sl_kind=\'收款单\') or (sl_kind=\'期初余额\' and sl_ym=' +
+            '(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid)))',
                 'ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
-                ' and sl_kind in (\'期初余额\',\'出货单\',\'销售退货单\')'],
-            prepaid_offset_payable: ['ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)<>0 and ifnull(sl_namount,0)<>0',
+                ' and (sl_kind in (\'出货单\',\'销售退货单\') or (sl_kind in (\'期初余额\') and sl_ym=' +
+                '(select min(pd_detno) from periodsdetail where pd_status=0 and periodsdetail.companyid=subledger.companyid)))'],
+            prepaid_offset_payable: ['ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)<>0 and ifnull(sl_namount,0)<>0 ' +
+            ' and ((sl_kind=\'付款单\') or (sl_kind=\'期初余额\' and sl_ym=' +
+            '(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid)))',
                 'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0' +
-                ' and sl_kind in (\'期初余额\',\'采购验收单\',\'采购验退单\')'],
-            receivable_offset_payable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0',
-                'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
+                ' and (sl_kind in (\'采购验收单\',\'采购验退单\') or (sl_kind in (\'期初余额\') and sl_ym=' +
+                '(select min(pd_detno) from periodsdetail where pd_status=0 and periodsdetail.companyid=subledger.companyid)))'],
+            receivable_offset_payable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
+            ' and ((sl_kind in (\'出货单\',\'销售退货单\')) or (sl_kind=\'期初余额\' and sl_ym=' +
+            '(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid)))',
+                'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0' +
+                ' and (sl_kind in (\'采购验收单\',\'采购验退单\') or (sl_kind in (\'期初余额\') and sl_ym=' +
+                '(select min(pd_detno) from periodsdetail where pd_status=0 and periodsdetail.companyid=subledger.companyid)))'],
             receivable_to_receivable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
-            ' and sl_kind in (\'期初余额\',\'出货单\',\'销售退货单\')'],
-            payable_to_payable: ['ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
-            ' and sl_kind in (\'期初余额\',\'采购验收单\',\'采购验退单\')']
+            ' and ((sl_kind in (\'出货单\',\'销售退货单\')) or (sl_kind=\'期初余额\' and sl_ym=' +
+            '(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid)))'],
+            payable_to_payable: ['ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0' +
+            ' and (sl_kind in (\'采购验收单\',\'采购验退单\') or (sl_kind in (\'期初余额\') and sl_ym=' +
+            '(select min(pd_detno) from periodsdetail where pd_status=0 and periodsdetail.companyid=subledger.companyid)))']
         }
     },