yhluo пре 6 дана
родитељ
комит
2c6eea9aac
1 измењених фајлова са 12 додато и 2 уклоњено
  1. 12 2
      WebContent/app/view/common/query/CheckForm.js

+ 12 - 2
WebContent/app/view/common/query/CheckForm.js

@@ -426,12 +426,22 @@ Ext.define('erp.view.common.query.CheckForm',{
 			var vendbar = Ext.getCmp("bar_vendbarcode");
 			var prodcode = Ext.getCmp("msl_prodcode");
 			if(bar && bar.value == ""){
-				if((vendbar && vendbar.value == "") && (macode && macode.value == "") && (prodcode && prodcode.value == "")){
+				/*if((vendbar && vendbar.value == "") && (macode && macode.value == "") && (prodcode && prodcode.value == "")){
 					re ="料卷号或者(工单号+物料编号)需要必填其中一个项!";
 					return re;
 				}
 				if((vendbar && vendbar.value == "") || (macode && macode.value == "") || (prodcode && macode.prodcode == "")){
-					re ="料卷号未填写时,工单号、物料编号都必填!";
+					re ="料卷号未填写时,工单号、供应商批号、物料编号都必填!";
+					return re;
+				}*/
+
+				// 261102 modify 料卷号为空的时候,工单号,料号不能为空,或者工单号,供应商批号不能为空
+				var macodeVal = (macode && macode.value) ? macode.value : "";
+				var vendbarVal = (vendbar && vendbar.value) ? vendbar.value : "";
+				var prodcodeVal = (prodcode && prodcode.value) ? prodcode.value : "";
+
+				if (!((macodeVal != "" && prodcodeVal != "") || (macodeVal != "" && vendbarVal != ""))) {
+					re = "料卷号为空时,工单号+物料编号 或 工单号+供应商批号 必须至少填写一组!";
 					return re;
 				}
 			}