feat:禅道444扭转工序,快速报工,扫码框后面加数字识别功能

This commit is contained in:
shijing 2026-07-20 11:27:37 +08:00
parent 6564742644
commit bec1e9a8a6
2 changed files with 47 additions and 10 deletions

View File

@ -47,7 +47,6 @@
id="exportDiv"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column label="日期" prop="日期" width="100" fixed="left">
@ -99,7 +98,6 @@
id="exportDiv"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
@ -131,7 +129,6 @@
id="exportDiv"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>

View File

@ -18,14 +18,14 @@
style="padding: 0 10px"
>
<el-row>
<el-col :span="project_code!=='bxerp'?22:24">
<el-col :span="scanColSpan">
<el-form-item label="扫码:">
<el-input
<el-input
class="inputWrap"
ref="codeInput"
v-model="wm_in"
clearable
@change="formWminChange(wm_in)"
ref="codeInput"
v-model="wm_in"
clearable
@change="formWminChange(wm_in)"
style="width: 100%;ime-mode:active"
></el-input>
<span style="color: red;line-height: 12px;font-size: 14px;">*请扫同一批次的物料码</span>
@ -34,6 +34,9 @@
<el-col :span="2" v-if="project_code!=='bxerp'">
<scScanner style="top: -7px" @scanResult="codeTextChange"></scScanner>
</el-col>
<el-col :span="4" v-if="route_code=='niuzhuan'">
<el-button type="success" @click="digital" style="margin-top: 3px;margin-left: 5px;">数字识别</el-button>
</el-col>
</el-row>
<el-row>
<el-col :md="12" :sm="12" :xs="24">
@ -230,7 +233,15 @@ export default {
}
},
emits: ["success", "closed"],
computed: {
scanColSpan(){
let span = this.project_code!=='bxerp' ? 22 : 24;
if(this.route_code=='niuzhuan'){
span -= 4;
}
return span;
},
},
data() {
return {
loading: false,
@ -266,6 +277,9 @@ export default {
imageUrl:'',
test_file:'',
project_code:'',
ocr_ip:"",
ocr_port:"",
ocr_unit:"",
visible: false,
isSaveing: false,
batchCountCando:0,
@ -309,6 +323,9 @@ export default {
});
});
},500)
that.ocr_ip = localStorage.getItem("ocr_ip") || "";
that.ocr_port = localStorage.getItem("ocr_port") || "";
that.ocr_unit = localStorage.getItem("ocr_unit") || "";
},
methods: {
//
@ -351,6 +368,29 @@ export default {
this.wm_in = text;
this.formWminChange(text);
},
digital(){
let that = this;
if(!that.ocr_ip || !that.ocr_port || !that.ocr_unit){
that.$message.warning('请先在右上角"数字识别设置"配置IP、端口号和位号');
return;
}
that.$API.em.equipment.get_svs_char.req({
host: that.ocr_ip,
port: that.ocr_port,
flow_unit: that.ocr_unit
}).then((res) => {
if(res.char){
that.wm_in = res.char;
that.formWminChange(res.char);
}
}).catch((err) => {
that.$notify.error({
title: '数字识别获取失败',
message: err.data
})
return err;
});
},
//
open(mode = "add") {
let that = this;