<!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}
|
.edit_layout th{
|
border-right:solid 1px #ccc;border-bottom:solid 1px #ccc;
|
}
|
|
</style>
|
<script type="text/javascript">
|
$(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=score]").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);
|
}
|
|
});
|
$("input[name=is_default]").click(function() {
|
if($(this).attr("checked")){
|
$("input[name=is_default]").attr("checked",false);
|
$(this).attr("checked",true);
|
}
|
});
|
|
});
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
var e=true;
|
$("input[name=score]").each(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;
|
}
|
});
|
|
|
|
var d = false;
|
var c = false;
|
var b = false;
|
var a = false;
|
|
$("input[name=evaluation]").each(function() {
|
var index = $(this).attr("id").substr(10,1);
|
|
if(!$.util.isEmpty($.util.trim($(this).val()))&&$.util.isEmpty($("#score"+index).val())) {
|
b = true;
|
return;
|
}
|
if(!$.util.isEmpty($.util.trim($(this).val()))&&!$.util.isNumber($("#score"+index).val())) {
|
a = true;
|
return;
|
}
|
if(!$.util.isEmpty($.util.trim($(this).val()))&&($("#score"+index).val()<0 ||$("#score"+index).val()>100 )) {
|
c = true;
|
return;
|
}
|
if(!$.util.isEmpty($.util.trim($(this).val()))&&!$.util.isNumber($("#ordernum"+index).val())) {
|
d = true;
|
return;
|
}
|
|
});
|
if(!e) {
|
popupTips("分数为小于等于100且小数不能超过两位的正数");
|
return;
|
}
|
if(d) {
|
popupTips("顺序号为整数");
|
return;
|
}
|
if(c) {
|
popupTips("分数为0到100");
|
return;
|
}
|
if(b) {
|
popupTips("有未填写的分数");
|
return;
|
}
|
if(a) {
|
popupTips("分数为整数");
|
return;
|
}
|
$("#myform").submit();
|
}
|
}
|
</script>
|
</head>
|
<body>
|
<div class="pad_10" style="margin-top: 10px;">
|
<div class="col-tab">
|
<div id="div_setting_1" class="contentList pad_10">
|
<form method="post" action="" id="myform" name="myform" >
|
<input type="hidden" name="id" id="id" value="${info.ID}" />
|
<table class="edit_layout edit_layout3" style="border:solid 1px #ccc;border-width:1px 0 0 1px;width:98%;text-align:cente;margin-left:10px;">
|
<tr>
|
<th>指标项名称:</th>
|
<td>${info.ITEM_NAME}
|
</td>
|
</tr>
|
|
<tr>
|
<th>评价项:</th>
|
<td style="padding:0;margin:0;border-bottom:0;">
|
<table class="td-table" >
|
<tr>
|
<th style="width:35%">评价项名称</th>
|
<th style="width:35%;">分数</th>
|
<th style="width:10%;;">顺序号</th>
|
<th style="border-right:0;">是否默认选中</th>
|
</tr>
|
[#if list?? && list?size>0]
|
[#list list as score]
|
<tr>
|
<td><input type="text" class="general general2" value="${score.EVA_NAME}" name="evaluation" id="evaluation${score_index+1}" />[#if score_index == 0]例:优[/#if]</td>
|
<td><input type="text" class="general" value="${score.SCORE}" name="score" id="score${score_index+1}" />(分)[#if score_index == 0]例:100[/#if]</td>
|
<td><input type="text" class="general" value="${score.ORDERNUM}" name="ordernum" id="ordernum${score_index+1}" /></td>
|
<td style="text-align:center;border-right:0;"><input type="checkbox" value="${score_index+1}" name="is_default" id="is_default${score_index+1}" [#if score.IS_DEFAULT == 1]checked[/#if]/></td>
|
</tr>
|
[/#list]
|
[/#if]
|
[#list info.list1 as score1]
|
<tr>
|
<td><input type="text" class="general general2" name="evaluation" id="evaluation${score1}" />[#if info.list1?size == 4 && score1_index == 0]例:优[/#if]</td>
|
<td><input type="text" class="general" name="score" id="score${score1}" />(分)[#if info.list1?size == 4 && score1_index == 0]例:100[/#if]</td>
|
<td><input type="text" class="general" name="ordernum" id="ordernum${score1}" /></td>
|
<td style="text-align:center;border-right:0;"><input type="checkbox" value="${score1}" name="is_default" id="is_default${score1}" /></td>
|
</tr>
|
[/#list]
|
</table>
|
</td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
</div>
|
</div>
|
</body>
|
</html>
|