1、申请类型:其它类,供应商、规格、金额必填。
2、申请类型:IT设备类,供应商、规格、金额可编辑。
<script>jQuery(document).ready(function(){//绑定主表字段变更事件WfForm.bindFieldChangeEvent("field6669", function(obj,id,value){var num = WfForm.getDetailAllRowIndexStr("detail_1");var numArr = num.split(',');var sqlxValue = WfForm.getFieldValue("field6669"); //主表字段申请类型// alert(sqlxValue);var rowIndex = 0;if (sqlxValue == 0){for (var i = 0; i < numArr.length; i++) {rowIndex = numArr[i];WfForm.changeFieldAttr("field6663_"+rowIndex, 2); //供应商字段修改为编辑WfForm.changeFieldAttr("field6664_"+rowIndex, 2); //规格字段修改为编辑WfForm.changeFieldAttr("field6667_"+rowIndex, 2); //金额字段修改为编辑};}else{for (var i = 0; i < numArr.length; i++) {rowIndex = numArr[i];WfForm.changeFieldAttr("field6663_"+rowIndex, 3); //供应商字段修改为必填WfForm.changeFieldAttr("field6664_"+rowIndex, 3); //规格字段修改为必填WfForm.changeFieldAttr("field6667_"+rowIndex, 3); //金额字段修改为必填}}}); });
</script>