| | |
| | | <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> |
| | | <h1 @dblclick="dangqianpeifang()">订单任务 </h1> |
| | | |
| | | <ol class="breadcrumb"> |
| | | |
| | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="item in shuzu"> |
| | | <tr v-for="item in shuzu" style="height: 51px;"> |
| | | <td>{{item['1_order_id']}}</td> |
| | | <td>{{item['2_original_width']}}</td> |
| | | <td>{{item['3_original_height']}}</td> |
| | |
| | | </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: 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> |
| | |
| | | </form> |
| | | </div> |
| | | |
| | | |
| | | <div class="modal fade" id="modify-infos" tabindex="-1" role="dialog" |
| | | aria-labelledby="myModalLabel" aria-hidden="true" style="height: 600px;"> |
| | | |
| | | <div class="modal-dialog" > |
| | | <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> |
| | | |
| | | </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> |
| | | |
| | | </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(2)" type="button" class="btn btn-primary btn-lg" |
| | | id="tiebiaoji">贴标机数据下发</button> |
| | | <button v-if="peifanhao[0]['0_recipe_no']!=null" id="peifangxiafa" @click="peifangxiafa(1)" type="button" class="btn btn-primary btn-lg" |
| | | id="peifangxiafa">配方下发</button> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </section> |
| | | <!-- /.content --> |
| | | </div> |
| | |
| | | data:{ |
| | | shuzu:[], |
| | | shuzu1:[], |
| | | shuzu2:[], |
| | | lines:<%= request.getParameter("id") %>, |
| | | peifanhao:[], |
| | | peifanhao:[{}], |
| | | subval:{ |
| | | id:'', |
| | | type:'' |
| | | } |
| | | }, |
| | | methods:{ |
| | | dainjishijian:function(type,id){ |
| | | console.log(type,id); |
| | | 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; |
| | |
| | | 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(){ |
| | |
| | | param.append("flag",1); |
| | | param.append("anquanma",json["anquanma"]); |
| | | |
| | | this.$http.post('../mysqlInsert/mysql.jsp',param).then(({ data }) => { |
| | | let result=$(data).text(); |
| | | this.$http.post('../mysqlInsert/mysql.jsp',param).then(( datas ) => { |
| | | let result=datas.data; |
| | | index = result.indexOf("[["); |
| | | if(index>-1){ |
| | | if(result.indexOf("[[anquanmaerr]]")>-1){ |
| | |
| | | } |
| | | }else{ |
| | | alert("任务修改成功!") |
| | | resolve(); |
| | | window.location.reload(); |
| | | |
| | | } |
| | |
| | | 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); |
| | |
| | | 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=''; |
| | |
| | | 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"); |
| | | this.loadAjxss('任务查询成功',sql,flag,"shuzu"); |
| | | /* sql="{call AXJ_qiegeguanli_peifanghao_cahxun()}"; |
| | | loadAjxs('配方号查询',sql,flag,"peifanhao"); */ |
| | | } |
| | | |
| | | }) |