|
|
|
@ -8,8 +8,14 @@ |
|
|
|
<el-button class="customer-bun-min" type="primary" style="margin-left: 10px; margin-bottom: 5px;">关闭</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-bottom: 5px;">刷新</el-button> |
|
|
|
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables" style="margin-left: 10px; margin-bottom: 5px;">刷新</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button class="customer-bun-min" type="primary" @click="moveUpScheduleBun" style="margin-left: 10px; margin-bottom: 5px;">上移</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button class="customer-bun-min" type="primary" @click="moveDownScheduleBun" style="margin-left: 10px; margin-bottom: 5px;">下移</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</fieldset> |
|
|
|
<!-- 排序规则 --> |
|
|
|
@ -92,7 +98,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号:</a></span> |
|
|
|
<el-input v-model="pageData.resourceId" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="pageData.resourceId" @blur="getCurrentWorkCenterNoByResourceId" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'加工中心编码:'"> |
|
|
|
<el-input v-model="pageData.workCenterNo" readonly="readonly" style="width: 120px"></el-input> |
|
|
|
@ -213,7 +219,9 @@ |
|
|
|
border |
|
|
|
highlight-current-row |
|
|
|
ref="scheduleTable" |
|
|
|
:row-class-name="scheduleRowClassName" |
|
|
|
@row-click="setCurrentSchedulingRow" |
|
|
|
@current-change="currentSchedulingRow" |
|
|
|
@row-dblclick="warnCancelScheduleConfirm" |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="margin-top: -20px; width: 100%;"> |
|
|
|
@ -277,6 +285,8 @@ import { |
|
|
|
cancelSoSchedule, |
|
|
|
addWaitSchedule, |
|
|
|
reScheduleWorkOrders, |
|
|
|
moveUpSchedule, |
|
|
|
moveDownSchedule, |
|
|
|
} from '@/api/schedule/order_schedule.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -306,11 +316,12 @@ export default { |
|
|
|
needTime1: '', |
|
|
|
needTime2: new Date(), |
|
|
|
scheduleDate: this.dayjs(new Date()).format('YYYY-MM-DD'), |
|
|
|
scheduleTime: this.dayjs(new Date()).format('HH:mm:ss'), |
|
|
|
scheduleTime: '08:30', |
|
|
|
specifiedTime: 'N', |
|
|
|
scheduledQty: 0, |
|
|
|
waitTimes: 0, |
|
|
|
sortField: '', |
|
|
|
scheduleSeqNo: 0, |
|
|
|
planStartTime: '', |
|
|
|
status: 1 |
|
|
|
}, |
|
|
|
resourceShiftList: [], |
|
|
|
@ -899,10 +910,10 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5301, |
|
|
|
serialNumber: '5301Order', |
|
|
|
serialNumber: '5301OrderOriSOOrderNo', |
|
|
|
tableId: "5301Order", |
|
|
|
tableName: "工单表", |
|
|
|
columnProp: "", |
|
|
|
columnProp: "oriSOOrderNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "SAP参考号", |
|
|
|
@ -913,78 +924,6 @@ export default { |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5301, |
|
|
|
serialNumber: '5301OrderTimeRequired', |
|
|
|
tableId: "5301Order", |
|
|
|
tableName: "工单表", |
|
|
|
columnProp: "timeRequired", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "待排产时间", |
|
|
|
columnWidth: 80, |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5301, |
|
|
|
serialNumber: '5301OrderEfficiency', |
|
|
|
tableId: "5301Order", |
|
|
|
tableName: "工单表", |
|
|
|
columnProp: "efficiency", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "效率", |
|
|
|
columnWidth: 80, |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5301, |
|
|
|
serialNumber: '5301Order', |
|
|
|
tableId: "5301Order", |
|
|
|
tableName: "工单表", |
|
|
|
columnProp: "刀模已发", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "", |
|
|
|
columnWidth: 80, |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5301, |
|
|
|
serialNumber: '5301Order', |
|
|
|
tableId: "5301Order", |
|
|
|
tableName: "工单表", |
|
|
|
columnProp: "印版已发", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "", |
|
|
|
columnWidth: 80, |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
} |
|
|
|
], |
|
|
|
columnOrderScheduleArray: [ |
|
|
|
@ -1016,7 +955,7 @@ export default { |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "计划开工时间", |
|
|
|
columnWidth: 60, |
|
|
|
columnWidth: 125, |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -1034,7 +973,7 @@ export default { |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: "计划完工时间", |
|
|
|
columnWidth: 80, |
|
|
|
columnWidth: 125, |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -1822,13 +1761,15 @@ export default { |
|
|
|
getOrderScheduleList() { |
|
|
|
getOrderScheduleList(this.pageData).then(({data}) => { |
|
|
|
this.orderScheduleList = data.rows; |
|
|
|
//清空已经选好的行数据 |
|
|
|
this.currentSchedlingRow = null; |
|
|
|
//判断是否需要选中当前行 |
|
|
|
if(this.scheduleIndex >= 0){ |
|
|
|
//选中当前是的行 |
|
|
|
this.$refs.scheduleTable.setCurrentRow(this.$refs.scheduleTable.data[index]); |
|
|
|
setTimeout(() =>{ |
|
|
|
this.$refs.scheduleTable.setCurrentRow(this.orderScheduleList[this.scheduleIndex]); |
|
|
|
},300); |
|
|
|
} |
|
|
|
//清空已经选好的行数据 |
|
|
|
this.currentScheduleRow = null; |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1900,7 +1841,7 @@ export default { |
|
|
|
getCurrentWorkCenterNoByResourceId(this.pageData).then(({data}) => { |
|
|
|
//区分是否成功 |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
//this.$message.error(data.msg); |
|
|
|
} else{ |
|
|
|
this.pageData.workCenterNo = data.workCenterNo; |
|
|
|
} |
|
|
|
@ -1917,11 +1858,35 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*设置工艺的行*/ |
|
|
|
setCurrentRoutingRow(row, column, event) { |
|
|
|
this.currentRoutingRow = row; |
|
|
|
}, |
|
|
|
|
|
|
|
/*设置当前派工单行的下标*/ |
|
|
|
scheduleRowClassName({row, rowIndex}){ |
|
|
|
row.index = rowIndex; |
|
|
|
}, |
|
|
|
|
|
|
|
/*设置派工单的行*/ |
|
|
|
setCurrentSchedulingRow(row, column, event) { |
|
|
|
this.currentSchedlingRow = JSON.parse(JSON.stringify(row)); |
|
|
|
//设置当前的序号 |
|
|
|
this.scheduleIndex = row.index; |
|
|
|
}, |
|
|
|
|
|
|
|
/*当前值发生变化的时候修改*/ |
|
|
|
currentSchedulingRow(row, oldRow){ |
|
|
|
//判断是否是获取焦点的事件 |
|
|
|
if(row){ |
|
|
|
this.currentSchedlingRow = JSON.parse(JSON.stringify(row)); |
|
|
|
//设置当前的序号 |
|
|
|
this.scheduleIndex = row.index; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*开始排产的操作*/ |
|
|
|
startScheduleOperation(row, $event, column){ |
|
|
|
//判断排产的加工中心和机台是否为空 |
|
|
|
@ -1983,12 +1948,6 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*设置派工单的行*/ |
|
|
|
setCurrentSchedulingRow(row, column, event) { |
|
|
|
this.currentSchedlingRow = JSON.parse(JSON.stringify(row)); |
|
|
|
}, |
|
|
|
|
|
|
|
/*提示取消派工单*/ |
|
|
|
warnCancelScheduleConfirm(row, $event, column){ |
|
|
|
//提示操作 |
|
|
|
@ -2011,13 +1970,17 @@ export default { |
|
|
|
this.pageData.scheduledQty = scheduleRow.qtyRequired; |
|
|
|
this.pageData.workCenterNo = scheduleRow.workCenterNo; |
|
|
|
this.pageData.resourceId = scheduleRow.resourceId; |
|
|
|
this.pageData.scheduleSeqNo = scheduleRow.scheduledSeqNo; |
|
|
|
this.pageData.planStartTime = scheduleRow.planStartTime; |
|
|
|
//取消排产 |
|
|
|
cancelSoSchedule(this.pageData).then(({data}) => { |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新明细的报工页面 |
|
|
|
//刷新排产的数据 |
|
|
|
this.getShopOrderList(); |
|
|
|
//刷新明细的数据 |
|
|
|
this.getOrderScheduleList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -2052,7 +2015,7 @@ export default { |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新明细的报工页面 |
|
|
|
//刷新明细 |
|
|
|
this.getOrderScheduleList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -2094,6 +2057,72 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*上移派工单*/ |
|
|
|
moveUpScheduleBun(){ |
|
|
|
//判断是否选择好了移动的行 |
|
|
|
let scheduleRow = this.currentSchedlingRow; |
|
|
|
if(null == scheduleRow || scheduleRow == ''){ |
|
|
|
this.$message.error('请先选择处理的行!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//判断是否是第一行 |
|
|
|
if(scheduleRow.index == 0){ |
|
|
|
this.$message.error('已经是首行,无法继续上行!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
debugger; |
|
|
|
//请求的参数 |
|
|
|
let requestData = {'site': this.pageData.site, |
|
|
|
'workCenterNo': this.pageData.workCenterNo, |
|
|
|
'resourceId': this.pageData.resourceId, |
|
|
|
'scheduleSeqNo': scheduleRow.scheduledSeqNo}; |
|
|
|
//请求处理当前的参数 |
|
|
|
moveUpSchedule(requestData).then(({data}) => { |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//重置当前行 |
|
|
|
this.scheduleIndex = this.scheduleIndex - 1; |
|
|
|
//刷新派工单的数据 |
|
|
|
this.getOrderScheduleList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*上移派工单*/ |
|
|
|
moveDownScheduleBun(){ |
|
|
|
//判断是否选择好了移动的行 |
|
|
|
let scheduleRow = this.currentSchedlingRow; |
|
|
|
if(null == scheduleRow || scheduleRow == ''){ |
|
|
|
this.$message.error('请先选择处理的行!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
let countNums = this.orderScheduleList.length; |
|
|
|
//判断是否是第一行 |
|
|
|
if(scheduleRow.index == countNums - 1){ |
|
|
|
this.$message.error('已经是末行,无法继续下行!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//请求的参数 |
|
|
|
let requestData = {'site': this.pageData.site, |
|
|
|
'workCenterNo': this.pageData.workCenterNo, |
|
|
|
'resourceId': this.pageData.resourceId, |
|
|
|
'scheduleSeqNo': scheduleRow.scheduledSeqNo}; |
|
|
|
//请求处理当前的参数 |
|
|
|
moveDownSchedule(requestData).then(({data}) => { |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//重置当前行 |
|
|
|
this.scheduleIndex = this.scheduleIndex + 1; |
|
|
|
//刷新派工单的数据 |
|
|
|
this.getOrderScheduleList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
//执行查询休息时间数据 |
|
|
|
|