123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <%@include file="../include.jsp"%>
- <script type="text/javascript">
- var fd_id = "<%=request.getParameter("fd_id")%>";
- var is_adjst = "<%=request.getParameter("is_adjst")%>";
- </script>
- <script type="text/javascript" src="<%=path%>/scripts/business/em/evaluate/admin/createTable.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/business/em/evaluate/admin/sysOuterManageEdit.js"></script>
- <script type="text/javascript">
- //取得用户id
- var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- //获取右边树
- var evaltree = getEvalTree();
- var isEditing=false;
- var dutyData={"list":[{"value":"0","key":"不填数字"},{"value":"1","key":"可填数字"}]};
- var gridlength = 0;
- var columns = [
- {
- display : '扣分',
- name : 'SCORE',
- align : 'center',
- width : "6%",
- editor : {
- type : 'text'
- }
- },
- {
- display : '上限',
- name : 'MAX_SCORE',
- align : 'center',
- width : "6%",
- editor : {
- type : 'text'
- }
- },
- {
- display : '评分依据',
- name : 'DESCRIPTION',
- align : 'center',
- width : "50%",
- editor : {
- type : 'textarea',
- }
- },
- {
- display : '类型',
- name : 'TYPE',
- showTitle : true,
- align : 'center',
- width : "20%",
- editor : {
- type : 'select',
- data : dutyData,
- selWidth : 138
- }
- },
- {
- display : '操作',
- isSort : false,
- width : "18%",
- render : showBtn
- } ];
-
- var delectIds = [];
- var addRowJsons = {};
-
- function initData(fdID){
- delectIds = [];
- addRowJsons = {};
- gridlength = 0;
- initGrid(fdID);
- }
-
- function initGrid(busi_id) {
- var url = $.pathname() + '/ws/targetManage/ManageService/getBasisByBusiId';
- var params = {
- fd_id : busi_id
- };
- $.request.query(url, params, function(data) {
- console.log(data);
- gridlength = data.length;
- $("#maingrid").html("");
- createIndexTable("maingrid",data,columns,trDbClick);
- });
-
- }
-
- function trDbClick (idx,rowdata,columsData){
- isEditing = true;
- rowSpanToInput(idx,rowdata,columsData);
- }
-
- function showBtn (idx,rowdata,colum,columsData){
- var h = "";
- if (!isEditing) {
- h += "<a onclick='onDelete("+ idx +")'><span class='icon_delete'>删除</span></a> ";
- } else {
- h += "<a onclick='endEdit("+ idx +")'><span class='icon_ok'>确认</span></a> ";
- h += "<a onclick='quxiaoEdit("+ idx +")'><span class='icon_delete'>取消</span></a> ";
- }
- isEditing = false;
- return h;
- }
-
- //新增
- function addUser() {
- //debugger;
- var idx = gridlength;
- gridlength++;
- isEditing = true;
- var initdata = {
- "FD_OBJECTID":"FD_OBJECTID"+(idx+1),
- "SCORE" : "",
- "MAX_SCORE" : "",
- "DESCRIPTION" : "",
- "TYPE" : "",
- "BUSINESS_ID" : ""
- };
- //console.log(initdata);
- //console.log("adduser"+idx);
- addNewRows(idx,initdata,columns,trDbClick);
- //$("#row_"+(idx+1)).data("isnew",true);
- }
-
- //删除
- function onDelete(idx) {
- /*var rowData = $("#row_"+idx).data("rowData");
- delectTableData(idx,rowData);*/
- var rowData = $("#row_"+idx).data("rowData");
- if(rowData.FD_OBJECTID != "FD_OBJECTID"+idx){
- delectIds.push(rowData.FD_OBJECTID);
- addRowJsons[rowData.FD_OBJECTID] = "";
- }else{
- addRowJsons["FD_OBJECTID"+idx] = "";
- }
- $("#row_"+idx).remove();
- logresult();
- }
-
- //取消----取消修改
- function quxiaoEdit(idx) {
- /*console.log(idx);
- console.log($("#row_"+idx));
- console.log($("#row_"+idx).data("rowData").FD_OBJECTID);*/
- if($("#row_"+idx).data("rowData").FD_OBJECTID == "FD_OBJECTID"+idx){
- $("#row_"+idx).remove();
- }else{
- rowInputToSpan(idx,$("#row_"+idx).data("rowData"),$("#row_"+idx).data("columsData"));
- }
- logresult();
- };
-
- //结束编辑
- function endEdit(idx) {
- var rowData = $("#row_"+idx).data("rowData");
- var columsData = $("#row_"+idx).data("columsData");
- for(var i=0;i<columsData.length;i++){
- var culum = columsData[i].name;
- var editordata = columsData[i].editor;
- if(editordata && editordata!=""){
- if(editordata.type=="text" || editordata.type=="textarea"){
- rowData[culum] = $("#"+culum+idx).val();
- }
- if(editordata.type=="select"){
- rowData[culum] = $("#"+culum+idx).attr("relValue");
- }
- }
- }
- //console.log(rowData);
- addRowJsons[rowData.FD_OBJECTID] = rowData;
- rowInputToSpan(idx,rowData,columsData);
- logresult();
- }
-
- function saveTableData(busi_id) {
- var url = $.pathname() + '/ws/targetManage/ManageService/addBasis';
- var params = {
- business_id:busi_id,
- delectIds:delectIds.toString(),
- json : JSON.stringify(jsonToArray(addRowJsons))
- };
- $.request.query(url, params, function(data) {
- initOutViewTable(busi_id);
- });
- }
-
- function initOutViewTable(busi_id){
- var url = $.pathname() + '/ws/targetManage/ManageService/getBasisByBusiId';
- var params = {
- fd_id : busi_id
- };
- $.request.query(url, params, function(data) {
- //console.log(data);
- var columsData = [
- { display : '分值', name : 'SCORE', align : 'center',width : "10%",},
- { display : '典型依据', name : 'DESCRIPTION', align : 'left',width : "65%",},
- { display : '类型', name : 'TYPE', align : 'center',width : "25%",}
- ];
- var $dom = $("#maingrid_view");
- $dom.html("");
- var $gridMainCont = $('<div class="gridmaincont"></div>');
- $dom.append($gridMainCont);
- var $gridCont = $('<div class="gridCont"></div>');
- $gridMainCont.append($gridCont);
- var tablehtml = '<div class="tablediv"><table class="tablecont" cellspacing="0" >';
- tablehtml += '<tr class="tablehead">';
- for(var i=0;i<columsData.length;i++){
- tablehtml += '<th width="'+columsData[i].width+'"><span>'+columsData[i].display+'</span></th>';
- }
- tablehtml += '</tr>';
- if(data.length!=0){
- for(var j=0;j<data.length;j++){
- var rowData = data[j];
- var idx = data.length-j;
- tablehtml += '<tr class="tablerow_view">';
- for(var k=0;k<columsData.length;k++){
- var culum = columsData[k].name;
- var value = rowData[culum]==undefined ?"":rowData[culum];
- if(culum == "TYPE"){
- if(value=="0"){
- value = "不填数字";
- }else if(value=="1"){
- value = "可填数字";
- }
- }
- tablehtml += '<td align="'+columsData[k].align+'" ><span title="'+value+'">'+value+'</span></td>';
- }
- tablehtml += '</tr>';
- }
- }
- tablehtml += '</table></div>';
- $gridCont.append(tablehtml);
- });
- }
-
- /**
- *打印结果
- */
- function logresult(){
- //console.log("删除的id:");
- //console.log(delectIds);
- //console.log("添加或者修改的数据:");
- //console.log(jsonToArray(addRowJsons));
- }
-
- function initComplete() {
- evaltree.init();
- var layout = $("#layout1").layout({
- height : 550,
- leftWidth : 250,
- space : 3,
- allowLeftResize : false,
- onEndResize : function() {
- triggerCustomHeightSet();
- },
- onHeightChanged : function(){
-
- }
- });
- //返回
- $("#back").hover(function(){
- $(this).attr("src","/nwyj/images/temp/back_hover.png");
- },function(){
- $(this).attr("src","/nwyj/images/temp/back.png");
- });
- }
- function customHeightSet(contentHeight) {
- $(".l-layout-left .l-layout-content").height("508");
- }
- function goback() {
- $('#frmright', window.parent.document).attr('src', $.pathname() + "/page/business/em/evaluate/admin/sysAdmin.jsp");
- }
-
- </script>
- <style>
- html,body{margin: 0;padding: 0;}
- legend{
- color:#3e62a0;
- }
- .mybox {
- width: 1000px;
- margin: 10px auto;
- background: #fff;
- padding: 0 2px 0 0;
- }
- #maingrid{
- overflow-y:hidden;
- overflow-x:hidden;
- }
- .box_cont{
- height:100%;
- overflow : auto;
- }
- .box_left{
- height:100%;
- overflow : auto;
- }
- .left-cont{
- overflow-x: auto;
- overflow-y: hidden;
- }
- .class_color {
- background-color: rgb(237, 239, 253);
- }
- .tablediv{width: 100%;height: auto;margin:0;padding:0; font-size: 12px; font-weight: normal;}
- .tablecont{overflow: hidden; width: 100%;height: auto; margin: 0px;padding: 0px; border: 0px; border-top: 1px solid #c7c6c6; border-left: 1px solid #c7c6c6;}
- .tablecont tr{width: 100%;margin: 0px;padding: 0px; height: 36px; line-height: 33px;}
- .tablecont th{ text-align: center; border-bottom: 1px solid #c7c6c6; border-right: 1px solid #c7c6c6; margin: 0px;padding: 0px; font-weight: normal;}
- .tablecont td{ text-align: center; border-bottom: 1px solid #c7c6c6; border-right: 1px solid #c7c6c6; margin: 0px;padding: 0px; }
- .tablehead {background-color: rgb(237, 239, 253);}
- .tablerow {background-color: #FFFFFF;}
- .tablerow_view {background-color: #FFFFFF;}
- .tablerow:hover {background-color: #EEE;}
- .tablerow_view:hover {background-color: #EEE;}
- .tablecont span{height: 30px;overflow: hidden;white-space:normal;word-wrap:break-word;display: inline-block;word-break: break-all;}
- .gridmaincont{width: 100%;height: auto;position: relative;}
- .fixedtablehead {position: absolute;top: 0;left: 0;}
- .gridCont{width: 100%;overflow: auto;}
-
- </style>
- </head>
- <body>
- <div class="b-m-mpanel" style="width: 150px;visibility:hidden;" id="rMenu">
- <div class="b-m-item" id="m_add" onclick="evaltree.addTreeNode();">
- <img style="vertical-align:middle;" src="<%=path%>/scripts/qui/libs/images/icons/add.png" /><span>增加下一级</span>
- </div>
-
- <div class="b-m-item" id="m_add_end" onclick="evaltree.addEndTreeNode();">
- <img style="vertical-align:middle;" src="<%=path%>/scripts/qui/libs/images/icons/add.png" /><span>增加评估内容</span>
- </div>
-
- <div class="b-m-item" id="m_edit" onclick="evaltree.editTreeNode();">
- <img style="vertical-align:middle;" src="<%=path%>/scripts/qui/libs/images/icons/edit.png" /><span>修改</span>
- </div>
- <div class="b-m-item" id="m_del" onclick="evaltree.removeTreeNode();">
- <img style="vertical-align:middle;" src="<%=path%>/scripts/qui/libs/images/icons/close.png" /><span>删除</span>
- </div>
- </div>
- <div class="mybox" align="" >
- <div class="" align="center" style="padding: 10px 20px 0;">
- <a href="javascript:;"><img id="back" onclick="goback();" align="left" src="<%=path%>/images/temp/back.png" /></a>
- <font style="font-weight: bold;font-size: 20px;line-height: 45px;" class="titleShow"> 配置详情信息</font>
- </div>
-
- <div id="layout1" >
- <div position="left" style="" panelTitle="配置体系">
- <div class="box_left">
- <!-- <input type="button" onclick="test();" value="提交"/> -->
- <ul id="tree-1" class="ztree" ></ul>
- </div>
- </div>
- <div position="center" style="">
- <div class="box_cont">
- <div style="padding:10px;">
- <fieldset id="jibenxinxi" class="fileTable">
- <legend >基本信息:</legend>
- <table class="tableStyle" align="center">
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color">名称:</td>
- <td colspan="3" ><span id="name_01" ></span></td>
- </tr>
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color">上级名称:</td>
- <td colspan="1" width="32%" ><span id="parent_name_01" ></span></td>
- <td colspan="1" width="120px" align="right" class="class_color">类型:</td>
- <td colspan="1" ><span id="type_01" ></span></td>
- </tr>
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color">标准分:</td>
- <td colspan="1"><span id="sta_score_01" ></span></td>
- <td colspan="1" width="120px" align="right" class="class_color">标准条纹:</td>
- <td colspan="1" ><span id="obj_stripe_01" ></span></td>
- </tr>
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color">检查方法:</td>
- <td colspan="1" ><span id="check_way_01" ></span></td>
- <td colspan="2" ></td>
- </tr>
-
- <tr class="viewShow" style="display: none;" >
- <td colspan="1" width="120px" align="right" class="class_color">检查说明:</td>
- <td colspan="3" ><span id="check_instruction_01" ></span></td>
- </tr>
- <tr class="viewShow" style="display: none;" >
- <td colspan="1" width="120px" align="right" class="class_color">建设内容:</td>
- <td colspan="3" ><span id="suggestion_01" ></span></td>
- </tr>
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color">备注:</td>
- <td colspan="3" ><span id="remark_01" ></span></td>
- </tr>
- </table>
- <div class="viewShow " id = "viewShow_yiju_id" style="display: none;" >
- <table class="tableStyle" align="center" style="position:relative;border-top: none;" >
- <tr>
- <td style="border-bottom: none;">
- <div>配置评估标准</div>
- </td>
- </tr>
- </table>
- <div id="maingrid_view" style="width:auto;position:relative;"></div>
- </div>
-
- </fieldset>
- <br />
- <div id="editnextcont" style="display:none;">
- <form id="contFrom01" >
- <fieldset id="editnext01" style="display:none;" class="fileTable" >
- <legend id="legendTitle01" >编辑下一级:</legend>
- <div>
- <input type="hidden" name="SYS_ID"/>
- <input type="hidden" name="SORT"/>
- </div>
- <div class="" align="right" style="margin-right: 15px;margin-bottom: 10px;">
- <input value="保存" type="button" onclick="evaltree.saveFrom(1);" />
- <input value="重置" type="button" onclick="evaltree.resetFrom(1);"/>
- <input value="取消" type="button" onclick="evaltree.cansleFrom();"/>
- </div>
- <table class="tableStyle" align="center" >
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color"><span class="star">*</span>名称:</td>
- <td colspan="3" align="left">
- <input id="NAME01" name="NAME" class="validate[required]" type="text" style="width:99%;" />
- </td>
- </tr>
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color" ><span class="star">*</span>上级名称:</td>
- <td colspan="1" align="left">
- <input id="PARENT_ID01" name="PARENT_ID" type="hidden" ></input>
- <input id="PATH_ID01" name="PATH_ID" type="hidden" ></input>
- <input id="PARENT_ID_SHOW01" class="validate[required]" readonly="readonly" type="text" ></input>
- </td>
- <td colspan="1" width="120px" align="right" class="class_color" ><span class="star">*</span>类型:</td>
- <td colspan="1" align="left">
- <select id="TYPE01" name="TYPE" class="validate[required]" readonly="readonly" editable=false prompt="请选择" selWidth="206" ></select>
- <input id="IS_END01" name="IS_END" type="hidden" value="0"></input>
- </td>
- </tr>
-
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color"><span class="star">*</span>标准分:</td>
- <td colspan="1" align="left">
- <input id="STA_SCORE01" name="STA_SCORE" class="validate[required]" type="text" ></input>
- </td>
- <td colspan="1" width="120px" align="right" class="class_color"><span class="star">*</span>标准条纹:</td>
- <td colspan="1" align="left">
- <input id="OBJ_STRIPE01" name="OBJ_STRIPE" class="validate[required]" type="text" ></input>
- </td>
- </tr>
-
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color"><span>备注:</span></td>
- <td colspan="3" align="left">
- <textarea id="REMARK01" name="REMARK" style="width:99%;"></textarea>
- </td>
- </tr>
-
- </table>
- </fieldset>
- </form>
-
- <form id="contFrom02" >
- <fieldset id="editnext02" style="display:none;" class="fileTable" >
- <legend id="legendTitle02">编辑下一级:</legend>
- <div>
- <input type="hidden" name="SYS_ID"/>
- <input type="hidden" name="SORT"/>
- </div>
-
- <div class="" align="right" style="margin-right: 15px;margin-bottom: 10px;">
- <input value="保存" type="button" onclick="evaltree.saveFrom(2);" />
- <input value="重置" type="button" onclick="evaltree.resetFrom(2);"/>
- <input value="取消" type="button" onclick="evaltree.cansleFrom();"/>
- <!-- <input value="测试" type="button" onclick="testclick();"/> -->
- </div>
- <table class="tableStyle" align="center" >
- <tr>
- <td colspan="4" align="left" >
- 基本信息:
- </td>
- </tr>
-
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color"><span class="star">*</span>名称:</td>
- <td colspan="3" align="left">
- <input id="NAME" name="NAME" class="validate[required]" type="text" style="width:99%;" />
- </td>
- </tr>
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color" ><span class="star">*</span>上级名称:</td>
- <td colspan="1" align="left">
- <input id="PARENT_ID" name="PARENT_ID" type="hidden" ></input>
- <input id="PATH_ID01" name="PATH_ID" type="hidden" ></input>
- <input id="PARENT_ID_SHOW" class="validate[required]" readonly="readonly" type="text" ></input>
- </td>
- <td colspan="1" width="120px" align="right" class="class_color" ><span class="star">*</span>类型:</td>
- <td colspan="1" align="left">
- <select id="TYPE" name="TYPE" class="validate[required]" readonly="readonly" editable=false prompt="请选择" selWidth="206" ></select>
- <input id="IS_END" name="IS_END" type="hidden" value="0"></input>
- </td>
- </tr>
-
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color"><span class="star">*</span>标准分:</td>
- <td colspan="1" align="left">
- <input id="STA_SCORE" name="STA_SCORE" class="validate[required]" type="text" ></input>
- </td>
- <td colspan="1" width="120px" align="right" class="class_color"><span class="star">*</span>标准条纹:</td>
- <td colspan="1" align="left">
- <input id="OBJ_STRIPE" name="OBJ_STRIPE" class="validate[required]" type="text" ></input>
- </td>
- </tr>
-
- <tr >
- <td colspan="1" width="120px" align="right" class="class_color" ><span class="star">*</span>检查方法:</td>
- <td colspan="1" align="left">
- <select id="CHECK_WAY" name="CHECK_WAY" class="validate[required]" editable=false prompt="请选择" data='{"list":[{"value":"1","key":"人员访谈"},{"value":"2","key":"查阅资料"},{"value":"3","key":"现场验证"},{"value":"4","key":"其他"}]}' selWidth="206" ></select>
- </td>
- <td colspan="2" ></td>
- </tr>
- <tr >
- <td colspan="1" width="120px" align="right" class="class_color">检查说明:</td>
- <td colspan="3" align="left">
- <input id="CHECK_INSTRUCTION" name="CHECK_INSTRUCTION" type="text" style="width:99%;" />
- </td>
- </tr>
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color"><span>建设内容:</span></td>
- <td colspan="3" align="left">
- <textarea id="SUGGESTION" name="SUGGESTION" style="width:99%;"></textarea>
- </td>
- </tr>
- <tr>
- <td colspan="1" width="120px" align="right" class="class_color"><span>备注:</span></td>
- <td colspan="3" align="left">
- <textarea id="REMARK" name="REMARK" style="width:99%;"></textarea>
- </td>
- </tr>
- </table>
-
- </fieldset>
- </form>
- <div class="" style="margin-bottom : 10px;width:100%;" id="padding_right5">
- <div class="" style="padding:10px;border:1px solid #DDD;border-top: none;" align="center" >
- <table class="tableStyle" align="center" style="position:relative;margin-top:10px;" >
- <tr>
- <td style="border-bottom: none;">
- <div>配置评估标准</div>
- <input value="添加" type="button" onclick="addUser()" style="position:absolute;right:5px;top:5px;" />
- </td>
- </tr>
- </table>
- <div id="maingrid" style="width:auto;position:relative;z-index: 1000;"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </body>
- </html>
|