|
|
|
@ -114,19 +114,34 @@ |
|
|
|
<fieldset class="customer-left-fieldset" style="width: 46%; margin-left: 0px; margin-top: 2px;"> |
|
|
|
<legend>可用操作员</legend> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-dropdown class="customer-dropdown" size="small" @command="operatorHandleCommand"> |
|
|
|
<el-button type="primary" @click="controlOperatorMenuBun"> |
|
|
|
菜单<i class="el-icon-arrow-down el-icon--right"></i> |
|
|
|
</el-button> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item class="customer-li" command="工作日历" |
|
|
|
:disabled="operatorMenuButton.workCalendarOutFlag">工作日历</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="批量维护工作日历" |
|
|
|
:disabled="operatorMenuButton.batchWorkCalendarFlag">批量维护工作日历</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="重新排产" |
|
|
|
:disabled="operatorMenuButton.reScheduleOrderFlag">重新排产</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-button class="customer-bun-mid" type="primary" @click="scheduleOperatorsBun(true)" |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;"> |
|
|
|
排产 |
|
|
|
</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-button class="customer-bun-mid" type="primary" @click="getOperatorList" |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;"> |
|
|
|
刷新数据 |
|
|
|
</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-button class="customer-bun-max" type="primary" @click="scheduleVirtualOperatorsBun(true)" |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;"> |
|
|
|
虚拟机台排产 |
|
|
|
@ -191,6 +206,12 @@ |
|
|
|
重新排产 |
|
|
|
</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-button class="customer-bun-mid" type="primary" @click="openSchedledOrderPage" |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;"> |
|
|
|
生产订单 |
|
|
|
</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-container> |
|
|
|
<el-main class="customer-right-main"> |
|
|
|
@ -237,31 +258,31 @@ |
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="' '" style="margin-left: -8px;"> |
|
|
|
<el-date-picker class="el-time-width" |
|
|
|
style="" |
|
|
|
v-model="searchData.enterTime2" |
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'要求完工日期'" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'要求完工日期'" style="margin-left: -8px;"> |
|
|
|
<el-date-picker class="el-time-width" |
|
|
|
style="" |
|
|
|
v-model="searchData.needTime1" |
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="' '" style="margin-left: -8px;"> |
|
|
|
<el-date-picker class="el-time-width" |
|
|
|
style="" |
|
|
|
v-model="searchData.needTime2" |
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'产品编码'" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'产品编码'" style="margin-left: -8px;"> |
|
|
|
<el-input v-model="searchData.partNo" style="width: 80px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'生产订单'" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'生产订单'" style="margin-left: -8px;"> |
|
|
|
<el-input v-model="searchData.orderNo" style="width: 80px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''" style="margin-left: 5px;"> |
|
|
|
@ -276,10 +297,14 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''" style="margin-left: -100px; margin-top: 5px;"> |
|
|
|
<el-form-item :label="''" style="margin-left: -110px; margin-top: 5px;"> |
|
|
|
<el-button class="customer-bun-max" @click="getShopOrderList" type="primary">刷新排产清单 |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''" style="margin-left: 0px; margin-top: 5px;"> |
|
|
|
<el-button class="customer-bun-mid" @click="openOrderPage" type="primary">生产工单 |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-container> |
|
|
|
<el-main class="customer-left-main"> |
|
|
|
@ -290,6 +315,7 @@ |
|
|
|
highlight-current-row |
|
|
|
v-loading="dataListLoading" |
|
|
|
@row-dblclick="startScheduleBun" |
|
|
|
@row-click="setCurrentRoutingRow" |
|
|
|
style="margin-left: -15px; margin-top: -5px;"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnOrderArray" :key="index" |
|
|
|
@ -344,7 +370,8 @@ import { |
|
|
|
cancelSoSchedule, |
|
|
|
reScheduleWorkOrders, |
|
|
|
moveUpSchedule, |
|
|
|
moveDownSchedule |
|
|
|
moveDownSchedule, |
|
|
|
getCalendarMapByResourceId,/*获取人员的班次*/ |
|
|
|
} from '@/api/schedule/order_schedule_fqc.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -360,7 +387,7 @@ export default { |
|
|
|
modelInputFlag: true, |
|
|
|
showWorkCalendarOut: false, |
|
|
|
showBatchWorkCalendar: false, |
|
|
|
currentRoutingRow: {}, |
|
|
|
currentRoutingRow: null, |
|
|
|
currentOperatorRow: {}, |
|
|
|
currentScheduleRow: {}, |
|
|
|
pageData: { |
|
|
|
@ -380,7 +407,9 @@ export default { |
|
|
|
specifiedTime: 'Y', |
|
|
|
scheduleSeqNo: -1, |
|
|
|
planStartTime: '', |
|
|
|
virtualFlag: 'N' |
|
|
|
virtualFlag: 'N', |
|
|
|
calendarId: '', |
|
|
|
calendarDesc: '', |
|
|
|
}, |
|
|
|
searchData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
@ -1361,9 +1390,19 @@ export default { |
|
|
|
fixed: false |
|
|
|
} |
|
|
|
], |
|
|
|
operatorMenuButton: { |
|
|
|
workCalendarOutFlag: true, |
|
|
|
batchWorkCalendarFlag: true, |
|
|
|
reScheduleOrderFlag: true, |
|
|
|
partStockFlag: true, |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*注册组件*/ |
|
|
|
components: { |
|
|
|
comWorkCalendarOut,/*工作日历外*/ |
|
|
|
comBatchWorkCalendar,/*批量维护工作日历外组件*/ |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.tableHeight = (window.innerHeight - 270); |
|
|
|
@ -1472,11 +1511,21 @@ export default { |
|
|
|
//判断是否是获取焦点的事件 |
|
|
|
if(row){ |
|
|
|
this.currentOperatorRow = JSON.parse(JSON.stringify(row)); |
|
|
|
//设置当前的序号 |
|
|
|
//this.operatorIndex = row.index; |
|
|
|
//设置日历编码和日历描述 |
|
|
|
this.refreshCalendarMapByResourceId(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*刷新日历编码和日历的描述*/ |
|
|
|
refreshCalendarMapByResourceId(){ |
|
|
|
let requestData = {'site': this.pageData.site, |
|
|
|
'workCenterNo': 'FQC', 'resourceId': this.currentOperatorRow.operatorId}; |
|
|
|
getCalendarMapByResourceId(requestData).then(({data}) => { |
|
|
|
this.pageData.calendarId = data.row.calendarId; |
|
|
|
this.pageData.calendarDesc = data.row.calendarDesc; |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*设置当前派工单行的下标*/ |
|
|
|
scheduleRowClassName({row, rowIndex}){ |
|
|
|
row.index = rowIndex; |
|
|
|
@ -1547,7 +1596,6 @@ export default { |
|
|
|
}); |
|
|
|
}else { |
|
|
|
this.$message.success(data.msg); |
|
|
|
debugger; |
|
|
|
//刷新明FQC操作员 |
|
|
|
this.getOperatorList(); |
|
|
|
this.pageData.virtualFlag = 'N'; |
|
|
|
@ -1730,6 +1778,99 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*区分不同的菜单 调用不同的方法 调用不同的方法*/ |
|
|
|
operatorHandleCommand(menuName){ |
|
|
|
//区分是哪一个方法调用 |
|
|
|
if('工作日历' === menuName){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(this.currentOperatorRow == null || this.currentOperatorRow == {}){ |
|
|
|
//重置按钮 |
|
|
|
this.operatorMenuButton.workCalendarOutFlag = true; |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择人员!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId, |
|
|
|
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate}; |
|
|
|
//打开组件 需要的数据 展示需要的数据 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.showWorkCalendarOut = true; |
|
|
|
this.$refs.comWorkCalendarOut.init(tempData); |
|
|
|
}) |
|
|
|
|
|
|
|
}else if('批量维护工作日历' === menuName){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(this.currentOperatorRow == null || this.currentOperatorRow == {}){ |
|
|
|
//重置按钮 |
|
|
|
this.operatorMenuButton.batchWorkCalendarFlag = true; |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择人员!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId, |
|
|
|
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate}; |
|
|
|
//打开组件 需要的数据 展示需要的数据 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.showBatchWorkCalendar = true; |
|
|
|
this.$refs.comBatchWorkCalendar.init(tempData); |
|
|
|
}) |
|
|
|
}else if('重新排产' === menuName){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(this.currentOperatorRow == null || this.currentOperatorRow == {}){ |
|
|
|
//重置按钮 |
|
|
|
this.operatorMenuButton.reScheduleOrderFlag = true; |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择人员!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//调用提示的方法 |
|
|
|
this.warnReScheduleConfirm(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//控制菜单的按钮 |
|
|
|
/*控制明细菜单是否显示*/ |
|
|
|
controlOperatorMenuBun(){ |
|
|
|
//没有选择行 所有的按钮都是灰色 |
|
|
|
if(this.currentOperatorRow == null || this.currentOperatorRow == {}){ |
|
|
|
this.operatorMenuButton.workCalendarOutFlag = true; |
|
|
|
this.operatorMenuButton.batchWorkCalendarFlag = true; |
|
|
|
this.operatorMenuButton.reScheduleOrderFlag = true; |
|
|
|
this.operatorMenuButton.changeScheduleByCalendarFlag = true; |
|
|
|
this.operatorMenuButton.partStockFlag = true; |
|
|
|
}else{ |
|
|
|
this.operatorMenuButton.workCalendarOutFlag = false; |
|
|
|
this.operatorMenuButton.batchWorkCalendarFlag = false; |
|
|
|
this.operatorMenuButton.reScheduleOrderFlag = false; |
|
|
|
this.operatorMenuButton.changeScheduleByCalendarFlag = false; |
|
|
|
this.operatorMenuButton.partStockFlag = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*打开已经排产工单的页面*/ |
|
|
|
openSchedledOrderPage(){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(this.currentScheduleRow == null || this.currentScheduleRow == {}){ |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择派工单!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//跳转页面 |
|
|
|
this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentScheduleRow.orderNo) |
|
|
|
}, |
|
|
|
|
|
|
|
/*打开工单的页面*/ |
|
|
|
openOrderPage(){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(!this.currentRoutingRow){ |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择工单!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//跳转页面 |
|
|
|
this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRoutingRow.orderNo) |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
//查询工单的数据 |
|
|
|
@ -1835,7 +1976,7 @@ div.customer-el-card-blue { |
|
|
|
|
|
|
|
/*添加主菜单和明细菜单的样式*/ |
|
|
|
.customer-css .customer-dropdown .el-button--primary { |
|
|
|
padding: 2px; |
|
|
|
padding: 5px; |
|
|
|
font-size: 12px; |
|
|
|
} |
|
|
|
|
|
|
|
|