<%@ page contentType="text/html;charset=UTF-8"%>
|
<%@page import="ng.db.DBHelper"%>
|
<c:set var="ctx" value="${pageContext.request.contextPath}" />
|
|
<html>
|
<head>
|
<link rel="stylesheet" href="../static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
<!-- Font Awesome -->
|
<link rel="stylesheet" href="../static/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css">
|
<!-- Ionicons -->
|
<link rel="stylesheet" href="../static/AdminLTE/bower_components/Ionicons/css/ionicons.min.css">
|
<!-- Theme style -->
|
<link rel="stylesheet" href="../static/AdminLTE/dist/css/AdminLTE.min.css">
|
<link rel="stylesheet" href="../static/AdminLTE/dist/css/skins/skin-blue.min.css">
|
|
<link rel="stylesheet" href="../static/css/element.css">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<script type="text/javascript">
|
/* var interval = setInterval('refreshStatus()', 20000);
|
$(document).ready(function(){
|
var info = $("#info").attr("info");
|
$("#infos").html(info);
|
}); */
|
// 设备页面自动刷新
|
/* function refreshStatus() {
|
window.location.reload();
|
}
|
// 停止页面自动刷新
|
function disableAutoRefresh() {
|
clearInterval(interval);
|
} */
|
|
|
|
|
</script>
|
<style>
|
.box table tr th,.box table tr td{
|
text-align:center;
|
}
|
</style>
|
<title>任务</title>
|
</head>
|
<body style="padding: 20px;background-color:#D5EAFF;height:100%">
|
<div id='app'>
|
<!-- <div style='height:20px;width:300px;background-color:#3C8DBC;float:right;'><span style = 'color:#fff;' >故障情况:</span><span id='infos'></span></div> -->
|
<section class="content-header" style="padding: 0px 15px 0 15px;">
|
<h1 @dblclick="dangqianpeifang()">订单任务 </h1>
|
|
<ol class="breadcrumb">
|
|
|
</a></li>
|
</ol>
|
</section>
|
|
<div id = "allstatu" ></div>
|
<div id = "info" ></div>
|
<!-- Main content -->
|
<input style="display:none" type="text" name="groups" value="${groups}" />
|
<section class="content container-fluid" style="padding: 0px;">
|
<div>
|
</div>
|
|
<div class="box" style="height: 600px; overflow: auto;margin-top: 10px;">
|
<table class="table table-striped table-hover"
|
style="overflow-x: auto;font-size: 12px;">
|
<thead>
|
<tr>
|
<th>项目名称</th>
|
<th>原片宽度</th>
|
<th>原片高度</th>
|
<th>小片宽度</th>
|
<th>小片高度</th>
|
<th>厚度</th>
|
<th>原片总数量</th>
|
<th>原片已加工数量</th>
|
<th>小片总数量</th>
|
<th>小片已加工数量</th>
|
<th>订单状态</th>
|
<th>制单人</th>
|
<th>操作</th>
|
|
</tr>
|
</thead>
|
<tbody>
|
<tr v-for="(item, index) in shuzu" :key="index" style="height: 51px;">
|
<td>{{item['1_order_id']}}</td>
|
<td>{{item['2_largeglass_length']}}</td>
|
<td>{{item['3_largeglass_width']}}</td>
|
<td>{{item['4_width']}}</td>
|
<td>{{item['5_height']}}</td>
|
<td>{{item['6_thickness']}}</td>
|
<td>{{item['7_largeglass_no']}}</td>
|
<td>{{item['8_largeglass_completed']}}</td>
|
<td>{{item['9_smallglass_no']}}</td>
|
<td>{{item['10_smallglass_completed']}}</td>
|
<td v-if="item['11_order_status']==1">
|
已下发
|
</td>
|
<td v-else-if="item['11_order_status']==2">
|
已领取
|
</td>
|
<td v-else-if="item['11_order_status']==3">
|
已完成
|
</td>
|
<td v-else-if="item['11_order_status']==4">
|
手动完成
|
</td>
|
<td v-else>
|
|
|
</td>
|
<td>{{item['12_order_maker']}}</td>
|
<td v-if="item['11_order_status']==1">
|
<button @click="dainjishijian('领取任务',item['0_id'])" style='background-color: #5CADFE' class='btn btn-large btn-success' >领取任务</button>
|
|
<button @click="dainjishijian('手动完成',item['0_id'])" style='background-color: #5CADFE' class='btn btn-large btn-success' >手动完成</button>
|
</td>
|
<td v-else-if="item['11_order_status']==2">
|
|
<button @click="dainjishijian('结束任务',item['0_id'])" style='background-color: red' class='btn btn-large btn-success' >结束任务</button>
|
|
<button @click="dainjishijian('取消任务',item['0_id'])" style='background-color: #5CADFE' class='btn btn-large btn-success' >取消任务</button>
|
</td>
|
<!-- <td v-else-if="item[11]==2">
|
<button @click="dainjishijian('重新下发',item[0])" style='background-color: #5CADFE' class='btn btn-large btn-success' >重新下发</button>
|
</td> -->
|
<td v-else>
|
|
</td>
|
</tr>
|
</tbody>
|
</table>
|
</div>
|
|
<div class="modal fade" id="modify-info" tabindex="-1" role="dialog"
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
<form class="form-horizontal" role="form">
|
<div class="modal-dialog">
|
<div class="modal-content">
|
<input type='hidden' id = "lineprint">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal"
|
aria-hidden="true">×</button>
|
<h3 class="modal-title" id="myModalLabel">提示信息</h3>
|
</div>
|
<div class="modal-body" style="text-align: left;">
|
<h1>请进行人脸识别,有效期两分钟</h1>
|
</div>
|
<div class="modal-footer">
|
|
<button type="button" @click='renwuguanliquxiao' class="btn btn-default btn-lg"
|
data-dismiss="modal">取消</button>
|
|
<button id="dianjishijian" @click='getMSg' type="button" class="btn btn-primary btn-lg"
|
id="surefinish">我已识别,确认</button>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
|
|
<div class="modal fade" id="modify-infos" tabindex="-1" role="dialog"
|
aria-labelledby="myModalLabel" aria-hidden="true" style="height: 800px;">
|
|
<div class="modal-dialog" style="width: 800px;" >
|
<div class="modal-content" >
|
<table class="table table-striped table-hover"
|
style="overflow-x: auto;font-size: 12px;">
|
<thead>
|
<tr>
|
<th>机器编号</th>
|
<th>机器名称</th>
|
<th>配方类型</th>
|
<th>当前配方值</th>
|
<th>发送配方值</th>
|
|
</tr>
|
</thead>
|
<tbody>
|
<tr v-for="item in shuzu2">
|
<td>{{item['0_id']}}</td>
|
<td>{{item['1_machine_name']}}</td>
|
<td>{{item['2_class_html']}}</td>
|
<td>{{item['3_content_value']}}</td>
|
<td>{{item['4_content_value1']}}</td>
|
</tr>
|
</tbody>
|
</table>
|
<div class="modal-footer">
|
<button type="button" class="btn btn-default btn-lg"
|
data-dismiss="modal">关闭</button>
|
<button v-if="peifanhao[0]['0_recipe_no']!=null" id="tiebiaoji" @click="peifangxiafa(1)" type="button" class="btn btn-primary btn-lg"
|
id="tiebiaoji">贴标机数据下发</button>
|
<button v-if="peifanhao[0]['0_recipe_no']!=null" id="peifangxiafa" @click="peifangxiafa(2)" type="button" class="btn btn-primary btn-lg"
|
id="peifangxiafa">配方下发</button>
|
|
|
|
</div>
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
<!-- /.content -->
|
</div>
|
<script src="../js/jquery-3.4.1.min.js"></script>
|
<script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
<script src="../js/vue.min.js"></script>
|
<script src="../js/axios.min.js"></script>
|
<script src="../js/mixins.js"></script>
|
|
<script>
|
Vue.prototype.$http= axios
|
let app = new Vue({
|
el:'#app',
|
mixins:[mixin],
|
data:{
|
shuzu:[],
|
shuzu1:[],
|
shuzu2:[],
|
lines:<%= request.getParameter("id") %>,
|
peifanhao:[{}],
|
subval:{
|
id:'',
|
type:''
|
}
|
},
|
methods:{
|
dangqianpeifang(){
|
|
this.shuzu2="";
|
let sql="{call AXJ_a_get_machine_recipe_select()}";
|
let flag=2;
|
this.loadAjxss('任务查询成功',sql,flag,"shuzu2");
|
let sql1="{call AXJ_qiegeguanli_peifanghao_cahxun1()}";
|
this.loadAjxss('配方号查询',sql1,2,"peifanhao")
|
|
$("#modify-infos").modal('show');
|
},
|
dainjishijian(type,id){
|
$("#modify-info").modal('show');
|
if(type=="领取任务"){
|
this.subval.type=2;
|
}else if(type=="结束任务"){
|
this.subval.type=3;
|
}else if(type=="手动完成"){
|
this.subval.type=4;
|
}else if(type=="取消任务"){
|
this.subval.type=1;
|
}
|
this.subval.id=id
|
let para={
|
ids:id
|
}
|
let sql="{call AXJ_qiegeguanli_peifanghao_cahxun(?,?)}~"+JSON.stringify(para);
|
this.loadAjxss('配方号查询',sql,2,"peifanhao")
|
},
|
getMSg(){
|
//this.getMSgs();
|
|
this.renwuguanli();
|
},
|
getMSgs(){
|
return new Promise((resolve, reject) => {
|
// 发送第一个请求,获取 id
|
sql="{call AXJ_qiegeguanli_threelinetask_renwuguanli(?,?,?)}~"+JSON.stringify(this.subval);
|
let param = new URLSearchParams();
|
param.append("gongneng",'任务修改');
|
param.append("sql",sql);
|
param.append("flag",1);
|
param.append("anquanma",json["anquanma"]);
|
|
this.$http.post('../mysqlInsert/mysql.jsp',param).then(( datas ) => {
|
let result=datas.data;
|
index = result.indexOf("[[");
|
if(index>-1){
|
if(result.indexOf("[[anquanmaerr]]")>-1){
|
//alert('请先登录后操作');
|
window.parent.location.href='../login/index.jsp';
|
}else{
|
result=result.substring(index).trim()
|
alert(result);
|
reject();
|
window.location.reload();
|
}
|
}else{
|
alert("任务修改成功!")
|
resolve();
|
window.location.reload();
|
|
}
|
}).catch(err => {
|
console.log(err.msg);
|
});
|
})
|
},
|
renwuguanli(){
|
this.getMSgs().then(() => {
|
let param = new URLSearchParams();
|
param.append("zt",this.subval.type);
|
param.append("peifanhao",this.peifanhao[0]['0_recipe_no']);
|
param.append("changpinghao",this.peifanhao[0]['1_changpinghao']);
|
param.append("way_of_working",this.peifanhao[0]['2_way_of_working']);
|
param.append("thickness",this.peifanhao[0]['3_thickness']);
|
param.append("glass_type",this.peifanhao[0]['4_glass_type']);
|
param.append("production_type",this.peifanhao[0]['5_production_type']);
|
this.$http.post( '../mysqlInsert/toPlc.jsp',param)
|
.then(function (response) {
|
console.log(response);
|
})
|
|
.catch(function (error) {
|
alert('Error: ' + "服务器机器连接发生错误!");
|
});
|
})
|
},
|
peifangxiafa(leixing){
|
if(leixing==1){
|
let param = new URLSearchParams();
|
param.append("zt",98);
|
param.append("peifanhao",this.peifanhao[0]['0_recipe_no']);
|
this.$http.post( '../mysqlInsert/toPlc.jsp',param)
|
.then(function (response) {
|
console.log(response);
|
})
|
|
.catch(function (error) {
|
alert('Error: ' + "服务器机器连接发生错误!");
|
});
|
}else if(leixing==2){
|
let param = new URLSearchParams();
|
param.append("zt",99);
|
param.append("peifanhao",this.peifanhao[0]['0_recipe_no']);
|
param.append("changpinghao",this.peifanhao[0]['1_changpinghao']);
|
param.append("way_of_working",this.peifanhao[0]['2_way_of_working']);
|
param.append("thickness",this.peifanhao[0]['3_thickness']);
|
param.append("glass_type",this.peifanhao[0]['4_glass_type']);
|
param.append("production_type",this.peifanhao[0]['5_production_type']);
|
this.$http.post( '../mysqlInsert/toPlc.jsp',param)
|
.then(function (response) {
|
console.log(response);
|
})
|
|
.catch(function (error) {
|
alert('Error: ' + "服务器机器连接发生错误!");
|
});
|
}
|
|
|
},
|
renwuguanliquxiao:function(){
|
this.subval='';
|
}
|
|
},
|
mounted:function(){
|
let canshu={
|
line:<%= request.getParameter("id") %>
|
}
|
// this.shuzu="";
|
let sql="{call AXJ_qiegeguanli_threelinetask_list1()}";
|
let flag=2;
|
this.loadAjxss('任务查询成功',sql,flag,"shuzu");
|
console.log("sql:",this.shuzu);
|
/* sql="{call AXJ_qiegeguanli_peifanghao_cahxun()}";
|
loadAjxs('配方号查询',sql,flag,"peifanhao"); */
|
}
|
|
})
|
</script>
|
</body>
|
</html>
|