自定义百分比限制调整

dev_local
杨树明 6 years ago
parent 47e119ff61
commit b019c751df

@ -191,7 +191,7 @@
<label class="panel-form-label fl">系统评分占比:</label> <label class="panel-form-label fl">系统评分占比:</label>
<span class="fl mr20 ml10"> <span class="fl mr20 ml10">
<input type="radio" name="Proportion" value="Equal_proportion" id="Equal_proportion" class="ml5 mr5 magic-radio" onchange="startSystem_score_percentage()" /> <input type="radio" name="Proportion" value="Equal_proportion" id="Equal_proportion" class="ml5 mr5 magic-radio" onchange="startSystem_score_percentage() " />
<label class="mt3" for="Equal_proportion">均分比例</label> <label class="mt3" for="Equal_proportion">均分比例</label>
</span> </span>
@ -330,7 +330,9 @@
function startSystem_score_percentage(){ function startSystem_score_percentage(){
getpercentage() getpercentage()
} }
// function customSystem_score_percentage(){
//
// }
$(function(){ $(function(){
//填写百分比初始化 //填写百分比初始化
//$("#All_tests").attr('checked', 'checked'); //$("#All_tests").attr('checked', 'checked');
@ -426,12 +428,11 @@
if ($("#Custom_ratio").is(":checked")) { if ($("#Custom_ratio").is(":checked")) {
for (var i = 0; i < percentagelist.length; i++) { for (var i = 0; i < percentagelist.length; i++) {
maxnum = maxnum+parseInt($(percentagelist[i]).val()); maxnum = maxnum+parseInt($(percentagelist[i]).val());
} }
} }
} }
if(maxnum != 100){ if(maxnum<100||maxnum>100){
$("#occupy_type").show() $("#occupy_type").show()
return return
} }

Loading…
Cancel
Save