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

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

parent e985b214
......@@ -84,55 +84,81 @@
/* 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_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||"当前计数获取失败"
jyfk_wrz(that,msg,'error')
}
});
}
function jyfk_queryKwellWoinfo(e){
/* newjyfk */
function jyfk_apijyfk(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.hg= res.data.records.hgsl||0;
that.ng= res.data.records.bhgsl||0;
that.gd = res.data.records.woDjid;
that.cpsn = res.data.records.wosnid;
that.ph = res.data.records.wlxxCode;
let woid = res.data.records.woDjid;
that.fkid = res.data.records.id;
y(woid)
/** wobom查询 **/
/* 日志操作 */
/* pdf地址 */
}else{
let msg=res.message||"查询工单信息:"+that.xlh+"失败"
that.xlh=""
jyfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
}
gas.post('kmes/gpfk/jyfk ',{"sncode":that.xlh,"bzgxid":window.bzlx||"","wosncode":that.wosncode||""}, function(res){
if(res.data&&res.data.records){
/* 赋值操作 */
that.hg= res.data.records.hgsl||0;
that.ng= res.data.records.bhgsl||0;
that.gd = res.data.records.woDjid;
that.cpsn = res.data.records.wosnid;
that.ph = res.data.records.wlxxCode;
let woid = res.data.records.woDjid;
that.fkid = res.data.records.id;
y(woid)
/** wobom查询 **/
if(res.data.records.sntype=="WOSNID")
{
that.wosncode=that.xlh
let msg=res.message||"查询WOSNID:"+that.wosncode+"成功"
jyfk_wrz(that,msg)
}else if(res.data.records.sntype=="OKBZ"){
that.isok="OK"
that.hg=res.data.records.hgsl||0;
that.ng=res.data.records.bhgsl||0;
}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 */
function jyfk_secjyfk(t,type){
let that=t
gas.post('kmes/gpfk/jyfk',{"fkid":that.fkid, "hgsn":that.xlh}, function(res){
if(res.data&&res.data.records){
debugger
if(type=="ok"){
that.isok="OK"
that.hg=res.data.records.hgsl||0;
......@@ -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>
<div id="kwrkb04">
<!-- 顶部信息条 -->
......@@ -218,7 +198,7 @@
<ul class="tipul" style="height: 100%;">
<li>{{username}}</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>
</ul>
......@@ -292,7 +272,7 @@
<ul class="tipul" style="height: 100%;">
<li>username</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>
</ul>
......@@ -368,7 +348,7 @@
<ul class="tipul" style="height: 100%;">
<li>{{username}}</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>
</ul>
......@@ -460,6 +440,7 @@
},
data:function(){
return{
fksl:0,
isok:"",
username:localStorage.getItem("username"),
pm:"",
......@@ -535,6 +516,7 @@
},
data:function(){
return{
fksl:0,
isok:"",
username:localStorage.getItem("username"),
pm:"",
......@@ -605,6 +587,7 @@
},
data:function(){
return{
fksl:0,
isok:"",
username:localStorage.getItem("username"),
pm:"",
......
......@@ -84,49 +84,92 @@
/* this.xlh="" */
}
/* 判定代码类型 登录页面*/
function wxfk_hqlx(e){
/* wxfk */
/* pdfshow gxid登录页传进来 */
function wxfk_pdfshow(e,woid){
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')
}
});
})
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_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
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+"成功"
wxfk_wrz(that,msg)
/* 赋值操作 */
that.hg= res.data.records.hgsl||0;
that.ng= res.data.records.bhgsl||0;
that.gd = res.data.records.woDjid;
that.cpsn = res.data.records.wosnid;
that.ph = res.data.records.wlxxCode;
let woid = res.data.records.woDjid;
that.fkid = res.data.records.id;
y(woid)
/** wobom查询 **/
/* 日志操作 */
/* pdf地址 */
}else{
let msg=res.message||"查询工单信息:"+that.xlh+"失败"
that.xlh=""
wxfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
}
gas.post('kmes/gpfk/wxfk ',{"sncode":that.xlh,"bzgxid":window.bzlx||"","wosncode":that.wosncode||""}, function(res){
if(res.data&&res.data.records){
/* 赋值操作 */
that.hg= res.data.records.hgsl||0;
that.ng= res.data.records.bhgsl||0;
that.gd = res.data.records.woDjid;
that.cpsn = res.data.records.wosnid;
that.ph = res.data.records.wlxxCode;
let woid = res.data.records.woDjid;
that.fkid = res.data.records.id;
y(woid)
/** wobom查询 **/
if(res.data.records.sntype=="WOSNID")
{
that.wosncode=that.xlh
let msg=res.message||"查询WOSNID:"+that.wosncode+"成功"
wxfk_wrz(that,msg)
}else if(res.data.records.sntype=="OKBZ"){
that.isok="OK"
that.hg=res.data.records.hgsl||0;
that.ng=res.data.records.bhgsl||0;
}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 */
function wxfk_secwxfk(t,type){
let that=t
......@@ -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>
<div id="kwrkb07">
<!-- 顶部信息条 -->
......@@ -217,7 +198,7 @@
<ul class="tipul" style="height: 100%;">
<li>{{username}}</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>
</ul>
......@@ -291,7 +272,7 @@
<ul class="tipul" style="height: 100%;">
<li>username</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>
</ul>
......@@ -367,9 +348,8 @@
<ul class="tipul" style="height: 100%;">
<li>{{username}}</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>
</ul>
</div>
<!-- 左侧信息条 -->
......@@ -459,6 +439,7 @@
},
data:function(){
return{
fksl:0,
isok:"",
username:localStorage.getItem("username"),
pm:"",
......@@ -534,6 +515,7 @@
},
data:function(){
return{
fksl:0,
isok:"",
username:localStorage.getItem("username"),
pm:"",
......@@ -604,6 +586,7 @@
},
data:function(){
return{
fksl:0,
isok:"",
username:localStorage.getItem("username"),
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