diff --git a/src/api/schedule/order_schedule.js b/src/api/schedule/order_schedule.js index 73ee05e..389676c 100644 --- a/src/api/schedule/order_schedule.js +++ b/src/api/schedule/order_schedule.js @@ -24,5 +24,8 @@ export const addWaitSchedule = data => createAPI('scheduling/addWaitSchedule', ' //重新排产生产工单的操作 export const reScheduleWorkOrders = data => createAPI('scheduling/reScheduleWorkOrders', 'POST', data) +//上移派工单 +export const moveUpSchedule = data => createAPI('scheduling/moveUpSchedule', 'POST', data) - +//上移派工单 +export const moveDownSchedule = data => createAPI('scheduling/moveDownSchedule', 'POST', data) diff --git a/src/views/modules/schedule/order_schedule.vue b/src/views/modules/schedule/order_schedule.vue index ea7f8dc..eb06ef7 100644 --- a/src/views/modules/schedule/order_schedule.vue +++ b/src/views/modules/schedule/order_schedule.vue @@ -8,8 +8,14 @@ 关闭 - 刷新 + 刷新 + + 上移 + + + 下移 + @@ -92,7 +98,7 @@ 机台编号: - + @@ -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() { //执行查询休息时间数据 diff --git a/src/views/modules/schedule/order_schedule_fqc.vue b/src/views/modules/schedule/order_schedule_fqc.vue index 993d63f..0012294 100644 --- a/src/views/modules/schedule/order_schedule_fqc.vue +++ b/src/views/modules/schedule/order_schedule_fqc.vue @@ -105,12 +105,13 @@ - -
+ +
-
+ +
可用操作员 @@ -133,9 +134,9 @@ - +
- - +
已排产记录 @@ -179,9 +179,9 @@ - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 刷新排产清单 + + + + + + + + + + + + + + +
+
@@ -258,7 +342,8 @@ export default { data() { return { tableHeight: 0, - tableWidth: 0, + tableLeftWidth: 0, + tableRightWidth: 0, tagNo: '', activeTable: '', showScheduleMenu: false, @@ -277,11 +362,9 @@ export default { resourceId: '', workCenterNo: '', enterTime1: '', - enterTime2: new Date(), + enterTime2: '', needTime1: '', - needTime2: new Date(), - scheduleDate: this.dayjs(new Date()).format('YYYY-MM-DD'), - scheduleTime: this.dayjs(new Date()).format('HH:mm:ss'), + needTime2: '', specifiedTime: 'N', scheduledQty: 0, waitTimes: 0, @@ -1875,8 +1958,9 @@ export default { mounted() { this.$nextTick(() => { - this.tableHeight = (window.innerHeight - 300); - this.tableWidth = (window.innerWidth - 100) / 2; + this.tableHeight = (window.innerHeight - 270); + this.tableLeftWidth = ((window.innerWidth - 100) / 2) - 60; + this.tableRightWidth = ((window.innerWidth - 100) / 2) + 60; }); //设置当前的动态高度 @@ -2201,7 +2285,7 @@ export default { /*全局年与日类型 宽度*/ div.el-time-width { - width: 110px !important; + width: 100px !important; } /* 全局时间右边框*/ @@ -2290,13 +2374,22 @@ div.customer-el-card-blue { display: none; } +/*左边的样式*/ +.customer-css .customer-left-main { + width: calc(50vw - 360px) !important; + padding: 0px; + margin-left: -10px; + margin-right: -25px; + margin-bottom: -5px; +} + /* el-main的样式 */ -.customer-css .customer-main { - width: calc(50vw - 300px) !important; - margin-left: -15px; - margin-top: -10px; - margin-right: -45px; - margin-bottom: -20px; +.customer-css .customer-right-main { + width: calc(50vw - 240px) !important; + padding: 0px; + margin-left: -10px; + margin-right: -25px; + margin-bottom: -5px; } .customer-css .customer-left-table { @@ -2304,9 +2397,18 @@ div.customer-el-card-blue { } /*调整右边field的样式*/ -.customer-css .customer-right-field{ - margin-left: 49%; - margin-top: calc(-100vh + 239px); - width: 52%; +.customer-css .customer-right-field { + margin-left: 46.2%; + margin-top: calc(-100vh + 223px); + width: 53.8%; +} + +.customer-css /deep/ .el-tabs__content { + padding: 0px; +} + +/*两个checkbox的样式*/ +.customer-checkbox + .customer-checkbox { + margin-top: 20px; } diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index 5b62973..e67a9e6 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -242,11 +242,14 @@ width="115" :label="'操作'"> diff --git a/src/views/modules/yieldReport/com_replace_tool.vue b/src/views/modules/yieldReport/com_replace_tool.vue index 8baa2e3..1165d12 100644 --- a/src/views/modules/yieldReport/com_replace_tool.vue +++ b/src/views/modules/yieldReport/com_replace_tool.vue @@ -230,7 +230,7 @@ export default { changeToolQty(){ let consumeQty = parseFloat(this.pageData.consumeQty); if(consumeQty < 0){ - this.$message.error('本卷生产数量不能小于0!'); + //this.$message.error('本卷生产数量不能小于0!'); return false; } //汇总数量 @@ -241,7 +241,7 @@ export default { changeTimeQty(){ let downTimeQty = this.pageData.downTimeQty; if(downTimeQty <= 0){ - this.$message.error('时长必须大于0!'); + //this.$message.error('时长必须大于0!'); return false; } }, diff --git a/src/views/modules/yieldReport/com_switch_roll.vue b/src/views/modules/yieldReport/com_switch_roll.vue index dc6abca..627a31a 100644 --- a/src/views/modules/yieldReport/com_switch_roll.vue +++ b/src/views/modules/yieldReport/com_switch_roll.vue @@ -153,6 +153,7 @@ export default { this.$message.error(data.msg); } else { //关闭当前的页面 + this.pageData.newRollNo = ''; this.closeDialog(); } })