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

1534 lines
48 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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />
<title>
<%= ServerObject.atttable.get("TOPTITLE")%>
</title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include><!-- 引入daterangepicker-->
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js" charset="utf-8"></script>
<style type="text/css">
.whole-body{
background: transparent;
width: 3342px;
height: 1284px;
padding-top: 60px;
padding-bottom: 60px;
padding-left: 70px;
padding-right: 70px;
}
.content-wrapper-bg-darkblue{
background: rgba(0,17,33,0.70);
border: 1px solid #454545;
border-radius: 14px;
}
.whole-body select{
text-align: left;
color: #ffffff;
}
.whole-body input{
text-align: center;
color:#04ffff;
width: 100%;
margin: auto;
}
.whole-body select,.whole-body input{
background: rgba(24,105,174,0.70);
border: 4px solid #00cbff;
border-radius: 2px;
font-size: 36px;
font-weight: 400;
line-height: 55px;
}
.whole-body .btn-xlg{
width: 200px;
height: 80px;
background: #00afe6;
border: 1px solid #707070;
border-radius: 14px;
font-size: 38px;
font-weight: 700;
letter-spacing: 0.76px;
}
.whole-body .row+.row{
margin-top: 50px;
}
.nav-tabs {
border: 0;
}
.nav-tabs>li,.nav-tabs>li+li{
padding-left: 110px;
}
.nav-tabs>li>a {
font-weight: 400;
text-align: center;
color: #ffffff;
line-height: 55px;
border: 0;
}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {
color: #ffffff;
cursor: default;
background-color: transparent;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom-width: 8px;
border-bottom-color: #00ffff;
}
.bg-color{
background: rgba(12,12,12,0.60);
width:100%;
height: 1066px;
}
.introduce-title{
height: 280px;
line-height: 280px;
font-size: 38px;
}
.introduce-content{
padding: 0 50px;
text-indent:2em;/*em是相对单位2em即现在一个字大小的两倍*/
text-align: left;
line-height: 2;
}
.content-left, .content-right{
float: left;
padding:0;
}
.content-left{
width: 810px;
}
.content-right{
width: 2380px;
}
.content-right-subject{
min-height: 215px;
}
.content-bg-darkblue{
background: rgba(12,12,12,0.60);
}
.homePage-btn{
cursor:pointer;
background: rgba(54,167,204,0.70);
border-radius: 10px;
}
.col-xs-1-5 {
width: 12%;
}
.col-xs-1-5{
float: left;
}
.col-xs-1-5 {
position: relative;
min-height: 1px;
}
.title-height{
height:80px;
}
.row-10{
height:10%;
}
.row-15{
height:15%;
}
.row-25{
height:25%;
}
.row-30{
height:30%;
}
.row-35{
height:35%;
}
.row-40{
height:40%;
}
.row-50{
height:50%;
}
.row-70{
height:70%;
}
.row-75{
height:75%;
}
.row-100{
height:100%;
}
.content-wrapper-bg-grey{
background: #eeeeee;
}
.content-wrapper-bg-white,.bgcolor-white,.bgcolor-white-light{
background: #ffffff;
border-radius: 5px;
}
.content-wrapper-bg-white,.content-wrapper-bg-transparent{
margin:0 5px;
border-radius: 5px;
}
.bgcolor-blue{
background: #052941;
}
.margin-bottom-10{
margin-bottom: 10px;
}
.margin-bottom-15{
margin-bottom: 15px;
}
.margin-bottom-22{
margin-bottom: 22px;
}
.margin-bottom-25{
margin-bottom: 25px;
}
.margin-bottom-30{
margin-bottom: 30px;
}
.margin-bottom-55{
margin-bottom: 55px;
}
.margin-bottom-75{
margin-bottom: 75px;
}
.padding-topbottom-35{
padding-top: 35px;
padding-bottom: 35px;
}
.pad-topbottom-60{
padding-top: 60px;
padding-bottom: 60px;
}
.pad-leftright-72{
padding-left: 72px;
padding-right: 72px;
}
.pad-bottom-10{
padding-bottom: 10px;
}
.padding-top-5{
padding-top:5px;
}
.padding-top-10{
padding-top: 10px;
}
.padding-top-15{
padding-top: 15px;
}
.padding-top-27{
padding-top: 27px;
}
.padding-top-90{
padding-top: 90px;
}
.line-height-08{
line-height: 0.8;
}
.line-height-1{
line-height: 1;
}
.line-height-2{
line-height: 2;
}
.line-height-2-3{
line-height: 2.3;
}
.line-height-3{
line-height: 3;
}
.line-height-5{
line-height: 5;
}
.line-height-6{
line-height: 6;
}
.font-size-12{
font-size: 12px;
font-weight: 400;
line-height: 24px;
}
.font-size-14{
font-size: 14px;
line-height: inherit;
}
.font-size-16{
font-size: 16px;
}
.font-size-18{
font-size: 18px;
}
.font-size-20{
font-size: 20px;
}
.font-size-22{
font-size: 22px;
}
.font-size-24{
font-size: 24px;
}
.font-size-30{
font-size: 30px;
}
.font-size-35{
font-size: 35px;
}
.font-size-36{
font-size: 36px;
}
.font-size-40{
font-size: 40px;
line-height: normal;
}
.font-size-50{
font-size: 50px;
}
.font-size-60{
font-size: 60px;
}
.font-size-65{
font-size: 65px;
}
.font-size-70{
font-size: 70px;
}
.font-size-200{
font-size: 200px;
}
.font-color-grey{
color: #AEAEAE;
}
.font-color-white,.font-color-dark-white{
color: #FFFFFF;
}
.font-color-black{
color: #0d2336;
font-weight: 600;
}
.font-color-red{
color: #E7A2FF;
}
.font-color-redlight{
color: #CE00FF;
}
.font-color-blue,.font-color-dark-blue{
color: #5c9fd1;
}
.font-color-lightBlue,.font-color-light-blue{
color: #00D3FF;
}
.font-color-green{
color: #69F9B6;
}
.font-color-orange{
color: #FF8800;
}
.border-left{
border-left: 1px solid #c1c1c1;
}
.border-right{
border-right: 2px solid #ffffff;
}
.border-bottom{
border-bottom: 1px solid #c1c1c1;
}
.border-leftAndRight{
border-left: 1px solid #c1c1c1;border-right: 1px solid #c1c1c1;
}
.bgcolor-blue-light{
background: #192B73;
}
.bgcolor-transparent{
background: transparent;
border-radius: 5px;
}
.img-icon{
width: 70px;
height: 70px;
}
.img-pump{
width: 60px;
height: 97px;
}
.progress_bar{
min-width: 170px;
height: 6px;
}
.polarBarLegend{
width: 360px;
height: 200px;
position: fixed;
}
.polarBar{
min-width: 630px;
height: 450px;
}
.cursor-pointer{
cursor: pointer;
}
.pressure-line{
width: 1180px;
height: 560px;
}
.calculation{
width: 1430px;
height: 500px;
margin: auto;
}
.calculation-fullBtn{
width: 1430px;
margin: auto;
padding-bottom: 15px;
}
.calculation2{
width: 1030px;
height: 380px;
margin: auto;
}
.calculation2-fullBtn{
width: 1030px;
margin: auto;
padding-bottom: 15px;
}
.rawwater-line{
width: 2360px;
height: 560px;
}
.instructions-line{
width: 2360px;
height: 355px;
}
.img-location{
position: absolute;
width: 220px;
}
.dosagePAC-location{
top: 30px;
left: 490px;
}
.dosagePAM-location{
top: 30px;
left: 760px;
}
.inflowFlow-location{
top: 180px;
left: 200px;
}
.influentTurbidity-location{
top: 290px;
left: 200px;
}
.inflowPH-location{
top: 520px;
left: 200px;
}
.inflowTemperature-location{
top: 630px;
left: 200px;
}
.inflowConductivity-location{
top: 740px;
left: 200px;
}
.inflowCod-location{
top: 850px;
left: 200px;
}
.inflowAmmoniaNitrogen-location{
top: 960px;
left: 200px;
}
.sludgeReturn-location{
bottom: 80px;
left: 640px;
}
.sludgeDischarge-location{
bottom: 80px;
right: 450px;
}
.effluentFlow-location{
top: 70px;
right: 110px;
}
.effluentTurbidity-location{
top: 180px;
right: 110px;
}
.modelSelect{
margin-top: 0px !important;
}
@media (min-width: 992px){
.modal-full {
width: 100%;
margin: 0;
}
}
.modal-content{
background-color: #000000;
padding: 0;
}
.full-line-tool{
float: right;
margin: 10px;
width: 1100px;
height: 70px;
margin-right: 150px;
}
.full-line{
float: right;
}
@media (min-width: 1920px){
.dropdown-menu,.ranges li,.btn-group-sm>.btn, .btn-sm,.form-control {
font-size: 31px;
}
}
.daterangepicker .input-mini {
height: 50px;
padding: 0 6px 0 48px;
}
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
width: 100px;
}
.daterangepicker .calendar {
max-width: 500px;
}
.today-material{
width: 23.7%;
height: 63px;
padding: 8px 2px;
float: left;
margin-top: 18px;
border-radius: 5px;
margin-right: 5px;
font-size: 12px;
cursor: pointer;
}
.today-material-text{
margin-bottom: 6px;
}
.today-material-number{
font-weight: 700;
text-align: center;
}
.today-material-0{
border: 1px solid #f406dc;
}
.today-material-0 .today-material-text>i{
color: #f406dc;
}
.today-material-1{
border: 1px solid #79C705;
}
.today-material-1 .today-material-text>i{
color: #79C705;
}
.today-material-2{
border: 1px solid #FFCC00;
}
.today-material-2 .today-material-text>i{
color: #FFCC00;
}
.today-material-3{
border: 1px solid #FAA307;
}
.today-material-3 .today-material-text>i{
color: #FAA307;
}
.today-material-4{
border: 1px solid #F48C06;
}
.today-material-4 .today-material-text>i{
color: #F48C06;
}
.today-material-5{
border: 1px solid #06CBF4;
}
.today-material-5 .today-material-text>i{
color: #06CBF4;
}
.today-material-6{
border: 1px solid #DC2F02;
}
.today-material-6 .today-material-text>i{
color: #DC2F02;
}
.today-material .today-material-text>i{
margin-right: 4px;
}
.today-material-bar{
height: 300px;
}
.today-material>.col-md-3{
height: 50px;
}
.today-material>.col-md-9,.today-material>.col-md-3{
padding: 0;
}
.box-body{
height: 530px;
}
.well-sm {
padding: 7px;
}
.well {
margin-bottom: 5px;
}
.well .col-md-1,.well .col-md-10,.well .col-md-11,.well .col-md-12,.well .col-md-2,
.well .col-md-3,.well .col-md-4,.well .col-md-5,.well .col-md-6,.well .col-md-7,
.well .col-md-8,.well .col-md-9 {
padding-left: 5px;
padding-right: 5px;
font-size: 12px;
}
</style>
<script type="text/javascript">
var colors = ['#F406DC','#79C705','#FFCC00','#FAA307','#F48C06','#06CBF4','#DC2F02'];
var ng = "${param.ng}";
var goods = "${param.goods}";
var bgcolor = "${param.bgcolor}";
var nowDate = new Date;
var modelIp = "${modelIp}";
var wagonBalanceJSONObject = '${wagonBalancejson}';
var wagonBalanceJSON = JSON.parse(wagonBalanceJSONObject);
//昨天处理量
let yesterdayValue = wagonBalanceJSON.yesterdayValue;
let goodsJSON = wagonBalanceJSON.goods;
var nowTime = '';
var nowDates = [];
var seriesdata = [];
var goodsNames = [];
var goodsIds = [];
$(function () {
if(goods=='hide'){
$("#goodsItems").hide();
$("#goodsNow").css("width", "50%");
$("#todayVehicles").css("width", "50%");
}
if(bgcolor=='transparent'){
$(".content-wrapper").css("background-color", "transparent");
$(".wrapper").css("background-color", "transparent");
$("body").css("background-color", "transparent");
}
var width = $(window).width();
var height = $(window).height();
$("#date_month").datetimepicker({
language: 'zh-CN',
format: 'yyyy-mm',
startView: "year", //初始化视图
minView: 3,
maxView: "year",
todayBtn: true,
clearBtn: true,
autoclose: true,
todayHighlight: 1,//今天高亮
endDate: new Date(),
}).on('changeDate', function (e) {
getMonthData($("#date_month").val());
});
var nowDate = new Date;
let nowMonth = nowDate.Format("yyyy-MM");
$('#date_month').val(nowMonth);
showNowTime();
setInterval(function() {
showNowTime();
},3600000);
});
function showNowTime(){
const myDate = new Date;
const year = myDate.getFullYear(); //获取当前年
const mon = myDate.getMonth() + 1; //获取当前月
const day = myDate.getDate(); //获取当前日
const h = myDate.getHours();//获取当前小时数(0-23)
nowTime = year + "-" + (mon < 10 ? "0" + mon : mon) + "-" + (day < 10 ? "0" + day : day) + " " + (h < 10 ? "0" + h : h) + ":00:00";
$('#nowTime').html(nowTime);
nowDates = [];
seriesdata = [];
goodsNames = [];
goodsIds = [];
lastDate = new Date;
/*for(var i=0;i<h;i++){
lastDate.setTime( myDate.getTime() - 60*i*1000*60);
let dateStr = lastDate.Format("yyyy-MM-dd hh:00");
nowDates.unshift(dateStr);
}*/
goodsList();
}
function goodsList(endDateStr){
$.ajax({
type: 'GET',
url: ext.contextPath + '/sparepart/goods/getList.do',
dataType: 'json',
data: {
rows: 100, // 每页要显示的数据条数
page: 1, // 每页显示数据的开始页码
sort: 'name',
order: 'asc',
className: "地磅",
},
error: function () {
return false;
},
success: function (data) {
var total = data.total;
if(total>0){
$('#today-material').empty();
$('#enter_table').empty();
$('#leave_table').empty();
$('#well').empty();
seriesdata = [];
var rows = data.rows;
$.each(rows,function(index,value){
goodsIds.push(value.id);
goodsNames.push(value.name);
let goodsSeriesData ={
name: value.name,
type: 'bar',
stack: 'Ad',
data: []
};
seriesdata.push(goodsSeriesData);
weighingData(value.name,value.unit,value.id,index);
});
let month = $('#date_month').val();
getMonthData(month);
}
}
});
}
function getMonthData(month){
$.each(goodsNames,function(index,value){
$.ajax({
type: 'GET',
url:"http://"+modelIp + "/work/weighingSaveData/getMonthData.do",
dataType: 'json',
data: {
month: month,
goodsName: value,
},
error: function () {
return false;
},
success: function (data) {
let rows = data.rows;
seriesdata[index].data = rows;
echarts_bar('today-material-bar',seriesdata,value+'进出量统计');
}
});
});
}
var enterCar = 0;
var leaveCar = 0;
var enterCarGrossWeight = 0;
var leaveCarGrossWeight = 0;
var enterCarPlan = 0;
var leaveCarPlan = 0;
var enterCarPlanGrossWeight = 0;
var leaveCarPlanGrossWeight = 0;
function weighingData(goodsName,goodsUnit,goodsId,goodsIndex){
if(goodsUnit==null || goodsUnit==''){
goodsUnit = 'KG';
}
let lastGrossWeightTime = '-';
let lastGrossWeight = '-';
let lastCarNumber = '-';
let stock = '-';
//物品重量
var goodsWeights = 0;
/*$.each(nowDates,function(index,value){
});*/
let nowDate = new Date;
let startDateStr = nowDate.Format("yyyy-MM-dd 00:00");
let endDateStr = nowDate.Format("yyyy-MM-dd hh:mm");
$.ajax({
type: 'GET',
url: "http://"+modelIp + "/work/weighingSaveData/getList.do",
dataType: 'json',
data: {
page: 1,
rows: 1000,
startDateStr: startDateStr,
endDateStr: endDateStr,
goodsName: goodsName,
},
error: function () {
return false;
},
success: function (data) {
var total = data.total;
if(total>0){
var rows = data.rows;
//毛重
var grossWeights = 0;
//毛重
var grossWeight = [];
//车牌号
var carNumber = [];
//车辆类型
var carType = [];
//入厂时间
var grossWeightTime_1 = [];
//出厂时间
var grossWeightTime_2 = [];
let faStr = 'fa-long-arrow-right';
let colorStr = 'font-color-lightBlue';
if(goodsName=='污泥'){
faStr = 'fa-long-arrow-left';
colorStr = 'font-color-orange';
}
$.each(rows,function(index,value){
grossWeights += Math.abs(value.weight);
//车牌为基准数组,其他数组相同下标都填充数据
// 根据车牌匹配,有就修改,没有就填充
if(carNumber.indexOf(value.carNumber)!=-1){
let subscript = carNumber.indexOf(value.carNumber);
grossWeight[subscript]=Math.abs(value.weight);
grossWeightTime_1[subscript]=value.IWeightTime.substring(0,16);
grossWeightTime_2[subscript]=value.OWeightTime.substring(0,16);
}else{
carNumber.push(value.carNumber);
carType.push(value.carType);
grossWeight.push(Math.abs(value.weight));
grossWeightTime_1.push(value.IWeightTime.substring(0,16));
grossWeightTime_2.push(value.OWeightTime.substring(0,16));
}
if(lastGrossWeightTime=='-'){
if(goodsName=='污泥'){
lastGrossWeightTime=value.OWeightTime.substring(0,16);
}else{
lastGrossWeightTime=value.IWeightTime.substring(0,16);
}
lastGrossWeight = Math.abs(value.weight);
lastCarNumber = value.carNumber;
}
});
let goodsdata = [endDateStr,grossWeights];
let goodsdatas = seriesdata[goodsIndex].data;
goodsdatas.push(goodsdata);
seriesdata[goodsIndex].data = goodsdatas;
$.each(carNumber,function(index,value){
if(goodsName=='污泥'){
leaveCar++;
leaveCarGrossWeight += grossWeight[index];
}else{
enterCar++;
enterCarGrossWeight += grossWeight[index];
}
var data = {
value1:enterCar,
value2:enterCarPlan,
}
progressBar('incoming-vehicles',data,'#00D3FF','#3D73B1');
data = {
value1:leaveCar,
value2:leaveCarPlan,
}
progressBar('outward-vehicles',data,'#FF8800','#DC2F02');
let wellStr = '<div class="well well-sm">'+
'<div class="row">'+
'<div class="col-md-1 text-center '+colorStr+' padding-top-5"><i class="fa '+faStr+' font-size-35"></i></div>'+
'<div class="col-md-11">'+
'<div class="row font-color-grey margin-bottom-10">'+
'<div class="col-md-2">'+carType[index]+'</div>'+
'<div class="col-md-2">'+value+'</div>'+
'<div class="col-md-4">入厂时间:<span>'+grossWeightTime_1[index]+'</span></div>'+
'<div class="col-md-4">出厂时间:<span>'+grossWeightTime_2[index]+'</span></div>'+
'</div>'+
'<div class="row">'+
'<div class="col-md-4">运送物料:<span>'+goodsName+'</span></div>'+
'<div class="col-md-4">重量:<span>'+grossWeight[index]+goodsUnit+'</span></div>'+
'</div>'+
'</div>'+
'</div>'+
'</div>';
$("#well").append(wellStr);
});
goodsWeights +=grossWeights;
}
let enter = 0;
if(enterCarPlan>0){
enter = enterCar/enterCarPlan*100;
}
$("#enter").html(enter.toFixed(0));
$("#enterCar").html(enterCar);
$("#enterCarGrossWeight").html(enterCarGrossWeight);
$("#enterCarPlan").html(enterCarPlan);
$("#enterCarPlanGrossWeight").html(enterCarPlanGrossWeight);
let leave = 0;
if(leaveCarPlan>0){
leave = leaveCar/leaveCarPlan*100;
}
$("#leave").html(leave);
$("#leaveCar").html(leaveCar);
$("#leaveCarGrossWeight").html(leaveCarGrossWeight);
$("#leaveCarPlan").html(leaveCarPlan);
$("#leaveCarPlanGrossWeight").html(leaveCarPlanGrossWeight);
}
});
/*$.ajax({
type: 'GET',
url: ext.contextPath + '/sparepart/stock/getList.do',
dataType: 'json',
data: {
rows: 100, // 每页要显示的数据条数
page: 1, // 每页显示数据的开始页码
search_name: goodsName,
},
error: function () {
return false;
},
success: function (data) {
var total = data.total;
var nowNumber = 0;
if(total>0){
var rows = data.rows;
$.each(rows,function(index,value){
nowNumber += value.nowNumber;
});
}
}
});*/
let goodsObj = goodsJSON.find(function (obj) {
if(obj.name === goodsName){
return obj;
}
})
//当前库存
var nowNumber = goodsObj.currentValue;;
var materialStr = '<div class="today-material-text"><i class="fa fa-circle"></i>'+goodsName+'</div>'+
'<div class="today-material-number">'+nowNumber+goodsUnit+'</div>';
if($('.today-material-'+goodsIndex+'').length>0){
$('.today-material-'+goodsIndex+'').html(materialStr);
}else{
materialStr ='<div class="today-material today-material-'+goodsIndex+'" onclick="echarts_dispatchAction(\''+goodsName+'\')">' +
'<div class="col-md-9">'+materialStr+'</div>' +
'<div class="col-md-3 " id="today-material-safe-'+goodsIndex+'"></div>' +
'</div>';
$("#today-material").append(materialStr);
}
//安全天数
let safeDays = goodsObj.safeDays;
//单耗-点位
let drugConsumptionCode = goodsObj.drugConsumptionCode;
//单耗-点位数据
let drugConsumptionValue = goodsObj.drugConsumptionValue;
//单耗-手动配置
let unitConsumption = goodsObj.unitConsumption;
if(drugConsumptionCode=='' || drugConsumptionCode==null){
drugConsumptionValue = unitConsumption;
}
let available = 0;
//可用天数=当前药量/(昨日处理量*单耗)
/*if(yesterdayValue>0 && drugConsumptionValue>0){
//单耗向上取整
drugConsumptionValue = Math.ceil(drugConsumptionValue)*0.001;
//单位换算,万吨转换为升
yesterdayValue = yesterdayValue*10000*1000;
available = nowNumber/(yesterdayValue*drugConsumptionValue);
}*/
//可用天数=当前药量/昨天用量 20230515修改
if(drugConsumptionValue>0){
//向下取整
available = Math.floor(nowNumber/drugConsumptionValue);
}
var safecolor='#22c3aa';
var fontcolor='#fff';
if(available<7){
safecolor='#FF8800';
fontcolor='#DC2F02';
}
safeBar('today-material-safe-'+goodsIndex,available,safeDays,safecolor,fontcolor);
if(goodsName=='污泥'){
$.ajax({
type: 'GET',
url: "http://"+modelIp + "/work/weighingSaveData/getList.do",
dataType: 'json',
data: {
page: 1,
rows: 1000,
sort: 'o_weight_time', // 要排序的字段
order: 'desc',
goodsName: goodsName,
},
error: function () {
return false;
},
success: function (data) {
var total = data.total;
if(total>0){
let rows = data.rows;
let value = rows[0];
lastGrossWeightTime= value.OWeightTime.substring(0,16);
lastGrossWeight = Math.abs(value.weight);
lastCarNumber = value.carNumber;
let leaveStr ='<tr>'+
'<td>'+goodsName+'</td>'+
'<td>'+lastGrossWeightTime+'</td>'+
'<td>'+lastGrossWeight+goodsUnit+'</td>'+
'<td>'+lastCarNumber+'</td>'+
'</tr>';
$("#leave_table").append(leaveStr);
}
}
});
}else{
let enterStr ='<tr>'+
'<td>'+goodsName+'</td>'+
'<td align="right">'+nowNumber+'</td>'+
'<td>'+available+'</td>'+
'<td>-</td>'+
'<td id="'+goodsId+'_lastGrossWeightTime">'+lastGrossWeightTime+'</td>'+
'<td id="'+goodsId+'_lastGrossWeight" align="right">'+lastGrossWeight+'</td>'+
'<td id="'+goodsId+'_lastCarNumber">'+lastCarNumber+'</td>'+
'</tr>';
$("#enter_table").append(enterStr);
$.ajax({
type: 'GET',
url: "http://"+modelIp + "/work/weighingSaveData/getList.do",
dataType: 'json',
data: {
page: 1,
rows: 1000,
sort: 'i_weight_time', // 要排序的字段
order: 'desc',
goodsName: goodsName,
},
error: function () {
return false;
},
success: function (data) {
var total = data.total;
if(total>0){
var rows = data.rows;
let value = rows[0];
lastGrossWeightTime= value.IWeightTime.substring(0,16);
lastGrossWeight = Math.abs(value.weight);
lastCarNumber = value.carNumber;
$("#"+goodsId+"_lastGrossWeightTime").html(lastGrossWeightTime);
$("#"+goodsId+"_lastGrossWeight").html(lastGrossWeight+goodsUnit);
$("#"+goodsId+"_lastCarNumber").html(lastCarNumber);
}
}
});
}
}
var lifeChart = null;
function echarts_bar(id,seriesdata,title,xAxisData){
lifeChart = echarts.getInstanceByDom(document.getElementById(id));
//有的话就获取已有echarts实例的DOM节点。
if (lifeChart != null) {
lifeChart.setOption({
/*xAxis: {
data: xAxisData
},*/
series: seriesdata
})
}else{
var option = {
color: colors,
tooltip: {
trigger: 'axis',
},
title:{
text: title,
x: 'center',
},
legend: {
selectedMode: 'single' ,
show: false ,
},
grid: {
left: '3%',
right: '3%',
bottom: '3%',
top: '16%',
containLabel: true,
},
xAxis: {
type: 'time',
axisLabel: {
formatter: '{dd}',
/*formatter:function (value, index) {
return value.substring(9,11);
}*/
},
/*data:xAxisData,*/
},
yAxis: {
type: 'value',
},
series: seriesdata,
};
lifeChart = echarts.init(document.getElementById(id));
lifeChart.setOption(option,true);
}
return lifeChart;
}
function echarts_dispatchAction(goodsName){
if (lifeChart != null) {
lifeChart.setOption({
title:{
text: goodsName+'进出量统计',
x: 'center',
},
})
lifeChart.dispatchAction({
type: 'legendSelect',
// 图例名称
name: goodsName,
});
}
}
function safeBar(id,available,safe,color,fontcolor){
let safeChart = echarts.getInstanceByDom(document.getElementById(id));
//有的话就获取已有echarts实例的DOM节点。
if (safeChart != null) {
safeChart.setOption({
xAxis: {
data: xAxisData
},
series: seriesdata
})
}else{
var option = {
color: ['#DC2F02',color],
grid: {
left: 0,
right: 0,
bottom: 0,
top: 0,
containLabel: true,
},
xAxis: [{
type: 'category',
show: false,
axisLabel: {
show: false ,
},
},{
type: 'category',
show: false,
axisLabel: {
show: false ,
},
boundaryGap: false,
}],
yAxis: {
type: 'value',
show: false,
axisLabel: {
show: false ,
},
max: function (value) {
return value.max;
} ,
},
series: [
{
name: '安全天数',
type: 'line',
showSymbol: false,
xAxisIndex: 1,
data: [safe, safe]
},
{
name: '可用天数',
data: [available],
type: 'bar',
barWidth: '100%',
label: {
show: true,
color: fontcolor ,
formatter: '{c} \n天',
fontSize: 12 ,
position: 'insideTop'
}
}
]
};
safeChart = echarts.init(document.getElementById(id));
safeChart.setOption(option,true);
}
return safeChart;
}
function progressBar(id,data,color1,color2){
var myChart = echarts.init(document.getElementById(id));
var option={
grid: {
top: 0,
bottom: 0,
left: 0,
right: '5%'
},
xAxis: {
show: false,
type: "value",
boundaryGap: [0, 0]
},
yAxis: [
{
type: "category",
data: [""],
axisLine: { show: false },
axisTick: [
{
show: false
}
]
}
],
series: [
{
name: "金额",
type: "bar",
zlevel: 1,
itemStyle: {
normal: {
barBorderRadius: 9,
color: color1
}
},
barWidth: 20,
data: [data.value1]
},
{
name: "背景",
type: "bar",
barWidth: 20,
barGap: "-100%",
data: [data.value2],
itemStyle: {
normal: {
color: color2,
barBorderRadius: 9
}
}
}
]
}
myChart.clear();
myChart.setOption(option, true);
}
//添加千分位符合
function toThousands(num) {
var nums =num;
var re=/\d{1,3}(?=(\d{3})+$)/g;
var n1=0;
if(nums!=null && nums!='' && nums!=undefined){
n1=nums.toString().replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.replace(re,"$&,")+s2;});
}
return n1;
}
function calculation() {
var jsonStr = [
{"mpcode":"PLC41_11AIT003.VAL","value": $('#influentTurbidity').val()},
{"mpcode":"PLC41_11FIT001A.VAL","value": $('#firstLineFlow').val()},
{"mpcode":"PLC41_13AIT001A.VAL","value": $('#effluentTurbidity').val()},
{"mpcode":"PLC31_33AFIQT001A.VAL","value": $('#dosagePAM').val()},
{"mpcode":"PLC31_32AFIQT001.VAL","value": $('#dosagePAC').val()}
];
$.post('http://10.194.10.125:8080/SIPAIIS_Model2/process/modeltype/handCompute4SOAP.do',
{jsonStr : JSON.stringify(jsonStr),modelName: $('#modelSelect').val()} ,
function(data) {
data = $.parseJSON(data);
var code = data.code;
if(code==1){
alert('计算成功。');
$('.currentForecast').html(data.result.toFixed(2));
}else{
alert(data.msg);
}
})
}
</script>
</head>
<body class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<div class="content-wrapper">
<input type="hidden" name="jsp_id" id="jsp_id" value="waterQualityModel">
<!-- Main content -->
<section class="content container-fluid">
<div class="row">
<div class="col-md-3" style="width: 26%;" id="goodsNow">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">当前物料情况</h3>
<div class="box-tools pull-right"></div>
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="row">
<div class="col-md-12" id="today-material">
<div class="today-material today-material-0">
<div class="today-material-text"><i class="fa fa-circle"></i>硫酸铝</div>
<div class="today-material-number">-</div>
</div>
<div class="today-material today-material-1">
<div class="today-material-text"><i class="fa fa-circle"></i>次氯酸钠</div>
<div class="today-material-number">-</div>
</div>
<div class="today-material today-material-2">
<div class="today-material-text"><i class="fa fa-circle"></i>PAM-</div>
<div class="today-material-number">-</div>
</div>
<div class="today-material today-material-3">
<div class="today-material-text"><i class="fa fa-circle"></i>PAM+</div>
<div class="today-material-number">-</div>
</div>
<div class="today-material today-material-4">
<div class="today-material-text"><i class="fa fa-circle"></i>硫酸铵</div>
<div class="today-material-number">-</div>
</div>
<div class="today-material today-material-5">
<div class="today-material-text"><i class="fa fa-circle"></i>液氧</div>
<div class="today-material-number">-</div>
</div>
<div class="today-material today-material-6">
<div class="today-material-text"><i class="fa fa-circle"></i>污泥</div>
<div class="today-material-number">-</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 35px;">
<div class="input-group input-group-sm pull-right" style="width: 120px;position: absolute;right: 0;">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" class="form-control" id="date_month" name="date_month" value="">
</div>
<div class="col-md-12 today-material-bar" id="today-material-bar"></div>
</div>
</div>
<!-- /.box-body -->
<%--<div class="box-footer"></div>--%>
<!-- /.box-footer-->
</div>
</div>
<div class="col-md-4" style="width: 35%; padding:0;" id="todayVehicles">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">今日车辆情况</h3>
<div class="box-tools pull-right"><span class="font-size-18" id="nowTime"></span></div>
</div>
<!-- /.box-header -->
<div class="box-body font-size-14">
<div class="row margin-bottom-10">
<div class="col-md-1"></div>
<div class="col-md-2 font-color-dark-blue">来料车辆</div>
<div class="col-md-2 font-color-grey"><span id="enter">-</span>%完成</div>
<div class="col-md-2"></div>
<div class="col-md-2 font-color-dark-blue">外送车辆</div>
<div class="col-md-2 font-color-grey"><span id="leave">-</span>%完成</div>
<div class="col-md-1"></div>
</div>
<div class="row margin-bottom-10">
<div class="col-md-1"></div>
<div class="col-md-4 progress_bar" id="incoming-vehicles"></div>
<div class="col-md-2"></div>
<div class="col-md-4 progress_bar" id="outward-vehicles"></div>
<div class="col-md-1"></div>
</div>
<div class="row margin-bottom-10">
<div class="col-md-1"></div>
<div class="col-md-2 font-color-dark-blue">已完成</div>
<div class="col-md-2 font-color-dark-blue">计划</div>
<div class="col-md-2"></div>
<div class="col-md-2 font-color-dark-blue">已完成</div>
<div class="col-md-2 font-color-dark-blue">计划</div>
<div class="col-md-1"></div>
</div>
<div class="row margin-bottom-15">
<div class="col-md-1"></div>
<div class="col-md-2"><span id="enterCar">-</span>辆</div>
<div class="col-md-2"><span id="enterCarPlan">-</span>辆</div>
<div class="col-md-2"></div>
<div class="col-md-2"><span id="leaveCar">-</span>辆</div>
<div class="col-md-2"><span id="leaveCarPlan">-</span>辆</div>
<div class="col-md-1"></div>
</div>
<div class="row margin-bottom-30">
<div class="col-md-1"></div>
<div class="col-md-2"><span id="enterCarGrossWeight">-</span>KG</div>
<div class="col-md-2"><span id="enterCarPlanGrossWeight">-</span>KG</div>
<div class="col-md-2"></div>
<div class="col-md-2"><span id="leaveCarGrossWeight">-</span>KG</div>
<div class="col-md-2"><span id="leaveCarPlanGrossWeight">-</span>KG</div>
<div class="col-md-1"></div>
</div>
<div id="well" style="height: 350px;overflow-x: hidden;">
<div class="well well-sm">
<div class="row">
<div class="col-md-1 text-center font-color-lightBlue padding-top-5"><i class="fa fa-long-arrow-down font-size-35"></i></div>
<div class="col-md-11">
<div class="row font-color-grey margin-bottom-10">
<div class="col-md-2">-</div>
<div class="col-md-2">-</div>
<div class="col-md-4">入厂时间:<span>-</span></div>
<div class="col-md-4">出厂时间:<span>-</span></div>
</div>
<div class="row">
<div class="col-md-4">运送物料:<span>硫酸铵</span></div>
<div class="col-md-4">重量:<span>-</span></div>
</div>
</div>
</div>
</div>
<div class="well well-sm">
<div class="row">
<div class="col-md-1 text-center font-color-orange padding-top-5"><i class="fa fa-long-arrow-up font-size-35"></i></div>
<div class="col-md-11">
<div class="row font-color-grey margin-bottom-10">
<div class="col-md-2">-</div>
<div class="col-md-2">-</div>
<div class="col-md-4">入厂时间:<span>-</span></div>
<div class="col-md-4">出厂时间:<span>-</span></div>
</div>
<div class="row">
<div class="col-md-4">运送物料:<span>污泥</span></div>
<div class="col-md-4">重量:<span>-</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.box-body -->
<%--<div class="box-footer"></div>--%>
<!-- /.box-footer-->
</div>
</div>
<div class="col-md-5" style="width: 39%;" id="goodsItems">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">物料情况</h3>
<div class="box-tools pull-right"></div>
</div>
<!-- /.box-header -->
<div class="box-body">
<table class="table table-bordered table-striped table-condensed" style="margin-bottom: 25px;">
<thead>
<tr>
<th></th>
<th>当前库存</th>
<th>可用天数</th>
<th>下次来料时间</th>
<th>上次来料时间</th>
<th>来料重量</th>
<th>车牌号</th>
</tr>
</thead>
<tbody id="enter_table" style="height: 350px;overflow-x: hidden;">
<tr>
<td>硫酸铝</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>次氯酸钠</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>PAM+</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>PAM-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>硫酸铵</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>液氧</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th></th>
<th>上次外送时间</th>
<th>重量</th>
<th>车牌号</th>
</tr>
</thead>
<tbody id="leave_table">
<tr>
<td>污泥</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
</div>
<!-- /.box-body -->
<%--<div class="box-footer"></div>--%>
<!-- /.box-footer-->
</div>
</div>
</div>
</section>
</div>
</div>
</body>
</html>