| New file |
| | |
| | | <%@ 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>订单任务 <small></small></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 in shuzu"> |
| | | <td>{{item['1_order_id']}}</td> |
| | | <td>{{item['2_original_width']}}</td> |
| | | <td>{{item['3_original_height']}}</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: #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]==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;"> |
| | | <h3>您确定要执行当前操作吗?</h3> |
| | | </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> |
| | | |
| | | </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:[], |
| | | lines:<%= request.getParameter("id") %>, |
| | | peifanhao:[], |
| | | subval:{ |
| | | id:'', |
| | | type:'' |
| | | } |
| | | }, |
| | | methods:{ |
| | | dainjishijian:function(type,id){ |
| | | console.log(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 |
| | | }, |
| | | 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(({ data }) => { |
| | | let result=$(data).text(); |
| | | 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); |
| | | resolve(); |
| | | window.location.reload(); |
| | | } |
| | | }else{ |
| | | alert("任务修改成功!") |
| | | 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']); |
| | | 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; |
| | | loadAjxs('任务查询成功',sql,flag,"shuzu"); |
| | | sql="{call AXJ_qiegeguanli_peifanghao_cahxun()}"; |
| | | loadAjxs('配方号查询',sql,flag,"peifanhao"); |
| | | } |
| | | |
| | | }) |
| | | </script> |
| | | </body> |
| | | </html> |