|
|
|
@ -44,6 +44,7 @@ export default {
|
|
|
|
|
drawItem:null,
|
|
|
|
|
workerGroup:null,
|
|
|
|
|
person:null,
|
|
|
|
|
deviceId:null,
|
|
|
|
|
kwBm:[
|
|
|
|
|
{"bmsm": "2跨超长超宽曲板", "bmlb": "QGKW", "bm": "10"},
|
|
|
|
|
{"bmsm": "2跨T型材腹板", "bmlb": "QGKW", "bm": "11"},
|
|
|
|
@ -67,9 +68,62 @@ export default {
|
|
|
|
|
this.initKonvaStage();
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
this.deviceId=this.$route.query.deviceId||''
|
|
|
|
|
window.addEventListener('resize', this.initKonvaStage)
|
|
|
|
|
},
|
|
|
|
|
sockets:{},
|
|
|
|
|
sockets:{
|
|
|
|
|
zyjhzx(data){
|
|
|
|
|
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType==='开始报工'){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
//工单号尾号长度
|
|
|
|
|
const djhWhLengh=3
|
|
|
|
|
const tmpList=this.sljhItemList.filter(item=>item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
|
|
|
|
|
if (tmpList.length>1){
|
|
|
|
|
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
for (const item of this.sljhItemList) {
|
|
|
|
|
if (item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
|
|
|
|
|
if (!!this.currentDw.tzbh&&item.kw===this.currentDw.tzbh){
|
|
|
|
|
const tmpZxData={
|
|
|
|
|
id:item.id,
|
|
|
|
|
lldw:this.currentDw.id,
|
|
|
|
|
llcs:this.dw[that.currentDwIndex].list.length+1,
|
|
|
|
|
llfkry:this.getCurrentWorker()?.userCode
|
|
|
|
|
}
|
|
|
|
|
const data={
|
|
|
|
|
ydjh:tmpZxData,
|
|
|
|
|
ydid:item.id,
|
|
|
|
|
dwId:this.currentDw.id,
|
|
|
|
|
ceng:this.dw[that.currentDwIndex].list.length+1,
|
|
|
|
|
czbh:item.dcCh,
|
|
|
|
|
pl:item.dcPl,
|
|
|
|
|
fd:item.dcFd,
|
|
|
|
|
kw:item.kw,
|
|
|
|
|
zl:item.zl,
|
|
|
|
|
tlth:item.tzbh,
|
|
|
|
|
wph:item.wpxh,
|
|
|
|
|
wpgg:item.wpgg,
|
|
|
|
|
sljhrq:item.sljhrq,
|
|
|
|
|
qgjhrq:item.qgjhrq,
|
|
|
|
|
bfr:this.currentWorker?.userCode,
|
|
|
|
|
type:'LLJ'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
shangLiao(data).then(res=>{})
|
|
|
|
|
|
|
|
|
|
this.sljhItemList.splice(this.getAttr('index'),1)
|
|
|
|
|
this.sljhGroup.destroyChildren()
|
|
|
|
|
this.drawSljhItem(that.sljhItemList)
|
|
|
|
|
}else{
|
|
|
|
|
that.$message.warning(`理料垛位错误,请放入${that.kwNameFormat(item.kw)}所在垛位`)
|
|
|
|
|
}
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
wsSubscribe() {
|
|
|
|
|
this.sockets.subscribe('llComplete', data => {
|
|
|
|
@ -84,41 +138,41 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.initDw()
|
|
|
|
|
})
|
|
|
|
|
this.sockets.subscribe('zyjhzx', data => {
|
|
|
|
|
if (this.zt===data.zt){
|
|
|
|
|
const item=data.zyjh
|
|
|
|
|
let dwId=0
|
|
|
|
|
let dwCeng=0
|
|
|
|
|
for (const dw of this.dw) {
|
|
|
|
|
if(dw.tzbh===data.zyjh.kw){
|
|
|
|
|
dwId=dw.dwId
|
|
|
|
|
dwCeng=dw.list.length
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const tmp={
|
|
|
|
|
ydjh:item,
|
|
|
|
|
dwId:dwId,
|
|
|
|
|
ceng:dwCeng+1,
|
|
|
|
|
czbh:item.dcCh,
|
|
|
|
|
pl:item.dcPl,
|
|
|
|
|
fd:item.dcFd,
|
|
|
|
|
kw:item.kw,
|
|
|
|
|
zl:item.zl,
|
|
|
|
|
tlth:item.tzbh,
|
|
|
|
|
wph:item.wpxh,
|
|
|
|
|
wpgg:item.wpgg,
|
|
|
|
|
sljhrq:item.sljhrq,
|
|
|
|
|
qgjhrq:item.qgjhrq,
|
|
|
|
|
bfr:data.zyjh.llry,
|
|
|
|
|
type:'LLJ'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
shangLiao(tmp).then(res=>{})
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.$message.error(`工单号错误:${data.gdh}`)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// this.sockets.subscribe('zyjhzx', data => {
|
|
|
|
|
// if (this.zt===data.zt){
|
|
|
|
|
// const item=data.zyjh
|
|
|
|
|
// let dwId=0
|
|
|
|
|
// let dwCeng=0
|
|
|
|
|
// for (const dw of this.dw) {
|
|
|
|
|
// if(dw.tzbh===data.zyjh.kw){
|
|
|
|
|
// dwId=dw.dwId
|
|
|
|
|
// dwCeng=dw.list.length
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// const tmp={
|
|
|
|
|
// ydjh:item,
|
|
|
|
|
// dwId:dwId,
|
|
|
|
|
// ceng:dwCeng+1,
|
|
|
|
|
// czbh:item.dcCh,
|
|
|
|
|
// pl:item.dcPl,
|
|
|
|
|
// fd:item.dcFd,
|
|
|
|
|
// kw:item.kw,
|
|
|
|
|
// zl:item.zl,
|
|
|
|
|
// tlth:item.tzbh,
|
|
|
|
|
// wph:item.wpxh,
|
|
|
|
|
// wpgg:item.wpgg,
|
|
|
|
|
// sljhrq:item.sljhrq,
|
|
|
|
|
// qgjhrq:item.qgjhrq,
|
|
|
|
|
// bfr:data.zyjh.llry,
|
|
|
|
|
// type:'LLJ'
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// shangLiao(tmp).then(res=>{})
|
|
|
|
|
//
|
|
|
|
|
// }else{
|
|
|
|
|
// this.$message.error(`工单号错误:${data.gdh}`)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
initPgd(pgd={}){
|
|
|
|
|
const group=this.drawGd(pgd)
|
|
|
|
|