Commit eb4c5c72 authored by 李苏's avatar 李苏 💬

登录页面

parent cb3d7483
<script src="js/pdfshow.js" type="text/javascript" charset="utf-8"></script>
<script src="js/dbenlarge.js" type="text/javascript" charset="utf-8"></script>
<script src="js/gethash.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="css/jyfk.css"/>
<div>
<div class="btn-group" >
<button id="btnqh1" type="button" class="btn btn-default" style="color: white;position: absolute;right: 5px;z-index: 9999999999;height: 50px;width: 200px;border: 0 solid #00AAFF;background-color: #00AAFF;">切换风格</button>
</div>
</div>
<script type="text/javascript">
$("#btnqh1").click(function(){
if($("#kwrkb04").css("display")=="flex"){
$("#kwrkb04").css("display","none")
$("#kwrkb05").css("display","flex")
$("#kwrkb06").css("display","none")
}else if($("#kwrkb05").css("display")=="flex"){
$("#kwrkb04").css("display","none")
$("#kwrkb05").css("display","none")
$("#kwrkb06").css("display","flex")
}else{
$("#kwrkb04").css("display","flex")
$("#kwrkb05").css("display","none")
$("#kwrkb06").css("display","none")
}
})
/* 通用代码 */
/* 时间 */
function jyfk_pagetime(w){
let that=w
let nowtime
nowtime=new Date().getTime()
that.systime=new Date(nowtime).Format("yyyy-MM-dd hh:mm")
that.sivtimer=setInterval(function(){
nowtime=new Date().getTime()
that.systime=new Date(nowtime).Format("yyyy-MM-dd hh:mm")
},20000)
}
/* 日志事件汇总,写在请求内部或者单独拿出 */
function jyfk_wrz(o,msg,type){
let that=o
if(type!='error'){
$(that.el).find(".rz").append("<br>>" + "<span>" +msg+"</sapn>")
that.addtop = that.addtop + 600
$(that.el).find(".rz").scrollTop(that.addtop)
}else{
$(that.el).find(".rz").append("<br>>" + "<span style='color: red;'>" +msg+"</sapn>")
that.addtop = that.addtop + 600
$(that.el).find(".rz").scrollTop(that.addtop)
}
/* this.xlh="" */
}
/* 判定代码类型 登录页面*/
function jyfk_hqlx(e){
let that=e
return new Promise(function(y,n){
gas.post('kmes/gpfk/querySmlx ',{"wosnid":that.xlh}, function(res){
if(res.data&&res.data.records){
let getinfor=res.data.records
y(getinfor.id||"")}
else{
n('nok')
}
});
})
}
function jyfk_queryKwellWoinfo(e){
let that=e
return new Promise(function(y,n){
gas.post('kmes/gpfk/queryKwellWoinfo',{"wosnid":that.xlh,"bzlx":window.bzlx}, function(res){
if(res.data&&res.data.records){
let msg="查询工单信息:"+that.xlh+"成功"
jyfk_wrz(that,msg)
/* 赋值操作 */
that.gd = res.data.records.woDjid;
that.cpsn = res.data.records.wosnid;
that.ph = res.data.records.wlxxCode;
let woid = res.data.records.woDjid;
y(woid)
/** wobom查询 **/
/* 日志操作 */
/* pdf地址 */
}else{
let msg="查询工单信息:"+that.xlh+"失败"
that.xlh=""
jyfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
}
});
})
}
/* jyfk */
function jyfk_secjyfk(){
gas.post('kmes/gpfk/jyfk',{"fkid":"", "hgsn":""}, function(res){
if(res.data&&res.data.records){
}
else{
}
});
}
/* 总体扫描封装 */
function jyfk_jyfk(t){
let that=t
jyfk_wrz(that,that.xlh)
jyfk_hqlx(that).then(function(e){
if(e=="WOSNID"){
let msg="正在查询WOSNID:"+that.xlh
jyfk_wrz(that,msg)
jyfk_queryKwellWoinfo(that).then(function(s){
console.log(s)
jyfk_secjyfk(that,s)
jyfk_pdfshow(that,s)
})
}else if(e=="OKBZ"){
}else if(e=="NGBZ"){
}else if(e=="WLID"){
let msg="正在查询WLID:"+that.xlh
jyfk_wrz(that,msg)
/* jyfk_wlxh(that) */
}else if(e=="LOGOUT"){
jyfk_wrz(that,"即将退出系统")
that.xlh=""
}
/* 获取类型 */
})
.catch(function(e){
console.log(e)
let msg="无法识别该序列号:"+that.xlh
jyfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
that.xlh=""
})
}
</script>
<div id="kwrkb04">
<!-- 顶部信息条 -->
<div class="toptitle" >
<ul class="tipul" style="height: 100%;">
<li>ADMIN</li>
<li>系统管理员</li>
<li>甲班</li>
<li class="tipuli2">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数:30</li>
<li class="tipuli2">当前工序:焊接</li>
</ul>
</div>
<!-- 左侧信息条 -->
<div class="left">
<!-- 左上信息表 -->
<div class="cbinfor">
<div class="cpif">
<!-- top -->
<div class="cpiftop" style="display: flex;align-items: center;">
<span>序列号</span><input class="easyuitext " style="width: 84%;" v-model="xlh" @keydown="scanxlh()" name="xlh" placeholder="请扫码条码" />
</div>
<!-- bot -->
<div class="cpifbot" style="display: flex;flex-wrap: wrap;">
<div class="ery">
<span>工序</span><input class="easyuitext wid70" v-model="gx" name="gx" />
</div>
<div class="ery">
<span>工单</span><input class="easyuitext wid70" v-model="gd" name="gd" />
</div>
<div class="ery">
<span>产品SN</span><input class="easyuitext wid70" v-model="cpsn" name="cpsn" />
</div>
<div class="ery">
<span>品号</span><input class="easyuitext wid70" v-model="ph" name="ph" />
</div>
</div>
</div>
<!-- 日志 -->
<div class="cprz" >
<div style="height: 100%;display: flex;align-items: center;justify-content: center;">
<div class="cardList-wrapper" style="width: 55%;height: 100%;background-color: #FFFFFF;color: #FFFFFF;display: flex;flex-wrap: wrap;justify-content:space-around;align-items: center;">
<div class="" style="height: 45%;width: 90%;display: flex;align-items: center;justify-content: center;color: #FFFFFF;background-color: #00AAFF!important;">
<span style="font-size: 20px;font-weight: 800;">合格数量:0</span>
</div>
<div class="" style="height: 45%;width: 90%;display: flex;align-items: center;justify-content: center;color: #FFFFFF;background-color: #FEC041!important;">
<span style="font-size: 20px;font-weight: 800;">NG数量:0</span>
</div>
</div>
<div class="cardList-wrappers" style="width: 40%;height: 95%;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;">
<b style="font-size: 60px;">ok</b>
</div>
</div>
</div>
</div>
<!-- 左下表格 -->
<div class="tab">
<div class="maintab">
<div style="height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;">
日志
</div>
<div style="height: calc(100% - 20px);display: flex;">
<div class="rz" style="width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;">
</div>
</div>
</div>
</div>
</div>
<!-- 右侧信息pdf -->
<div class="right">
<canvas id="gpjypdf" class="rightPdf"></canvas>
</div>
</div>
<!-- 界面5 -->
<div id="kwrkb05">
<!-- 顶部信息条 -->
<div class="toptitle" >
<ul class="tipul" style="height: 100%;">
<li>ADMIN</li>
<li>系统管理员</li>
<li>甲班</li>
<li class="tipuli2">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数:30</li>
<li class="tipuli2">当前工序:焊接</li>
</ul>
</div>
<!-- 左侧信息条 -->
<div class="left">
<!-- 左上信息表 -->
<div class="cbinfor">
<div class="cpif">
<!-- top -->
<div class="cpiftop" style="display: flex;align-items: center;">
<span>序列号</span><input class="easyuitext" style="width: 80%" name="xlh" v-model="xlh" @keydown="scanxlh()" />
</div>
<!-- bot -->
<div class="cpifbot" style="display: flex;flex-wrap: wrap;">
<div style="display: flex;width: 55%;height: 100%;flex-wrap: wrap;">
<div class="ery">
<span>工序</span><input class="easyuitext" style="width: 70%" name="gx" v-model="gx" />
</div>
<div class="ery">
<span>工单</span><input class="easyuitext" style="width: 70%" name="gd" v-model="gd" />
</div>
<div class="ery">
<span>产品SN</span><input class="easyuitext" style="width: 70%" name="cpsn" v-model="cpsn" />
</div>
<div class="ery">
<span>品号</span><input class="easyuitext" style="width: 70%" name="ph" v-model="ph" />
</div>
<div class="ery">
<span>品名</span><input class="easyuitext" style="width: 70%" name="pm" v-model="pm" />
</div>
</div>
<div style="display: flex;width: 45%;height: 100%;flex-wrap: wrap;align-items: center;">
<div style="height: 45%;width: 90%;background-color: #00AAFF;display: flex;align-items: center;justify-content: center;color: #FFFFFF;">
<span style="font-size: 20px;font-weight: 800;">合格数量:0</span>
</div>
<div style="height: 45%;width: 90%;background-color: #FEC041;display: flex;align-items: center;justify-content: center;color: #FFFFFF;">
<span style="font-size: 20px;font-weight: 800;">NG数量:0</span>
</div>
</div>
</div>
</div>
</div>
<!-- 左下表格 -->
<div class="tab">
<div class="maintab" style="position: relative;">
<div class="cpiright" style="width:160px;height: 160px;padding: 10px;position: absolute;right: 10px;top: 20px;">
<div style="width: 100%;height: 100%;background-color: #1890FF;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;">
<b>ok</b>
</div>
</div>
<div style="height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;">
日志
</div>
<div style="height: calc(100% - 20px);display: flex;">
<div class="rz" style="width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;">
</div>
</div>
</div>
</div>
</div>
<!-- 右侧信息pdf -->
<div class="right">
<canvas id="pdf" class="rightPdf"></canvas>
</div>
</div>
<!-- 看板6html -->
<div id="kwrkb06">
<!-- 顶部信息条 -->
<div class="toptitle" >
<ul class="tipul" style="height: 100%;">
<li>ADMIN</li>
<li>系统管理员</li>
<li>甲班</li>
<li class="tipuli2">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数:30</li>
<li class="tipuli2">当前工序:焊接</li>
</ul>
</div>
<!-- 左侧信息条 -->
<div class="left">
<!-- 左上信息表 -->
<div class="cbinfor">
<div class="cpif">
<!-- top -->
<div class="cpiftop" style="display: flex;align-items: center;">
<span>序列号</span><input class="easyuitext" style="width: 80%;" name="xlh" @keydown="scanxlh()" v-model="xlh" />
</div>
<!-- bot -->
<div class="cpifbot" style="display: flex;flex-wrap: wrap;">
<div style="display: flex;width: 55%;height: 100%;flex-wrap: wrap;">
<div class="ery">
<span>工序</span><input class="easyuitext" style="width: 70%;" name="gx" v-model="gx" />
</div>
<div class="ery">
<span>工单</span><input class="easyuitext" style="width: 70%;" name="gd" v-model="gd" />
</div>
<div class="ery">
<span>产品SN</span><input class="easyuitext" style="width: 70%;" name="cpsn" v-model="cpsn" />
</div>
<div class="ery">
<span>品号</span><input class="easyuitext" style="width: 70%;" name="ph" v-model="ph" />
</div>
<div class="ery">
<span>品名</span><input class="easyuitext" style="width: 70%;" name="pm" v-model="pm" />
</div>
</div>
<div style="display: flex;width: 45%;height: 100%;flex-wrap: wrap;align-items: center;">
<div style="height: 45%;width: 90%;background-color: #00AAFF;display: flex;align-items: center;justify-content: center;color: #FFFFFF;">
<span style="font-size: 20px;font-weight: 800;">合格数量:0</span>
</div>
<div style="height: 45%;width: 90%;background-color: #FEC041;display: flex;align-items: center;justify-content: center;color: #FFFFFF;">
<span style="font-size: 20px;font-weight: 800;">NG数量:0</span>
</div>
</div>
</div>
</div>
</div>
<!-- 左下表格 -->
<div class="tab">
<div class="maintab" style="position: relative;">
<div class="cpiright" style="width:130px;height: 130px;padding: 10px;position: absolute;right: 10px;top: 20px;">
<div style="width: 100%;height: 100%;background-color: #1890FF;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;">
<b>ok</b>
</div>
</div>
<div style="height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;">
日志
</div>
<div style="height: calc(100% - 20px);display: flex;">
<div class="rz" style="width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;">
</div>
</div>
</div>
<div class="mainsp">
<video src="movie.ogg" controls="controls" style="height: 100%;width: 100%;">
您的浏览器不支持 video 标签。
</video>
</div>
</div>
</div>
<!-- 右侧信息pdf -->
<div class="right">
<canvas id="pdf" class="rightPdf"></canvas>
</div>
</div>
<script type="text/javascript">
let Vkwrkb04= new Vue({
el:"#kwrkb04",
mounted() {
dbenlarge('kwrkb04',1,this.isFocus())
pdfshow("pdf/dcAcess.pdf","gpjypdf",5000).then(e=>{
this.sivpdf=e
})
// this.sivpdf=
this.initpage()
this.gettime()
this.appdestory()
},
destroyed() {
clearInterval(this.sivdestory)
clearInterval(this.sivpdf)
clearInterval(this.sivtimer)
},
data:function(){
return{
pdfdom:"kwrkb04pdf",
el:"#kwrkb04",
addtop:0,
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"",
tabdata:[],
sivtimer:null,//时间计数器
sivpdf:null,
sivdestory:null
}
},
methods:{
// 扫码接口
apiscanxlh(){
let that=this
jyfk_jyfk(that)
},
isFocus(){
let $xlh=$(this.el).find('input[name="xlh"]')
$xlh.focus()
},
// 扫码事件
scanxlh(e){
var evt = window.event || e;
if (evt.keyCode == 13) {
this.apiscanxlh()
}
},
// 初始化页面
initpage(){
},
/* 展示时间 */
gettime(){
let that = this
jyfk_pagetime(that)
},
appdestory(){
let that=this
this.sivdestory=setInterval(function(){
if(!$("#kwrkb04").height()){
Vkwrkb04.$destroy()
}
},3000)
}
}
})
/* 界面5vue实例 */
let Vkwrkb05= new Vue({
el:"#kwrkb05",
mounted() {
dbenlarge('kwrkb05')
pdfshow("pdf/dcAcess.pdf","pdf",5000).then(e=>{
this.sivpdf=e
$("#kwrkb05").hide()
})
// this.sivpdf=
this.initpage()
this.gettime()
this.appdestory()
},
destroyed() {
clearInterval(this.sivdestory)
clearInterval(this.sivpdf)
clearInterval(this.sivtimer)
},
data:function(){
return{
pdfdom:"kwrkb05pdf",
el:"#kwrkb05",
addtop:0,
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"",
tabdata:[],
sivtimer:null,//时间计数器
sivpdf:null,
sivdestory:null
}
},
methods:{
//扫码事件
scanxlh(e){
var evt = window.event || e;
if (evt.keyCode == 13) {
this.apiscanxlh()
}
},
// 扫码接口
apiscanxlh(){
let that=this
jyfk_jyfk(that)
},
// 初始化页面
initpage(){
},
/* 展示时间 */
gettime(){
let that=this
jyfk_pagetime(that)
},
appdestory(){
let that=this
this.sivdestory=setInterval(function(){
if(!$("#kwrkb05").height()){
Vkwrkb05.$destroy()
}
},3000)
}
}
})
/* 看板6实例 */
let Vkwrkb06= new Vue({
el:"#kwrkb06",
mounted() {
dbenlarge('kwrkb06')
pdfshow("pdf/dcAcess.pdf","pdf",5000).then(e=>{
this.sivpdf=e
$("#kwrkb06").hide()
})
// this.sivpdf=
this.initpage()
this.gettime()
this.appdestory()
},
destroyed() {
clearInterval(this.sivdestory)
clearInterval(this.sivpdf)
clearInterval(this.sivtimer)
},
data:function(){
return{
pdfdom:"kwrkb06pdf",
el:"#kwrkb06",
addtop:0,
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"",
tabdata:[],
sivtimer:null,//时间计数器
sivpdf:null,
sivdestory:null
}
},
methods:{
//扫码事件
scanxlh(e){
var evt = window.event || e;
if (evt.keyCode == 13) {
this.apiscanxlh()
}
},
// 扫码接口
apiscanxlh(){
let that=this
jyfk_jyfk(that)
},
// 初始化页面
initpage(){
},
/* 展示时间 */
gettime(){
let that=this
jyfk_pagetime(that)
},
appdestory(){
let that=this
this.sivdestory=setInterval(function(){
if(!$("#kwrkb06").height()){
Vkwrkb06.$destroy()
}
},3000)
}
}
})
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment