|
|
@ -28,6 +28,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { bidetReclinerQuery, submitBidetRepair } from '@/api/quality/defectdata' |
|
|
|
export default { |
|
|
|
name: 'bidetRepair', |
|
|
|
props: { |
|
|
@ -42,19 +43,52 @@ export default { |
|
|
|
repairCode: '', |
|
|
|
repairCodeEcho: '', |
|
|
|
productCodeEcho: '', |
|
|
|
echoInfo: {}, // 回显的信息 |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 关闭返修弹框 |
|
|
|
closeRepair() { |
|
|
|
this.bidetVisible = false |
|
|
|
this.echoInfo = null |
|
|
|
this.$emit('bidetHandle', this.bidetVisible) |
|
|
|
}, |
|
|
|
// 产品条码回车出发按钮 |
|
|
|
enterRepairPress() { |
|
|
|
|
|
|
|
bidetReclinerQuery(this.repairCode).then((res) => { |
|
|
|
if (res.code === 200) { |
|
|
|
this.repairCodeEcho = res.data['QM_ReclinerReclst-ReclinerNr'] |
|
|
|
this.productCodeEcho = res.data['QM_ReclinerReclst-SerialOrderId'] |
|
|
|
this.echoInfo = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
this.repairCode = '' |
|
|
|
this.$refs.codeFocus.focus() |
|
|
|
}, |
|
|
|
// 点击产品--完成按钮 |
|
|
|
confirmRepair() { |
|
|
|
|
|
|
|
if (!this.repairCodeEcho) { |
|
|
|
this.msgInfo('请先输入产品条码查询相关信息') |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm('确认进行完成操作吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
}).then(() => { |
|
|
|
let params = { |
|
|
|
"QM_ReclinerReclst-PlantNr": 100, |
|
|
|
"QM_ReclinerReclst-SerialOrderId": this.echoInfo['QM_ReclinerReclst-SerialOrderId'], |
|
|
|
} |
|
|
|
submitBidetRepair(params).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.msgSuccess('提交成功!') |
|
|
|
} else { |
|
|
|
this.msgError(res.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.$refs.codeFocus.focus() |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|