|
|
@ -1,29 +1,39 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="customer-css"> |
|
|
<div class="customer-css"> |
|
|
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" |
|
|
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" |
|
|
width="225px" style="height: 680px;" class="customer-dialog"> |
|
|
|
|
|
<el-container style="height: 125px;"> |
|
|
|
|
|
|
|
|
width="205px" style="height: 580px;" class="customer-dialog"> |
|
|
|
|
|
<el-container style="height: 105px;"> |
|
|
<el-form :inline="true" label-position="top" label-width="80px"> |
|
|
<el-form :inline="true" label-position="top" label-width="80px"> |
|
|
<!-- 材料卷号和BOM序号 --> |
|
|
<!-- 材料卷号和BOM序号 --> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="16"> |
|
|
<el-col :span="16"> |
|
|
<el-form-item :label="'材料卷号:'"> |
|
|
<el-form-item :label="'材料卷号:'"> |
|
|
<el-input v-model="scheduleData.seqNo" style="width: 120px"></el-input> |
|
|
|
|
|
|
|
|
<el-input ref="rmRollNo" @keyup.native="recordTime" |
|
|
|
|
|
@keyup.enter.native="checkRmRollNo" |
|
|
|
|
|
v-model="pageData.rmRollNo" |
|
|
|
|
|
style="width: 120px"> |
|
|
|
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="16"> |
|
|
<el-col :span="16"> |
|
|
<el-form-item :label="'BOM 序号:'"> |
|
|
<el-form-item :label="'BOM 序号:'"> |
|
|
<el-input v-model="scheduleData.seqNo" style="width: 120px"></el-input> |
|
|
|
|
|
|
|
|
<el-select v-model="pageData.bomItemNo" style="width: 120px"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in bomList" |
|
|
|
|
|
:key="item.itemNo" |
|
|
|
|
|
:label="item.itemNo" |
|
|
|
|
|
:value="item.itemNo"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</el-container> |
|
|
</el-container> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary">列表</el-button> |
|
|
|
|
|
<el-button type="primary">确 定</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary">确定</el-button> |
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -42,23 +52,41 @@ export default { |
|
|
userName: this.$store.state.user.name, |
|
|
userName: this.$store.state.user.name, |
|
|
seqNo: '', |
|
|
seqNo: '', |
|
|
orderNo: '', |
|
|
orderNo: '', |
|
|
|
|
|
itemNo: 0, |
|
|
partNo: '', |
|
|
partNo: '', |
|
|
|
|
|
workCenterNo: '', |
|
|
|
|
|
workCenterDesc: '', |
|
|
|
|
|
resourceDesc: '', |
|
|
rollNo: '', |
|
|
rollNo: '', |
|
|
partDesc: '', |
|
|
partDesc: '', |
|
|
reportedFlag: 'N', |
|
|
|
|
|
|
|
|
planStartTime: '', |
|
|
|
|
|
planFinishTime: '', |
|
|
qtyRequiredOriginal: 0, |
|
|
qtyRequiredOriginal: 0, |
|
|
scheduledDate: '', |
|
|
scheduledDate: '', |
|
|
shiftNo: '', |
|
|
shiftNo: '', |
|
|
preItemDesc: '', |
|
|
preItemDesc: '', |
|
|
nextItemDesc: '', |
|
|
nextItemDesc: '', |
|
|
nextItemNo: 0, |
|
|
nextItemNo: 0, |
|
|
|
|
|
operatorId: '', |
|
|
|
|
|
functionName: '', |
|
|
currentRollFlag: false |
|
|
currentRollFlag: false |
|
|
}, |
|
|
}, |
|
|
currentRollOps: { |
|
|
|
|
|
|
|
|
timeArray: [], |
|
|
|
|
|
bomList: [], |
|
|
|
|
|
pageData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
userName: this.$store.state.user.name, |
|
|
seqNo: '', |
|
|
seqNo: '', |
|
|
|
|
|
orderNo: '', |
|
|
|
|
|
itemNo: 0, |
|
|
|
|
|
partNo: '', |
|
|
|
|
|
workCenterNo: '', |
|
|
rollNo: '', |
|
|
rollNo: '', |
|
|
finishedFlag: '', |
|
|
|
|
|
|
|
|
rmRollNo: '', |
|
|
|
|
|
bomItemNo: 0, |
|
|
|
|
|
shiftNo: '', |
|
|
|
|
|
nextItemNo: 0, |
|
|
|
|
|
operatorId: '' |
|
|
}, |
|
|
}, |
|
|
operatorData: { |
|
|
operatorData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
@ -74,11 +102,53 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
//初始化页面的参数 |
|
|
|
|
|
init(scheduleData, operatorData) { |
|
|
|
|
|
//初始化参数 |
|
|
|
|
|
this.scheduleData = scheduleData; |
|
|
|
|
|
//初始化操作员对象 |
|
|
|
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|
|
|
|
|
//设置页面的参数 |
|
|
|
|
|
this.pageData.orderNo = scheduleData.orderNo; |
|
|
|
|
|
this.pageData.itemNo = scheduleData.itemNo; |
|
|
|
|
|
this.pageData.seqNo = scheduleData.seqNo; |
|
|
|
|
|
this.pageData.rollNo = scheduleData.rollNo; |
|
|
|
|
|
this.pageData.rmRollNo = ''; |
|
|
|
|
|
this.pageData.bomItemNo = 0; |
|
|
|
|
|
//自动获取焦点 |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs.rmRollNo.focus(); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
/*关闭modal*/ |
|
|
closeDialog(){ |
|
|
closeDialog(){ |
|
|
this.$emit('update:visible', false); |
|
|
this.$emit('update:visible', false); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*记录每一次录入字符串的时间*/ |
|
|
|
|
|
recordTime(){ |
|
|
|
|
|
this.timeArray.push(new Date().getTime()); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*检查材料卷号的数据*/ |
|
|
|
|
|
checkRmRollNo(){ |
|
|
|
|
|
//首先判断时间是否超过100毫秒 |
|
|
|
|
|
let len = this.timeArray.length; |
|
|
|
|
|
let timeDiff = this.timeArray[len-1] - this.timeArray[0]; |
|
|
|
|
|
//判断时间是否在范围之内 |
|
|
|
|
|
/*if(timeDiff > 1000){ |
|
|
|
|
|
this.$message.error('请扫码输入!'); |
|
|
|
|
|
}*/ |
|
|
|
|
|
//判断null和空字符串 |
|
|
|
|
|
if(this.pageData.rmRollNo == null || this.pageData.rmRollNo == ''){ |
|
|
|
|
|
this.$message.error('材料卷号不能为空!'); |
|
|
|
|
|
} |
|
|
|
|
|
//处理扫描材料卷号 |
|
|
|
|
|
debugger; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -89,16 +159,6 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
init(seqNo, operatorData) { |
|
|
|
|
|
//初始化参数 |
|
|
|
|
|
this.scheduleData.seqNo = seqNo; |
|
|
|
|
|
//初始化操作员对象 |
|
|
|
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|
|
|
|
|
// this.currentRollOps.seqNo = seqNo; |
|
|
|
|
|
// this.currentRollOps.rollNo = rollNo; |
|
|
|
|
|
//刷新当前派工单的信息 |
|
|
|
|
|
//this.refreshPageData(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
|