Commit ae2791ab authored by jingnan's avatar jingnan 👀

加入阿洛丁合格证编号逻辑

parent 8ca2d36b
<template>
<div>
<el-select
v-if="['certificateNo','modelNo'].includes(itemObj.attrKey)"
v-if="['certificateNo','modelNo','certificateNum'].includes(itemObj.attrKey)"
v-model="form[itemObj.attrKey]"
filterable
remote
......@@ -18,7 +18,7 @@
:value="item.value"
:disabled="item.disabled"
>
<div v-if="itemObj.attrKey==='certificateNo'">
<div v-if="itemObj.attrKey==='certificateNo'||itemObj.attrKey==='certificateNum'">
<span>{{ item.label }}</span>
<span>{{ item.lotNo?' / ':'' }}</span>
<span>{{ item.lotNo || '' }}</span>
......@@ -110,7 +110,7 @@ export default {
// 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted() {
this.com = this.findByNameVnode(this, 'DeeAsForm')
if (this.itemObj.attrKey === 'certificateNo') {
if (this.itemObj.attrKey === 'certificateNo' || this.itemObj.attrKey === 'certificateNum') {
//
} else {
if (this.basicData.setAttrs) {
......@@ -293,6 +293,9 @@ export default {
if (this.itemObj.attrKey === 'certificateNo') {
const obj = this.form.inventory.find(item => item.testNo === value)
this.$set(this.form, 'lotNo', obj.lotNo)
} else if (this.itemObj.attrKey === 'certificateNum') {
const obj = this.form.inventory.find(item => item.testNo === value)
this.$set(this.form, 'diluentLotNo', obj.lotNo)
} else {
this.$set(this.form, this.itemObj.attrKey, value)
this.changeRequest()
......@@ -417,8 +420,8 @@ export default {
if (query && query.length >= 2) {
this.time = setTimeout(() => {
this.loading = true
if (this.itemObj.attrKey === 'certificateNo') {
this.getCertificateNo(query)
if (this.itemObj.attrKey === 'certificateNo' || this.itemObj.attrKey === 'certificateNum') {
this.getCertificateNo(query, this.itemObj.attrKey)
} else {
this.getModelNo(query)
}
......@@ -456,7 +459,7 @@ export default {
}
})
},
getCertificateNo(query) {
getCertificateNo(query, attrKey) {
const params = {
'pageFrom': 1,
'pageSize': 20,
......@@ -485,7 +488,7 @@ export default {
disabled
}
})
this.setFormDataAttr('certificateNo', 'options', this.requestOp)
this.setFormDataAttr(attrKey, 'options', this.requestOp)
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment