<!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 td{
|
width:200px;
|
}
|
.edit_layout th{
|
width:150px;
|
}
|
</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=fg_rate]").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=bigqz]").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=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=defaultscore]").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);
|
}
|
|
});
|
|
});
|
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("tr").css("background-color","");
|
var a= false;
|
var b = false;
|
var c = false;
|
var d = false;
|
var e = false;
|
var f = false;
|
var g = false;
|
var h = false;
|
var quanz = 0;
|
var $items = $("input[name=bigqz]");
|
$items.each(function() {
|
var index = $(this).attr("id").substr(15);
|
if($.util.isEmpty($.util.trim($("#fg_rate"+index).val()))) {
|
$("#fg_rate"+index).parent().parent().css("background-color","#ccc");
|
a= true;
|
return false;
|
}
|
if(!$.util.isNumber($.util.trim($("#fg_rate"+index).val()))){
|
$("#fg_rate"+index).parent().parent().css("background-color","#ccc");
|
b= true;
|
return false;
|
}
|
if($.util.isEmpty($.util.trim($(this).val()))) {
|
$(this).parent().parent().css("background-color","#ccc");
|
c= true;
|
return;
|
}
|
if(!$.util.isNumber($.util.trim($(this).val()))){
|
$(this).parent().parent().css("background-color","#ccc");
|
d= true;
|
return;
|
}
|
if($.util.isEmpty($.util.trim($("#score"+index).val()))) {
|
$("#score"+index).parent().parent().css("background-color","#ccc");
|
e= true;
|
return;
|
}
|
if(!$.util.isNumber($.util.trim($("#score"+index).val()))){
|
$("#score"+index).parent().parent().css("background-color","#ccc");
|
f= true;
|
return;
|
}
|
if($.util.isEmpty($.util.trim($("#defaultscore"+index).val()))) {
|
$("#defaultscore"+index).parent().parent().css("background-color","#ccc");
|
g= true;
|
return;
|
}
|
if(!$.util.isNumber($.util.trim($("#defaultscore"+index).val()))){
|
$("#defaultscore"+index).parent().parent().css("background-color","#ccc");
|
h= true;
|
return;
|
}
|
var squan = Math.round($(this).val());
|
quanz = quanz + squan ;
|
});
|
|
if(a){
|
popupTips("有未填写的覆盖率");
|
return;
|
}
|
if(b){
|
alert("覆盖率应为数字");
|
return;
|
}
|
if(c){
|
popupTips("有未填写的权重");
|
return;
|
}
|
if(d){
|
popupTips("权重应为数字");
|
return;
|
}
|
if(e){
|
popupTips("有未填写的要求得分");
|
return;
|
}
|
if(f){
|
popupTips("要求得分应为数字");
|
return;
|
}
|
if(g){
|
popupTips("有未填写的默认得分");
|
return;
|
}
|
if(h){
|
popupTips("默认得分应为数字");
|
return;
|
}
|
if(quanz != 100){
|
popupTips("权重为数字,权重之和不等于100");
|
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" >
|
<table align="center" width="98%" class="edit_layout">
|
<tr>
|
<th width="70px;" align="center">响应支持类:
|
<input type="hidden" class="general" name="qz_type" value="1" id="item_name1" />
|
</th>
|
<th align="right">调查覆盖率:</th>
|
<td><input style="width:100px;" type="text" class="general" value="${xyMap.FG_RATE}" name="fg_rate" id="fg_rate1" />%</td>
|
<th align="right">权重:</th>
|
<td><input style="width:100px;" type="text" class="general" value="${xyMap.SATIS_QZ}" name="bigqz" id="template_weight1" />%</td>
|
</tr>
|
<tr>
|
<th width="70px;" align="center">
|
</th>
|
<th align="right">要求得分:</th>
|
<td><input style="width:100px;" type="text" class="general" value="${xyMap.SATIS_SCORE}" name="score" id="score1" /></td>
|
<th align="right">默认得分:</th>
|
<td><input style="width:100px;" type="text" class="general" value="${xyMap.DEFAULT_SCORE}" name="defaultscore" id="defaultscore1" /></td>
|
</tr>
|
<tr>
|
<th align="center">驻场:
|
<input type="hidden" class="general" name="qz_type" value="3" id="item_name3" />
|
</th>
|
<th align="right">调查覆盖率:</th>
|
<td><input style="width:100px;" type="text" class="general" value="${zcMap.FG_RATE}" name="fg_rate" id="fg_rate3" />%</td>
|
<th align="right">权重:</th>
|
<td><input style="width:100px;" type="text" class="general" value="${zcMap.SATIS_QZ}" name="bigqz" id="template_weight3" />%</td>
|
</tr>
|
<tr>
|
<th align="center">
|
</th>
|
<th align="right">要求得分:</th>
|
<td><input style="width:100px;" type="text" class="general" value="${zcMap.SATIS_SCORE}" name="score" id="score3" /></td>
|
<th align="right">默认得分:</th>
|
<td><input style="width:100px;" type="text" class="general" value="${zcMap.DEFAULT_SCORE}" name="defaultscore" id="defaultscore3" /></td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
</div>
|
</div>
|
</body>
|
</html>
|