Browse Source

FQC 排产

master
rui_li 4 years ago
parent
commit
5170a77bab
  1. 73
      src/views/modules/schedule/order_schedule_fqc.vue

73
src/views/modules/schedule/order_schedule_fqc.vue

@ -115,7 +115,7 @@
<legend>可用操作员</legend> <legend>可用操作员</legend>
<el-row> <el-row>
<el-col :span="8"> <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;"> style="margin-left: 10px; margin-bottom: 5px;">
排产 排产
</el-button> </el-button>
@ -127,7 +127,7 @@
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="8"> <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;"> style="margin-left: 10px; margin-bottom: 5px;">
虚拟机台排产 虚拟机台排产
</el-button> </el-button>
@ -363,7 +363,8 @@ export default {
scheduleTime: '08:30', scheduleTime: '08:30',
specifiedTime: 'Y', specifiedTime: 'Y',
scheduleSeqNo: -1, scheduleSeqNo: -1,
planStartTime: ''
planStartTime: '',
virtualFlag: 'N'
}, },
searchData: { searchData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -1495,9 +1496,10 @@ export default {
}, },
/*开始排产的操作*/ /*开始排产的操作*/
scheduleOperatorsBun() {
scheduleOperatorsBun(checkFlag) {
// //
let scheduleOperators = []; let scheduleOperators = [];
this.pageData.virtualFlag = 'N';
// //
for(let i = 0; i < this.operatorList.length; i++){ for(let i = 0; i < this.operatorList.length; i++){
let tempOperator = this.operatorList[i]; let tempOperator = this.operatorList[i];
@ -1511,15 +1513,74 @@ export default {
return false; 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}) => { scheduleFqcOperators(postData).then(({data}) => {
if (data.code == 500) { if (data.code == 500) {
this.$message.error(data.msg); this.$message.error(data.msg);
} 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 { }else {
this.$message.success(data.msg); this.$message.success(data.msg);
//FQC //FQC
this.getOperatorList(); this.getOperatorList();
this.pageData.virtualFlag = 'N';
this.pageData.checkFlag = true;
} }
}); });
}, },
@ -1546,7 +1607,7 @@ export default {
this.pageData.scheduledQty = scheduleRow.qtyRequired; this.pageData.scheduledQty = scheduleRow.qtyRequired;
this.pageData.workCenterNo = scheduleRow.workCenterNo; this.pageData.workCenterNo = scheduleRow.workCenterNo;
this.pageData.resourceId = scheduleRow.resourceId; this.pageData.resourceId = scheduleRow.resourceId;
this.pageData.scheduleSeqNo = scheduleRow.scheduleSeqNo;
this.pageData.scheduleSeqNo = scheduleRow.scheduledSeqNo;
this.pageData.planStartTime = scheduleRow.planStartTime; this.pageData.planStartTime = scheduleRow.planStartTime;
// //
cancelSoSchedule(this.pageData).then(({data}) => { cancelSoSchedule(this.pageData).then(({data}) => {

Loading…
Cancel
Save