|
|
@ -97,9 +97,36 @@ |
|
|
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|
|
|
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; |
|
|
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|
|
|
|
|
|
|
$("#form-bom-add").validate({ |
|
|
|
onkeyup: false, |
|
|
|
rules:{ |
|
|
|
materialNo:{ |
|
|
|
remote: { |
|
|
|
url: prefix + "/checkMaterialNoUnique", |
|
|
|
type: "get", |
|
|
|
dataType: "json", |
|
|
|
data: { |
|
|
|
"materialNo": function() { |
|
|
|
console.log($("#materialNo").val()) |
|
|
|
return $.common.trim($("#materialNo").val()); |
|
|
|
} |
|
|
|
}, |
|
|
|
dataFilter: function(data, type) { |
|
|
|
return $.validate.unique(data); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
messages: { |
|
|
|
"materialNo": { |
|
|
|
remote: "料号已经存在", |
|
|
|
}, |
|
|
|
}, |
|
|
|
focusCleanup: true |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$(function() { |
|
|
|
$("#materialNo").select2({ |
|
|
|
theme: "bootstrap", |
|
|
|