fix:光芯日志pad添加扫码功能

This commit is contained in:
shijing 2025-03-31 13:58:57 +08:00
parent f6ffda0a8f
commit 6681b5baba
1 changed files with 10 additions and 6 deletions

View File

@ -23,6 +23,7 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card style="width: 100%; margin: 1vh 0" shadow="never" header="日志列表"> <el-card style="width: 100%; margin: 1vh 0" shadow="never" header="日志列表">
<div style="display: flex;">
<el-button <el-button
type="primary" type="primary"
v-if="fmlogItem.submit_time == null" v-if="fmlogItem.submit_time == null"
@ -30,14 +31,16 @@
@click="table_add" @click="table_add"
>新增</el-button >新增</el-button
> >
<scScanner @scanResult="codeTextChange" style="margin:0 10px;"></scScanner>
<el-input <el-input
ref="codeInput" ref="codeInput"
v-model="codeText" v-model="codeText"
clearable clearable
placeholder="正常交接" placeholder="物料编号"
style="width:150px" style="width:150px"
@keyup.enter="codeTextChange" @keyup.enter="codeTextChange(codeText)"
></el-input> ></el-input>
</div>
<scTable <scTable
stripe stripe
ref="table" ref="table"
@ -299,7 +302,7 @@ export default {
that.paramsWm.search = that.batchContains; that.paramsWm.search = that.batchContains;
that.apiObjWm = that.$API.wpm.wmaterial.list; that.apiObjWm = that.$API.wpm.wmaterial.list;
if(that.codeText!=""){ if(that.codeText!=""){
this.codeTextChange(); this.codeTextChange(that.codeText);
} }
}else{} }else{}
}); });
@ -316,11 +319,12 @@ export default {
this.$refs.saveDialog.open('add'); this.$refs.saveDialog.open('add');
}); });
}, },
codeTextChange(){ codeTextChange(codeText){
let that = this; let that = this;
that.codeText = codeText;
that.dialog.save = true; that.dialog.save = true;
that.$nextTick(() => { that.$nextTick(() => {
that.$refs.saveDialog.open('add',that.codeText); that.$refs.saveDialog.open('add',codeText);
}); });
}, },
table_edit(row){ table_edit(row){