Authored by 陶雨

网销信息商品参数改为必填

... ... @@ -230,7 +230,7 @@ edit.prototype = {
});
that.__listen("bind");
},
validate: function() {
validate: function(isTip) {
var that = this;
var rules = {},
data = {},
... ... @@ -320,7 +320,11 @@ edit.prototype = {
// return false;
// }
if (err.length > 0) {
that.__err(err.join(''));
if(!isTip){
that.__err(err.join(''));
}else{
that.errMessage=err.join('');
}
return false;
}
var zierr = 0;
... ... @@ -333,14 +337,19 @@ edit.prototype = {
});
if (zierr > 0) {
that.__err(err.join(''));
if(!isTip){
that.__err(err.join(''));
}else{
that.errMessage=err.join('');
}
return false;
}
return true;
},
submit: function(url, callback) {
var that = this;
if (!that.validate()) {
if (!that.validate(url?false:true)) {
return false;
}
var data = {};
... ...
... ... @@ -209,7 +209,7 @@ common.util.__ajax({
GOLABDATA.on("TYcaizhi", function() {
return goodsParamEdit.submit('', function(option) {
var a= goodsParamEdit.submit(false, function(option) {
$('.goods-param-group').each(function() {
goodsParamArr.push({
productSkn: $('#productSkn').val(),
... ... @@ -221,6 +221,7 @@ GOLABDATA.on("TYcaizhi", function() {
option.data.productSkn = $('#productSkn').val();
option.debug = true;
});
return a?a:goodsParamEdit.errMessage;
});
$("#propertySave").on('click', function() {
... ... @@ -230,9 +231,3 @@ $("#propertySave").on('click', function() {
}, function() {});
});
/*console.log(goodsParamArr)
window.GOLABDATA.on('TYcaizhi', function() {
return {
attributeProValuesOne: JSON.stringify(goodsParamArr)
};
});*/
\ No newline at end of file
... ...
... ... @@ -43,7 +43,7 @@
<label style="cursor: pointer;"><input name="[[b.attributeId]]" type="[[b.inputType]]" value="[[c.id]]">[[c.text]]</label>
[[/each]]
</span>
<input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues]]">
<input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues]]" required="required">
</div>
[[/each]]
</script>
\ No newline at end of file
... ...