|
|
|
@ -35,7 +35,7 @@ |
|
|
|
</el-form> |
|
|
|
</el-container> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="feedingMaterialRollFun">确定</el-button> |
|
|
|
<el-button type="primary" @click="processCuttingMaterial">确定</el-button> |
|
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
@ -143,7 +143,8 @@ export default { |
|
|
|
let transQty = this.pageData.transQty; |
|
|
|
//判断是否可以修改 |
|
|
|
if (transQty > this.pageData.oriTransQty){ |
|
|
|
this.$message.error('!'); |
|
|
|
this.$message.error('退料数量超过了该记录上的发料数量!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//判断时间是否在范围之内 |
|
|
|
if(transQty <= 0){ |
|
|
|
@ -151,40 +152,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*获取BOM行号*/ |
|
|
|
refreshSomItemNos(){ |
|
|
|
getBomItemNosByPartNo(this.pageData).then(({data}) => { |
|
|
|
//判断是否成功 |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.bomList = data.rows; |
|
|
|
//首先判断行号是否只有一行 |
|
|
|
if(this.bomList.length == 1){ |
|
|
|
//禁用下拉框 |
|
|
|
this.selectFlag = true; |
|
|
|
//选中第一个 |
|
|
|
this.pageData.bomItemNo = data.rows[0].itemNo; |
|
|
|
}else{ |
|
|
|
//启用下拉框 |
|
|
|
this.selectFlag = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*保存材料上机的记录*/ |
|
|
|
feedingMaterialRollFun(){ |
|
|
|
/*处理材料下料的记录*/ |
|
|
|
processCuttingMaterial(){ |
|
|
|
//判断卷号是否为空 |
|
|
|
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo == ''){ |
|
|
|
this.$message.error('请扫描材料卷号!') |
|
|
|
return false; |
|
|
|
} |
|
|
|
//判断是否选中行号 |
|
|
|
if(this.pageData.bomItemNo == '请选择' || this.pageData.bomItemNo === ''){ |
|
|
|
this.$message.error('请选择BOM行号!') |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
//调用方法执行上材料 |
|
|
|
feedingMaterialRoll(this.pageData).then(({data}) => { |
|
|
|
if(data.code == 500){ |
|
|
|
|