diff --git a/src/views/jhzx/symxCX.vue b/src/views/jhzx/symxCX.vue index 3f9b5ed..f74d4d7 100644 --- a/src/views/jhzx/symxCX.vue +++ b/src/views/jhzx/symxCX.vue @@ -61,7 +61,8 @@
- 月度计划排产 + 月度计划排产 + 生成月度计划 汇总 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) diff --git a/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue b/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue index 325b47f..976dfbc 100644 --- a/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue +++ b/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue @@ -4,32 +4,90 @@