| | |
| | | model: /卷号[::]\s*([^\s<]+)/, |
| | | batch: /箱号[::]\s*([^\s<]+)/, |
| | | specs: /规格[::]\s*([^\s<]+)/, |
| | | length: /长度[::]\s*([\d.]+)\s* ?m/, |
| | | anfme: /净重[::]\s*([\d.]+)\s* ?kg/, |
| | | qty: /毛重[::]\s*([\d.]+)\s* ?kg/, |
| | | volume: /接头[::]\s*([\d.]+)\s* ?个/ |
| | | length: /长度[::]\s*([\d.]+)\s*m/, |
| | | anfme: /净重[::]\s*([\d.]+)\s*kg/, |
| | | qty: /毛重[::]\s*([\d.]+)\s*kg/, |
| | | volume: /接头[::]\s*([\d.]+)\s*个/ |
| | | }; |
| | | |
| | | // 提取各字段信息 |
| | |
| | | const match = this.matnr.match(patterns[key]); |
| | | if (match && match[1]) { |
| | | if (['length', 'anfme', 'qty', 'volume'].includes(key)) { |
| | | productInfo[key] = parseFloat(match[1]); |
| | | productInfo[key] = parseFloat(match[1].trim()); |
| | | } else { |
| | | productInfo[key] = match[1].trim(); |
| | | } |
| | |
| | | if (!flag) { |
| | | this.msgType = 'warn' |
| | | this.title = '警告' |
| | | this.content = '箱号:' + data.batch + '规格:' + data.specs + '净重:' + data.anfme + ' 不存在,请检查!' |
| | | this.content = "箱号:" + data.batch + "\n" |
| | | + "规格:"+ data.specs + "\n" |
| | | + "净重:"+ data.anfme + "\n" |
| | | + '不存在,请检查!' |
| | | this.$refs.combConfirm2.open() |
| | | } |
| | | this.focuss() |
| | |
| | | comb() { |
| | | let _this = this |
| | | |
| | | if (!_this.memo) { |
| | | this.messageText = "请选择复核备注" |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | // if (!_this.memo) { |
| | | // this.messageText = "请选择复核备注" |
| | | // this.messageToggle('error') |
| | | // return; |
| | | // } |
| | | if (!_this.threeCode) { |
| | | this.messageText = "请选择复核人" |
| | | this.messageToggle('error') |