| | |
| | | onLoad() { |
| | | var _this = this; |
| | | _this._getOutBoundWorkPieceInfoCount(); |
| | | //不再循环读 |
| | | /* |
| | | this.myInterval = setInterval(function() { |
| | | _this._getOutBoundWorkPieceInfoCount(); |
| | | }, 1000 * 10); |
| | | //*/ |
| | | //this.myInterval=setInterval(this.myFun(), 3000); |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | // 获取工件信息 |
| | | async onSearchContainter(OP80NewCode) { |
| | | // if (OP80NewCode.length > 22) { |
| | | // this.initFocus(100); |
| | | |
| | | //debugger |
| | | if (OP80NewCode.length != 21) { |
| | | this.initFocus(100); |
| | | // uni.showToast({ |
| | | // title: '工件码或成品码长度不正确', |
| | | // icon: 'error', |
| | | // duration: 2000, |
| | | // mask: true |
| | | // }); |
| | | // return; |
| | | // } |
| | | return; |
| | | } |
| | | |
| | | this.inputFocus = false |
| | | const param = { |
| | | OP80NewCode: OP80NewCode |
| | | } |
| | | try { |
| | | let { |
| | | data |
| | | } = await getWorkPieceByOP80NewCode(param) |
| | | let data={}; |
| | | data.addTime = new Date(); |
| | | data.workPieceID=OP80NewCode; |
| | | data.oP80NewCode=OP80NewCode; |
| | | if (!this.workPieceData.some(item => item.workPieceID == data.workPieceID)) { |
| | | data.addTime = new Date(); |
| | | this.workPieceData.push(data) |
| | |
| | | //顺序调转,排序 |
| | | this.workPieceData.sort((a, b) => b.addTime - a.addTime); |
| | | |
| | | this.OP80NewCode = ''; //每次刷完就清空输入框 【Editby shaocx,2024-06-12】 |
| | | this.initFocus(100); |
| | | //console.log(this.workPieceData,'dsts'); |
| | | // setTimeout(()=>{ |
| | |
| | | reflesh() { |
| | | this.OP80NewCode = '' |
| | | this.workPieceData = [] |
| | | setTimeout(() => { |
| | | this._getOutBoundWorkPieceInfoCount(); |
| | | this.setMsg(); |
| | | }, 1000) |
| | | }, |
| | | outBoundConfirm() { |
| | | this.$refs.pwdRef.showModal(this.workPieceData) |
| | | |
| | | /* |
| | | // 存在非成品 |
| | | const flag = this.workPieceData.some(item => item.workPieceState != 10) |
| | | if (flag) { |
| | |
| | | this.$refs.pwdRef.showModal(this.workPieceData) |
| | | } |
| | | |
| | | //*/ |
| | | |
| | | }, |
| | | /* 页面初始化获取页面body高度的定时器 */ |
| | | startInitInterval(callback) { |