|
|
@ -1,7 +1,17 @@ |
|
|
|
<template> |
|
|
|
<div class="defectdata-container" v-loading="loading"> |
|
|
|
<permiss-login @getLoginMessage="getLoginMessage" :isShowRepair="isShowRepair" /> |
|
|
|
<div class="up" v-show="isLoginVisible"> |
|
|
|
<div style="height: 50px;"> |
|
|
|
<span>工位:</span> |
|
|
|
<el-select v-model="WorkPlaceNr" filterable placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in stationArray" |
|
|
|
:key="item['WorkPlace-WorkPlaceNr']" |
|
|
|
:label="item['WorkPlace-Descr']" |
|
|
|
:value="item['WorkPlace-WorkPlaceNr']" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="up"> |
|
|
|
<div class="up-left"> |
|
|
|
<div class="up-left-up"> |
|
|
|
<div class="title"> |
|
|
@ -89,7 +99,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="down" v-show="isLoginVisible"> |
|
|
|
<div class="down"> |
|
|
|
<div class="down-left"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="24"> |
|
|
@ -141,6 +151,7 @@ |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import * as api from '@/api/quality/defectdata.js' |
|
|
|
import { getWorkplaceList } from '@/api/system/station' |
|
|
|
import { codeparser } from '@/api/quality/pkg.js' |
|
|
|
import permissLogin from './component/login' |
|
|
|
export default { |
|
|
@ -167,22 +178,21 @@ export default { |
|
|
|
viewBlock: {}, |
|
|
|
errorPoints: [], |
|
|
|
loading: false, |
|
|
|
isLoginVisible: false, // 是否登录 |
|
|
|
isShowRepair: false, // 是否显示返修按钮 |
|
|
|
form:{} |
|
|
|
form:{}, |
|
|
|
SerialorderId: '', |
|
|
|
stationArray: [], // 工位 |
|
|
|
WorkPlaceNr: '', |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.codeparser() |
|
|
|
getWorkplaceList(this.queryParams).then(({code, data = []}) => { |
|
|
|
if (code === 200) { |
|
|
|
this.stationArray = data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getLoginMessage({form, actPosItem, isLoginSuccess}) { |
|
|
|
this.form={ |
|
|
|
...form, |
|
|
|
actPosItem:actPosItem |
|
|
|
}; |
|
|
|
this.isLoginVisible = isLoginSuccess |
|
|
|
}, |
|
|
|
getViewsofarticle() { |
|
|
|
api.getViewsofarticle([this.code]).then((res) => { |
|
|
|
this.seeImgs = res.data |
|
|
@ -325,10 +335,14 @@ export default { |
|
|
|
}, |
|
|
|
//提交错误 |
|
|
|
submitError() { |
|
|
|
if (!this.WorkPlaceNr) { |
|
|
|
this.msgError("请先选择工位") |
|
|
|
return |
|
|
|
} |
|
|
|
api.insertDefectrecord({ |
|
|
|
"QM_SerialOrderRuting-PlantNr": this.form['Person-PlantNr'], |
|
|
|
"QM_SerialOrderRuting-SerialorderId": this.form.SerialorderId, |
|
|
|
"QM_SerialOrderRuting-WorkPlaceNr": this.form.actPosItem, |
|
|
|
// "QM_SerialOrderRuting-PlantNr": this.form['Person-PlantNr'], |
|
|
|
"QM_SerialOrderRuting-SerialorderId": this.SerialorderId, |
|
|
|
"QM_SerialOrderRuting-WorkPlaceNr": this.WorkPlaceNr, |
|
|
|
'QM_SerialOrderRuting-DefectRecord':this.errorList |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
@ -362,7 +376,12 @@ export default { |
|
|
|
// 扫码回车提交 |
|
|
|
enterPress(e) { |
|
|
|
let code = e.target.value.trim(); |
|
|
|
this.form.SerialorderId=code; |
|
|
|
if (code === 'one') { |
|
|
|
this.$emit('handleActiveNameTwo', code) |
|
|
|
this.code = '' |
|
|
|
return |
|
|
|
} |
|
|
|
this.SerialorderId = code |
|
|
|
let ruleCode = this.codeRules.filter( |
|
|
|
(code) => code['CodeParser-ParserId'] == 'PackOrder' |
|
|
|
)[0] |
|
|
@ -430,12 +449,11 @@ export default { |
|
|
|
<style lang="scss" scoped> |
|
|
|
.defectdata-container { |
|
|
|
width: 100%; |
|
|
|
height: calc(100vh - 80px); |
|
|
|
height: calc(100vh - 135px); |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
padding: 16px; |
|
|
|
padding: 10px; |
|
|
|
box-sizing: border-box; |
|
|
|
margin-top: 29px; |
|
|
|
background: #f5f7fc; |
|
|
|
.title { |
|
|
|
width: calc(100% - 48px); |
|
|
@ -466,7 +484,7 @@ export default { |
|
|
|
} |
|
|
|
.up { |
|
|
|
width: 100%; |
|
|
|
height: calc(100% - 16px - 100px - 80px); |
|
|
|
height: calc(100% - 16px - 80px); |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
margin-bottom: 16px; |
|
|
@ -572,16 +590,11 @@ export default { |
|
|
|
width: 100%; |
|
|
|
height: calc(100% - 56px); |
|
|
|
background: #f5f7fc; |
|
|
|
// padding: 24px; |
|
|
|
box-sizing: border-box; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
position: relative; |
|
|
|
// img { |
|
|
|
// width: 600px; |
|
|
|
// height: 400px; |
|
|
|
// } |
|
|
|
.coord-circle { |
|
|
|
position: absolute; |
|
|
|
z-index: 1; |
|
|
@ -598,11 +611,8 @@ export default { |
|
|
|
height: 100px; |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
// padding: 16px 24px; |
|
|
|
// box-sizing: border-box; |
|
|
|
.down-left, |
|
|
|
.down-right { |
|
|
|
// width: calc((100% - 16px) / 2); |
|
|
|
height: 100%; |
|
|
|
background: #fff; |
|
|
|
padding: 16px; |
|
|
|