Browse Source

优化扫描

lijuncheng0816
lijuncheng 1 month ago
parent
commit
1395fb7523
  1. 35
      src/mycomponents/scan/winComScan.vue
  2. 4
      src/pages/package/coms/comScanPackagePack.vue

35
src/mycomponents/scan/winComScan.vue

@ -5,13 +5,9 @@
<view class="pop_tab">
<view class="tab_info">
<view class="conbox">
<textarea
v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:placeholder="placeholderValue"
:focus="boxfocus"
@blur="handleBlur"
@focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex" ></textarea>
<textarea v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:placeholder="placeholderValue" :focus="boxfocus" @blur="handleBlur" @focus="handleFocus"
@input="handelScanMsg" ></textarea>
</view>
<view class="uni-flex uni-row space-between u-col-center">
@ -37,8 +33,7 @@
</view>
</view>
<u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'></u-line>
<scroll-view scroll-y="true" class="scroll-view" v-if="expand"
style="height: 70px;">
<scroll-view scroll-y="true" class="scroll-view" v-if="expand" style="height: 70px;">
<view class="uni-flex u-col" v-for="(item,index) in scanList">
<view style="width: 100%;max-height: 100px;">
<view class="uni-flex u-row space-between u-col-center" @click="showItem(item)">
@ -139,7 +134,7 @@
},
clearScanValue() {
this.scanMsg = ''
this.cursorIndex =0
// this.cursorIndex = 0
this.getfocus();
},
clickScanMsg() {
@ -153,8 +148,10 @@
// mask: true
// })
let that = this;
let index = that.scanMsg.indexOf('\n');
if (index >= 0) {
// if(index==-1){
// that.scanMsg =that.scanMsg + "\n";
// }
if (that.scanMsg.includes('\n')) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {
that.losefocus();
@ -191,12 +188,11 @@
})
}
});
}, 500);
}, 200);
}
},
handleFocus(){
},
handleFocus() {},
handleBlur() {
// setTimeout(res=>{
@ -216,14 +212,13 @@
});
},
clear() {
if(this.clearResult)
{
this.cursorIndex = 0;
this.scanMsg = ''
if (this.clearResult) {
this.scanMsg = ""
// this.cursorIndex = 0;
}
},
iconClick(type) {
this.$emit("clearResult", this.scanMsgk);
this.$emit("clearResult", this.scanMsg);
},
expands() {
this.expand = !this.expand;

4
src/pages/package/coms/comScanPackagePack.vue

@ -353,8 +353,10 @@ import { getDirectoryItemArray } from '@/common/directory';
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.calcBatchHandleQty(batch);
this.packGetFocus();
this.$emit('refresh');
setTimeout(res=>{
this.packGetFocus();
},100)
},
swipeClick(e, item, index) {

Loading…
Cancel
Save