Browse Source

结束派工单页面查询

master
Rui_Li 4 years ago
parent
commit
0ce5bb8a76
  1. 44
      src/api/yieldReport/com_finish_schedule.js
  2. 132
      src/views/modules/yieldReport/com_finish_schedule.vue

44
src/api/yieldReport/com_finish_schedule.js

@ -0,0 +1,44 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取当前的卷的报工汇总数据
export const getFinishSchedulePageData = data => createAPI('schedule/getFinishSchedulePageData', 'POST', data)
// 获取派工单的时间记录
export const getSfdcTimeHistBySeqNo = data => createAPI('schedule/getSfdcTimeHistBySeqNo', 'POST', data)
// 获取派工单的工具记录
export const getSfdcToolHistBySeqNo = data => createAPI('schedule/getSfdcToolHistBySeqNo', 'POST', data)
// 获取派工单的材料记录
export const getSfdcMaterialHistBySeqNo = data => createAPI('schedule/getSfdcMaterialHistBySeqNo', '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 checkFinishRollWithNoFqc = data => createAPI('schedule/checkFinishRollWithNoFqc', 'POST', data)
// 结束卷的操作
export const finishRollWithNoFqc = data => createAPI('schedule/finishRollWithNoFqc', 'POST', data)

132
src/views/modules/yieldReport/com_finish_schedule.vue

@ -95,7 +95,7 @@
<el-row style="margin-top: 18px; height: 55px;">
<el-col style="text-align: center">
<el-form-item>
<el-button type="primary" @click="createNewRollFun"
<el-button type="primary" @click="finishScheduleBun"
style="margin-left: 10px; margin-bottom: 5px;">
接单关闭
</el-button>
@ -105,7 +105,7 @@
<el-row style="height: 55px;">
<el-col style="text-align: center">
<el-form-item>
<el-button type="primary" @click="switchRollModal" style="margin-left: 10px; margin-bottom: 5px;">
<el-button type="primary" @click="closeDialog" style="margin-left: 10px; margin-bottom: 5px;">
关闭
</el-button>
</el-form-item>
@ -114,7 +114,7 @@
<el-row style="height: 55px;">
<el-col style="text-align: center">
<el-form-item>
<el-button type="primary" @click="separateRollModal" style="margin-left: 10px; margin-bottom: 5px;">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
刷新数据
</el-button>
</el-form-item>
@ -179,7 +179,7 @@
<el-col :span="6">
<el-form-item :label="''" style="margin-left: 65px;">
<el-checkbox style="margin-top: 28px;" true-label="Y" false-label="N"
v-model="pageData.showNoFinishedTollFlag">仅显示未结束使用刀模记录
v-model="pageData.showNoFinishedToolFlag">仅显示未结束使用刀模记录
</el-checkbox>
</el-form-item>
</el-col>
@ -270,16 +270,11 @@
/*添加组件*/
import comExceptionReason from "./com_exception_reason";//
import {
getCurrentRollReportedQty,
countSfdcTimeQty,
getScheduleShiftData,
getSfdcTimeMaxAndMinTime,
getSfdcTimeData,
getSfdcReportedData,
getSfdcMaterialByRollNo,
checkFinishRollWithNoFqc,
finishRollWithNoFqc
} from '@/api/yieldReport/com_finish_roll.js';
getFinishSchedulePageData,
getSfdcTimeHistBySeqNo,
getSfdcToolHistBySeqNo,
getSfdcMaterialHistBySeqNo,
} from '@/api/yieldReport/com_finish_schedule.js';
export default {
name: "com_finish_roll",
data() {
@ -310,7 +305,7 @@ export default {
timeFinishedFlag: 'Y',//
showNoFinishedTimeFlag: 'Y',//
toolFinishedFlag: 'Y',//
showNoFinishedTollFlag: 'Y',//
showNoFinishedToolFlag: 'Y',//
materialFinishedFlag: 'Y',//
showNoFinishedMaterialFlag: 'Y',//
remark: '',
@ -908,6 +903,61 @@ export default {
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageData(){
getFinishSchedulePageData(this.pageData).then(({data}) => {
this.pageData.totalApprovedQty = data.resultMap.reportedQty;//
this.pageData.totalDefectedQty = data.resultMap.defectedQty;//
//
this.pageData.totalSetupTime = data.resultMap.totalSetupTime;//
this.pageData.totalDowntimeTimeSetup = data.resultMap.totalDowntimeTimeSetup;//
this.pageData.totalPureSetupTime = data.resultMap.pureSetupTime;//
//
this.pageData.totalProdTime = data.resultMap.totalProdTime; //
this.pageData.totalDowntimeTimeProd = data.resultMap.totalDowntimeTimeProd; //
this.pageData.totalPureProdTime = data.resultMap.pureProdTime; //
//
this.pageData.totalManufactureTime = data.resultMap.totalManfTime; //
this.pageData.totalManufactureDowntimeTime = data.resultMap.totalDowntimeTimeManf; //
this.pageData.totalPureManufactureTime = data.resultMap.pureManfTime; //
//
this.pageData.scheduledDate = data.resultMap.scheduledDate; //
this.pageData.shiftDesc = data.resultMap.shiftDesc; //
//
this.pageData.timeFinishedFlag = data.resultMap.scheduledDate; //
this.pageData.toolFinishedFlag = data.resultMap.shiftDesc; //
this.pageData.materialFinishedFlag = data.resultMap.scheduledDate; //
//
this.refreshSfdcTimeHist();
//
this.refreshSfdcToolHist();
//
this.refreshSfdcMaterialHist();
});
},
//
refreshSfdcTimeHist(){
getSfdcTimeHistBySeqNo(this.pageData).then(({data}) => {
this.sfdcTimeList = data.rows;
})
},
//
refreshSfdcToolHist(){
getSfdcToolHistBySeqNo(this.pageData).then(({data}) => {
this.sfdcToolList = data.rows;
})
},
//
refreshSfdcMaterialHist(){
getSfdcMaterialHistBySeqNo(this.pageData).then(({data}) => {
this.sfdcMaterialList = data.rows;
})
},
/*生产过程的停机组件*/
exceptionReasonModal() {
//1.
@ -919,34 +969,7 @@ export default {
});
},
/*刷新当前的页面参数*/
refreshPageData(){
//1.
},
/*检查数据是否有效*/
checkValidQty(row){
//
if(row.netIssueQty == ''){
this.$message.error('材料上本卷耗用数量不能为空!');
row.netIssueQty = 0;//
return false;
}
//
if(row.netIssueQty <= 0){
this.$message.error('材料耗用数量必须大于0!');
return false;
}
//
if(row.netIssueQty > row.transQty){
this.$message.error('材料耗用数量大于发料数量!');
row.netIssueQty = 0;//
return false;
}
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
@ -964,22 +987,27 @@ export default {
/*检验良品的总数量*/
checkValidApprovedQty(){
//
this.refreshSfdcData();
//
let approvedQty = this.pageData.totalApprovedQty;
if(approvedQty == null || approvedQty == ''){
this.$message.error('请输入总良品数量!');
this.pageData.approvedQty = 0;//
return false;
}
},
/*结束当前的操作*/
finishRollBun(){
finishScheduleBun(){
//
let approvedQty = this.pageData.approvedQty;
if(approvedQty == null || approvedQty == ''){
this.$message.error('请输入良品数量!');
this.pageData.approvedQty = 0;//
let totalApprovedQty = this.pageData.totalApprovedQty;
if(totalApprovedQty == null || totalApprovedQty == ''){
this.$message.error('请输入良品数量!');
this.pageData.totalApprovedQty = 0;//
return false;
}
if(approvedQty <= 0){
this.$message.error('良品数量必须大于0!');
this.pageData.approvedQty = 0;//
if(totalApprovedQty <= 0){
this.$message.error('良品数量必须大于0!');
this.pageData.totalApprovedQty = 0;//
return false;
}
//

Loading…
Cancel
Save