Browse Source

产量报告

master
Rui_Li 4 years ago
parent
commit
09d18582d9
  1. 47
      src/api/yieldReport/com_finish_part_roll.js
  2. 5
      src/api/yieldReport/produce_report_normal.js
  3. 865
      src/views/modules/yieldReport/com_finish_part_roll.vue
  4. 105
      src/views/modules/yieldReport/com_produce_report_normal.vue

47
src/api/yieldReport/com_finish_part_roll.js

@ -0,0 +1,47 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取当前的卷的报工汇总数据
export const getCurrentRollReportedQty = data => createAPI('schedule/getCurrentRollReportedQty', 'POST', data)
// 获取上机卷的时间信息汇总
export const countSfdcTimeQty = data => createAPI('schedule/countSfdcTimeQty', 'POST', data)
// 获取派工单的班次信息
export const getScheduleShiftData = data => createAPI('schedule/getScheduleShiftData', 'POST', data)
// 获取sfdc表的时间信息汇总
export const getSfdcTimeData = data => createAPI('schedule/getSfdcTimeData', 'POST', data)
// 获取当前时间记录信息
export const getSfdcTimeMaxAndMinTime = data => createAPI('schedule/getSfdcTimeMaxAndMinTime', 'POST', data)
// 获取当前卷sfdc表的报工数据
export const getSfdcReportedData = data => createAPI('schedule/getSfdcReportedData', 'POST', data)
// 获取当前卷的材料记录--在线的
export const getSfdcMaterialByRollNo = data => createAPI('schedule/getSfdcMaterialByRollNo', 'POST', data)
// 获取当前派工单的材料记录
export const getSfdcMaterialByCon = data => createAPI('schedule/getSfdcMaterialByCon', 'POST', data)
// 获取当前派工单的上机卷记录
export const getSfdcRollOpsByCon = data => createAPI('schedule/getSfdcRollOpsByCon', 'POST', data)
// 获取当前派工单的不良卷记录
export const getSfdcDefectByCon = data => createAPI('schedule/getSfdcDefectByCon', 'POST', data)
// 获取当前上机卷信息
export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data)
// 结束卷的验证
export const checkFinishRollWithNoFqc = data => createAPI('schedule/checkFinishRollWithNoFqc', 'POST', data)
// 结束卷的操作
export const finishRollWithNoFqc = data => createAPI('schedule/finishRollWithNoFqc', 'POST', data)

5
src/api/yieldReport/produce_report_normal.js

@ -46,6 +46,11 @@ export const reopenSfdcRolls = data => createAPI('schedule/reopenSfdcRolls', 'PO
//删除sfdcRolls
export const deleteSfdcRolls = data => createAPI('schedule/deleteSfdcRolls', 'POST', data)
//执行工具的结束使用的方法
export const processFinishTool = data => createAPI('schedule/processFinishTool', 'POST', data)
//执行材料结束使用 且未剩余的方法
export const processFinishMaterialWithNoRemainder = data => createAPI('schedule/processFinishMaterialWithNoRemainder', 'POST', data)

865
src/views/modules/yieldReport/com_finish_part_roll.vue

@ -0,0 +1,865 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="920px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 495px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row>
<el-col :span="24">
<el-form-item :label="'当前时间'">
<el-date-picker disabled="disabled" style="width: 145px;"
v-model="pageData.reportedTime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="">
</el-date-picker>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" style="margin-left: 10px; margin-bottom: 5px;">
列表</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
刷新</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" @click="finishRollBun" style="margin-left: 10px; margin-bottom: 5px;">
结束卷</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" @click="closeDialog" style="margin-left: 10px; margin-bottom: 5px;">
关闭</el-button>
</el-form-item>
</el-col>
</el-row>
<!-- 卷数量统计 班次信息 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 505px;">
<legend>卷数量统计</legend>
<el-form-item class="customer-item">
<el-checkbox disabled="disabled" style="margin-top: 15px;" true-label="Y" false-label="N"
v-model="pageData.reportedFlag">是否报告产量</el-checkbox>
</el-form-item>
<el-form-item class="customer-item" label="总良品数量:" style="margin-top: -10px;">
<el-input v-model="pageData.approvedQty" type="number" @blur="checkValidApprovedQty"
style="width: 80px;" ></el-input>
</el-form-item>
<el-form-item class="customer-item" label="总不良品数量:" style="margin-top: -10px;">
<el-input v-model="pageData.defectedQty" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="总数量" style="margin-top: -10px;">
<el-input v-model="pageData.totalQty" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="其他卷数量:" style="margin-top: -10px;">
<el-input v-model="pageData.otherRollQty" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
</fieldset>
<!-- 操作员信息和班次信息 -->
<fieldset class="customer-fieldset"
style="margin-left: 510px; margin-top: -70px; ;width: 390px;">
<legend>人员排程班次信息</legend>
<el-form-item class="customer-item" label="操作员:">
<el-input v-model="operatorData.operatorId" disabled="disabled" style="width: 80px;" ></el-input>
</el-form-item>
<el-form-item class="customer-item" label="操作员姓名:">
<el-input v-model="operatorData.operatorName" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="排产日期:">
<el-input v-model="pageData.scheduledDate" disabled="disabled" style="width: 80px;" ></el-input>
</el-form-item>
<el-form-item class="customer-item" label="班次:">
<el-input v-model="pageData.shiftDesc" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
</fieldset>
</el-form>
<!-- 卷生产时间统计产量报告 -->
<el-form style="margin-top: 5px;">
<fieldset class="customer-fieldset" style="width: 320px;">
<legend>卷生产时间统计</legend>
<!-- 调机时间 -->
<el-row>
<el-col :span="24">
<el-form-item label="总调机时间:">
<el-input v-model="pageData.totalSetupTime" disabled="disabled" style="width: 80px;" ></el-input>
</el-form-item>
<el-form-item label="总调机过程停机时间:">
<el-input v-model="pageData.totalDowntimeTimeSetup" disabled="disabled" style="width: 100px;"></el-input>
</el-form-item>
<el-form-item label="净调机时间:" >
<el-input v-model="pageData.totalPureSetupTime" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 生产时间 -->
<el-row>
<el-col :span="24">
<el-form-item label="总生产时间">
<el-input v-model="pageData.totalProdTime" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item label="总生产过程停机时间:">
<el-input v-model="pageData.totalDowntimeTimeProd" disabled="disabled" style="width: 100px;"></el-input>
</el-form-item>
<el-form-item label="净生产时间:" >
<el-input v-model="pageData.totalPureProdTime" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 制造时间 -->
<el-row>
<el-col :span="24">
<el-form-item label="总制造时间:">
<el-input v-model="pageData.totalManufactureTime" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item label="总制造过程停机时间:">
<el-input v-model="pageData.totalManufactureDowntimeTime" disabled="disabled" style="width: 100px;"></el-input>
</el-form-item>
<el-form-item label="净制造时间:" >
<el-input v-model="pageData.totalPureManufactureTime" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<!-- 产量报告 -->
<fieldset class="customer-fieldset"
style="margin-left: 325px; margin-top: -165px; width: 575px;">
<legend>产量报告</legend>
<!-- 开工时间 -->
<el-row>
<el-col :span="24">
<el-form-item label="开工时间">
<el-input v-model="pageData.eventTime" disabled="disabled" style="width: 130px;"></el-input>
</el-form-item>
<el-form-item label="完工时间">
<el-input v-model="pageData.tillTime" disabled="disabled" style="width: 130px;"></el-input>
</el-form-item>
<el-form-item label="生产时间" >
<el-input v-model="pageData.sfdcProdTime" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item label="调机时间" >
<el-input v-model="pageData.sfdcSetupTime" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item label="制造时间" >
<el-input v-model="pageData.sfdcManufactureTime" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 合格数量 -->
<el-row>
<el-col :span="24">
<el-form-item label="合格数量">
<el-input v-model="pageData.sfdcApprovedQty" disabled="disabled" style="width: 130px;"></el-input>
</el-form-item>
<el-form-item label="不合格数量">
<el-input v-model="pageData.defectedQty" disabled="disabled" style="width: 130px;"></el-input>
</el-form-item>
<el-form-item label="报告数量" >
<el-input v-model="pageData.sfdcReportedQty" disabled="disabled" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item label="调机停机">
<el-input v-model="pageData.sfdcSetupDownTime" style="width: 80px;"></el-input>
</el-form-item>
<el-form-item label="生产调机" >
<el-input v-model="pageData.sfdcProdSetupTime" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 备注 -->
<el-row>
<el-col :span="24">
<el-form-item label="remark">
<el-input v-model="pageData.remark" disabled="disabled" style="width: 430px;"></el-input>
</el-form-item>
<el-form-item label="停机时间">
<el-input v-model="pageData.sfdcDownTime" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
<!-- 主材料 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 830px;">
<legend>主材料</legend>
<el-table
height="180"
:data="sfdcMaterialList"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: -5px;">
<el-table-column
v-for="(item,index) in columnMaterialArray" :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">
<el-input type="number" class="table-input" align="right" @blur="checkValidQty(scope.row)"
v-if="item.columnHidden" v-model="scope.row[item.columnProp]"></el-input>
<span v-else>{{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>
</fieldset>
</el-form>
</el-form>
</el-dialog>
<!-- 异常原因录入的组件 -->
<comExceptionReason ref="comExceptionReason" :close-on-click-modal="false"
:visible.sync="showExceptionFlag"
@initExceptionReason = "initExceptionReason">
</comExceptionReason>
</div>
</template>
<script>
/*添加组件*/
import comExceptionReason from "./com_exception_reason";//
import {
getCurrentRollReportedQty,
countSfdcTimeQty,
getScheduleShiftData,
getSfdcTimeMaxAndMinTime,
getSfdcTimeData,
getSfdcReportedData,
getSfdcMaterialByRollNo,
checkFinishRollWithNoFqc,
finishRollWithNoFqc
} from '@/api/yieldReport/com_finish_part_roll.js';
export default {
name: "com_finish_roll",
data() {
return {
titleCon: '结束卷',
showExceptionFlag: false,
sfdcTimeList: [],
scheduleData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
orderNo: '',
itemNo: 0,
seqNo: '',
rollNo: '',
resourceId: '',
scheduledDate: '',
shiftNo: '',
reportedTime: this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
reportedFlag: 'N',
approvedQty: 0,
defectedQty: 0,
totalQty: 0,
editNewRollQty: 0,
otherRollQty: '',
shiftDesc: '',
totalSetupTime: 0,
totalDowntimeTimeSetup: 0,
totalPureSetupTime: 0,
totalProdTime: 0,
totalDowntimeTimeProd: 0,
totalPureProdTime: 0,
totalManufactureTime: 0,
totalManufactureDowntimeTime: 0,
totalPureManufactureTime: 0,
sfdcProdTime: 0,//
sfdcSetupTime: 0,//
sfdcManufactureTime: 0,//
sfdcSetupDownTime: 0,//
sfdcProdSetupTime: 0,//
sfdcDownTime: 0,//
eventTime: '',
tillTime: '',
sfdcApprovedQty: 0,
sfdcDefectedQty: 0,
sfdcReportedQty: 0,
remark: '',
exceptionFlag: 'N',
exceptionReason: '',
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
sfdcMaterialList: [],
columnMaterialArray: [
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303MaterialReportDate',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "reportDate",
headerAlign: "center",
align: "center",
columnLabel: "报告时间",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303MaterialReportedBy',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "reportedBy",
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: 5303,
serialNumber: '5303MaterialRmRollNo',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "rmRollNo",
headerAlign: "center",
align: "center",
columnLabel: "材料卷号",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303MaterialPartNo',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "partNo",
headerAlign: "center",
align: "center",
columnLabel: "零部件编码",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303MaterialStartDate',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "startDate",
headerAlign: "center",
align: "center",
columnLabel: "开始使用时间",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303MaterialTransQty',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "transQty",
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: 5303,
serialNumber: '5303MaterialNetIssueQty',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "netIssueQty",
headerAlign: "center",
align: "center",
columnLabel: "本卷耗用数量",
columnWidth: 100,
columnHidden: true,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303MaterialKeyRMFlag',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "keyRMFlag",
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: 5303,
serialNumber: '5303MaterialSAPBOMItemNo',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "sAPBOMItemNo",
headerAlign: "center",
align: "center",
columnLabel: "SAP BOM序号",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
dataListLoading: false,
}
},
components: {
comExceptionReason,/*异常原因的组件*/
},
methods: {
/*初始化页面参数*/
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
//
if(null == scheduleData.rollNo || scheduleData.rollNo == ''){
this.pageData.rollNo = '暂无卷号';
this.scheduleData.rollNo = '暂无卷号';
}else{
this.pageData.rollNo = scheduleData.rollNo;
}
this.pageData.scheduledDate = scheduleData.scheduledDate;
this.pageData.shiftNo = scheduleData.shiftNo;
this.pageData.resourceId = scheduleData.resourceId;
this.pageData.operatorId = operatorData.operatorId;
//
this.pageData.reportedTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.titleCon = '结束卷操作 \
派工单号:'+scheduleData.seqNo;
//
this.pageData.exceptionFlag = 'N';
this.pageData.exceptionReason = '';
//
this.refreshPageData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*生产过程的停机组件*/
exceptionReasonModal() {
//1.
//checkProduceButton('produceDownFlag');
//
this.$nextTick(() => {
this.show = true;
this.$refs.comProduceDown.init(this.scheduleData, this.operatorData)
});
},
/*刷新当前的页面参数*/
async refreshPageData(){
//1.
await getCurrentRollReportedQty(this.scheduleData).then(({data}) => {
this.pageData.approvedQty = data.row.approvedQty;
this.pageData.defectedQty = data.row.defectedQty;
this.pageData.totalQty = data.row.totalQty;
this.pageData.otherRollQty = data.row.otherRollQty;
})
//2.
await countSfdcTimeQty(this.scheduleData).then(({data}) => {
this.pageData.totalSetupTime = data.row.totalSetupTime;
this.pageData.totalDowntimeTimeSetup = data.row.totalDowntimeTimeSetup;
this.pageData.totalPureSetupTime = data.row.totalPureSetupTime;
this.pageData.totalProdTime = data.row.totalProdTime;
this.pageData.totalDowntimeTimeProd = data.row.totalDowntimeTimeProd;
this.pageData.totalPureProdTime = data.row.totalPureProdTime;
this.pageData.totalManufactureTime = data.row.totalManufactureTime;
this.pageData.totalManufactureDowntimeTime = data.row.totalManufactureDowntimeTime;
this.pageData.totalPureManufactureTime = data.row.totalPureManufactureTime;
//
//=
this.pageData.sfdcProdTime = this.pageData.totalProdTime;
//=
this.pageData.sfdcSetupTime = this.pageData.totalSetupTime;
//=
this.pageData.sfdcManufactureTime = this.pageData.totalManufactureTime;
//=
this.pageData.sfdcSetupDownTime = this.pageData.totalDowntimeTimeSetup;
//=
this.pageData.sfdcProdSetupTime = this.pageData.totalDowntimeTimeProd;
//=
this.pageData.sfdcDownTime = this.pageData.totalManufactureDowntimeTime;
});
//3.
await getScheduleShiftData(this.scheduleData).then(({data}) => {
//
if(data.code == 500){
this.pageData.shiftDesc = data.row.shiftDesc;//
this.pageData.scheduledDate = '';//
this.pageData.shiftNo = '';
}else{
this.pageData.shiftDesc = data.row.shiftDesc;//
this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//
this.pageData.shiftNo = data.row.shiftNo;
}
});
//4.
await getSfdcTimeMaxAndMinTime(this.scheduleData).then(({data}) => {
this.pageData.eventTime = data.row.eventTime;
this.pageData.tillTime = data.row.tillTime;
});
//5.Sfdc
await getSfdcTimeData(this.scheduleData).then(({data}) => {
//
if(data.resultCode == 200){
//
this.pageData.eventTime = data.row.finishTime;
this.pageData.sfdcProdTime = data.row.sfdcProdTime;
this.pageData.sfdcSetupTime = data.row.sfdcSetupTime;
this.pageData.sfdcManufactureTime = data.row.sfdcManufactureTime;
this.pageData.sfdcDownTime = data.row.sfdcDownTime;
this.pageData.sfdcSetupDownTime = data.row.sfdcSetupDownTime;
this.pageData.sfdcProdSetupTime = data.row.sfdcProdSetupTime;
}else{
//
}
});
//6.
await getSfdcReportedData(this.scheduleData).then(({data}) => {
this.pageData.sfdcApprovedQty = this.pageData.approvedQty - data.row.approveQty;
this.pageData.sfdcDefectedQty = this.pageData.defectedQty - data.row.defectQty;
this.pageData.sfdcReportedQty = this.pageData.sfdcApprovedQty + this.pageData.sfdcDefectedQty;
});
//
await getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
},
/*刷新当前卷的报工数据汇总*/
refreshCurrentRollReportedQty(){
getCurrentRollReportedQty(this.scheduleData).then(({data}) => {
this.pageData.approvedQty = data.row.approvedQty;
this.pageData.defectedQty = data.row.defectedQty;
this.pageData.totalQty = data.row.totalQty;
this.pageData.otherRollQty = data.row.otherRollQty;
})
},
//
refreshCurrentRollTimeQty(){
countSfdcTimeQty(this.scheduleData).then(({data}) => {
this.pageData.totalSetupTime = data.row.totalSetupTime;
this.pageData.totalDowntimeTimeSetup = data.row.totalDowntimeTimeSetup;
this.pageData.totalPureSetupTime = data.row.totalPureSetupTime;
this.pageData.totalProdTime = data.row.totalProdTime;
this.pageData.totalDowntimeTimeProd = data.row.totalDowntimeTimeProd;
this.pageData.totalPureProdTime = data.row.totalPureProdTime;
this.pageData.totalManufactureTime = data.row.totalManufactureTime;
this.pageData.totalManufactureDowntimeTime = data.row.totalManufactureDowntimeTime;
this.pageData.totalPureManufactureTime = data.row.totalPureManufactureTime;
});
},
//
refreshScheduleShiftData(){
getScheduleShiftData(this.scheduleData).then(({data}) => {
//
if(data.code == 500){
this.pageData.shiftDesc = data.row.shiftDesc;//
this.pageData.scheduledDate = '';//
this.pageData.shiftNo = '';
}else{
this.pageData.shiftDesc = data.row.shiftDesc;//
this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//
this.pageData.shiftNo = data.row.shiftNo;
}
});
},
//
refreshCurrentRollMaxAndMinTime(){
getSfdcTimeMaxAndMinTime(this.scheduleData).then(({data}) => {
this.pageData.eventTime = data.row.eventTime;
this.pageData.tillTime = data.row.tillTime;
});
},
//Sfdc
refreshSfdcTimeData(){
getSfdcTimeData(this.scheduleData).then(({data}) => {
//
this.pageData.eventTime = data.row.finishTime;
this.pageData.sfdcProdTime = data.row.sfdcProdTime;
this.pageData.sfdcSetupTime = data.row.sfdcSetupTime;
this.pageData.sfdcManufactureTime = data.row.sfdcManufactureTime;
this.pageData.sfdcDownTime = data.row.sfdcDownTime;
this.pageData.sfdcSetupDownTime = data.row.sfdcSetupDownTime;
this.pageData.sfdcProdSetupTime = data.row.sfdcProdSetupTime;
});
},
//
refreshSfdcData(){
getSfdcReportedData(this.scheduleData).then(({data}) => {
this.pageData.sfdcApprovedQty = this.pageData.approvedQty - data.row.approveQty;
this.pageData.sfdcDefectedQty = this.pageData.defectedQty - data.row.defectQty;
this.pageData.sfdcReportedQty = this.pageData.sfdcApprovedQty + this.pageData.sfdcDefectedQty;
});
},
//
refreshSfdcMaterialTable(){
getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
},
/*检查数据是否有效*/
checkValidQty(row){
//
if(row.netIssueQty == ''){
this.$message.error('材料上本卷耗用数量不能为空!');
row.netIssueQty = 0;//
return false;
}
//
if(row.netIssueQty <= 0){
this.$message.error('材料耗用数量必须大于0!');
return false;
}
//
if(row.netIssueQty > row.transQty){
this.$message.error('材料耗用数量大于发料数量!');
row.netIssueQty = 0;//
return false;
}
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if(column.property == 'netIssueQty'){
return 'customer-number-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if(column.property == 'netIssueQty'){
return 'padding: 0px 0px;';
}
},
/*检验良品的总数量*/
checkValidApprovedQty(){
//
this.refreshSfdcData();
debugger;
this.pageData.totalQty = parseFloat(this.pageData.approvedQty) + parseFloat(this.pageData.defectedQty);
},
/*结束当前的操作*/
finishRollBun(){
//
let approvedQty = this.pageData.approvedQty;
if(approvedQty == null || approvedQty == ''){
this.$message.error('请输入良品总数量!');
this.pageData.approvedQty = 0;//
return false;
}
if(approvedQty <= 0){
this.$message.error('良品总数量必须大于0!');
this.pageData.approvedQty = 0;//
return false;
}
//
if(this.pageData.shiftDesc == '无班次'){
this.$message.error('该时间段内没有匹配的班次信息,请联系相关人员!!');
return false;
}
//
let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)};
//
checkFinishRollWithNoFqc(postData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else if (data.resultMap.resultCode == '201'){
//
this.$confirm(data.resultMap.resultMsg, '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() => {
this.showExceptionReasonModal();
});
}else{
//
this.finishRollOperation();
}
});
},
/*结束卷的具体操作*/
finishRollOperation(){
//
let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)};
//
finishRollWithNoFqc(postData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
//
this.$emit('refreshPageData');
//
this.closeDialog();
}
})
},
/*打开异常原因录入页面*/
showExceptionReasonModal(){
//1.
//checkProduceButton('produceMaterialFlag');
//
this.$nextTick(() => {
this.showExceptionFlag = true;
this.$refs.comExceptionReason.init();
});
},
/*处理异常的原因*/
initExceptionReason(exceptionReason){
//
this.pageData.exceptionFlag = 'Y';
this.pageData.exceptionReason = exceptionReason;
//
this.finishRollOperation();
}
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
/*table中input*/
div.table-input /deep/ input.el-input__inner{
text-align: right;
}
</style>

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

@ -167,7 +167,7 @@
<template slot-scope="scope">
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag == 'N'" @click="replaceToolModal(scope.row)"
>刀模替换</a>
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag != 'Y' && scope.row.rollNo == '*'" @click="replaceToolModal(scope.row)"
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag != 'Y' && scope.row.rollNo == '*'" @click="warnFinishToolConfirm(scope.row)"
>结束使用</a>
</template>
</el-table-column>
@ -246,7 +246,7 @@
>换料</a>
<a class="customer-a" v-if="operatorData.operatorName != '' && 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="replaceMaterialModal(scope.row)"
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag == 'N' && scope.row.histType == '发料' && scope.row.keyRMFlag == 'N'" @click="warnFinishMaterialWithNoRemainderConfirm(scope.row)"
>生产结束</a>
</template>
</el-table-column>
@ -407,7 +407,7 @@
<!-- 停机 -->
<fieldset class="customer-fieldset"
style="margin-left: 600px; margin-bottom: 10px; width: 200px; height: 190px;">
style="margin-left: 600px; margin-bottom: 0px; width: 200px; height: 100px;">
<legend class="customer-legend">停机</legend>
<el-form>
<el-form-item>
@ -418,6 +418,19 @@
</el-form-item>
</el-form>
</fieldset>
<!--其他操作-->
<fieldset class="customer-fieldset"
style="margin-left: 600px; margin-bottom: 10px; width: 200px; height: 90px;">
<legend class="customer-legend">其他操作</legend>
<el-form>
<el-form-item>
<el-button type="primary" @click="finishPartRollModal"
style="margin-left: 50px; margin-top: 10px;">
产量报告
</el-button>
</el-form-item>
</el-form>
</fieldset>
</el-form>
</el-dialog>
@ -439,12 +452,20 @@
:visible.sync="showSeparateFlag" @refreshPageData="refreshPageData">
</comSeparateRoll>
<!-- 结束卷的modal -->
<comFinishRoll ref="comFinishRoll" :close-on-click-modal="false"
:visible.sync="showFinishFlag" @refreshPageData="refreshPageData">
</comFinishRoll>
<!-- 产量报告的组件 -->
<comFinishPartRoll ref="comFinishPartRoll" :close-on-click-modal="false"
:visible.sync="showFinishPartFlag"
@refreshPageData="refreshPageData">
</comFinishPartRoll>
<!-- 合并卷组件 -->
<comMergeRoll ref="comMergeRoll" :close-on-click-modal="false"
:visible.sync="showMergeFlag" @refreshPageData="refreshPageData">
@ -539,12 +560,15 @@ import {
createNewRoll,
reopenSfdcRolls,/*重新打开卷操作*/
deleteSfdcRolls,/*删除sfdcRolls的操作*/
processFinishTool,/*执行工具的结束使用的方法*/
finishMaterialWithNoRemainder,/*执行材料结束使用 且无剩余 */
} from "@/api/yieldReport/produce_report_normal.js";
/*引入组件*/
import comSwitchOperator from "./com_switch_operator";/*切换操作员*/
import comSwitchRoll from "./com_switch_roll";/*切换卷操作*/
import comSeparateRoll from "./com_separate_roll";
import comFinishRoll from "./com_finish_roll";/*结束卷数的组件*/
import comFinishPartRoll from "./com_finish_part_roll";//
import comMergeRoll from "./com_merge_roll";/*合并卷的组件*/
import comStartTuning from "./com_start_tuning";/*开始调机组件*/
import comStartProduce from "./com_start_produce";/*开始生产组件*/
@ -566,6 +590,7 @@ export default {
showSwitchFlag: false,
showSeparateFlag: false,
showFinishFlag: false,
showFinishPartFlag: false,
showMergeFlag: false,
showTuningFlag: false,
showProduceFlag: false,
@ -2810,6 +2835,7 @@ export default {
comSwitchRoll,/*切换卷操作*/
comSeparateRoll,/*創建分卷组件*/
comFinishRoll,/*结束卷的组件*/
comFinishPartRoll,/*产量报告的组件*/
comMergeRoll,/*合并卷组件*/
comStartTuning,/*开始调机组件*/
comStartProduce,/*开始生产组件*/
@ -2992,7 +3018,7 @@ export default {
await this.refreshCurrentTabTable();
//
//await this.refreshPageButtons();
await this.refreshPageButtons();
},
@ -3151,6 +3177,17 @@ export default {
});
},
/*产量报告的卷操作*/
finishPartRollModal() {
//1.
//checkProduceButton('finishRollFlag');
//
this.$nextTick(() => {
this.showFinishPartFlag = true;
this.$refs.comFinishPartRoll.init(this.scheduleData, this.operatorData)
});
},
/*合并卷modal*/
mergeRollModal() {
//1.
@ -3354,6 +3391,66 @@ export default {
});
},
/*结束使用 工具确认功能*/
warnFinishToolConfirm(toolRow){
this.$confirm('确实要结束该工具的使用吗?', '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() =>{
//使
this.finishToolOperation(toolRow);
});
},
/*执行删除sfdcRolls的数据功能*/
finishToolOperation(toolRow){
let toolData = {'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'histSeqNo': toolRow.histSeqNo, 'toolInstanceId': toolRow.toolInstanceId};
//
processFinishTool(toolData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.info(data.msg);
//
this.refreshPageData();
}
});
},
/*结束使用 材料确认功能*/
warnFinishMaterialWithNoRemainderConfirm(materialRow){
this.$confirm('确实要结束该工具的使用吗?', '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() =>{
//使
this.finishMaterialWithNoRemainderOperation(materialRow);
});
},
/*执行结束使用 材料的数据功能*/
finishMaterialWithNoRemainderOperation(materialRow){
let materialData = {'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'histSeqNo': materialRow.histSeqNo, 'rollNo': materialRow.rollNo};
//使
finishMaterialWithNoRemainder(materialData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.info(data.msg);
//
this.refreshPageData();
}
});
},
},
created() {
// this.factoryList()

Loading…
Cancel
Save