Browse Source

结束卷代码

master
Rui_Li 4 years ago
parent
commit
a83ff6730f
  1. 7
      src/api/yieldReport/com_finish_roll.js
  2. 62
      src/views/modules/yieldReport/com_exception_reason.vue
  3. 87
      src/views/modules/yieldReport/com_finish_roll.vue
  4. 1
      src/views/modules/yieldReport/com_produce_material.vue

7
src/api/yieldReport/com_finish_roll.js

@ -33,10 +33,11 @@ export const getSfdcDefectByCon = data => createAPI('schedule/getSfdcDefectByCon
// 获取当前上机卷信息 // 获取当前上机卷信息
export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data) export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data)
// 结束卷的操作
export const finishRoll = data => createAPI('schedule/finishRoll', 'POST', data)
// 结束卷的验证
export const checkFinishRollWithNoFqc = data => createAPI('schedule/checkFinishRollWithNoFqc', 'POST', data)
// 结束卷的操作
export const finishRollWithNoFqc = data => createAPI('schedule/finishRollWithNoFqc', 'POST', data)

62
src/views/modules/yieldReport/com_exception_reason.vue

@ -0,0 +1,62 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="900px" style="height: 415px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 265px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row>
<el-col :span="3" >
<el-form-item :label="'异常原因:'">
<textarea rows="2" cols="24" placeholder="异常原因"></textarea>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</div>
</template>
<script>
export default {
name: "com_exception_reason",
data() {
return {
titleCon: '异常原因',
pageData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
exceptionReason: ''
},
}
},
methods: {
/*初始化页面参数*/
init() {
//
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
},
created() {
//
}
}
</script>
<style scoped lang="scss">
</style>

87
src/views/modules/yieldReport/com_finish_roll.vue

@ -24,7 +24,7 @@
刷新</el-button> 刷新</el-button>
</el-form-item> </el-form-item>
<el-form-item class="customer-button"> <el-form-item class="customer-button">
<el-button type="primary" @click="finishRollOperation" style="margin-left: 10px; margin-bottom: 5px;">
<el-button type="primary" @click="finishRollBun" style="margin-left: 10px; margin-bottom: 5px;">
结束卷</el-button> 结束卷</el-button>
</el-form-item> </el-form-item>
<el-form-item class="customer-button"> <el-form-item class="customer-button">
@ -41,7 +41,7 @@
<el-checkbox disabled="disabled" style="margin-top: 15px;" true-label="Y" false-label="N" <el-checkbox disabled="disabled" style="margin-top: 15px;" true-label="Y" false-label="N"
v-model="pageData.reportedFlag">是否报告产量</el-checkbox> v-model="pageData.reportedFlag">是否报告产量</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item class="customer-item" label="良品数量:" style="margin-top: -10px;">
<el-form-item class="customer-item" label="良品数量:" style="margin-top: -10px;">
<el-input v-model="pageData.approvedQty" type="number" @blur="checkValidApprovedQty" <el-input v-model="pageData.approvedQty" type="number" @blur="checkValidApprovedQty"
style="width: 80px;" ></el-input> style="width: 80px;" ></el-input>
</el-form-item> </el-form-item>
@ -123,6 +123,7 @@
<!-- 产量报告 --> <!-- 产量报告 -->
<fieldset class="customer-fieldset" <fieldset class="customer-fieldset"
style="margin-left: 325px; margin-top: -165px; width: 575px;"> style="margin-left: 325px; margin-top: -165px; width: 575px;">
<legend>产量报告</legend> <legend>产量报告</legend>
<!-- 开工时间 --> <!-- 开工时间 -->
<el-row> <el-row>
@ -213,10 +214,20 @@
</el-dialog> </el-dialog>
<!-- 异常原因录入的组件 -->
<comExceptionReason ref="comExceptionReason" :close-on-click-modal="false"
:visible.sync="showExceptionFlag"
@initExceptionReason = "initExceptionReason">
</comExceptionReason>
</div> </div>
</template> </template>
<script> <script>
/*添加组件*/
import comExceptionReason from "./com_exception_reason";//
import { import {
getCurrentRollReportedQty, getCurrentRollReportedQty,
countSfdcTimeQty, countSfdcTimeQty,
@ -225,13 +236,15 @@ import {
getSfdcTimeData, getSfdcTimeData,
getSfdcReportedData, getSfdcReportedData,
getSfdcMaterialByRollNo, getSfdcMaterialByRollNo,
finishRoll,
checkFinishRollWithNoFqc,
finishRollWithNoFqc
} from '@/api/yieldReport/com_finish_roll.js'; } from '@/api/yieldReport/com_finish_roll.js';
export default { export default {
name: "com_finish_roll", name: "com_finish_roll",
data() { data() {
return { return {
titleCon: '',
titleCon: '结束卷',
showExceptionFlag: false,
sfdcTimeList: [], sfdcTimeList: [],
scheduleData: { scheduleData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -272,6 +285,7 @@ export default {
approvedQty: 0, approvedQty: 0,
defectedQty: 0, defectedQty: 0,
totalQty: 0, totalQty: 0,
editNewRollQty: 0,
otherRollQty: '', otherRollQty: '',
shiftDesc: '', shiftDesc: '',
totalSetupTime: 0, totalSetupTime: 0,
@ -295,6 +309,8 @@ export default {
sfdcDefectedQty: 0, sfdcDefectedQty: 0,
sfdcReportedQty: 0, sfdcReportedQty: 0,
remark: '', remark: '',
exceptionFlag: 'N',
exceptionReason: '',
}, },
operatorData: { operatorData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -486,6 +502,9 @@ export default {
dataListLoading: false, dataListLoading: false,
} }
}, },
components: {
comExceptionReason,/*异常原因的组件*/
},
methods: { methods: {
/*初始化页面参数*/ /*初始化页面参数*/
init(scheduleData, operatorData) { init(scheduleData, operatorData) {
@ -499,6 +518,7 @@ export default {
this.pageData.scheduledDate = scheduleData.scheduledDate; this.pageData.scheduledDate = scheduleData.scheduledDate;
this.pageData.shiftNo = scheduleData.shiftNo; this.pageData.shiftNo = scheduleData.shiftNo;
this.pageData.resourceId = scheduleData.resourceId; 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.pageData.reportedTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
// //
@ -514,6 +534,17 @@ export default {
this.$emit('update:visible', false); this.$emit('update:visible', false);
}, },
/*生产过程的停机组件*/
exceptionReasonModal() {
//1.
//checkProduceButton('produceDownFlag');
//
this.$nextTick(() => {
this.show = true;
this.$refs.comProduceDown.init(this.scheduleData, this.operatorData)
});
},
/*刷新当前的页面参数*/ /*刷新当前的页面参数*/
refreshPageData(){ refreshPageData(){
//1. //1.
@ -542,7 +573,7 @@ export default {
//= //=
this.pageData.sfdcManufactureTime = this.pageData.totalManufactureTime; this.pageData.sfdcManufactureTime = this.pageData.totalManufactureTime;
//= //=
this.pageData.sfdcDownTime = this.pageData.totalDowntimeTimeSetup;
this.pageData.sfdcSetupDownTime = this.pageData.totalDowntimeTimeSetup;
//= //=
this.pageData.sfdcProdSetupTime = this.pageData.totalDowntimeTimeProd; this.pageData.sfdcProdSetupTime = this.pageData.totalDowntimeTimeProd;
//= //=
@ -551,7 +582,8 @@ export default {
}).then(() => { }).then(() => {
//3. //3.
getScheduleShiftData(this.scheduleData).then(({data}) => { getScheduleShiftData(this.scheduleData).then(({data}) => {
this.pageData.shiftDesc = data.row.shiftDesc;
this.pageData.shiftDesc = data.row.shiftDesc;//
this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//
}); });
}).then(() => { }).then(() => {
//4. //4.
@ -621,7 +653,8 @@ export default {
// //
refreshScheduleShiftData(){ refreshScheduleShiftData(){
getScheduleShiftData(this.scheduleData).then(({data}) => { getScheduleShiftData(this.scheduleData).then(({data}) => {
this.pageData.shiftDesc = data.row.shiftDesc;
this.pageData.shiftDesc = data.row.shiftDesc;//
this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//
}); });
}, },
@ -707,7 +740,7 @@ export default {
}, },
/*结束当前的操作*/ /*结束当前的操作*/
finishRollOperation(){
finishRollBun(){
// //
let approvedQty = this.pageData.approvedQty; let approvedQty = this.pageData.approvedQty;
if(approvedQty == null || approvedQty == ''){ if(approvedQty == null || approvedQty == ''){
@ -725,9 +758,29 @@ export default {
this.$message.error('该时间段内没有匹配的班次信息,请联系相关人员!!'); this.$message.error('该时间段内没有匹配的班次信息,请联系相关人员!!');
return false; return false;
} }
// //
let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)}; let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)};
finishRoll(postData).then(({data}) => {
//
checkFinishRollWithNoFqc(postData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else if (data.resultMap.resultCode == '201'){
//
}else{
//
}
});
},
/*结束卷的具体操作*/
finishRollOperation(){
//
finishRollWithNoFqc(postData).then(({data}) => {
this.$message.error('qty_reported找不到!'); this.$message.error('qty_reported找不到!');
// //
if(data.code == 500){ if(data.code == 500){
@ -741,14 +794,14 @@ export default {
}) })
}, },
/*处理异常的原因*/
initExceptionReason(exceptionReason){
//
this.pageData.exceptionFlag = 'Y';
this.pageData.exceptionReason = exceptionReason;
//
this.finishRollOperation();
}
}, },
created() { created() {
// this.factoryList() // this.factoryList()

1
src/views/modules/yieldReport/com_produce_material.vue

@ -202,6 +202,7 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.msg);
// //
this.pageData.rmRollNo = ''; this.pageData.rmRollNo = '';
this.pageData.bomItemNo = -1; this.pageData.bomItemNo = -1;

Loading…
Cancel
Save