fix:光芯日志pad添加扫码功能
This commit is contained in:
parent
2c5c5fe513
commit
f6ffda0a8f
|
|
@ -408,7 +408,6 @@ export default {
|
|||
that.$API.mtm.mgroup.item.req(that.mgroup).then((res) => {
|
||||
that.deptId = res.belong_dept;
|
||||
that.mgroupName = res.name;
|
||||
that.process = res.process;
|
||||
that.getEquipment();
|
||||
that.getUserList();
|
||||
});
|
||||
|
|
@ -481,7 +480,7 @@ export default {
|
|||
that.$API.wpm.wmaterial.list.req({mtaskx:that.mtask,mgroupx: that.mgroup,material: that.material_in,page: 0,}).then((res) => {
|
||||
that.materialOptions = res;
|
||||
if(that.codeText!==''){
|
||||
that.materialOptions.forEach(item=>{
|
||||
res.forEach(item=>{
|
||||
if(item.batch == that.codeText){
|
||||
that.form.wm_in = item.id;
|
||||
that.form.batch = item.batch;
|
||||
|
|
|
|||
|
|
@ -16,13 +16,14 @@
|
|||
v-auth="'mlog.create'"
|
||||
>返工</el-button
|
||||
>
|
||||
<scScanner @scanResult="codeTextChange" style="margin:0 10px;"></scScanner>
|
||||
<el-input
|
||||
ref="codeInput"
|
||||
v-model="codeText"
|
||||
clearable
|
||||
placeholder="正常交接"
|
||||
placeholder="物料扫码"
|
||||
style="width:150px"
|
||||
@keyup.enter="codeTextChange"
|
||||
@keyup.enter="codeTextChange(codeText)"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
|
|
@ -267,9 +268,9 @@ export default {
|
|||
});
|
||||
},
|
||||
//日志页面扫描物料二维码信息mlog
|
||||
codeTextChange(){
|
||||
codeTextChange(codeText){
|
||||
let that = this;
|
||||
that.codeText;
|
||||
that.codeText = codeText;
|
||||
//根据扫描内容获取物料
|
||||
let obj = {};
|
||||
obj.page=0;
|
||||
|
|
|
|||
|
|
@ -79,20 +79,21 @@
|
|||
header="输入物料"
|
||||
shadow="never"
|
||||
>
|
||||
<div>
|
||||
<div style="display: flex;">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
||||
icon="el-icon-plus"
|
||||
@click="table_add"
|
||||
>新增</el-button>
|
||||
<scScanner @scanResult="codeTextChange" style="margin:0 10px;"></scScanner>
|
||||
<el-input
|
||||
ref="codeInput"
|
||||
v-model="codeText"
|
||||
clearable
|
||||
placeholder="物料批次号"
|
||||
style="width:150px"
|
||||
@keyup.enter="codeTextChange"
|
||||
@keyup.enter="codeTextChange(codeText)"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="height: 4px"></div>
|
||||
|
|
@ -756,7 +757,8 @@ export default {
|
|||
});
|
||||
});
|
||||
},
|
||||
codeTextChange(){
|
||||
codeTextChange(codeText){
|
||||
this.codeText = codeText;
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open();
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ export default {
|
|||
mounted() {
|
||||
let that = this;
|
||||
if(that.codeText!==''){
|
||||
let id = data.split('#')[1];
|
||||
let id = that.codeText.split('#')[1];
|
||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||
that.codeBatch = res.batch;
|
||||
this.getMaterial();
|
||||
|
|
|
|||
|
|
@ -9,13 +9,14 @@
|
|||
v-auth="'mlog.create'"
|
||||
>新增</el-button
|
||||
>
|
||||
<scScanner @scanResult="codeTextChange"></scScanner>
|
||||
<el-input
|
||||
ref="codeInput"
|
||||
v-model="codeText"
|
||||
clearable
|
||||
placeholder="设备编号"
|
||||
style="width:150px"
|
||||
@keyup.enter="codeTextChange"
|
||||
@keyup.enter="codeTextChange(codeText)"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
|
|
@ -363,6 +364,7 @@ export default {
|
|||
}
|
||||
},
|
||||
codeTextChange(text){
|
||||
this.codeText = text;
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add",text);
|
||||
|
|
|
|||
Loading…
Reference in New Issue