|
|
@ -35,7 +35,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="processCuttingMaterial">确定</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="processCuttingMaterialBun">确定</el-button> |
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -44,9 +44,8 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
getBomItemNosByPartNo, |
|
|
|
|
|
feedingMaterialRoll, |
|
|
|
|
|
} from "@/api/yieldReport/com_produce_material.js"; |
|
|
|
|
|
|
|
|
processCuttingMaterialRoll, |
|
|
|
|
|
} from "@/api/yieldReport/com_cutting_material.js"; |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -139,7 +138,7 @@ export default { |
|
|
|
|
|
|
|
|
/*检查材料卷号的数据*/ |
|
|
/*检查材料卷号的数据*/ |
|
|
checkValidQty() { |
|
|
checkValidQty() { |
|
|
//首先判断时间是否超过100毫秒 |
|
|
|
|
|
|
|
|
//获取当前是的数量 |
|
|
let transQty = this.pageData.transQty; |
|
|
let transQty = this.pageData.transQty; |
|
|
//判断是否可以修改 |
|
|
//判断是否可以修改 |
|
|
if (transQty > this.pageData.oriTransQty){ |
|
|
if (transQty > this.pageData.oriTransQty){ |
|
|
@ -149,24 +148,34 @@ export default { |
|
|
//判断时间是否在范围之内 |
|
|
//判断时间是否在范围之内 |
|
|
if(transQty <= 0){ |
|
|
if(transQty <= 0){ |
|
|
this.$message.error('请输入有效的数量!'); |
|
|
this.$message.error('请输入有效的数量!'); |
|
|
|
|
|
return false; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/*处理材料下料的记录*/ |
|
|
/*处理材料下料的记录*/ |
|
|
processCuttingMaterial(){ |
|
|
|
|
|
//判断卷号是否为空 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
processCuttingMaterialBun(){ |
|
|
|
|
|
//数量是否符合要求 |
|
|
|
|
|
let transQty = this.pageData.transQty; |
|
|
|
|
|
//判断是否可以修改 |
|
|
|
|
|
if (transQty > this.pageData.oriTransQty){ |
|
|
|
|
|
this.$message.error('退料数量超过了该记录上的发料数量!'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
//判断时间是否在范围之内 |
|
|
|
|
|
if(transQty <= 0){ |
|
|
|
|
|
this.$message.error('请输入有效的数量!'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
//调用方法执行上材料 |
|
|
//调用方法执行上材料 |
|
|
feedingMaterialRoll(this.pageData).then(({data}) => { |
|
|
|
|
|
|
|
|
processCuttingMaterialRoll(this.pageData).then(({data}) => { |
|
|
if(data.code == 500){ |
|
|
if(data.code == 500){ |
|
|
this.$message.error(data.msg); |
|
|
this.$message.error(data.msg); |
|
|
}else{ |
|
|
}else{ |
|
|
this.$message.info(data.msg); |
|
|
this.$message.info(data.msg); |
|
|
//清空信息二次操作 |
|
|
|
|
|
this.pageData.rmRollNo = ''; |
|
|
|
|
|
this.pageData.bomItemNo = -1; |
|
|
|
|
|
this.bomList = []; |
|
|
|
|
|
this.timeArray = []; |
|
|
|
|
|
|
|
|
//刷新报工的页面 |
|
|
|
|
|
this.$emit('refreshPageData'); |
|
|
|
|
|
//关闭当前的页面 |
|
|
|
|
|
this.closeDialog(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|