|
|
@ -6,10 +6,8 @@ |
|
|
|
<view class="tab_info"> |
|
|
|
<view class="conbox"> |
|
|
|
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" |
|
|
|
style="margin-left: 5px;width: 90%;" |
|
|
|
:focus="boxfocus" :placeholder="placeholderValue" |
|
|
|
@focus="handleFocus" |
|
|
|
@input="handelScanMsg" :cursor="cursorIndex"></textarea> |
|
|
|
style="margin-left: 5px;width: 90%;" :focus="boxfocus" :placeholder="placeholderValue" |
|
|
|
@focus="handleFocus" @input="handelScanMsg" :cursor="cursorIndex"></textarea> |
|
|
|
</view> |
|
|
|
<view class="uni-flex uni-row space-between u-col-center"> |
|
|
|
<view class="uni-flex"> |
|
|
@ -125,6 +123,7 @@ |
|
|
|
this.placeholderValue = '请扫描' + this.placeholder; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleFocus() {}, |
|
|
|
setItemCodeSimulate(itemCode, scanMsg) { |
|
|
|
this.itemCode = itemCode; |
|
|
|
this.scanMsg = scanMsg; |
|
|
@ -140,7 +139,7 @@ |
|
|
|
this.scanMsg = val |
|
|
|
}, |
|
|
|
clearScanValue() { |
|
|
|
this.cursorIndex=0, |
|
|
|
this.cursorIndex = 0, |
|
|
|
this.scanMsg = '' |
|
|
|
this.getfocus(); |
|
|
|
}, |
|
|
@ -188,7 +187,7 @@ |
|
|
|
// let productDate = content.substr(lengthMat, 8); |
|
|
|
// let batch = content.substr(lengthMat + 8, 3); |
|
|
|
let order = content.substr(-8); |
|
|
|
if(content.length!=lengthBc){ |
|
|
|
if (content.length != lengthBc) { |
|
|
|
that.clear(); |
|
|
|
throw new Error("解析错误:扫描标签长度与配置条码的长度不一致") |
|
|
|
} |
|
|
|