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.$API.mtm.mgroup.item.req(that.mgroup).then((res) => {
|
||||||
that.deptId = res.belong_dept;
|
that.deptId = res.belong_dept;
|
||||||
that.mgroupName = res.name;
|
that.mgroupName = res.name;
|
||||||
that.process = res.process;
|
|
||||||
that.getEquipment();
|
that.getEquipment();
|
||||||
that.getUserList();
|
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.$API.wpm.wmaterial.list.req({mtaskx:that.mtask,mgroupx: that.mgroup,material: that.material_in,page: 0,}).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res;
|
||||||
if(that.codeText!==''){
|
if(that.codeText!==''){
|
||||||
that.materialOptions.forEach(item=>{
|
res.forEach(item=>{
|
||||||
if(item.batch == that.codeText){
|
if(item.batch == that.codeText){
|
||||||
that.form.wm_in = item.id;
|
that.form.wm_in = item.id;
|
||||||
that.form.batch = item.batch;
|
that.form.batch = item.batch;
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,14 @@
|
||||||
v-auth="'mlog.create'"
|
v-auth="'mlog.create'"
|
||||||
>返工</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>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
|
@ -267,9 +268,9 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//日志页面扫描物料二维码信息mlog
|
//日志页面扫描物料二维码信息mlog
|
||||||
codeTextChange(){
|
codeTextChange(codeText){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.codeText;
|
that.codeText = codeText;
|
||||||
//根据扫描内容获取物料
|
//根据扫描内容获取物料
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.page=0;
|
obj.page=0;
|
||||||
|
|
|
||||||
|
|
@ -79,20 +79,21 @@
|
||||||
header="输入物料"
|
header="输入物料"
|
||||||
shadow="never"
|
shadow="never"
|
||||||
>
|
>
|
||||||
<div>
|
<div style="display: flex;">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@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>
|
</div>
|
||||||
<div style="height: 4px"></div>
|
<div style="height: 4px"></div>
|
||||||
|
|
@ -756,7 +757,8 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
codeTextChange(){
|
codeTextChange(codeText){
|
||||||
|
this.codeText = codeText;
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open();
|
this.$refs.saveDialog.open();
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.codeText!==''){
|
if(that.codeText!==''){
|
||||||
let id = data.split('#')[1];
|
let id = that.codeText.split('#')[1];
|
||||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
that.codeBatch = res.batch;
|
that.codeBatch = res.batch;
|
||||||
this.getMaterial();
|
this.getMaterial();
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,14 @@
|
||||||
v-auth="'mlog.create'"
|
v-auth="'mlog.create'"
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
|
<scScanner @scanResult="codeTextChange"></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>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
|
@ -363,6 +364,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
codeTextChange(text){
|
codeTextChange(text){
|
||||||
|
this.codeText = text;
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open("add",text);
|
this.$refs.saveDialog.open("add",text);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue