<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>增加</title>
|
|
[#include "/business/pages/include/static.html" /]
|
<style type="text/css">
|
html{_overflow-y:scroll}
|
</style>
|
<script type="text/javascript">
|
var templateId = '${templateId}';
|
var sjbh = '${infofather.categoryid}';
|
$(document).ready(function() {
|
$.formValidator.initConfig({formID:"myform",onError:function(msg){alert(msg)},onSuccess:function(){
|
document.getElementById("myform").target = window.top.openDialog("1","操作",
|
{},
|
{"width":40,"height":40,"noclose":true},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
|
return true;
|
}});
|
|
// $("input[name=template_weight]").change(function() {
|
// var value = $(this).val();
|
// if($.util.isNumber(value)){
|
// if(!/(^[0-9]{1,3}$)|(^[0-9]{1,2}[\.]{1}[0-9]{1,2}$)/.test(value)){
|
// popupTips("权重为小于等于100且小数不能超过两位的正数");
|
// if(value<0){
|
// $(this).val(0);
|
// }else{
|
// value = Math.round(value);
|
// $(this).val(value);
|
// }
|
// }else{
|
// if(value>100){
|
// popupTips("权重为小于等于100且小数不能超过两位的正数");
|
// $(this).val(100);
|
// }
|
// }
|
// }else{
|
// popupTips("权重为小于等于100且小数不能超过两位的正数");
|
// $(this).val(0);
|
// }
|
|
// });
|
$("input[name=ordernum]").change(function() {
|
var value = $(this).val();
|
if($.util.isNumber(value)){
|
value = Math.round(value);
|
$(this).val(value);
|
}else{
|
$(this).val(0);
|
}
|
|
});
|
|
$("input[name=check]").click(function() {
|
if(!$(this).attr("checked")){
|
var qxindex = $(this).attr("id").substr(5);
|
$("#zh"+qxindex).val("");
|
}
|
});
|
});
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
var e=true;
|
$("input[name=template_weight]").change(function() {
|
var value = $(this).val();
|
if($.util.isNumber(value)){
|
if(!/(^[0-9]{1,3}$)|(^[0-9]{1,2}[\.]{1}[0-9]{1,2}$)/.test(value)){
|
e=false;
|
}else{
|
if(value>100){
|
e=false;
|
}
|
}
|
}else{
|
e=false;
|
}
|
|
});
|
if(!e){
|
popupTips("权重为小于等于100且小数不能超过两位的正数");
|
return;
|
}
|
|
|
|
$("input[name=check]").parent().parent().css("background-color","");
|
|
|
|
var a= false;
|
var b = false;
|
var c = false;
|
var quanz = 0;
|
var $items = $("input:checked");
|
$items.each(function() {
|
var index = $(this).attr("id").substr(5,1);
|
if($.util.isEmpty($.util.trim($("#item_name"+index).val()))||$.util.isEmpty($("#template_weight"+index).val())
|
||$.util.isEmpty($.util.trim($("#ordernum"+index).val()))) {
|
b = true;
|
$(this).parent().parent().css("background-color","#ccc");
|
return;
|
}
|
if(!$.util.isNumber($.util.trim($("#ordernum"+index).val()))||!$.util.isNumber($("#template_weight"+index).val())){
|
a = true;
|
$(this).parent().parent().css("background-color","#ccc");
|
return;
|
}
|
if($.util.trim($("#ordernum"+index).val()) ==0 ){
|
c = true;
|
$(this).parent().parent().css("background-color","#ccc");
|
return;
|
}
|
var zhvalues = $("#item_name"+index).val() + "&" + $("#template_weight"+index).val() + "&" + $("#ordernum"+index).val() + "&" +$("#item_note"+index).val();
|
$("#zh"+index).val(zhvalues);
|
var squan = parseFloat($("#template_weight"+index).val());
|
quanz = parseFloat(quanz) + parseFloat(squan) ;
|
});
|
if(b) {
|
popupTips("有未填写的指标项内容");
|
return;
|
}
|
if(c) {
|
popupTips("顺序号应为正数字");
|
return;
|
}
|
if(a) {
|
popupTips("指标项权重和顺序号应为数字");
|
return;
|
}else{
|
if(quanz != 100){
|
popupTips("指标项权重之和不等于100");
|
return;
|
}
|
}
|
$("#myform").submit();
|
}
|
}
|
|
</script>
|
</head>
|
<body class="end_task_body widthauto">
|
<div class="edit_txt">
|
<form method="post" action="" id="myform" name="myform" >
|
<input type="hidden" name="categoryid" id="categoryid" value="${infofather.categoryid}" />
|
<input type="hidden" name="item_level" id="item_level" value="${infofather.item_level}" />
|
<table class="edit_layout2">
|
<tr>
|
<td ><input type="checkbox" class="input-text" name="check" id="check1" />
|
<input type="hidden" class="input-text" name="zh" id="zh1" />
|
</td>
|
<th align="center" width="10%">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name1" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight1" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td> <input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum1"/>
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note1"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check2" />
|
<input type="hidden" class="input-text" name="zh" id="zh2" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name2" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight2" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum2" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note2"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check3" />
|
<input type="hidden" class="input-text" name="zh" id="zh3" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name3" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight3" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum3" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note3"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check4" />
|
<input type="hidden" class="input-text" name="zh" id="zh4" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name4" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight4" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum4" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note4"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check5" />
|
<input type="hidden" class="input-text" name="zh" id="zh5" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name5" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight5" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum5" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note5"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check6" />
|
<input type="hidden" class="input-text" name="zh" id="zh6" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name6" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight6" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum6" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note6"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check7" />
|
<input type="hidden" class="input-text" name="zh" id="zh7" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name7" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight7" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum7" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note7"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check8" />
|
<input type="hidden" class="input-text" name="zh" id="zh8" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name8" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight8" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum8" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note8"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check9" />
|
<input type="hidden" class="input-text" name="zh" id="zh9" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name9" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight9" />
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum9" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note9"/>
|
</td>
|
</tr>
|
<tr>
|
<td align="right"><input type="checkbox" class="input-text" name="check" id="check10" />
|
<input type="hidden" class="input-text" name="zh" id="zh10" />
|
</td>
|
<th align="right">名称:</th>
|
<td><input style="width:100px;" type="text" class="general" name="item_name" id="item_name10" />
|
</td>
|
<th align="right">权重:</th>
|
<td><input style="width:50px;" type="text" class="general" name="template_weight" id="template_weight10"/>
|
</td>
|
<th align="right">顺序号:</th>
|
<td><input style="width:50px;" type="text" class="general" name="ordernum" id="ordernum10" />
|
</td>
|
<th align="right">说明:</th>
|
<td><input style="width:300px;" type="text" class="general" name="item_note" id="item_note10"/>
|
</td>
|
</tr>
|
|
</table>
|
</form>
|
</div>
|
</body>
|
</html>
|