| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <html>
- <head>
- <style type="text/css">
- .left-div, .right-div {
- float: left;
- /*width: 48%;*/
- height: 94%;
- box-sizing: border-box;
- position: relative;
- }
- .left-div {
- width: 37%;
- }
- .right-div {
- width: 62.7%;
- }
- table.list {
- margin-left: 0px !important;
- }
- table.list th{
- /* width: 158px;*/
- }
- table.list td{
- /* width: 158px;*/
- }
- .list-div tr {
- border-bottom: 1px solid #e4e4e4;
- background-color: #f0f0f0;
- }
- .list-div tr:hover {
- border-bottom: 1px solid #e4e4e4;
- background-color: #c7e3fc;
- }
- .list tr:nth-child(even):hover {
- background-color:#c7e3fc;
- }
- .list-div td {
- /*max-width: 140px !important;*/
- padding: 0px 12px 0px 12px !important;
- }
- .list-div th {
- padding: 0px 12px 0px 12px !important;
- }
- .left-button {
- width: 100%;
- float: left;
- text-align: center;
- position: absolute;
- bottom: 0;
- }
- .left-div {
- margin-right: 1px;
- }
- .times {
- width: 80px !important;
- }
- .form-text {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .cjfs {
- width: 60px !important;
- }
- .list tr td {
- padding-right: 28px;
- }
- input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
- -webkit-appearance: none;
- }
- input[type="text"] {
- -moz-appearance: textfield;
- width: 65px;
- text-align: right;
- }
- .content-div {
- padding-right:15px!important;
- }
- .xylist {
- display: block;
- height: 630px;
- overflow-y: auto;
- }
- .list tr{
- display: table;
- width: 100%;
- table-layout: fixed;
- }
- .list-highlight {
- color: #2b368f!important;
- font-size: 14px!important;
- }
- </style>
- <script type="text/javascript">
- console.log("start!!!");
- window.onload = function () { // 加载数据服务,统一为 ByA。Lin
- loadXsCj();
- }
- function loadXsCj(e){
- console.log("loadXsCj");
- var rcid = ${rcid};
- $.ajax({
- url : "<serv.ss name='rcXcdjl_excelInitAddByZxxz'/>",
- type : 'post',
- async : false,
- dataType: "json", // 增加。Lin
- data : {
- 'rcid' : rcid
- },
- success : function(result) {
- /* 改。Lin
- * 增加 dataType: "json", 了
- * 只有一组数据
- var data = eval("(" + result + ")");
- //学员信息
- var stuData = data.stulist;
- */ var stuData = result;
- // var stuStr = ""; // 去掉,没用到。Lin
- var jlztmBoolean=true;
- for (var i in stuData) {
- console.log(stuData[i]);
- var stu = stuData[i];
- var str = "";
- if(stu.jlztm && stu.jlztm == 51){//加灰色样式
- str += "<tr class='filter'>";
- }else{//不加
- str += "<tr>";
- }
- str += "<input type='hidden' value='" + stu.xcdid + "' name='xcdid' />";
- str += "<input type='hidden' value='";
- if ("xcdjlid" in stu)
- str += stu.xcdjlid;
- else
- str += "null";
- str += "' name='xcdjlid' />"; // + stu.ryid + "' name='xyid' />"。Lin
- str += "<td style='width:85px;' class='list-highlight'>" + stu.xcdmc + "</td>"; // + stu.xm +。Lin
- var jyfs="";
- if(stu.jlztm==51){
- jyfs=" readonly='true' ";
- }
- // 情况描述。Lin
- str += "<td style='width:120px;text-align: right;'>" +
- "<input "+ jyfs +" type='text' value='"+ stu.qkms +"' name='qkms' tab='tabField'"+
- " onfocus='keydown_to_tab(this)' onkeypress='if(event.keyCode==13) focusNextInput(this);'/>" +
- "</td>";
- // 处理描述。Lin
- str += "<td style='width:120px;text-align: right;'>" +
- "<input "+ jyfs +" type='text' value='"+ stu.clms +"' name='clms' tab='tabField'"+
- " onfocus='keydown_to_tab(this)' onkeypress='if(event.keyCode==13) focusNextInput(this);'/>" +
- "</td>";
- // 责任人。Lin
- str += "<td style='width:50px;text-align: right;'>" +
- "<input "+ jyfs +" type='text' value='"+ stu.zrr +"' name='zrr' tab='tabField'"+
- " onfocus='keydown_to_tab(this)' onkeypress='if(event.keyCode==13) focusNextInput(this);'/>" +
- "</td>";
- str += "</tr>";
- $('.xylist').append($(str));
- if(stu.jlztm==1||!stu.jlztm)
- jlztmBoolean=false;
- }
- //if (stuData[0].jlztm && stuData[0].jlztm != 1) {
- if(jlztmBoolean){
- $('.xylist input').attr("disabled", "disabled");
- $('input[name="save"]').attr('disabled', 'disabled');
- $('input[name="subm"]').attr('disabled', 'disabled');
- $('input[name="save"]').css("color", "#aaa");
- $('input[name="subm"]').css("color", "#aaa");
- } else {
- $('input[name="save"]').attr('disabled', false);
- $('input[name="subm"]').attr('disabled', false);
- $('input[name="save"]').css("color", "");
- $('input[name="subm"]').css("color", "");
- }
- }
- });
- }
- </script>
- </head>
- <body>
- <!-- 查询 -->
- <%-- 再改,点击 保存 按钮后不能关闭弹出窗口的问题 -- <form action= 里增加 dest=。Lin
- <form action="" name="cjform" method="post"> --%>
- <form action="<serv.ss name='rcXcdjl_excelSaveAddByZxxz' dest='info' parm='{requestParentViewObject:"${requestParentViewObject}"}'/>" method="post">
- <input type="hidden" name="xxx" value="${dataType}" />
- <input type="hidden" name="rcid" value="${rcid}" />
- <div class="list-div list-search-div right-div content-div "
- style="height: 90% overflow-x:hidden; min-height:80%;">
- <table class="list aa" style=" float:right;width:100%!important;">
- <thead style="width: 100%">
- <tr style="border:none;">
- <th style="padding: 0 0 0 12px;width: 140px;">巡查点</th>
- <th style="width:85px;">情况描述</th>
- <th style="width: 275px;">处理描述</th>
- <th style="width:120px;">责任人</th>
- </tr>
- </thead>
- <tbody ssOddClazz="list-odd" ssEvenClazz="list-even" ssHovClazz="list-hover" class="xylist scrollbar" ssFith="{list:true,rowHeight:35}" >
- <rpt.ss name="ssList" id="item">
- <tr class="list-dim" >
- <td style='width: 205px;'></td>
- <td></td>
- <td style='width: 275px;'>
- <onoff.ss name="qxfs" val="1,2" mode="play" />
- </td>
- <td></td>
- <td></td>
- </tr>
- </rpt.ss>
- </tbody>
- </table>
- </div>
- <div class="bottom-div">
- <equal.ss val='${dataType=="play"}' val2="false">
- <div class="bottom-down-div">
- <%-- 改,二级对象的保存就是提交,新的提交只是放到二级对象草稿箱(不需要确认)。Lin
- <in@put type="button" name="save" value="保存" class="bottom-button"
- onclick="submitForm(1);" style="display: inline-block !important;">
- 再改,解决点击 保存 按钮后不能关闭弹出窗口的问题 -- <form action= 里增加 dest=
- 直接用标准的 <form 的提交。直接写到 <form action= 里
- <in@put type="button" name="save" value="保存" class="bottom-button"
- onclick="submitForm();" style="display: inline-block !important;"> --%>
- <input type="submit" value="保存" class="bottom-button"/>
- <%-- 去掉,界面上(业务上),二级对象没有提交 -- 二级对象的保存就是提交。Lin
- <in@put type="button" name="subm" value="提交" class="bottom-button"
- onclick="tjConfirm();" style="display: inline-block !important;">
- --%>
- <input type="button" value="取消" class="bottom-button"
- onclick="wd.display.closeDialog();">
- </div>
- </equal.ss>
- </div>
- </form>
- </body>
- <script type="text/javascript">
- <%-- 去掉,界面上(业务上),二级对象没有提交 -- 二级对象的保存就是提交。Lin
- function tjConfirm(){
- wd.display.confirm(" ","请确认成绩已全部录完,提交后不能在此页面修改!",function(){submitForm(2)},function(){return;});
- }
- --%>
- <%-- 改,去掉 type,只有一个提交了 -- 二级对象的保存就是提交,新的提交只是放到二级对象草稿箱(不需要确认)。Lin
- function submitForm(type) { --%>
- <%-- 再去掉,直接写到 <form action= 里 -- 解决点击 保存 按钮后不能关闭弹出窗口的问题 -- <form action= 里增加 dest=。Lin
- function submitForm() {
- //若是 保存更新,就不提交表单
- var f = $('form[name="cjform"]');
- --%>
- <%-- 去掉,去掉 type,只有一个提交了 -- 二级对象的保存就是提交,新的提交只是放到二级对象草稿箱(不需要确认)。Lin
- if (type == 1) {
- $.ajax({
- url : "<serv.ss name='rcXcdjl_excelSaveAddByZxxz'/>", // :"m_xy_gl_djcj_bc"。Lin
- type : "post",
- data : f.serialize(),
- beforeSend : function(result) {
- //将 保存 提交按钮改为 不可用
- $('input[name="save"]').attr('disabled', 'disabled');
- $('input[name="subm"]').attr('disabled', 'disabled');
- $('input[name="save"]').css("color", "#aaa");
- $('input[name="subm"]').css("color", "#aaa");
- },
- success : function(result) {
- var data = eval("(" + result + ")");
- if (data.result)
- //eval('@service{dest:"sys_info",show:"wdDialog",param:{"msg":"保存成功"}}@');
- wd.display.alert("保存成功");
- else
- //eval('@service{dest:"sys_info",show:"wdDialog",param:{"msg":"保存失败"}}@');
- wd.display.alert("保存失败");
- },
- error : function(result) {
- //eval('@service{dest:"sys_info",show:"wdDialog",param:{"msg":"保存失败"}}@');
- wd.display.alert("保存失败");
- },
- complete : function(result) {
- afterSelectPlan(1);
- /*$('input[name="save"]').attr('disabled', false);
- $('input[name="subm"]').attr('disabled', false);
- $('input[name="save"]').css("color", "#015a31");
- $('input[name="subm"]').css("color", "#015a31");*/
- }
- });
- }
- if (type == 2) {
- --%>
- <%-- 改,续传变量,BpmU.saveSq( 需要用到 -- 增加写 二级对象草稿箱。Lin
- f.attr('action', '@service{name:"m_xy_gl_djcj_tj",dest:"sys_info"}@'); --%>
- <%-- 再去掉,直接写到 <form action= 里 -- 解决点击 保存 按钮后不能关闭弹出窗口的问题 -- <form action= 里增加 dest=。Lin
- f.attr('action', "<serv.ss name='rcXcdjl_excelSaveAddByZxxz' parm='{requestParentViewObject:"${requestParentViewObject}"}'/>");
- f.submit();
- --%>
- // } // 去掉,去掉 type,只有一个提交了。Lin
- <%-- 再去掉,直接写到 <form action= 里 -- 解决点击 保存 按钮后不能关闭弹出窗口的问题 -- <form action= 里增加 dest=。Lin
- }
- --%>
- // 回车下一个获取焦点
- function focusNextInput(thisInput) {
- var inputs = $("input[tab='tabField']"); // = $("input[name='cjfs']")。Lin
- for (var i = 0; i < inputs.length; i++) {
- // 如果是最后一个,则焦点回到第一个
- if (i == (inputs.length - 1)) {
- inputs[0].focus(); break;
- } else if (thisInput == inputs[i]) {
- inputs[i + 1].focus(); break;
- }
- }
- }
- // 上一个获取焦点
- function focusUpInput(thisInput) {
- // console.log(11111);
- var inputs = $("input[tab='tabField']"); // = $("input[name='cjfs']")。Lin
- for (var i = 0; i < inputs.length; i++) {
- // 如果是第一个,则焦点回到最后一个
- if (thisInput == inputs[i]) {
- inputs[i - 1].focus(); break;
- } else if (thisInput == inputs[0]) {
- inputs[inputs.length - 1].focus(); break;
- }
- }
- }
- function keydown_to_tab($input) { //聚焦
- // console.log($input)
- $($input).bind("keydown", function(e) {
- // var n = $('.cjfs').length; // 去掉,没用到。Lin
- // console.log(n,e.keyCode)
- if (e.keyCode == 40) { //键盘按下
- focusNextInput($input)
- } else if (e.keyCode == 38) { //键盘按上
- focusUpInput($input)
- }
- });
- }
- </script>
- </html>
|