Browse Source

材料上机

master
rui_li 4 years ago
parent
commit
7179729d0c
  1. 39
      src/api/yieldReport/com_produce_material.js
  2. 4
      src/api/yieldReport/com_produce_tool.js
  3. 41
      src/views/modules/yieldReport/com_produce_material.vue
  4. 43
      src/views/modules/yieldReport/com_produce_tool.vue

39
src/api/yieldReport/com_produce_material.js

@ -3,40 +3,5 @@ import { createAPI } from '@/utils/httpRequest.js'
// 获取当前BOM行号
export const getBomItemNosByPartNo = data => createAPI('schedule/getBomItemNosByPartNo', 'POST', data)
// 获取上机卷的时间信息汇总
export const countSfdcTimeQty = data => createAPI('schedule/countSfdcTimeQty', 'POST', data)
// 获取派工单的班次信息
export const getScheduleShiftData = data => createAPI('schedule/getScheduleShiftData', 'POST', data)
// 获取sfdc表的时间信息汇总
export const getSfdcTimeData = data => createAPI('schedule/getSfdcTimeData', 'POST', data)
// 获取当前时间记录信息
export const getSfdcTimeMaxAndMinTime = data => createAPI('schedule/getSfdcTimeMaxAndMinTime', 'POST', data)
// 获取当前卷sfdc表的报工数据
export const getSfdcReportedData = data => createAPI('schedule/getSfdcReportedData', 'POST', data)
// 获取当前卷的材料记录--在线的
export const getSfdcMaterialByRollNo = data => createAPI('schedule/getSfdcMaterialByRollNo', 'POST', data)
// 获取当前派工单的材料记录
export const getSfdcMaterialByCon = data => createAPI('schedule/getSfdcMaterialByCon', 'POST', data)
// 获取当前派工单的上机卷记录
export const getSfdcRollOpsByCon = data => createAPI('schedule/getSfdcRollOpsByCon', 'POST', data)
// 获取当前派工单的不良卷记录
export const getSfdcDefectByCon = data => createAPI('schedule/getSfdcDefectByCon', 'POST', data)
// 获取当前上机卷信息
export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data)
//材料上机
export const feedingMaterialRoll = data => createAPI('schedule/feedingMaterialRoll', 'POST', data)

4
src/api/yieldReport/com_produce_tool.js

@ -3,8 +3,8 @@ import { createAPI } from '@/utils/httpRequest.js'
//检查工具实例编码
export const checkToolInstanceId = data => createAPI('schedule/checkToolInstanceId', 'POST', data)
// 获取不良代码的信息
export const checkDefectCode = data => createAPI('schedule/checkDefectCode', 'POST', data)
//工具上机
export const addToolInstanceId = data => createAPI('schedule/addToolInstanceId', 'POST', data)
// 获取不良代码的信息
export const reportDefectCode = data => createAPI('schedule/reportDefectCode', 'POST', data)

41
src/views/modules/yieldReport/com_produce_material.vue

@ -33,7 +33,7 @@
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="checkRmRollNo">确定</el-button>
<el-button type="primary" @click="feedingMaterialRollFun">确定</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
@ -43,6 +43,7 @@
<script>
import {
getBomItemNosByPartNo,
feedingMaterialRoll,
} from "@/api/yieldReport/com_produce_material.js";
export default {
data() {
@ -82,12 +83,10 @@ export default {
seqNo: '',
orderNo: '',
itemNo: 0,
workCenterNo: '',
rollNo: '',
rmRollNo: '',
bomItemNo: '',
shiftNo: '',
nextItemNo: 0,
histSeqNo: -1,
operatorId: '',
closedFlag: 'N'
},
@ -118,11 +117,14 @@ export default {
this.pageData.rollNo = scheduleData.rollNo;
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = '';
this.pageData.closedFlag = 'N';
this.pageData.histSeqNo = -1;
this.pageData.operatorId = operatorData.operatorId;
//
this.$nextTick(() => {
this.$refs.rmRollNo.focus();
});
//
this.timeArray = [];
},
/*关闭modal*/
@ -132,7 +134,12 @@ export default {
/*记录每一次录入字符串的时间*/
recordTime(){
this.timeArray.push(new Date().getTime());
//
if(this.pageData.rmRollNo.trim().length == 0){
this.timeArray = [];
}else{
this.timeArray.push(new Date().getTime());
}
},
/*检查材料卷号的数据*/
@ -141,9 +148,9 @@ export default {
let len = this.timeArray.length;
let timeDiff = this.timeArray[len - 1] - this.timeArray[0];
//
/*if(timeDiff > 1000){
if(timeDiff > 1000){
this.$message.error('请扫码输入!');
}*/
}
//null
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo == '') {
this.$message.error('材料卷号不能为空!');
@ -173,23 +180,35 @@ export default {
}else{
//
this.selectFlag = false;
//this.bomList.unshift({'itemNo': ''})
}
});
},
/*保存材料上机的记录*/
feedingMaterialRoll(){
feedingMaterialRollFun(){
//
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo == ''){
this.$message.error('请扫描材料卷号!')
return false;
}
//
if(this.pageData.bomItemNo == '请选择' || this.pageData.bomItemNo == ''){
if(this.pageData.bomItemNo == '请选择' || this.pageData.bomItemNo === ''){
this.$message.error('请选择BOM行号!')
return false;
}
//
feedingMaterialRoll(this.pageData).then(({data}) => {
debugger;
if(data.code == 500){
this.$message.error(data.msg);
}else{
//
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = -1;
this.bomList = [];
this.timeArray = [];
}
});
},

43
src/views/modules/yieldReport/com_produce_tool.vue

@ -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() {

Loading…
Cancel
Save