Browse Source

修改制造单单价为0提示

zhoudw 7 years ago
parent
commit
64cf8dad93
1 changed files with 26 additions and 1 deletions
  1. 26 1
      frontend/saas-web/app/view/stock/make/FormPanel.js

+ 26 - 1
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -385,5 +385,30 @@ Ext.define('saas.view.stock.make.FormPanel', {
         name : "ma_auditdate", 
         fieldLabel : "审核日期",
         readOnly:true
-    }]
+    }],
+    beforeAudit:function(){
+        var me = this,
+        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>'
+            }
+        });
+    
+        if(str!=''){
+            saas.util.BaseUtil.showConfirm('提示',str)
+            .then(function(y) {
+                if(y == 'yes') {
+                    controller.audit();
+                }
+            });
+        }else{
+            controller.audit();
+        }
+        return false;
+    }
 });