|
|
|
@ -115,7 +115,7 @@ |
|
|
|
<legend>可用操作员</legend> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-button class="customer-bun-mid" type="primary" @click="scheduleOperatorsBun" |
|
|
|
<el-button class="customer-bun-mid" type="primary" @click="scheduleOperatorsBun(true)" |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;"> |
|
|
|
排产 |
|
|
|
</el-button> |
|
|
|
@ -127,7 +127,7 @@ |
|
|
|
</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-button class="customer-bun-max" type="primary" @click="" |
|
|
|
<el-button class="customer-bun-max" type="primary" @click="scheduleVirtualOperatorsBun(true)" |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;"> |
|
|
|
虚拟机台排产 |
|
|
|
</el-button> |
|
|
|
@ -363,7 +363,8 @@ export default { |
|
|
|
scheduleTime: '08:30', |
|
|
|
specifiedTime: 'Y', |
|
|
|
scheduleSeqNo: -1, |
|
|
|
planStartTime: '' |
|
|
|
planStartTime: '', |
|
|
|
virtualFlag: 'N' |
|
|
|
}, |
|
|
|
searchData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
@ -1495,9 +1496,10 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*开始排产的操作*/ |
|
|
|
scheduleOperatorsBun() { |
|
|
|
scheduleOperatorsBun(checkFlag) { |
|
|
|
//循环判断是否存在需要排产 |
|
|
|
let scheduleOperators = []; |
|
|
|
this.pageData.virtualFlag = 'N'; |
|
|
|
//处理需要排产的数据 |
|
|
|
for(let i = 0; i < this.operatorList.length; i++){ |
|
|
|
let tempOperator = this.operatorList[i]; |
|
|
|
@ -1511,15 +1513,74 @@ export default { |
|
|
|
return false; |
|
|
|
} |
|
|
|
//处理参数 |
|
|
|
let postData = {'pageData': JSON.stringify(this.pageData), 'operatorList': JSON.stringify(scheduleOperators)} |
|
|
|
let postData = {'pageData': JSON.stringify(this.pageData), |
|
|
|
'operatorList': JSON.stringify(scheduleOperators), |
|
|
|
'checkFlag': checkFlag} |
|
|
|
//提交后台的数据 |
|
|
|
scheduleFqcOperators(postData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else { |
|
|
|
} else if (data.code == 201) { |
|
|
|
this.$confirm(data.msg, '提示', { |
|
|
|
confirmButtonText: '确认', |
|
|
|
celButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
//重新掉用排产 |
|
|
|
this.scheduleOperatorsBun(false); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
this.$message.success(data.msg); |
|
|
|
debugger; |
|
|
|
//刷新明FQC操作员 |
|
|
|
this.getOperatorList(); |
|
|
|
this.pageData.virtualFlag = 'N'; |
|
|
|
this.pageData.checkFlag = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*虚拟排产的操作*/ |
|
|
|
scheduleVirtualOperatorsBun(checkFlag) { |
|
|
|
//循环判断是否存在需要排产 |
|
|
|
let scheduleOperators = []; |
|
|
|
this.pageData.virtualFlag = 'Y'; |
|
|
|
//处理需要排产的数据 |
|
|
|
for(let i = 0; i < this.operatorList.length; i++){ |
|
|
|
let tempOperator = this.operatorList[i]; |
|
|
|
if(parseFloat(tempOperator.qtyToSchedule) > 0){ |
|
|
|
scheduleOperators.push(tempOperator); |
|
|
|
} |
|
|
|
} |
|
|
|
//判断是否存在需要排产的操作员 |
|
|
|
if(scheduleOperators.length == 0){ |
|
|
|
this.$message.error('暂无可排产的操作员!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//处理参数 |
|
|
|
let postData = {'pageData': JSON.stringify(this.pageData), |
|
|
|
'operatorList': JSON.stringify(scheduleOperators), |
|
|
|
'checkFlag': checkFlag} |
|
|
|
//提交后台的数据 |
|
|
|
scheduleFqcOperators(postData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else if (data.code == 201) { |
|
|
|
this.$confirm(data.msg, '提示', { |
|
|
|
confirmButtonText: '确认', |
|
|
|
celButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
//重新掉用排产 |
|
|
|
this.scheduleVirtualOperatorsBun(false); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新明FQC操作员 |
|
|
|
this.getOperatorList(); |
|
|
|
this.pageData.virtualFlag = 'N'; |
|
|
|
this.pageData.checkFlag = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
@ -1546,7 +1607,7 @@ export default { |
|
|
|
this.pageData.scheduledQty = scheduleRow.qtyRequired; |
|
|
|
this.pageData.workCenterNo = scheduleRow.workCenterNo; |
|
|
|
this.pageData.resourceId = scheduleRow.resourceId; |
|
|
|
this.pageData.scheduleSeqNo = scheduleRow.scheduleSeqNo; |
|
|
|
this.pageData.scheduleSeqNo = scheduleRow.scheduledSeqNo; |
|
|
|
this.pageData.planStartTime = scheduleRow.planStartTime; |
|
|
|
//取消排产 |
|
|
|
cancelSoSchedule(this.pageData).then(({data}) => { |
|
|
|
|