Browse Source

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

hy 7 years ago
parent
commit
cf5b7c4fdf

+ 8 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -404,7 +404,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         double pdQty=0, pdYqty=0;
         //检查转单状态
         String acceptstatus = purchase.getPu_acceptstatuscode();
-
         if (Status.CLOSE.name().equals(acceptstatus)){
             return Result.error(ExceptionCode.CLOSED_EXIST);
         }
@@ -530,12 +529,19 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
     @Transactional
     public void singleUnAudit(Long id) {
-        Purchase purchase = new Purchase();
+        //校验关闭状态
+        Purchase purchase = getMapper().selectByPrimaryKey(id);
+        //检查转单状态
+        String acceptstatus = purchase.getPu_acceptstatuscode();
+        if (Status.CLOSE.name().equals(acceptstatus)){
+            throw new  BizException(ExceptionCode.CLOSED_EXIST);
+        }
         //检查是否已转验收单
         Integer num = getMapper().checkTurnInstatus(id);
         if (num > 0) {
             throw new BizException(BizExceptionCode.PURCHASE_UNAUDIT_ERROR);
         }
+        purchase = new Purchase();
         //生成更新对象
         purchase.setId(id);
         purchase.setPu_status(Status.UNAUDITED.getDisplay());

+ 7 - 7
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -19,10 +19,10 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         emptyText:'请输入单号或物料',
         showDetail: true,
         getCondition: function(value) {
-            if(value != '') {
-                return  ' (pi_inoutno like\'%' + value + '%\' or pd_prodcode like \'%'+value+'%\' ) ';
-            }else {
+            if(value == ''|| value ==null) {
                 return '1=1';
+            }else {
+                return  ' (pi_inoutno like\'%' + value + '%\' or pd_prodcode like \'%'+value+'%\' ) ';
             }
         }
     }, {
@@ -66,10 +66,10 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         emptyText :'请输入仓库名或仓库编号',
         showDetail: true,
         getCondition: function(value) {
-            if(value != '') {
-                return  ' (pd_whcode like\'%' + value + '%\' or pd_whname like \'%'+value+'%\' or pd_inwhcode like\'%' + value + '%\' or pd_inwhname like \'%'+value+'%\') ';
-            }else {
+            if(value == '' || value == null) {
                 return '1=1';
+            }else {
+                return  ' (pd_whcode like\'%' + value + '%\' or pd_whname like \'%'+value+'%\' or pd_inwhcode like\'%' + value + '%\' or pd_inwhname like \'%'+value+'%\') ';                
             }
         }
     }],
@@ -167,7 +167,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
                 width: 80
             },{
                 text: '数量',
-                dataIndex: 'pd_inqty',
+                dataIndex: 'pd_outqty',
                 xtype:'numbercolumn',
                 width: 110
             },{

+ 1 - 2
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -196,8 +196,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     {
         text : "盘点库存", 
         dataIndex : "st_actqty", 
-        width : 110.0, 
-        xtype : "numbercolumn",
+        width : 110.0,
         editor : {
             xtype : "numberfield",
             decimalPrecision: 3,