Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/bot/showBotList.jsp
2026-01-16 14:13:44 +08:00

295 lines
14 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page import="com.sipai.entity.base.ServerObject"%>
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<!-- 文件上传-->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
<script type="text/javascript">
function doshow(bizid){
console.log(bizid);
if(bizid=='' || bizid == undefined){
bizid = '9b162f0489e749ccafa86661ebcb6331';
}
$.post(ext.contextPath + '/bot/bot/getbotList.do', {bizid:bizid} , function(data) {
// console.log(data);
var typejsonlist= JSON.parse(data);
var html = "";
html += '<div class="firstdiv" style="width: 100%;height:auto;">';
for(var i = 0;i<typejsonlist.length;i++){
var color = "#"+typejsonlist[i].color;
for(var j=0;j<typejsonlist[i].codes.length;j++){
html += '<div style="width: 260px;height: 260px;float:left;">';
html += '<div style="width:100%;height:90%;background-color:white;border-radius:10px;">';
//第一层15%
html += '<div style="width:100%;height:15%;background-color: '+color+';cursor: pointer;border-top-left-radius:10px;border-top-right-radius:10px;" onclick="dobotedit(\''+typejsonlist[i].codes[j].id+'\');">';
html += '<div style="width:100%;height:100%">';
html += '<div style="width:100%;height:25%"></div>';
html += '<div style="width:100%;height:50%;color:white;text-align:center;">'+typejsonlist[i].codes[j].bizname+'</div>';
html += '<div style="width:100%;height:25%"></div>';
html += '</div>';
html += '</div>';
//第二层85%
html += '<div style="width:100;height:85%">';
//左
html += '<div style="width:5%;height:100%;float:left;"></div>';
//中
html += '<div style="width:90%;height:100%;float:left;">';
//中间第一层45%
html +='<div style="width:100%;height:45%;">';
//上
html += '<div style="width:100%;height:10%"></div>';
//下
html += '<div style="width:100%;height:90%">';
//下左width60%
html += '<div style="width:65%;height:100%;float:left">';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:8px;">设计规模:</div>';
html += '<div style="width:60%;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].designScale+'</div>';
html += '</div>';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:8px;">排放标准:</div>';
html += '<div style="width:60%;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].emission+'</div>';
html += '</div>';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:8px;">处理工艺:</div>';
if (typejsonlist[i].codes[j].process.byteLength()>12){
html += '<div style="width:60%;float:left;font-weight: 600;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="'+typejsonlist[i].codes[j].process+'">'+typejsonlist[i].codes[j].process.substr(0,6)+'...'+'</div>';
}else{
html += '<div style="width:60%;float:left;font-weight: 600;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="'+typejsonlist[i].codes[j].process+'">'+typejsonlist[i].codes[j].process+'</div>';
}
html += '</div>';
html += '</div>';
//下中width10%
html += '<div style="width:5%;height:100%;float:left">';
html += '</div>';
//下右width30% 里边是厂图片
html += '<div style="width:30%;height:100%;float:left">';
html += '<div style="width:65px;height:65px;">';
html += '<img src="<%=request.getContextPath()%>/IMG/bot/biz.png" style="width: 100%;height: 100%;">';
html += '</div>';
html += '</div>';
html += '</div>';
html += '</div>';
//中间第二层35%
html += '<div style="width:100%;height:35%;border-bottom: 1px solid #EBEBEB;border-top: 1px solid #EBEBEB;">';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:100%;height:40%">';
html += '<div style="width:59%;float:left;color:#8F9297;font-size:8px;">初始污水处理服务费单价:</div>';
html += '<div style="width:40%;float:left;font-weight: 600;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="'+typejsonlist[i].codes[j].price+'">'+typejsonlist[i].codes[j].price+'</div>';
html += '</div>';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:100%;height:40%">';
html += '<div style="width:35%;float:left;color:#8F9297;font-size:8px;">协议签订日期:</div>';
html += '<div style="width:65%;float:left;font-weight: 600;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="'+typejsonlist[i].codes[j].signdate+'">'+typejsonlist[i].codes[j].signdate+'</div>';
html += '</div>';
html += '</div>'
//中间第三层20%
html += '<div style="width:100%;height:20%;">';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:100%;height:80%">';
html += '<div style="width:85%;height:100%;float:left;color:#8F9297;">';
html += '<div style="width:auto;float:left;color:#8F9297">特许经营期:</div>';
html += '<div style="width:auto;float:left;font-weight: 600;color:#333">'+typejsonlist[i].codes[j].franchisePeriod+'</div>';
html += '</div>';
//放下载文件的图片
html += '<div style="width:15%;height:100%;float:left;">';
html += '<div style="width:22px;height:19px;">';
html += '<img src="<%=request.getContextPath()%>/IMG/bot/downfile.png" style="width: 100%;height: 100%;cursor: pointer;" onclick="fileDownload(\''+typejsonlist[i].codes[j].fileid+'\',\''+typejsonlist[i].codes[j].filetype+'\');">';
html += '</div>';
html += '</div>';
html += '</div>';
html += '</div>'
html += '</div>';
//右
html += '<div style="width:5%;height:100%;float:left;"></div>';
html += '</div>';
html += '</div>';
html += '</div>';
html += '<div style="width:10px;height:120px;background-color:rgba(0,0,0,0);float:left; "></div>';
}
}
html += '</div>';
$('#sublists').html(html);
});
}
var tbName ='tb_bot_file'; //数据表
String.prototype.byteLength = function() { //获取字符串的字节数扩展string类型方法
var b = 0;
if(this.length>0) { //如果存在字符串,则执行计划
for(var i = 0; i < 1; i ++) { //遍历字符串,枚举每个字符
if(this.charCodeAt(i) > 255) { //字符编码大于255说明是双字节字符
b += 2; //则累加2个
}else {
b ++; //否则递加一次
}
}
return b; //返回字节数
} else {
return 0; //如果参数为空则返回0个
}
}
//下载文件
var fileDownload = function(id,type) {
if(type == "no"){
swal('当前无文件下载!');
}else if(type=="yes"){
window.open(ext.contextPath + "/base/downloadFile.do?key="+id+"&tbName="+tbName,"_self");
}
// $.post(ext.contextPath + '/base/downloadFile.do', {key:id,tbName:tbName} , function(data) {
// });
};
var dobotedit = function(id) {
$.post(ext.contextPath + '/bot/bot/doBotEdit.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
$(function () {
doshow(unitId);
//简易公司combotree
$.post(ext.contextPath + '/user/getUnitForTreeFromTop.do', { ng: '', unitId: unitId }, function (data) {
//console.log("data",data[0]);
/* if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
//当登陆者的pid以下没有子节点时显示单独一个span
$("#search_pid").val(data[0].id);
$("#companyselect").hide();
$("#companyName").text("公司:" + data[0].text);
showtable();
} else */if ((data.length == 1 && data.nodes != "") || data.length > 1) {
//第一次加载时赋值
$("#search_pid").val(data[0].id);
$("#cname_input").val(data[0].text);
// showtable();
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
$('#companytree').treeview({
data: data,
showBorder: false,
});
$('#companytree').on('nodeSelected', function (event, data) {
$("#search_pid").val(data.id);
$("#cname_input").val(data.text);
doshow(data.id);
//$("ul#companyselect").hide();
// $table.bootstrapTable('refresh');
});
} else {
//待完善
};
}, 'json');
});
</script>
</head>
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<!-- 引用top -->
<%--<jsp:include page="/jsp/top.jsp"></jsp:include>--%>
<!-- 菜单栏 -->
<%--<jsp:include page="/jsp/left.jsp"></jsp:include>--%>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- <section class="content-header">
<h1 id="head_title"></h1>
<ol class="breadcrumb">
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
<li class="active">Here</li>
</ol>
</section> -->
<!-- Main content -->
<section class="content container-fluid">
<div id="mainAlertdiv"></div>
<div id="subDiv"></div>
<div id="fileInputDiv"></div>
<!--搜索栏-->
<div style="width: 100%;height: 60px;">
<div class="form-group " style="margin-bottom:10px;">
<!-- -->
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
</div>
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
<li class="dropdown messages-menu" style="width:300px;">
<!-- Menu toggle button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
<div class="input-group">
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
readonly />
</div><!-- /input-group -->
</a>
<ul class="dropdown-menu">
<li class="header" id="li_unread">
<div id="companytree" style="width: 275px;overflow:auto;"></div>
</li>
</ul>
</li>
</ul>
<div class="form-group pull-right form-inline " style="margin-top: -40px;">
<!-- <div class="form-group has-feedback ">
<input type="text" class="form-control " id="search_group" name ="search_group" placeholder="小组" onclick="showUnit4SelectFun();" style="width: 250px;height:30px">
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea" style="padding-top:6px;pointer-events: auto"></a>
</input>
</div>
<input id="search_pid" class="form-control" name="search_pid" type="hidden" /> -->
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
placeholder="处理工艺">
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea" style="padding-top:6px;pointer-events: auto"></a>
</input>
<div class="input-group-btn">
<button type="button" class="btn btn-default" onclick="doshow();"><i
class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<!-- <div style="width: 100%;height: 15px;">
</div> -->
<div id="sublists">
</div>
</section>
<!-- /.content -->
</div>
<%--<jsp:include page="/jsp/bottom.jsp"></jsp:include>--%>
<%--<jsp:include page="/jsp/side.jsp"></jsp:include>--%>
</div>
</body>
</html>