|
|
|
@ -9,17 +9,18 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'不良代码:'"> |
|
|
|
<el-input v-model="scheduleData.seqNo" style="width: 120px"></el-input> |
|
|
|
<el-input ref="defectCode" v-model="pageData.defectCode" |
|
|
|
style="width: 120px" @keyup.enter.native="getDefectDesc" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'不良数量:'"> |
|
|
|
<el-input v-model="scheduleData.seqNo" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="pageData.defectQty" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'检验日期:'"> |
|
|
|
<el-date-picker v-model="scheduleData.reportDate" |
|
|
|
<el-date-picker v-model="pageData.reportDate" |
|
|
|
style="width: 120px" format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
</el-date-picker> |
|
|
|
@ -29,7 +30,7 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item :label="'不良原因:'"> |
|
|
|
<el-input v-model="scheduleData.seqNo" style="width: 495px"></el-input> |
|
|
|
<el-input readonly v-model="pageData.defectDesc" style="width: 495px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -50,8 +51,8 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item style="margin-top: 15px;"> |
|
|
|
<el-button type="primary" |
|
|
|
style="margin-left: -10px; margin-bottom: 5px;"> |
|
|
|
<el-button type="primary" style="margin-left: -10px; margin-bottom: 5px;" |
|
|
|
@click="reportDefectFun"> |
|
|
|
插入</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -74,7 +75,7 @@ |
|
|
|
<el-container> |
|
|
|
<fieldset class="customer-fieldset" style="margin-top: -35px; margin-bottom: 15px;"> |
|
|
|
<legend>不良记录</legend> |
|
|
|
<el-container style="width: 580px;"> |
|
|
|
<el-container style="width: 580px;" class="customer-tab"> |
|
|
|
<el-table |
|
|
|
height="250" |
|
|
|
:data="sfdcDefectList" |
|
|
|
@ -109,35 +110,53 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getScheduleDefectHist, |
|
|
|
checkDefectCode, |
|
|
|
reportDefectCode, |
|
|
|
} |
|
|
|
from '@/api/yieldReport/com_defect_roll.js'; |
|
|
|
export default { |
|
|
|
name: "com_defect_roll", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
titleCon: '报告不良', |
|
|
|
sfdcTimeList: [], |
|
|
|
scheduleData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
seqNo: '', |
|
|
|
orderNo: '', |
|
|
|
itemNo: 0, |
|
|
|
partNo: '', |
|
|
|
workCenterNo: '', |
|
|
|
workCenterDesc: '', |
|
|
|
resourceDesc: '', |
|
|
|
rollNo: '', |
|
|
|
partDesc: '', |
|
|
|
reportDate: this.dayjs(new Date()).format('YYYY-MM-DD'), |
|
|
|
reportedFlag: 'N', |
|
|
|
planStartTime: '', |
|
|
|
planFinishTime: '', |
|
|
|
qtyRequiredOriginal: 0, |
|
|
|
scheduledDate: '', |
|
|
|
shiftNo: '', |
|
|
|
preItemDesc: '', |
|
|
|
nextItemDesc: '', |
|
|
|
nextItemNo: 0, |
|
|
|
operatorId: '', |
|
|
|
functionName: '', |
|
|
|
currentRollFlag: false |
|
|
|
}, |
|
|
|
currentRollOps: { |
|
|
|
pageData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
orderNo: '', |
|
|
|
itemNo: '', |
|
|
|
seqNo: '', |
|
|
|
rollNo: '', |
|
|
|
finishedFlag: '', |
|
|
|
operatorId: '', |
|
|
|
reportDate: this.dayjs(new Date()).format('YYYY-MM-DD'), |
|
|
|
defectCode: '', |
|
|
|
defectDesc: '', |
|
|
|
defectQty: 0, |
|
|
|
}, |
|
|
|
operatorData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
@ -277,29 +296,79 @@ export default { |
|
|
|
fixed: false |
|
|
|
} |
|
|
|
], |
|
|
|
buttonTags:{ |
|
|
|
createRollFlag: true, |
|
|
|
switchRollFlag: true, |
|
|
|
separatorRollFlag: true, |
|
|
|
finishRollFlag: true, |
|
|
|
mergeRollFlag: true, |
|
|
|
tuningFlag: true, |
|
|
|
produceFlag: true, |
|
|
|
defectFlag: true, |
|
|
|
toolFlag: true, |
|
|
|
materialFlag: true, |
|
|
|
downTimeFlag: true |
|
|
|
}, |
|
|
|
dataListLoading: false, |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
//初始化组件的参数 |
|
|
|
init(scheduleData, operatorData) { |
|
|
|
//初始化参数 |
|
|
|
this.scheduleData = scheduleData; |
|
|
|
//初始化操作员对象 |
|
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|
|
|
//设置参数 |
|
|
|
this.pageData.orderNo = scheduleData.orderNo; |
|
|
|
this.pageData.itemNo = scheduleData.itemNo; |
|
|
|
this.pageData.seqNo = scheduleData.seqNo; |
|
|
|
this.pageData.rollNo = scheduleData.rollNo; |
|
|
|
this.pageData.operatorId = operatorData.operatorId; |
|
|
|
//清空数据 |
|
|
|
this.pageData.defectQty = 0; |
|
|
|
this.pageData.defectCode = ''; |
|
|
|
this.pageData.defectDesc = ''; |
|
|
|
//自动获取焦点 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.defectCode.focus(); |
|
|
|
}); |
|
|
|
//刷新当前不良记录列表 |
|
|
|
this.refreshPageTable(); |
|
|
|
}, |
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
|
closeDialog(){ |
|
|
|
this.$emit('update:visible', false); |
|
|
|
}, |
|
|
|
|
|
|
|
/*刷新页面的table数据*/ |
|
|
|
refreshPageTable(){ |
|
|
|
getScheduleDefectHist(this.pageData).then(({data}) => { |
|
|
|
this.sfdcDefectList = data.rows; |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*检查不良代码*/ |
|
|
|
getDefectDesc(){ |
|
|
|
if(this.pageData.defectCode == null || this.pageData.defectCode == ''){ |
|
|
|
this.$message.error('请扫描不良代码!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
checkDefectCode(this.pageData).then(({data}) => { |
|
|
|
//判断是否存在异常 |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
let resultMap = data.resultMap; |
|
|
|
this.pageData.defectDesc = resultMap.defectDesc; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/*报告不良代码*/ |
|
|
|
reportDefectFun(){ |
|
|
|
reportDefectCode(this.pageData).then(({data}) => { |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
//清空信息二次报告 |
|
|
|
this.pageData.defectQty = 0; |
|
|
|
this.pageData.defectCode = ''; |
|
|
|
this.pageData.defectDesc = ''; |
|
|
|
//刷新列表 |
|
|
|
this.refreshPageTable(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -310,16 +379,6 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
init(seqNo, operatorData) { |
|
|
|
//初始化参数 |
|
|
|
this.scheduleData.seqNo = seqNo; |
|
|
|
//初始化操作员对象 |
|
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|
|
|
// this.currentRollOps.seqNo = seqNo; |
|
|
|
// this.currentRollOps.rollNo = rollNo; |
|
|
|
//刷新当前派工单的信息 |
|
|
|
//this.refreshPageData(); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
|