Browse Source

制造单拆件类型才校验明细物料成本单价

rainco 7 years ago
parent
commit
fc665bf037
1 changed files with 10 additions and 8 deletions
  1. 10 8
      frontend/saas-web/app/view/stock/make/FormPanel.js

+ 10 - 8
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -391,14 +391,16 @@ Ext.define('saas.view.stock.make.FormPanel', {
         controller = me.getController(),
         viewModel = me.getViewModel(),
         grid = me.down('detailGridField'),
-        data = grid.getTrueData()
-        str='';
-        Ext.Array.each(data,function(item){
-            if(item.mm_price==0){     
-                str=str+item.mm_detno+'行'+item.mm_prodcode+'物料成本单价为0!'+'<br>'
-            }
-        });
-    
+        data = grid.getTrueData(),
+        str='',
+        type = viewModel.get('ma_type');
+        if ('拆件' == type) {
+            Ext.Array.each(data,function(item){
+                if(item.mm_price==0){     
+                    str=str+item.mm_detno+'行'+item.mm_prodcode+'物料成本单价为0!'+'<br>'
+                }
+            });
+        }
         if(str!=''){
             saas.util.BaseUtil.showConfirm('提示',str)
             .then(function(y) {