Commit 37176789 authored by zhoumaotao's avatar zhoumaotao

Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes

parents 25b15c6d 8adc41bf
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
}) })
/* 通用代码 */ /* 通用代码 */
/* 通用表格参数 */ /* 通用表格参数 */
zpfk_columns=[ var zpfk_columns=[
[{ [{
field: 'wlxxCode', field: 'wlxxCode',
title: '品号', title: '品号',
...@@ -58,13 +58,9 @@ ...@@ -58,13 +58,9 @@
let that=e let that=e
return new Promise(function(y,n){ return new Promise(function(y,n){
gas.post('kmes/gpfk/querySmlx ',{"wosnid":that.xlh}, function(res){ gas.post('kmes/gpfk/querySmlx ',{"wosnid":that.xlh}, function(res){
/* if(res.data&&res.data.records){ if(res.data&&res.data.records){
let getinfor=res.data.records let getinfor=res.data.records
y(getinfor) y(getinfor.id||"")}
} */
if(res){
y("ok")
}
else{ else{
n('nok') n('nok')
} }
...@@ -103,7 +99,7 @@ ...@@ -103,7 +99,7 @@
}); });
} }
/* pdfshow gxid登录页传进来 */ /* pdfshow gxid登录页传进来 */
function zpfk_pdfshow(e){ function zpfk_pdfshow(e,woid){
let that=e let that=e
let newPdfurl=that.pdfurl+"?woid="+woid+"&&"+"gxid="+window.gxid||"nogxid" let newPdfurl=that.pdfurl+"?woid="+woid+"&&"+"gxid="+window.gxid||"nogxid"
if (newpdfurl!=that.pdfurl){ if (newpdfurl!=that.pdfurl){
...@@ -111,11 +107,69 @@ ...@@ -111,11 +107,69 @@
if(that.sivpdf){ if(that.sivpdf){
clearInterval(that.sivpdf) clearInterval(that.sivpdf)
} }
pdfshow(that.pdfurl+"?woid="+woid+"&&"+"gxid="+that.gxid, "gphy", 20000).then(e => { pdfshow(that.pdfurl, that.pdfdom, 20000).then(e => {
this.sivpdf = e that.sivpdf = e
}) })
} }
} }
/* 总体扫描封装 */
function zpfk_zpfk(t){
let that=t
zpfk_hqlx(that).then(function(e){
if(e=="WOSNID"){
zpfk_queryKwellWoinfo(that).then(function(s){
console.log(s)
zpfk_queryWoBomByWoid(that,s)
zpfk_pdfshow(that,s)
})
}else if(e=="OKBZ"){
that.okOrng="OK"
}else if(e=="NGBZ"){
that.okOrng="NG"
}
/* 获取类型 */
}).catch(function(){
that.xlh=""
})
}
/* 初始化表格 */
function zpfk_pageinit(q){
let that=q
let $tab = $(that.el).find('.showtab')
that.$tab=$tab
that.taboptions = {
height: '100%',
width:"100%",
fitColumns: false,
rowStyler:function(index,row){
if(index<2){
return 'background-color:#6293BB;color:#fff;';
}
},
columns:zpfk_columns,
data: that.tabdata
}
$tab.datagrid(that.taboptions);
}
/* 时间 */
function zpfk_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 zpfk_rzts1(o){
let that=o
$(that.el).find(".rz").append("<br>>" + "<span>" +"正在查询:"+that.xlh+"</sapn>")
that.addtop = that.addtop + 600
$(that.el).find(".rz").scrollTop(that.addtop)
/* this.xlh="" */
}
</script> </script>
<div id="kwrkb01" > <div id="kwrkb01" >
<!-- 顶部信息条 --> <!-- 顶部信息条 -->
...@@ -165,7 +219,7 @@ ...@@ -165,7 +219,7 @@
</div> </div>
<div class="ok-item" <div class="ok-item"
style="width: 20%;height: 100%;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;"> style="width: 20%;height: 100%;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;">
<b>ok</b> <b>{{okOrng}}</b>
</div> </div>
</div> </div>
</div> </div>
...@@ -181,7 +235,7 @@ ...@@ -181,7 +235,7 @@
</div> </div>
<!-- 右侧信息pdf --> <!-- 右侧信息pdf -->
<div class="right"> <div class="right">
<canvas id="gphy" class="rightPdf"></canvas> <canvas id="kwrkb01pdf" class="rightPdf"></canvas>
</div> </div>
</div> </div>
<!-- div2 --> <!-- div2 -->
...@@ -224,7 +278,7 @@ ...@@ -224,7 +278,7 @@
</div> </div>
<div class="cpiright" style="width: 30%;height: 100%;padding: 10px;"> <div class="cpiright" style="width: 30%;height: 100%;padding: 10px;">
<div style="width: 100%;height: 100%;background-color: #1890FF;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;"> <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> <b>{{okOrng}}</b>
</div> </div>
</div> </div>
<!-- bot --> <!-- bot -->
...@@ -253,7 +307,7 @@ ...@@ -253,7 +307,7 @@
</div> </div>
<!-- 右侧信息pdf --> <!-- 右侧信息pdf -->
<div class="right"> <div class="right">
<canvas id="pdf" class="rightPdf"></canvas> <canvas id="kwrkb02pdf" class="rightPdf"></canvas>
</div> </div>
</div> </div>
<!-- 界面3 --> <!-- 界面3 -->
...@@ -291,9 +345,9 @@ ...@@ -291,9 +345,9 @@
<div class="cbinfor"> <div class="cbinfor">
<!-- 日志 --> <!-- 日志 -->
<div class="cprz" style="position: relative;"> <div class="cprz" style="position: relative;">
<div class="cpiright" style="width:130px;height: 130px;padding: 10px;position: absolute;right: 0px;top: 20px;"> <div class="cpiright" style="width:30%;height: 50%;padding: 10px;position: absolute;right: 0px;top: 20px;">
<div style="width: 100%;height: 100%;background-color: #1890FF;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;"> <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> <b>{{okOrng}}</b>
</div> </div>
</div> </div>
<div style="height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;"> <div style="height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;">
...@@ -317,7 +371,7 @@ ...@@ -317,7 +371,7 @@
</div> </div>
<!-- 右侧信息pdf --> <!-- 右侧信息pdf -->
<div class="right"> <div class="right">
<canvas id="pdf" class="rightPdf"></canvas> <canvas id="kwrkb03pdf" class="rightPdf"></canvas>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
...@@ -337,6 +391,9 @@ ...@@ -337,6 +391,9 @@
}, },
data: function() { data: function() {
return { return {
okOrng:"N",
pdfdom:"kwrkb01pdf",
el:"#kwrkb01",
pdfurl:"kmes/gpfk/queryPdfByWoidAndZpgx", pdfurl:"kmes/gpfk/queryPdfByWoidAndZpgx",
addtop:0, addtop:0,
xlh:"", xlh:"",
...@@ -356,16 +413,7 @@ ...@@ -356,16 +413,7 @@
// 扫码接口 // 扫码接口
apiscanxlh(){ apiscanxlh(){
let that=this let that=this
zpfk_hqlx(that).then(function(e){ zpfk_zpfk(that)
console.log(e)
/* 获取类型 */
zpfk_queryKwellWoinfo(that).then(function(s){
zpfk_queryWoBomByWoid(that,s)
})
}).catch(function(){
that.xlh=""
})
}, },
isFocus(){ isFocus(){
let $xlh=$("#kwrkb01").find('input[name="xlh"]') let $xlh=$("#kwrkb01").find('input[name="xlh"]')
...@@ -386,34 +434,12 @@ ...@@ -386,34 +434,12 @@
// 初始化页面 // 初始化页面
initpage() { initpage() {
let that=this let that=this
let $tab = $("#kwrkb01").find('.showtab') zpfk_pageinit(that)
this.$tab=$tab
this.taboptions = {
height: '100%',
width:"100%",
fitColumns: false,
rowStyler:function(index,row){
if(index<2){
return 'background-color:#6293BB;color:#fff;';
}
},
columns:zpfk_columns,
data: this.tabdata
}
$tab.datagrid(this.taboptions);
}, },
/* 展示时间 */ /* 展示时间 */
gettime() { gettime() {
let that = this let that = this
let nowtime zpfk_pagetime(that)
nowtime = new Date().getTime()
that.systime = new Date(nowtime).Format("yyyy-MM-dd hh:mm")
this.sivtimer = setInterval(function() {
nowtime = new Date().getTime()
that.systime = new Date(nowtime).Format("yyyy-MM-dd hh:mm")
}, 20000)
}, },
appdestory() { appdestory() {
let that = this let that = this
...@@ -446,6 +472,9 @@ ...@@ -446,6 +472,9 @@
}, },
data:function(){ data:function(){
return{ return{
okOrng:"N",
pdfdom:"kwrkb02pdf",
el:"#kwrkb02",
pdfurl:"kmes/gpfk/queryPdfByWoidAndZpgx", pdfurl:"kmes/gpfk/queryPdfByWoidAndZpgx",
addtop:0, addtop:0,
xlh:"", xlh:"",
...@@ -465,16 +494,7 @@ ...@@ -465,16 +494,7 @@
// 扫码接口 // 扫码接口
apiscanxlh(){ apiscanxlh(){
let that=this let that=this
zpfk_hqlx(that).then(function(e){ zpfk_zpfk(that)
console.log(e)
/* 获取类型 */
zpfk_queryKwellWoinfo(that).then(function(s){
zpfk_queryWoBomByWoid(that,s)
})
}).catch(function(){
that.xlh=""
})
}, },
// 扫码事件 // 扫码事件
scanxlh(e){ scanxlh(e){
...@@ -491,32 +511,12 @@ ...@@ -491,32 +511,12 @@
// 初始化页面 // 初始化页面
initpage() { initpage() {
let that=this let that=this
let $tab = $("#kwrkb02").find('.showtab') zpfk_pageinit(that)
this.$tab=$tab
this.taboptions = {
height: '100%',
width:"100%",
fitColumns: false,
rowStyler:function(index,row){
if(index<2){
return 'background-color:#6293BB;color:#fff;';
}
},
columns:zpfk_columns,
data: this.tabdata
}
$tab.datagrid(this.taboptions);
}, },
/* 展示时间 */ /* 展示时间 */
gettime(){ gettime(){
let that=this let that = this
let nowtime zpfk_pagetime(that)
nowtime=new Date().getTime()
that.systime=new Date(nowtime).Format("yyyy-MM-dd hh:mm")
this.sivtimer=setInterval(function(){
nowtime=new Date().getTime()
that.systime=new Date(nowtime).Format("yyyy-MM-dd hh:mm")
},20000)
}, },
appdestory(){ appdestory(){
let that=this let that=this
...@@ -548,6 +548,9 @@ ...@@ -548,6 +548,9 @@
}, },
data:function(){ data:function(){
return{ return{
okOrng:"N",
pdfdom:"kwrkb03pdf",
el:"#kwrkb03",
pdfurl:"kmes/gpfk/queryPdfByWoidAndZpgx", pdfurl:"kmes/gpfk/queryPdfByWoidAndZpgx",
addtop:0, addtop:0,
xlh:"", xlh:"",
...@@ -567,16 +570,7 @@ ...@@ -567,16 +570,7 @@
// 扫码接口 // 扫码接口
apiscanxlh(){ apiscanxlh(){
let that=this let that=this
zpfk_hqlx(that).then(function(e){ zpfk_zpfk(that)
console.log(e)
/* 获取类型 */
zpfk_queryKwellWoinfo(that).then(function(s){
zpfk_queryWoBomByWoid(that,s)
})
}).catch(function(){
that.xlh=""
})
}, },
// 扫码事件 // 扫码事件
scanxlh(e){ scanxlh(e){
...@@ -593,32 +587,12 @@ ...@@ -593,32 +587,12 @@
// 初始化页面 // 初始化页面
initpage(){ initpage(){
let that=this let that=this
let $tab = $("#kwrkb02").find('.showtab') zpfk_pageinit(that)
this.$tab=$tab
this.taboptions = {
height: '100%',
width:"100%",
fitColumns: false,
rowStyler:function(index,row){
if(index<2){
return 'background-color:#6293BB;color:#fff;';
}
},
columns:zpfk_columns,
data: this.tabdata
}
$tab.datagrid(this.taboptions);
}, },
/* 展示时间 */ /* 展示时间 */
gettime(){ gettime(){
let that=this let that = this
let nowtime zpfk_pagetime(that)
nowtime=new Date().getTime()
that.systime=new Date(nowtime).Format("yyyy-MM-dd hh:mm")
this.sivtimer=setInterval(function(){
nowtime=new Date().getTime()
that.systime=new Date(nowtime).Format("yyyy-MM-dd hh:mm")
},20000)
}, },
appdestory(){ appdestory(){
let that=this let that=this
......
...@@ -23,6 +23,21 @@ ...@@ -23,6 +23,21 @@
} }
}) })
/* 通用代码 */
/* 判定代码类型 登录页面*/
/* 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')
}
});
})
} */
</script> </script>
<div id="kwrkb04"> <div id="kwrkb04">
<!-- 顶部信息条 --> <!-- 顶部信息条 -->
...@@ -285,9 +300,7 @@ ...@@ -285,9 +300,7 @@
cpsn:"", cpsn:"",
ph:"", ph:"",
systime:"", systime:"",
tabdata:[ tabdata:[],
],
sivtimer:null,//时间计数器 sivtimer:null,//时间计数器
sivpdf:null, sivpdf:null,
sivdestory:null sivdestory:null
...@@ -357,19 +370,6 @@ ...@@ -357,19 +370,6 @@
return{ return{
systime:"", systime:"",
tabdata:[ tabdata:[
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
], ],
sivtimer:null,//时间计数器 sivtimer:null,//时间计数器
sivpdf:null, sivpdf:null,
...@@ -422,22 +422,14 @@ ...@@ -422,22 +422,14 @@
}, },
data:function(){ data:function(){
return{ return{
addtop:0,
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"", systime:"",
tabdata:[ tabdata:[],
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
{ph:10,pm:"GT-RBZ6",ggxh:"RBG-AK",sl:13,zpsl:12},
],
sivtimer:null,//时间计数器 sivtimer:null,//时间计数器
sivpdf:null, sivpdf:null,
sivdestory:null sivdestory:null
......
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