Browse Source

FQC排产的页面

master
rui_li 4 years ago
parent
commit
63761faacf
  1. 5
      src/api/schedule/order_schedule.js
  2. 213
      src/views/modules/schedule/order_schedule.vue
  3. 156
      src/views/modules/schedule/order_schedule_fqc.vue
  4. 9
      src/views/modules/yieldReport/com_produce_report_normal.vue
  5. 4
      src/views/modules/yieldReport/com_replace_tool.vue
  6. 1
      src/views/modules/yieldReport/com_switch_roll.vue

5
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)

213
src/views/modules/schedule/order_schedule.vue

@ -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() {
//

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

@ -105,12 +105,13 @@
</el-form-item>
</el-form>
</fieldset>
<fieldset class="customer-fieldset" style="margin-bottom: 10px; width: 100%;">
<!-- 下面的页面 -->
<fieldset class="customer-fieldset" style="margin-bottom: 0px; width: 100%;">
<el-tabs v-model="activeTable" style="margin-top: 0px;"
type="border-card" @tab-click="tabClick" class="customer-tab">
<el-tab-pane label="排产" name="scheduling">
<fieldset class="customer-mid-fieldset" style="width: 50%; margin-left: -15px; margin-top: -15px;">
<!-- 左边的边框 -->
<fieldset class="customer-left-fieldset" style="width: 46%; margin-left: 0px; margin-top: 2px;">
<legend>可用操作员</legend>
<el-row>
<el-col :span="8">
@ -133,9 +134,9 @@
</el-col>
</el-row>
<el-container>
<el-main class="customer-main">
<el-main class="customer-left-main">
<el-table class="customer-left-table"
:height="tableHeight" :width="tableWidth"
:height="tableHeight" :width="tableLeftWidth"
:data="operatorList"
border
v-loading="dataListLoading"
@ -160,8 +161,7 @@
</el-main>
</el-container>
</fieldset>
<!-- 右边的边框 -->
<fieldset class="customer-right-field">
<legend>已排产记录</legend>
<el-row>
@ -179,9 +179,9 @@
</el-col>
</el-row>
<el-container>
<el-main class="customer-main">
<el-main class="customer-right-main">
<el-table class="customer-left-table"
:height="tableHeight" :width="tableWidth"
:height="tableHeight" :width="tableRightWidth"
:data="operatorList"
border
v-loading="dataListLoading"
@ -208,6 +208,90 @@
</fieldset>
</el-tab-pane>
<el-tab-pane label="待排产清单" name="wait_schedule">
<fieldset style="margin-left: 0px; margin-top: 2px;">
<el-form :inline="true" label-position="top" style="margin-top: 5px;">
<el-form-item :label="'录入日期'" style="margin-top: 0px;">
<el-date-picker class="el-time-width"
style=""
v-model="pageData.enterTime1"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item :label="' '" style="margin-top: 0px;">
<el-date-picker class="el-time-width"
style=""
v-model="pageData.enterTime2"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item :label="'要求完工日期'" style="margin-top: 0px;">
<el-date-picker class="el-time-width"
style=""
v-model="pageData.needTime1"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item :label="' '" style="margin-top: 0px;">
<el-date-picker class="el-time-width"
style=""
v-model="pageData.needTime2"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item :label="'产品编码'" style="margin-top: 0px;">
<el-input v-model="pageData.partNo" style="width: 80px"></el-input>
</el-form-item>
<el-form-item :label="'生产订单'" style="margin-top: 0px;">
<el-input v-model="pageData.orderNo" style="width: 80px"></el-input>
</el-form-item>
<el-form-item :label="''" style="margin-left: 5px;">
<el-row>
<el-col :span="24">
<el-checkbox class="customer-checkbox" style=""
label="查看已排满的工序"></el-checkbox>
</el-col>
<el-col :span="24" style="margin-top: 0px; ">
<el-checkbox class="customer-checkbox" style="margin-top: 5px;"
label="仅查看前道工序已排产的工序"></el-checkbox>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="''" style="margin-left: -100px; margin-top: 5px;">
<el-button class="customer-bun-max" type="primary">刷新排产清单
</el-button>
</el-form-item>
<el-container>
<el-main class="customer-left-main">
<el-table class="customer-left-table"
:height="tableHeight" :width="tableLeftWidth"
:data="operatorList"
border
v-loading="dataListLoading"
style="margin-left: -15px; margin-top: -5px;">
<el-table-column
v-for="(item,index) in columnOperatorArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-main>
</el-container>
</el-form>
</fieldset>
</el-tab-pane>
</el-tabs>
</fieldset>
@ -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;
}
</style>

9
src/views/modules/yieldReport/com_produce_report_normal.vue

@ -242,11 +242,14 @@
width="115"
:label="'操作'">
<template slot-scope="scope">
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.rollNo != '*' && scope.row.finishedFlag == 'N' && scope.row.histType == '发料'"
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.rollNo != '*' && scope.row.sAPBOMItemNo >= 0
&& scope.row.finishedFlag == 'N' && scope.row.histType == '发料'"
@click="replaceMaterialModal(scope.row)">换料</a>
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.rollNo == '*' && scope.row.finishedFlag == 'N' && scope.row.histType == '发料'" @click="cuttingMaterialModal(scope.row)"
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.rollNo == '*' && scope.row.sAPBOMItemNo >= 0
&& scope.row.finishedFlag == 'N' && scope.row.histType == '发料'" @click="cuttingMaterialModal(scope.row)"
>下料</a>
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag == 'N' && scope.row.histType == '发料' && scope.row.keyRMFlag == 'N'" @click="warnFinishMaterialWithNoRemainderConfirm(scope.row)"
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag == 'N' && scope.row.sAPBOMItemNo >= 0
&& scope.row.histType == '发料' && scope.row.keyRMFlag == 'N'" @click="warnFinishMaterialWithNoRemainderConfirm(scope.row)"
>生产结束</a>
</template>
</el-table-column>

4
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;
}
},

1
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();
}
})

Loading…
Cancel
Save