Browse Source

Merge remote-tracking branch 'origin/master'

master
qiezi 1 year ago
parent
commit
5fa5bee585
  1. 77
      src/views/modules/Abnormal/AbnormalFeedBack.vue
  2. 68
      src/views/modules/production/generateReport.vue

77
src/views/modules/Abnormal/AbnormalFeedBack.vue

@ -153,6 +153,20 @@
width="100"
label="异常原因">
</el-table-column>
<el-table-column
prop="abnormalQty"
header-align="center"
align="right"
width="100"
label="异常数量">
</el-table-column>
<el-table-column
prop="abnormalInfluence"
header-align="center"
align="left"
width="120"
label="异常情况影响分析">
</el-table-column>
<el-table-column
prop="abnormalRemark"
header-align="center"
@ -164,7 +178,7 @@
fixed="right"
header-align="center"
align="center"
width="250"
width="300"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="getDetailModel(scope.row)">查看</a>
@ -202,12 +216,30 @@
<el-input v-model="addData.shiftNo" disabled style="width: 100px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
<el-form-item :label="'异常数量:'">
<el-input v-model="addData.abnormalQty" type="number" style="width: 85px"></el-input>
</el-form-item>
<el-form-item :label="'异常情况影响分析:'">
<el-input v-model="addData.abnormalInfluence" style="width: 463px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
<el-form-item label="异常情况描述(派工单0:表示混炼胶异常反馈;派工单-1:表示产品发货异常反馈)">
<el-input v-model="addData.abnormalRemark" type="textarea" :rows="3" resize='none' style="width: 562px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:30px;margin-top: 50px;text-align:center">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 50px;">
<el-upload drag :file-list="fileList"
action="javascript:void(0);" ref="uploadFile"
:on-change="onChange"
multiple :auto-upload="false"
style="text-align: left;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-form>
<el-footer style="height:30px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveAbnormalData()" >保存</el-button>
<el-button type="primary" @click="addModalFlag = false">取消</el-button>
</el-footer>
@ -227,6 +259,11 @@
<el-input v-model="abnormalFeedBackData.treatmentTemporary" type="textarea" :disabled="disableFlag2" :rows="3" resize='none' style="width: 562px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 40px;">
<el-form-item label="临时性措施结论">
<el-input v-model="abnormalFeedBackData.temporaryConclusion" type="textarea" :disabled="disableFlag2" :rows="3" resize='none' style="width: 562px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 40px;">
<span style="font-size: 12px">工艺变更记录:</span>
</el-form>
@ -252,6 +289,9 @@
<el-form-item label="长久处理方式" style="margin-top: 40px;">
<el-input v-model="abnormalFeedBackData.treatment" type="textarea" :disabled="disableFlag3" :rows="3" resize='none' style="width: 562px"></el-input>
</el-form-item>
<el-form-item label="效果验证结论" style="margin-top: 40px;">
<el-input v-model="abnormalFeedBackData.permanentConclusion" type="textarea" :disabled="disableFlag3" :rows="3" resize='none' style="width: 562px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 40px;">
<span style="font-size: 12px">工艺变更记录:</span>
@ -302,7 +342,8 @@
name: 'AbnormalFeedBack',
data () {
return {
folder: 'abnormal',
fileList: [],
searchData:{
userId:this.$store.state.user.name,
startDate:'',
@ -327,8 +368,11 @@
"反馈人": "feedbackBy",
"状态": "status",
"异常原因": "abnormalDesc",
"异常数量": "abnormalQty",
"异常情况影响分析": "abnormalInfluence",
"异常描述": "abnormalRemark",
"紧急处理方式": "treatmentTemporary",
"临时性措施结论": "temporaryConclusion",
"温度": "temperatureTemporary",
"压力": "pressureTemporary",
"时间": "timeTemporary",
@ -341,6 +385,7 @@
"工装": "workClothesTemporary",
"根本原因分析": "rootCause",
"长久处理方式": "treatment",
"效果验证结论": "permanentConclusion",
"温度 ": "temperature",
"压力 ": "pressure",
"时间 ": "time",
@ -370,6 +415,8 @@
feedbackBy:this.$store.state.user.name,
abnormalCode:'',
abnormalRemark:'',
abnormalInfluence:'',
abnormalQty:'',
},
addModalFlag:false,
@ -400,6 +447,10 @@
this.tableData = data.rows;
})
},
/*选择上传文件时*/
onChange(file,fileList){
this.fileList = fileList;
},
addAbnormal(){
this.addData.seqNo='',
this.addData.shiftNo='',
@ -454,8 +505,26 @@
})
return false;
}
saveAbnormalData(this.addData).then(({data}) => {
const formData = new FormData();
//
for (let i = 0; i < this.fileList.length; i++) {
formData.append("file",this.fileList[i].raw)
}
formData.append("folder", this.folder);
formData.append("site", this.addData.site);
formData.append("seqNo", this.addData.seqNo);
formData.append("orderNo", this.addData.orderNo);
formData.append("shiftNo", this.addData.shiftNo);
formData.append("resourceDesc", this.addData.resourceDesc);
formData.append("feedbackBy", this.addData.feedbackBy);
formData.append("abnormalCode", this.addData.abnormalCode);
formData.append("abnormalRemark", this.addData.abnormalRemark);
formData.append("abnormalInfluence", this.addData.abnormalInfluence);
formData.append("abnormalQty", this.addData.abnormalQty);
saveAbnormalData(formData).then(({data}) => {
if (data && data.code === 0) {
this.$refs.uploadFile.clearFiles();
this.fileList = [];
this.addModalFlag=false
this.search()
this.$message({

68
src/views/modules/production/generateReport.vue

@ -333,17 +333,7 @@
<el-button type="primary" @click="startModalFlag = false">取消</el-button>
</el-footer>
</el-dialog>
<!-- <el-dialog title="派工单暂停" :close-on-click-modal="false" v-drag :visible.sync="stopModalFlag" width="215px">-->
<!-- <el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>-->
<!-- <el-form-item :label="'派工单号:'">-->
<!-- <el-input v-model="scanSeqNo" ref="stop" type="number" style="width: 130px;" @keyup.enter.native="stopWork()"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">-->
<!-- <el-button type="primary" @click="stopWork()">开始</el-button>-->
<!-- <el-button type="primary" @click="stopModalFlag = false">关闭</el-button>-->
<!-- </el-footer>-->
<!-- </el-dialog>-->
<el-dialog title="派工单暂停" :close-on-click-modal="false" v-drag :visible.sync="stopModalFlag" width="620px" >
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="'派工单号:'">
@ -370,12 +360,30 @@
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
<el-form-item :label="'异常数量:'">
<el-input v-model="stopData.abnormalQty" type="number" style="width: 85px"></el-input>
</el-form-item>
<el-form-item :label="'异常情况影响分析:'">
<el-input v-model="stopData.abnormalInfluence" style="width: 463px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
<el-form-item label="异常情况描述">
<el-input v-model="stopData.abnormalRemark" type="textarea" :rows="3" resize='none' style="width: 562px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:30px;margin-top: 50px;text-align:center">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 50px;">
<el-upload drag :file-list="fileList"
action="javascript:void(0);" ref="uploadFile"
:on-change="onChange"
multiple :auto-upload="false"
style="text-align: left;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-form>
<el-footer style="height:30px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="stopWork()" >保存</el-button>
<el-button type="primary" @click="stopModalFlag = false">取消</el-button>
</el-footer>
@ -635,6 +643,15 @@
},
data () {
return {
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
projectId: '',
projectName: '',
fileType: '',
},
folder: 'abnormal',
fileList: [],
toolHistList:[],//
cavity:'',
setUp: {
@ -780,6 +797,8 @@
feedbackBy:this.$store.state.user.name,
abnormalCode:'',
abnormalRemark:'',
abnormalInfluence:'',
abnormalQty:'',
},
}
},
@ -1400,13 +1419,31 @@
})
return false;
}
const formData = new FormData();
//
for (let i = 0; i < this.fileList.length; i++) {
formData.append("file",this.fileList[i].raw)
}
formData.append("folder", this.folder);
formData.append("site", this.stopData.site);
formData.append("seqNo", this.stopData.seqNo);
formData.append("orderNo", this.stopData.orderNo);
formData.append("resourceDesc", this.stopData.resourceDesc);
formData.append("feedbackBy", this.stopData.feedbackBy);
formData.append("abnormalCode", this.stopData.abnormalCode);
formData.append("abnormalRemark", this.stopData.abnormalRemark);
formData.append("abnormalInfluence", this.stopData.abnormalInfluence);
formData.append("abnormalQty", this.stopData.abnormalQty);
// let inData={
// username:this.$store.state.user.name,
// seqNo:this.scanSeqNo
// }
stopWork(this.stopData).then(({data}) => {
stopWork(formData).then(({data}) => {
if (data && data.code === 0) {
this.stopModalFlag=false;
this.$refs.uploadFile.clearFiles();
this.fileList = [];
this.$message({
message: '派工单已暂停',
type: 'success',
@ -1456,6 +1493,11 @@
this.badCodeList = data.rows;
})
},
/*选择上传文件时*/
onChange(file,fileList){
this.fileList = fileList;
},
},
created () {
this.getBadCodeList();

Loading…
Cancel
Save