Commit ae2791ab authored by jingnan's avatar jingnan 👀

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

parent 8ca2d36b
<template> <template>
<div> <div>
<el-select <el-select
v-if="['certificateNo','modelNo'].includes(itemObj.attrKey)" v-if="['certificateNo','modelNo','certificateNum'].includes(itemObj.attrKey)"
v-model="form[itemObj.attrKey]" v-model="form[itemObj.attrKey]"
filterable filterable
remote remote
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
:value="item.value" :value="item.value"
:disabled="item.disabled" :disabled="item.disabled"
> >
<div v-if="itemObj.attrKey==='certificateNo'"> <div v-if="itemObj.attrKey==='certificateNo'||itemObj.attrKey==='certificateNum'">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<span>{{ item.lotNo?' / ':'' }}</span> <span>{{ item.lotNo?' / ':'' }}</span>
<span>{{ item.lotNo || '' }}</span> <span>{{ item.lotNo || '' }}</span>
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
// 生命周期 - 挂载完成(可以访问 DOM 元素) // 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted() { mounted() {
this.com = this.findByNameVnode(this, 'DeeAsForm') this.com = this.findByNameVnode(this, 'DeeAsForm')
if (this.itemObj.attrKey === 'certificateNo') { if (this.itemObj.attrKey === 'certificateNo' || this.itemObj.attrKey === 'certificateNum') {
// //
} else { } else {
if (this.basicData.setAttrs) { if (this.basicData.setAttrs) {
...@@ -293,6 +293,9 @@ export default { ...@@ -293,6 +293,9 @@ export default {
if (this.itemObj.attrKey === 'certificateNo') { if (this.itemObj.attrKey === 'certificateNo') {
const obj = this.form.inventory.find(item => item.testNo === value) const obj = this.form.inventory.find(item => item.testNo === value)
this.$set(this.form, 'lotNo', obj.lotNo) 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 { } else {
this.$set(this.form, this.itemObj.attrKey, value) this.$set(this.form, this.itemObj.attrKey, value)
this.changeRequest() this.changeRequest()
...@@ -417,8 +420,8 @@ export default { ...@@ -417,8 +420,8 @@ export default {
if (query && query.length >= 2) { if (query && query.length >= 2) {
this.time = setTimeout(() => { this.time = setTimeout(() => {
this.loading = true this.loading = true
if (this.itemObj.attrKey === 'certificateNo') { if (this.itemObj.attrKey === 'certificateNo' || this.itemObj.attrKey === 'certificateNum') {
this.getCertificateNo(query) this.getCertificateNo(query, this.itemObj.attrKey)
} else { } else {
this.getModelNo(query) this.getModelNo(query)
} }
...@@ -456,7 +459,7 @@ export default { ...@@ -456,7 +459,7 @@ export default {
} }
}) })
}, },
getCertificateNo(query) { getCertificateNo(query, attrKey) {
const params = { const params = {
'pageFrom': 1, 'pageFrom': 1,
'pageSize': 20, 'pageSize': 20,
...@@ -485,7 +488,7 @@ export default { ...@@ -485,7 +488,7 @@ export default {
disabled 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