|
|
@@ -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;
|
|
|
+ }
|
|
|
});
|