|
@@ -0,0 +1,399 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+<meta charset="utf-8">
|
|
|
+<title></title>
|
|
|
+<meta name="renderer" content="webkit">
|
|
|
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
+<meta name="viewport"
|
|
|
+ content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
|
+<link rel="stylesheet" href="${request.contextPath }/css/layui.css" media="all">
|
|
|
+<style type="text/css">
|
|
|
+ .layui-layout-admin .layui-footer {
|
|
|
+ left: 0px;
|
|
|
+ padding: 4px 10px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .layui-form-label:before {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ .layui-form {
|
|
|
+ margin-top: 10px;
|
|
|
+ margin-right: 10px;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ .layui-textarea {
|
|
|
+ width: 513px;
|
|
|
+ min-height: 60px;
|
|
|
+ }
|
|
|
+ .cb-show {
|
|
|
+ float: left;
|
|
|
+ padding: 9px 40px 9px 5px;
|
|
|
+ color: red;
|
|
|
+ display:block;
|
|
|
+ }
|
|
|
+ .layui-table-cell {
|
|
|
+ overflow: visible;
|
|
|
+ }
|
|
|
+ /*.layui-table-box {*/
|
|
|
+ /* overflow: visible;*/
|
|
|
+ /*}*/
|
|
|
+ /*.layui-table-body {*/
|
|
|
+ /* overflow: visible;*/
|
|
|
+ /*}*/
|
|
|
+ .layui-form-select dl dd{
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ .layui-input{
|
|
|
+ height: 28px;
|
|
|
+ }
|
|
|
+ a:hover {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #ff5858;
|
|
|
+ }
|
|
|
+ a {
|
|
|
+ text-decoration: underline;
|
|
|
+ color: red;
|
|
|
+ padding: 0 3px;
|
|
|
+ }
|
|
|
+ .tips{
|
|
|
+ padding: 12px 20px 7px 20px;
|
|
|
+ font-size: 22px;
|
|
|
+ color: #01AAED;
|
|
|
+ font-weight: bolder;
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .arrow_box{animation: glow 550ms ease-out infinite alternate; }
|
|
|
+ @keyframes glow {
|
|
|
+ 0% {
|
|
|
+ border-color: #f11919;
|
|
|
+ box-shadow: 0 0 5px rgb(253, 54, 54), inset 0 0 5px rgb(255, 0, 0), 0 1px 0 #e98686;
|
|
|
+ }
|
|
|
+ 100% {
|
|
|
+ border-color: #ff0000;
|
|
|
+ box-shadow: 0 0 10px rgb(246 120 120), inset 0 0 7px rgb(222 41 41), 0 1px 0 #d83838;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|
|
|
+</head>
|
|
|
+<body class="layui-layout-bod" style="overflow:auto;">
|
|
|
+<div class="layui-layout layui-layout-admin">
|
|
|
+ <form class="layui-form">
|
|
|
+ <#--<div class="layui-form-item">
|
|
|
+ <div class="layui-inline">
|
|
|
+ <div class="layui-form-label">机构查询:</div>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <input type="text" class="layui-input" id="jgmc"
|
|
|
+ autocomplete="off" placeholder="请输入机构名称查询" >
|
|
|
+ </div>
|
|
|
+ <button class="layui-btn layui-btn-sm" id="btn_search"><i class="layui-icon"></i>查 询</button>
|
|
|
+ </div>
|
|
|
+ </div>-->
|
|
|
+ <div class="tips" id="tips1">
|
|
|
+ 共查询到<div class="totalNum" style="display: inline-block;"></div>家机构可进行年度评级,请点击<a onclick="kspj()">开始评级</a>
|
|
|
+ </div>
|
|
|
+ <div class="tips" id="tips2">
|
|
|
+ (<div style="display: inline" class="finishNum"></div> / <div class="totalNum" style="display: inline"></div>)正在评级,请稍候...
|
|
|
+ </div>
|
|
|
+ <div class="tips" style="color: #009688;padding: 5px 20px 0px 20px;" id="tips3">
|
|
|
+ <i class="layui-icon" style="font-size: 22px">စ</i> 年度评级已完成,可在页面中调整评级结果,调整结束后请点击<a onclick="finish()">评级完成</a>
|
|
|
+ <div class="layui-inline" style="padding-top: 10px;font-size: 15px;color: #666666;">
|
|
|
+ <label class="layui-form-label" style="text-align: left;padding:6px 0 0 0;width: 72px">机构名称:</label>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <input type="text" class="layui-input" id="jgmc" autocomplete="off" placeholder="请填入机构全称进行查找"
|
|
|
+ style="font-weight: 400;height: 30px;width: 300px;border-color: #c8c8c8">
|
|
|
+ </div>
|
|
|
+ <button id="search" class="layui-btn layui-btn-sm" >
|
|
|
+ <i class="layui-icon"></i>查找
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="layui-form-item">
|
|
|
+ <table class="layui-table" id="lay_table_main"
|
|
|
+ lay-data="{id: 'mainTable'}" lay-filter="main"></table>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+</body>
|
|
|
+<script src="${request.contextPath }/layui.js" charset="utf-8"></script>
|
|
|
+<script>
|
|
|
+ layui.use(['form', 'laydate', 'table', 'form'], function() {
|
|
|
+ var $ = layui.$;
|
|
|
+ var table = layui.table;
|
|
|
+ var form = layui.form;
|
|
|
+
|
|
|
+ table.render({
|
|
|
+ elem : '#lay_table_main',
|
|
|
+ url : '${request.contextPath}/sys/score/list',
|
|
|
+ where : {'zt':1},
|
|
|
+ cols : [[{
|
|
|
+ field : 'xh',
|
|
|
+ title : '序号',
|
|
|
+ width : 48,
|
|
|
+ align : 'center',
|
|
|
+ templet : function (d){
|
|
|
+ return d.LAY_TABLE_INDEX + 1;
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ field : 'jgmc',
|
|
|
+ title : '机构名称',
|
|
|
+ width : 280,
|
|
|
+ align : 'left',
|
|
|
+ templet : function (d){
|
|
|
+ var jgmc = d.jgmc;
|
|
|
+ if (jgmc.length > 16){
|
|
|
+ return d.jgmc.substring(0,16)+"..."
|
|
|
+ }else {
|
|
|
+ return jgmc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ field : 'shtyxydm',
|
|
|
+ title : '信用代码',
|
|
|
+ width : 190,
|
|
|
+ align : 'center'
|
|
|
+ }, {
|
|
|
+ field : 'fz',
|
|
|
+ title : '当前分值',
|
|
|
+ width : 100,
|
|
|
+ align : 'center',
|
|
|
+ templet : function (d){
|
|
|
+ return d.fz + "分"
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ field : 'pjzt',
|
|
|
+ title : '评级状态',
|
|
|
+ width : 100,
|
|
|
+ align : 'center',
|
|
|
+ templet : function(d){
|
|
|
+ return '<div id="zt'+d.id+'">' +
|
|
|
+ '待评级'+
|
|
|
+ // '<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop" style="display: inline-block"></i>' +
|
|
|
+ '</div>';
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ field : 'pjjg',
|
|
|
+ title : '评级结果',
|
|
|
+ width : 136,
|
|
|
+ align : 'center',
|
|
|
+ templet : function(d){
|
|
|
+ return '<div id="jg'+d.id+'">' +
|
|
|
+ '-'+
|
|
|
+ // '<select id="jglx">'+
|
|
|
+ // '<option value="1" >房地产经纪机构</option>'+
|
|
|
+ // '<option value="2">房地产评估机构</option>'+
|
|
|
+ // '<option value="3" selected>房地产开发企业</option>'+
|
|
|
+ // '</select>' +
|
|
|
+ '</div>';
|
|
|
+
|
|
|
+ }
|
|
|
+ }] ],
|
|
|
+ id : 'mainTable',
|
|
|
+ page : false,
|
|
|
+ method : 'post',
|
|
|
+ loading : true,
|
|
|
+ height : 'full-110',
|
|
|
+ response : {
|
|
|
+ // 数据状态的字段名称,默认:code
|
|
|
+ statusName : 'status',
|
|
|
+ // 成功的状态码,默认:0
|
|
|
+ statusCode : 200,
|
|
|
+ // 状态信息的字段名称,默认:msg
|
|
|
+ msgName : 'hint',
|
|
|
+ // 数据总数的字段名称,默认:count
|
|
|
+ countName : 'total',
|
|
|
+ // 数据列表的字段名称,默认:data
|
|
|
+ dataName : 'data'
|
|
|
+ },
|
|
|
+ request : {
|
|
|
+ // 页码的参数名称,默认:page
|
|
|
+ pageName : 'pageNo',
|
|
|
+ // 每页数据量的参数名,默认:limit
|
|
|
+ limitName : 'pageSize'
|
|
|
+ },
|
|
|
+ limits : [ 10, 20 ],
|
|
|
+ limit : 20,
|
|
|
+ done: function(res, curr, count){
|
|
|
+ $("#tips1").css("display","block");
|
|
|
+ $(".totalNum").html(count);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ window.finish = function (){
|
|
|
+ var arr = [];
|
|
|
+ for (var i=0;i<dataArr.length;i++){
|
|
|
+ var obj = {};
|
|
|
+ obj.id = dataArr[i].id;
|
|
|
+ obj.xydj = $('#select'+dataArr[i].id+' option:selected').text();
|
|
|
+ obj.xydjbs = $('#select'+dataArr[i].id).val();
|
|
|
+ arr.push(obj);
|
|
|
+ }
|
|
|
+ var data = {"scoreList":arr};
|
|
|
+ $.ajax({
|
|
|
+ url : '${request.contextPath}/sys/score/ndpj',
|
|
|
+ type : 'post',
|
|
|
+ data : JSON.stringify(data),
|
|
|
+ contentType: 'application/json',
|
|
|
+ dataType : 'json',
|
|
|
+ success : function(data) {
|
|
|
+ console.log(data)
|
|
|
+ if (data.code) {
|
|
|
+ layer.msg(data.msg, {
|
|
|
+ icon : 1
|
|
|
+ }, function(index) {
|
|
|
+ var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
+ parent.layer.close(index);
|
|
|
+ parent.tableReload();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error : function(data, status, e) {
|
|
|
+ layer.alert("操作失败", {
|
|
|
+ icon : 2
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#search").on("click",function(){
|
|
|
+ var jgmc = $("#jgmc").val();
|
|
|
+ if (jgmc != ''){
|
|
|
+ for (var i=0;i<dataArr.length;i++){
|
|
|
+ if (jgmc === dataArr[i].jgmc){
|
|
|
+ var cellHtml = $(".layui-table-main").find("tr[data-index=" + dataArr[i].LAY_TABLE_INDEX + "]");
|
|
|
+ //添加边框闪烁样式
|
|
|
+ cellHtml.addClass("arrow_box");
|
|
|
+ //移除边框闪烁样式
|
|
|
+ setTimeout(function (){
|
|
|
+ cellHtml.removeClass("arrow_box");
|
|
|
+ },2850);
|
|
|
+ var cellTop = cellHtml.offset().top;
|
|
|
+ $(".layui-table-main").scrollTop(cellTop-5);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ var index = 0;
|
|
|
+ var dataArr = [];
|
|
|
+ var setTime = 1;
|
|
|
+ window.kspj = function (){
|
|
|
+ //获取数据
|
|
|
+ dataArr = layui.table.cache["mainTable"]
|
|
|
+ //开启遮罩
|
|
|
+ layer.load(2, {shade: [0.1,'#fff'] });
|
|
|
+ pj();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ function pj(){
|
|
|
+ $("#tips1").css("display","none");
|
|
|
+ $("#tips2").css("display","block");
|
|
|
+ $("#tips3").css("display","none");
|
|
|
+ $(".finishNum").html(index+1);
|
|
|
+ if (index == 0){
|
|
|
+ $("#zt"+dataArr[index].id).html("");
|
|
|
+ $("#zt"+dataArr[index].id).html('<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop" style="display: inline-block"></i>');
|
|
|
+ setTimeout(function (){
|
|
|
+ $("#jg"+dataArr[index].id).html("");
|
|
|
+ $("#jg"+dataArr[index].id).html(getXydj(dataArr[index].fz,dataArr[index].blxxfz,dataArr[index].hmdbs));
|
|
|
+ form.render();
|
|
|
+ $("#zt"+dataArr[index].id).html("");
|
|
|
+ $("#zt"+dataArr[index].id).html('<i class="layui-icon" style="display: inline-block;color: #18ef18;font-weight: 800"></i>');
|
|
|
+ index++;
|
|
|
+ $("#zt"+dataArr[index].id).html("");
|
|
|
+ $("#zt"+dataArr[index].id).html('<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop" style="display: inline-block"></i>')
|
|
|
+ setTimeout(function (){
|
|
|
+ pj()
|
|
|
+ },setTime);
|
|
|
+ },setTime);
|
|
|
+ }else {
|
|
|
+ $("#jg"+dataArr[index].id).html("");
|
|
|
+ $("#jg"+dataArr[index].id).html(getXydj(dataArr[index].fz,dataArr[index].blxxfz,dataArr[index].hmdbs));
|
|
|
+ form.render();
|
|
|
+ // var cellHtml = $(".layui-table-main").find("tr[data-index=" + dataArr[i].LAY_TABLE_INDEX + "]");
|
|
|
+ // var cellTop = cellHtml.offset().top;
|
|
|
+ // console.log(cellTop)
|
|
|
+ if (index>2){
|
|
|
+ $(".layui-table-main").scrollTop(39*index-100);//
|
|
|
+ }
|
|
|
+ $("#zt"+dataArr[index].id).html("");
|
|
|
+ $("#zt"+dataArr[index].id).html('<i class="layui-icon" style="display: inline-block;color: #18ef18;font-weight: 800"></i>');
|
|
|
+ if (index+1<dataArr.length){
|
|
|
+ index++;
|
|
|
+ $("#zt"+dataArr[index].id).html("");
|
|
|
+ $("#zt"+dataArr[index].id).html('<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop" style="display: inline-block"></i>')
|
|
|
+ setTimeout(function (){
|
|
|
+ pj()
|
|
|
+ },setTime);
|
|
|
+ }
|
|
|
+ if (index+1 == dataArr.length){
|
|
|
+ layer.closeAll();
|
|
|
+ setTimeout(function (){
|
|
|
+ $("#tips1").css("display","none");
|
|
|
+ $("#tips2").css("display","none");
|
|
|
+ $("#tips3").css("display","block");
|
|
|
+ },1200);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function getXydj(fz,blxxfz,hemdbs){
|
|
|
+ var xydj = '<select id="select'+dataArr[index].id+'">';
|
|
|
+ if (hemdbs == 1){
|
|
|
+ xydj = xydj + '<option value="5">AAA级</option>' +
|
|
|
+ '<option value="4">AA级</option>' +
|
|
|
+ '<option value="3">A级</option>' +
|
|
|
+ '<option value="2">B级</option>' +
|
|
|
+ '<option value="1" selected>C级</option>' ;
|
|
|
+ }else {
|
|
|
+ if (fz >= 130){
|
|
|
+ if (blxxfz <= 10){
|
|
|
+ xydj = xydj + '<option value="5" selected>AAA级</option>' +
|
|
|
+ '<option value="4">AA级</option>' +
|
|
|
+ '<option value="3">A级</option>' +
|
|
|
+ '<option value="2">B级</option>' +
|
|
|
+ '<option value="1">C级</option>';
|
|
|
+ }
|
|
|
+ }else if (fz >= 110){
|
|
|
+ if (blxxfz <= 20) {
|
|
|
+ xydj = xydj + '<option value="5">AAA级</option>' +
|
|
|
+ '<option value="4" selected>AA级</option>' +
|
|
|
+ '<option value="3">A级</option>' +
|
|
|
+ '<option value="2">B级</option>' +
|
|
|
+ '<option value="1">C级</option>';
|
|
|
+ }
|
|
|
+ }else if (fz >= 100){
|
|
|
+ if (blxxfz <= 30) {
|
|
|
+ xydj = xydj + '<option value="5">AAA级</option>' +
|
|
|
+ '<option value="4">AA级</option>' +
|
|
|
+ '<option value="3" selected>A级</option>' +
|
|
|
+ '<option value="2">B级</option>' +
|
|
|
+ '<option value="1">C级</option>';
|
|
|
+ }
|
|
|
+ }else if (fz >= 80){
|
|
|
+ if (blxxfz <= 40) {
|
|
|
+ xydj = xydj + '<option value="5">AAA级</option>' +
|
|
|
+ '<option value="4">AA级</option>' +
|
|
|
+ '<option value="3">A级</option>' +
|
|
|
+ '<option value="2" selected>B级</option>' +
|
|
|
+ '<option value="1">C级</option>';
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ xydj = xydj + '<option value="5">AAA级</option>' +
|
|
|
+ '<option value="4">AA级</option>' +
|
|
|
+ '<option value="3">A级</option>' +
|
|
|
+ '<option value="2">B级</option>' +
|
|
|
+ '<option value="1" selected>C级</option>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return xydj+'</select>';
|
|
|
+ }
|
|
|
+ });
|
|
|
+</script>
|
|
|
+</html>
|