<%@ page pageEncoding="UTF-8" language="java"
contentType="text/html;charset=UTF-8"%>
<%@include file="/pages/es_gov/layout/header.jsp"%>
<script type="text/javascript"
src="${ctx}/scripts/plugins/lhgcore.lhgdialog.min.js"></script>
<script type="text/javascript" src="${ctx}/scripts/e4safe3/plugins/layer/layer.js"></script>
<style>
/* .bottomBtn{position:fixed; bottom:0;text-align:center;} */
</style>
<script type="text/javascript">
$(function(){
refresh();
$('.chk').bind('click',function(){
if(!$(this).prop("checked")){
$(this).val("");
}else{
$(this).val($(this).attr("id"));
}
});
})
function refresh(){
$('.chk').each(function (i, o) {
if ($(o).attr("isMulti")=='true') {
$(o).prop("checked",true);
}
});
}
function isCheckAll(){
var isCheckAllFlag = $("#checkAll").prop("checked");
$('.chk').each(function (i, o) {
if(isCheckAllFlag){
$(o).val($(o).attr("id"));
}
});
}
function refreshCheckbox(){
var tcIdsStr = "";
$('.chk').each(function (i, o) {
if ($(o).attr("id") && $(o).val() && $(o).prop("checked")==true) {
tcIdsStr += "," + $(o).val();
}
});
tcIdsStr = tcIdsStr.substring(1);
$('#tcIds').val(tcIdsStr);
}
function refreshCheckboxNotselect(){
var tcIdsStr = "";
$('.chk').each(function (i, o) {
if (!$(o).prop("checked")) {
tcIdsStr += "," + $(o).attr("id");
}
});
tcIdsStr = tcIdsStr.substring(1);
$('#notTcIds').val(tcIdsStr);
}
<!--
var windowapi = frameElement == null ? window.top : frameElement.api, W = windowapi == null ? window.top
: windowapi.opener;
var zIndex = W == null ? 1976 : W.$.dialog.setting.zIndex + 1;
var dlg;
var submited=false;
var itemid='';
var itemname='';
function opreate(args, opCode) {
var baseUrl = "${ctx}/quota/item/getTqoutaTypeTree.action?fTypeQuota=second_level";
if ('ReturnClose' === opCode) {
frameElement.api.close();
}else if('saveAndUpdateIsmulti'===opCode){
isCheckAll();
refreshCheckbox();
refreshCheckboxNotselect();
var tcids = $("#tcIds").val();
var notTcIds = $("#notTcIds").val();
var baseUpdateUrl = "${ctx}/quota/template/updateIsmulti.action";
console.log(tcids);
console.log(notTcIds);
$.ajax({
url:baseUpdateUrl,
data:{tcidStrs:tcids,notTcIdsStrs:notTcIds},
type:'post',
dataType:'json',
success:function(data){
if(data.status==1){
alert("保存成功");
frameElement.api.close();
}else{
alert("保存失败");
}
}
});
}
}
//=========
window.initNode = function(args) {
$("#typeid").val(args.TYPE_ID);
$("#typename").val(args.TYPE_NAME);
}
//-->
</script>
<x:qx var="qx" menuId="${param.menuId}"></x:qx>
<body>
<form id="opForm" name="opForm" οnsubmit="return true;"
action="${ctx}/quota/template/treeNodeUpdateInfo.action" method="post">
<s:hidden name="menuId" id="menuId" />
<s:hidden name="itemBean.itemid" id="itemBean.itemid" />
<s:hidden name="itemBean.template_id" id="template_id" />
<!-- 令牌环,防止重复提交 -->
<s:token></s:token>
<div class="edit-step" style="margin-top: 0;">
<span class="badge badge-info">4</span><span class="caption">高级配置--指标项是否可以选中多个</span>
</div>
<div class="" >
<table class="table" style="margin:auto">
<input id="tcIds" type="hidden" value=""/>
<input id="notTcIds" type="hidden" value=""/>
<tr>
<th >录入项</th>
<th style="text-align:center" >录入类型</th>
<!-- <td width=60px></td> -->
<td ><input id="checkAll" style="margin:7px" type="checkbox" value="" checkSelector="Selector"/></td>
</tr>
<c:forEach items="${configuredatas}" var="item">
<input id="${item.TCID}" type="hidden" value="${item.TCID}"/>
<tr>
<td id="${item.ITEMID }" style="text-align:right">${item.NAME }</td>
<td id="${item.ITEMID }" style="text-align:center">
<c:if test="${item.CTYPE eq 'text' }">输入框</c:if>
<c:if test="${item.CTYPE eq 'radio' }">单选框</c:if>
<c:if test="${item.CTYPE eq 'checkbox' }">复选框</c:if>
<c:if test="${item.CTYPE eq 'select' }">选择框</c:if>
<c:if test="${item.CTYPE eq 'textarea' }">文本框</c:if>
<c:if test="${item.CTYPE eq 'date' }">日期</c:if>
<c:if test="${item.CTYPE eq 'file' }">附件</c:if>
</td>
<!-- <td width=60px></td> -->
<td ><input style="margin:7px" name="tcId" id="${item.TCID}" isMulti="${item.ISMULTI}" type="checkbox" class="chk" value="${item.TCID}" checkNode="Selector" /></td>
</tr>
</c:forEach>
</table>
<div class="luru_btn_group " style="position:fixed;padding-left:200px;bottom:20px">
<input type="button" style="background-color: #7ebb0f; height: 40px;width: 150px;" οnclick="opreate('','saveAndUpdateIsmulti')" value=" 保存" />
<input type="button" style="background-color: #fc6032; height: 40px; width: 130px;" value=" 返 回 " οnclick="opreate('','ReturnClose')" id="reButton" />
</div>
</div>
</form> <!--editblock end-->
</body>