|
|
@ -8,7 +8,8 @@ |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item :label="'工具实例编号:'"> |
|
|
<el-form-item :label="'工具实例编号:'"> |
|
|
<el-input v-model="scheduleData.seqNo" style="width: 120px"></el-input> |
|
|
|
|
|
|
|
|
<el-input ref="toolInstanceId" v-model="pageData.toolInstanceId" |
|
|
|
|
|
@keyup.enter.native="checkToolInstanceIdFun" style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -20,7 +21,7 @@ |
|
|
<el-col :span="16"> |
|
|
<el-col :span="16"> |
|
|
<el-form-item class="customer-item"> |
|
|
<el-form-item class="customer-item"> |
|
|
<el-checkbox disabled="disabled" true-label="Y" false-label="N" |
|
|
<el-checkbox disabled="disabled" true-label="Y" false-label="N" |
|
|
v-model="scheduleData.reportedFlag">换刀模</el-checkbox> |
|
|
|
|
|
|
|
|
v-model="pageData.replaceFlag">换刀模</el-checkbox> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -28,24 +29,24 @@ |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item class="customer-item" label="原工具实例编码:"> |
|
|
<el-form-item class="customer-item" label="原工具实例编码:"> |
|
|
<el-input v-model="scheduleData.orderNo" readonly style="width: 100px;" ></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="pageData.oriToolInstanceId" readonly="readonlyFlag" style="width: 100px;" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item class="customer-item" label="本卷生产数量:"> |
|
|
<el-form-item class="customer-item" label="本卷生产数量:"> |
|
|
<el-input v-model="scheduleData.orderNo" readonly style="width: 100px;" ></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="pageData.consumeQty" readonly="readonlyFlag" style="width: 100px;" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item class="customer-item" label="之前卷以生产数量:"> |
|
|
<el-form-item class="customer-item" label="之前卷以生产数量:"> |
|
|
<el-input v-model="scheduleData.orderNo" readonly style="width: 100px;" ></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="pageData.oriConsumeQty" readonly="readonlyFlag" style="width: 100px;" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item class="customer-item" label="累计生产数量:"> |
|
|
<el-form-item class="customer-item" label="累计生产数量:"> |
|
|
<el-input v-model="scheduleData.orderNo" readonly style="width: 100px;" ></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="pageData.totalConsumeQty" readonly="readonlyFlag" style="width: 100px;" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -55,7 +56,6 @@ |
|
|
</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> |
|
|
@ -64,6 +64,10 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import { |
|
|
|
|
|
checkToolInstanceId, |
|
|
|
|
|
} |
|
|
|
|
|
from '@/api/yieldReport/com_produce_tool.js'; |
|
|
export default { |
|
|
export default { |
|
|
name: "com_defect_roll", |
|
|
name: "com_defect_roll", |
|
|
data() { |
|
|
data() { |
|
|
@ -75,23 +79,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: { |
|
|
|
|
|
|
|
|
pageData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
userName: this.$store.state.user.name, |
|
|
|
|
|
orderNo: '', |
|
|
|
|
|
itemNo: '', |
|
|
seqNo: '', |
|
|
seqNo: '', |
|
|
rollNo: '', |
|
|
rollNo: '', |
|
|
finishedFlag: '', |
|
|
|
|
|
|
|
|
operatorId: '', |
|
|
|
|
|
replaceFlag: false, |
|
|
|
|
|
toolInstanceId: '', |
|
|
|
|
|
oriToolInstanceId: '', |
|
|
|
|
|
consumeQty: 0, |
|
|
|
|
|
oriConsumeQty: 0, |
|
|
|
|
|
totalConsumeQty: 0, |
|
|
|
|
|
readonlyFlag: true, |
|
|
|
|
|
checkFlag: false, |
|
|
}, |
|
|
}, |
|
|
operatorData: { |
|
|
operatorData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
@ -107,32 +129,66 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
//初始化组件的参数 |
|
|
|
|
|
init(scheduleData, operatorData, replaceFlag) { |
|
|
|
|
|
//初始化参数 |
|
|
|
|
|
this.scheduleData = scheduleData; |
|
|
|
|
|
//初始化操作员对象 |
|
|
|
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|
|
|
|
|
//是否是切换 |
|
|
|
|
|
this.pageData.replaceFlag = replaceFlag; |
|
|
|
|
|
//设置参数 |
|
|
|
|
|
this.pageData.orderNo = scheduleData.orderNo; |
|
|
|
|
|
this.pageData.itemNo = scheduleData.itemNo; |
|
|
|
|
|
this.pageData.seqNo = scheduleData.seqNo; |
|
|
|
|
|
this.pageData.rollNo = scheduleData.rollNo; |
|
|
|
|
|
this.pageData.operatorId = operatorData.operatorId; |
|
|
|
|
|
//清空数据 |
|
|
|
|
|
this.pageData.toolInstanceId = ''; |
|
|
|
|
|
this.pageData.oriToolInstanceId = ''; |
|
|
|
|
|
this.pageData.defectDesc = ''; |
|
|
|
|
|
//自动获取焦点 |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs.toolInstanceId.focus(); |
|
|
|
|
|
}); |
|
|
|
|
|
//区分是否是切换切换的 |
|
|
|
|
|
if(replaceFlag){ |
|
|
|
|
|
this.pageData.consumeQty = 0; |
|
|
|
|
|
this.pageData.oriConsumeQty = 0; |
|
|
|
|
|
this.pageData.totalConsumeQty = 0; |
|
|
|
|
|
this.readonlyFlag = false; |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.pageData.consumeQty = ''; |
|
|
|
|
|
this.pageData.oriConsumeQty = ''; |
|
|
|
|
|
this.pageData.totalConsumeQty = ''; |
|
|
|
|
|
this.readonlyFlag = true; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
/*关闭modal*/ |
|
|
closeDialog(){ |
|
|
closeDialog(){ |
|
|
this.$emit('update:visible', false); |
|
|
this.$emit('update:visible', false); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*检查新的工具实例信息*/ |
|
|
|
|
|
checkToolInstanceIdFun(){ |
|
|
|
|
|
if(this.pageData.toolInstanceId == null || this.pageData.toolInstanceId == ''){ |
|
|
|
|
|
this.$message.error('请扫描工具实例!'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
checkToolInstanceId(this.pageData).then(({data}) => { |
|
|
|
|
|
//判断检查是否通过 |
|
|
|
|
|
//判断是否存在异常 |
|
|
|
|
|
if(data.code == 500){ |
|
|
|
|
|
this.$message.error(data.msg); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.pageData.checkFlag = true; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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() { |
|
|
// this.factoryList() |
|
|
// this.factoryList() |
|
|
|