|
|
@ -33,7 +33,7 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
</el-container> |
|
|
</el-container> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="checkRmRollNo">确定</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="feedingMaterialRollFun">确定</el-button> |
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -43,6 +43,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
getBomItemNosByPartNo, |
|
|
getBomItemNosByPartNo, |
|
|
|
|
|
feedingMaterialRoll, |
|
|
} from "@/api/yieldReport/com_produce_material.js"; |
|
|
} from "@/api/yieldReport/com_produce_material.js"; |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
@ -82,12 +83,10 @@ export default { |
|
|
seqNo: '', |
|
|
seqNo: '', |
|
|
orderNo: '', |
|
|
orderNo: '', |
|
|
itemNo: 0, |
|
|
itemNo: 0, |
|
|
workCenterNo: '', |
|
|
|
|
|
rollNo: '', |
|
|
rollNo: '', |
|
|
rmRollNo: '', |
|
|
rmRollNo: '', |
|
|
bomItemNo: '', |
|
|
bomItemNo: '', |
|
|
shiftNo: '', |
|
|
|
|
|
nextItemNo: 0, |
|
|
|
|
|
|
|
|
histSeqNo: -1, |
|
|
operatorId: '', |
|
|
operatorId: '', |
|
|
closedFlag: 'N' |
|
|
closedFlag: 'N' |
|
|
}, |
|
|
}, |
|
|
@ -118,11 +117,14 @@ export default { |
|
|
this.pageData.rollNo = scheduleData.rollNo; |
|
|
this.pageData.rollNo = scheduleData.rollNo; |
|
|
this.pageData.rmRollNo = ''; |
|
|
this.pageData.rmRollNo = ''; |
|
|
this.pageData.bomItemNo = ''; |
|
|
this.pageData.bomItemNo = ''; |
|
|
this.pageData.closedFlag = 'N'; |
|
|
|
|
|
|
|
|
this.pageData.histSeqNo = -1; |
|
|
|
|
|
this.pageData.operatorId = operatorData.operatorId; |
|
|
//自动获取焦点 |
|
|
//自动获取焦点 |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs.rmRollNo.focus(); |
|
|
this.$refs.rmRollNo.focus(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
//清空当前的时间数据 |
|
|
|
|
|
this.timeArray = []; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
/*关闭modal*/ |
|
|
@ -132,7 +134,12 @@ export default { |
|
|
|
|
|
|
|
|
/*记录每一次录入字符串的时间*/ |
|
|
/*记录每一次录入字符串的时间*/ |
|
|
recordTime(){ |
|
|
recordTime(){ |
|
|
this.timeArray.push(new Date().getTime()); |
|
|
|
|
|
|
|
|
//判断是否清掉所有的内容 |
|
|
|
|
|
if(this.pageData.rmRollNo.trim().length == 0){ |
|
|
|
|
|
this.timeArray = []; |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.timeArray.push(new Date().getTime()); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/*检查材料卷号的数据*/ |
|
|
/*检查材料卷号的数据*/ |
|
|
@ -141,9 +148,9 @@ export default { |
|
|
let len = this.timeArray.length; |
|
|
let len = this.timeArray.length; |
|
|
let timeDiff = this.timeArray[len - 1] - this.timeArray[0]; |
|
|
let timeDiff = this.timeArray[len - 1] - this.timeArray[0]; |
|
|
//判断时间是否在范围之内 |
|
|
//判断时间是否在范围之内 |
|
|
/*if(timeDiff > 1000){ |
|
|
|
|
|
|
|
|
if(timeDiff > 1000){ |
|
|
this.$message.error('请扫码输入!'); |
|
|
this.$message.error('请扫码输入!'); |
|
|
}*/ |
|
|
|
|
|
|
|
|
} |
|
|
//判断null和空字符串 |
|
|
//判断null和空字符串 |
|
|
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo == '') { |
|
|
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo == '') { |
|
|
this.$message.error('材料卷号不能为空!'); |
|
|
this.$message.error('材料卷号不能为空!'); |
|
|
@ -173,23 +180,35 @@ export default { |
|
|
}else{ |
|
|
}else{ |
|
|
//启用下拉框 |
|
|
//启用下拉框 |
|
|
this.selectFlag = false; |
|
|
this.selectFlag = false; |
|
|
//this.bomList.unshift({'itemNo': '请选择'}) |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/*保存材料上机的记录*/ |
|
|
/*保存材料上机的记录*/ |
|
|
feedingMaterialRoll(){ |
|
|
|
|
|
|
|
|
feedingMaterialRollFun(){ |
|
|
//判断卷号是否为空 |
|
|
//判断卷号是否为空 |
|
|
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo == ''){ |
|
|
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo == ''){ |
|
|
this.$message.error('请扫描材料卷号!') |
|
|
this.$message.error('请扫描材料卷号!') |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
//判断是否选中行号 |
|
|
//判断是否选中行号 |
|
|
if(this.pageData.bomItemNo == '请选择' || this.pageData.bomItemNo == ''){ |
|
|
|
|
|
|
|
|
if(this.pageData.bomItemNo == '请选择' || this.pageData.bomItemNo === ''){ |
|
|
this.$message.error('请选择BOM行号!') |
|
|
this.$message.error('请选择BOM行号!') |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
//调用方法执行上材料 |
|
|
|
|
|
feedingMaterialRoll(this.pageData).then(({data}) => { |
|
|
|
|
|
debugger; |
|
|
|
|
|
if(data.code == 500){ |
|
|
|
|
|
this.$message.error(data.msg); |
|
|
|
|
|
}else{ |
|
|
|
|
|
//清空信息二次操作 |
|
|
|
|
|
this.pageData.rmRollNo = ''; |
|
|
|
|
|
this.pageData.bomItemNo = -1; |
|
|
|
|
|
this.bomList = []; |
|
|
|
|
|
this.timeArray = []; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|