|
|
|
@ -56,7 +56,7 @@ |
|
|
|
</el-form> |
|
|
|
</el-container> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary">确 定</el-button> |
|
|
|
<el-button type="primary" @click="addToolInstanceIdFun">确 定</el-button> |
|
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
@ -66,6 +66,7 @@ |
|
|
|
<script> |
|
|
|
import { |
|
|
|
checkToolInstanceId, |
|
|
|
addToolInstanceId, |
|
|
|
} |
|
|
|
from '@/api/yieldReport/com_produce_tool.js'; |
|
|
|
export default { |
|
|
|
@ -140,15 +141,13 @@ export default { |
|
|
|
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(); |
|
|
|
}); |
|
|
|
//区分是否是切换切换的 |
|
|
|
this.pageData.toolInstanceId = ''; |
|
|
|
this.pageData.oriToolInstanceId = ''; |
|
|
|
if(histSeqNo > 0){ |
|
|
|
this.pageData.consumeQty = 0; |
|
|
|
this.pageData.oriConsumeQty = 0; |
|
|
|
@ -162,6 +161,8 @@ export default { |
|
|
|
this.readonlyFlag = true; |
|
|
|
this.replaceFlag = false; |
|
|
|
} |
|
|
|
//重置校验的标记 |
|
|
|
this.pageData.checkFlag = false; |
|
|
|
}, |
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
|
@ -179,13 +180,43 @@ export default { |
|
|
|
//判断是否存在异常 |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else if (data.resultMap.resultCode == 201){ |
|
|
|
let msg = data.resultMap.resultMsg; |
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
this.pageData.checkFlag = true; |
|
|
|
}).catch(() => { |
|
|
|
this.pageData.checkFlag = false; |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
this.pageData.checkFlag = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*添加刀模记录*/ |
|
|
|
addToolInstanceIdFun(){ |
|
|
|
//判断是否校验通过 |
|
|
|
if(!this.pageData.checkFlag){ |
|
|
|
this.$message.error('校验失败,请重试!') |
|
|
|
return false; |
|
|
|
} |
|
|
|
addToolInstanceId(this.pageData).then(({data}) => { |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
//清空数据再次准备 |
|
|
|
this.pageData.toolInstanceId = ''; |
|
|
|
this.pageData.oriToolInstanceId = ''; |
|
|
|
this.pageData.consumeQty = ''; |
|
|
|
this.pageData.oriConsumeQty = ''; |
|
|
|
this.pageData.totalConsumeQty = ''; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
|