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

检验反馈以及维修反馈页面接口

parent e985b214
...@@ -84,55 +84,81 @@ ...@@ -84,55 +84,81 @@
/* this.xlh="" */ /* this.xlh="" */
} }
/* 判定代码类型 登录页面*/ /* 反馈技计数 */
function jyfk_hqlx(e){ function jyfk_apigetjs(s){
let that=e let that=s
return new Promise(function(y,n){ gas.post('kmes/gpfk/getDailyInfo',{}, function(res){
gas.post('kmes/gpfk/querySmlx ',{"wosnid":that.xlh}, function(res){ if(res.data&&res.data.records){
if(res.data&&res.data.records){ that.fksl=res.data.records.fksl||0
let getinfor=res.data.records }else{
y(getinfor.id||"")} let msg=res.message||"当前计数获取失败"
else{ jyfk_wrz(that,msg,'error')
n('nok') }
} });
});
})
} }
function jyfk_queryKwellWoinfo(e){ /* newjyfk */
function jyfk_apijyfk(e){
let that=e let that=e
return new Promise(function(y,n){ return new Promise(function(y,n){
gas.post('kmes/gpfk/queryKwellWoinfo',{"wosnid":that.xlh,"bzlx":window.bzlx}, function(res){ gas.post('kmes/gpfk/jyfk ',{"sncode":that.xlh,"bzgxid":window.bzlx||"","wosncode":that.wosncode||""}, function(res){
if(res.data&&res.data.records){ if(res.data&&res.data.records){
let msg="查询工单信息:"+that.xlh+"成功" /* 赋值操作 */
jyfk_wrz(that,msg) that.hg= res.data.records.hgsl||0;
/* 赋值操作 */ that.ng= res.data.records.bhgsl||0;
that.hg= res.data.records.hgsl||0; that.gd = res.data.records.woDjid;
that.ng= res.data.records.bhgsl||0; that.cpsn = res.data.records.wosnid;
that.gd = res.data.records.woDjid; that.ph = res.data.records.wlxxCode;
that.cpsn = res.data.records.wosnid; let woid = res.data.records.woDjid;
that.ph = res.data.records.wlxxCode; that.fkid = res.data.records.id;
let woid = res.data.records.woDjid; y(woid)
that.fkid = res.data.records.id; /** wobom查询 **/
y(woid) if(res.data.records.sntype=="WOSNID")
/** wobom查询 **/ {
that.wosncode=that.xlh
/* 日志操作 */ let msg=res.message||"查询WOSNID:"+that.wosncode+"成功"
/* pdf地址 */ jyfk_wrz(that,msg)
}else{ }else if(res.data.records.sntype=="OKBZ"){
let msg=res.message||"查询工单信息:"+that.xlh+"失败" that.isok="OK"
that.xlh="" that.hg=res.data.records.hgsl||0;
jyfk_wrz(that,msg,'error') that.ng=res.data.records.bhgsl||0;
screenAlert(that.el,msg,2000) }else if(res.data.records.sntype=="NGBZ"){
} that.isok="NG"
that.hg=res.data.records.hgsl||0;
that.ng=res.data.records.bhgsl||0;
}
that.xlh=""
/* 日志操作 */
/* pdf地址 */
}else{
let msg=res.message||"查询该序列号:"+that.xlh+"失败"
that.xlh=""
jyfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
}
}); });
}) })
} }
/* 总体扫描封装 */
function jyfk_jyfk(t){
let that=t
if(that.xlh=="logout")
{
jyfk_wrz(that,"即将退出系统")
localStorage.clear();
window.location.href ="loginscan_view";
return
}
jyfk_apigetjs(that)
jyfk_wrz(that,"正在查询序列号:"+that.xlh)
jyfk_apijyfk(that).then(function(s){
jyfk_pdfshow(that,s)
})
}
/* jyfk */ /* jyfk */
function jyfk_secjyfk(t,type){ function jyfk_secjyfk(t,type){
let that=t let that=t
gas.post('kmes/gpfk/jyfk',{"fkid":that.fkid, "hgsn":that.xlh}, function(res){ gas.post('kmes/gpfk/jyfk',{"fkid":that.fkid, "hgsn":that.xlh}, function(res){
if(res.data&&res.data.records){ if(res.data&&res.data.records){
debugger
if(type=="ok"){ if(type=="ok"){
that.isok="OK" that.isok="OK"
that.hg=res.data.records.hgsl||0; that.hg=res.data.records.hgsl||0;
...@@ -164,53 +190,7 @@ ...@@ -164,53 +190,7 @@
}) })
} }
} }
/* 总体扫描封装 */
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){
jyfk_pdfshow(that,s)
})
that.xlh=""
}else if(e=="OKBZ"){
if(that.fkid){
jyfk_secjyfk(that,"ok")
}else{
jyfk_wrz(that,"请先扫描WOSNID","error")
}
that.xlh=""
}else if(e=="NGBZ"){
if(that.fkid){
jyfk_secjyfk(that,"ng")
}else{
jyfk_wrz(that,"请先扫描WOSNID","error")
}
that.xlh=""
}else if(e=="WLID"){
let msg="正在查询WLID:"+that.xlh
jyfk_wrz(that,msg)
that.xlh=""
/* jyfk_wlxh(that) */
}else if(e=="LOGOUT"){
jyfk_wrz(that,"即将退出系统")
localStorage.clear();
window.location.href ="loginscan_view";
}
/* 获取类型 */
})
.catch(function(e){
console.log(e)
let msg="无法识别该序列号:"+that.xlh
jyfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
that.xlh=""
})
}
</script> </script>
<div id="kwrkb04"> <div id="kwrkb04">
<!-- 顶部信息条 --> <!-- 顶部信息条 -->
...@@ -218,7 +198,7 @@ ...@@ -218,7 +198,7 @@
<ul class="tipul" style="height: 100%;"> <ul class="tipul" style="height: 100%;">
<li>{{username}}</li> <li>{{username}}</li>
<li class="tipuli2" style="width: 250px;">{{systime}}</li> <li class="tipuli2" style="width: 250px;">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{hg+ng}}</span></li> <li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{fksl}}</span></li>
<li class="tipuli2">当前工序:{{gx}}</li> <li class="tipuli2">当前工序:{{gx}}</li>
</ul> </ul>
...@@ -292,7 +272,7 @@ ...@@ -292,7 +272,7 @@
<ul class="tipul" style="height: 100%;"> <ul class="tipul" style="height: 100%;">
<li>username</li> <li>username</li>
<li class="tipuli2" style="width: 250px;">{{systime}}</li> <li class="tipuli2" style="width: 250px;">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{hg+ng}}</span></li> <li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{fksl}}</span></li>
<li class="tipuli2">当前工序:{{gx}}</li> <li class="tipuli2">当前工序:{{gx}}</li>
</ul> </ul>
...@@ -368,7 +348,7 @@ ...@@ -368,7 +348,7 @@
<ul class="tipul" style="height: 100%;"> <ul class="tipul" style="height: 100%;">
<li>{{username}}</li> <li>{{username}}</li>
<li class="tipuli2" style="width: 250px;">{{systime}}</li> <li class="tipuli2" style="width: 250px;">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{hg+ng}}</span></li> <li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{fksl}}</span></li>
<li class="tipuli2">当前工序:{{gx}}</li> <li class="tipuli2">当前工序:{{gx}}</li>
</ul> </ul>
...@@ -460,6 +440,7 @@ ...@@ -460,6 +440,7 @@
}, },
data:function(){ data:function(){
return{ return{
fksl:0,
isok:"", isok:"",
username:localStorage.getItem("username"), username:localStorage.getItem("username"),
pm:"", pm:"",
...@@ -535,6 +516,7 @@ ...@@ -535,6 +516,7 @@
}, },
data:function(){ data:function(){
return{ return{
fksl:0,
isok:"", isok:"",
username:localStorage.getItem("username"), username:localStorage.getItem("username"),
pm:"", pm:"",
...@@ -605,6 +587,7 @@ ...@@ -605,6 +587,7 @@
}, },
data:function(){ data:function(){
return{ return{
fksl:0,
isok:"", isok:"",
username:localStorage.getItem("username"), username:localStorage.getItem("username"),
pm:"", pm:"",
......
...@@ -84,49 +84,92 @@ ...@@ -84,49 +84,92 @@
/* this.xlh="" */ /* this.xlh="" */
} }
/* 判定代码类型 登录页面*/ /* wxfk */
function wxfk_hqlx(e){ /* pdfshow gxid登录页传进来 */
function wxfk_pdfshow(e,woid){
let that=e let that=e
return new Promise(function(y,n){ let newpdfurl=pdfUr+"/"+woid+"/"+window.bzlx
gas.post('kmes/gpfk/querySmlx ',{"wosnid":that.xlh}, function(res){ that.pdf=""
if(res.data&&res.data.records){ if (newpdfurl!=that.pdfurl){
let getinfor=res.data.records that.pdfurl=newpdfurl
y(getinfor.id||"")} if(that.sivpdf){
else{ clearInterval(that.sivpdf)
n('nok') }
} pdfshow(that.pdfurl, that.pdfdom, 10000).then(e => {
}); that.sivpdf = e
}) })
}
}
/* 反馈技计数 */
function wxfk_apigetjs(s){
let that=s
gas.post('kmes/gpfk/getDailyInfo',{}, function(res){
if(res.data&&res.data.records){
that.fksl=res.data.records.fksl||0
}else{
let msg=res.message||"当前计数获取失败"
wxfk_wrz(that,msg,'error')
}
});
} }
function wxfk_queryKwellWoinfo(e){ /* newwxfk */
function wxfk_apiwxfk(e){
let that=e let that=e
return new Promise(function(y,n){ return new Promise(function(y,n){
gas.post('kmes/gpfk/queryKwellWoinfo',{"wosnid":that.xlh,"bzlx":window.bzlx}, function(res){ gas.post('kmes/gpfk/wxfk ',{"sncode":that.xlh,"bzgxid":window.bzlx||"","wosncode":that.wosncode||""}, function(res){
if(res.data&&res.data.records){ if(res.data&&res.data.records){
let msg="查询工单信息:"+that.xlh+"成功" /* 赋值操作 */
wxfk_wrz(that,msg) that.hg= res.data.records.hgsl||0;
/* 赋值操作 */ that.ng= res.data.records.bhgsl||0;
that.hg= res.data.records.hgsl||0; that.gd = res.data.records.woDjid;
that.ng= res.data.records.bhgsl||0; that.cpsn = res.data.records.wosnid;
that.gd = res.data.records.woDjid; that.ph = res.data.records.wlxxCode;
that.cpsn = res.data.records.wosnid; let woid = res.data.records.woDjid;
that.ph = res.data.records.wlxxCode; that.fkid = res.data.records.id;
let woid = res.data.records.woDjid; y(woid)
that.fkid = res.data.records.id; /** wobom查询 **/
y(woid) if(res.data.records.sntype=="WOSNID")
/** wobom查询 **/ {
that.wosncode=that.xlh
/* 日志操作 */ let msg=res.message||"查询WOSNID:"+that.wosncode+"成功"
/* pdf地址 */ wxfk_wrz(that,msg)
}else{ }else if(res.data.records.sntype=="OKBZ"){
let msg=res.message||"查询工单信息:"+that.xlh+"失败" that.isok="OK"
that.xlh="" that.hg=res.data.records.hgsl||0;
wxfk_wrz(that,msg,'error') that.ng=res.data.records.bhgsl||0;
screenAlert(that.el,msg,2000) }else if(res.data.records.sntype=="NGBZ"){
} that.isok="NG"
that.hg=res.data.records.hgsl||0;
that.ng=res.data.records.bhgsl||0;
}
that.xlh=""
/* 日志操作 */
/* pdf地址 */
}else{
let msg=res.message||"查询该序列号:"+that.xlh+"失败"
that.xlh=""
wxfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
}
}); });
}) })
} }
/* 总体扫描封装 */
function wxfk_wxfk(t){
let that=t
if(that.xlh=="logout")
{
wxfk_wrz(that,"即将退出系统")
localStorage.clear();
window.location.href ="loginscan_view";
return
}
wxfk_apigetjs(that)
wxfk_wrz(that,"正在查询序列号:"+that.xlh)
wxfk_apiwxfk(that).then(function(s){
wxfk_pdfshow(that,s)
})
}
/* wxfk */ /* wxfk */
function wxfk_secwxfk(t,type){ function wxfk_secwxfk(t,type){
let that=t let that=t
...@@ -148,68 +191,6 @@ ...@@ -148,68 +191,6 @@
} }
}); });
} }
/* pdfshow gxid登录页传进来 */
function wxfk_pdfshow(e,woid){
let that=e
let newpdfurl=pdfUr+"/"+woid+"/"+window.bzlx
that.pdf=""
if (newpdfurl!=that.pdfurl){
that.pdfurl=newpdfurl
if(that.sivpdf){
clearInterval(that.sivpdf)
}
pdfshow(that.pdfurl, that.pdfdom, 10000).then(e => {
that.sivpdf = e
})
}
}
/* 总体扫描封装 */
function wxfk_wxfk(t){
let that=t
wxfk_wrz(that,that.xlh)
wxfk_hqlx(that).then(function(e){
if(e=="WOSNID"){
let msg="正在查询WOSNID:"+that.xlh
wxfk_wrz(that,msg)
wxfk_queryKwellWoinfo(that).then(function(s){
wxfk_pdfshow(that,s)
})
that.xlh=""
}else if(e=="OKBZ"){
if(that.fkid){
wxfk_secwxfk(that,"ok")
}else{
wxfk_wrz(that,"请先扫描WOSNID","error")
}
that.xlh=""
}else if(e=="NGBZ"){
if(that.fkid){
wxfk_secwxfk(that,"ng")
}else{
wxfk_wrz(that,"请先扫描WOSNID","error")
}
that.xlh=""
}else if(e=="WLID"){
let msg="正在查询WLID:"+that.xlh
wxfk_wrz(that,msg)
that.xlh=""
/* wxfk_wlxh(that) */
}else if(e=="LOGOUT"){
wxfk_wrz(that,"即将退出系统")
localStorage.clear();
window.location.href ="loginscan_view";
}
/* 获取类型 */
})
.catch(function(e){
console.log(e)
let msg="无法识别该序列号:"+that.xlh
wxfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
that.xlh=""
})
}
</script> </script>
<div id="kwrkb07"> <div id="kwrkb07">
<!-- 顶部信息条 --> <!-- 顶部信息条 -->
...@@ -217,7 +198,7 @@ ...@@ -217,7 +198,7 @@
<ul class="tipul" style="height: 100%;"> <ul class="tipul" style="height: 100%;">
<li>{{username}}</li> <li>{{username}}</li>
<li class="tipuli2" style="width: 250px;">{{systime}}</li> <li class="tipuli2" style="width: 250px;">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{hg+ng}}</span></li> <li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{fksl}}</span></li>
<li class="tipuli2">当前工序:{{gx}}</li> <li class="tipuli2">当前工序:{{gx}}</li>
</ul> </ul>
...@@ -291,7 +272,7 @@ ...@@ -291,7 +272,7 @@
<ul class="tipul" style="height: 100%;"> <ul class="tipul" style="height: 100%;">
<li>username</li> <li>username</li>
<li class="tipuli2" style="width: 250px;">{{systime}}</li> <li class="tipuli2" style="width: 250px;">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{hg+ng}}</span></li> <li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{fksl}}</span></li>
<li class="tipuli2">当前工序:{{gx}}</li> <li class="tipuli2">当前工序:{{gx}}</li>
</ul> </ul>
...@@ -367,9 +348,8 @@ ...@@ -367,9 +348,8 @@
<ul class="tipul" style="height: 100%;"> <ul class="tipul" style="height: 100%;">
<li>{{username}}</li> <li>{{username}}</li>
<li class="tipuli2" style="width: 250px;">{{systime}}</li> <li class="tipuli2" style="width: 250px;">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{hg+ng}}</span></li> <li class="tipuli2" style="margin-right: 200px;">计数: <span style="font-size: 16px;">{{fksl}}</span></li>
<li class="tipuli2">当前工序:{{gx}}</li> <li class="tipuli2">当前工序:{{gx}}</li>
</ul> </ul>
</div> </div>
<!-- 左侧信息条 --> <!-- 左侧信息条 -->
...@@ -459,6 +439,7 @@ ...@@ -459,6 +439,7 @@
}, },
data:function(){ data:function(){
return{ return{
fksl:0,
isok:"", isok:"",
username:localStorage.getItem("username"), username:localStorage.getItem("username"),
pm:"", pm:"",
...@@ -534,6 +515,7 @@ ...@@ -534,6 +515,7 @@
}, },
data:function(){ data:function(){
return{ return{
fksl:0,
isok:"", isok:"",
username:localStorage.getItem("username"), username:localStorage.getItem("username"),
pm:"", pm:"",
...@@ -604,6 +586,7 @@ ...@@ -604,6 +586,7 @@
}, },
data:function(){ data:function(){
return{ return{
fksl:0,
isok:"", isok:"",
username:localStorage.getItem("username"), username:localStorage.getItem("username"),
pm:"", pm:"",
......
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