Authored by 马力

适销季改成单选

... ... @@ -229,15 +229,15 @@
<input type="hidden" id="grade" value="[[grade||'0']]" for="radio" required/>-->
<label class="col-sm-2 control-label">适销季 <span class="red">*</span></label>
<div class="col-sm-4">
<label class="radio-inline" style="padding-left: 0">
<input type="checkbox" name="seasons" value="spring">春秋</label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="summer"></label>
<input type="radio" name="seasons" value="spring">春秋</label>
<label class="radio-inline">
<input type="radio" name="seasons" value="summer"></label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="winter"></label>
<input type="radio" name="seasons" value="winter"></label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="seasons">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="checkbox" placeholder="年龄层" />
<input type="radio" name="seasons" value="seasons">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="radio" placeholder="适销季" />
</div>
</div>
... ...
... ... @@ -74,14 +74,14 @@
<label class="col-sm-3">年龄层:[[ageLevel]] </label>
<label class="col-sm-3">适销季 <span class="red">*</span>:
<label>
<input type="checkbox" name="seasons" value="spring">春秋</label>
<input type="radio" name="seasons" value="spring">春秋</label>
<label>
<input type="checkbox" name="seasons" value="summer"></label>
<input type="radio" name="seasons" value="summer"></label>
<label>
<input type="checkbox" name="seasons" value="winter"></label>
<input type="radio" name="seasons" value="winter"></label>
<label>
<input type="checkbox" name="seasons" value="seasons">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="checkbox" placeholder="适销季" />
<input type="radio" name="seasons" value="seasons">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="radio" placeholder="适销季" />
</label>
</div>
... ...
... ... @@ -462,7 +462,7 @@ $(document).on("change",".colorSelect",function(){
// });
// $("#ageLevel").val(arr.join('|'));
// });
$(document).on("change",":checkbox[name=seasons]",function(){
/*$(document).on("change",":checkbox[name=seasons]",function(){
var value=$(this).val();
var c=$(":checkbox[name=seasons]");
if($(this).is(":checked")){
... ... @@ -477,7 +477,7 @@ $(document).on("change",":checkbox[name=seasons]",function(){
arr.push($(this).val())
});
$("#seasons").val(arr.join('|'));
});
});*/
$(document).on("change",".attr_input",function(){
var item=ag.rows[$(this).data("index")];
... ...
... ... @@ -128,7 +128,7 @@ function initInfo(basicInfo) {
$("#isOutLets2").val(basicInfo.isOutLets);
$(":checkbox[name=seasons]").each(function(){
$(":radio[name=seasons]").each(function(){
if(basicInfo.seasons!=null&&basicInfo.seasons!=undefined&&basicInfo.seasons!=''&&
basicInfo.seasons.indexOf($(this).val())>-1){
$(this).prop("checked",true)
... ... @@ -208,9 +208,9 @@ common.util.__ajax({
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
}, true);
$(document).on("change",":checkbox[name=seasons]",function(){
$(document).on("change",":radio[name=seasons]",function(){
var value=$(this).val();
var c=$(":checkbox[name=seasons]");
/*var c=$(":radio[name=seasons]");
if($(this).is(":checked")){
if(value=="seasons"){
c.slice(0,3).prop("checked",false);
... ... @@ -219,10 +219,10 @@ $(document).on("change",":checkbox[name=seasons]",function(){
}
}
var arr=[];
$(":checked[name=seasons]").each(function(){
$(":radio[name=seasons]").each(function(){
arr.push($(this).val())
});
$("#seasons").val(arr.join(','));
});*/
$("#seasons").val($(this).val());
});
$(document).on("change",":radio[name=isOutLets]",function(){
... ...