Commit e9da982d authored by jingnan's avatar jingnan 👀

阿洛丁牌号带出并下拉

parent 19703862
<template>
<div>
<el-select
v-if="['certificateNo','modelNo','certificateNum'].includes(itemObj.attrKey)"
v-if="['certificateNo','modelNo','certificateNum','baseModelNo'].includes(itemObj.attrKey)"
v-model="form[itemObj.attrKey]"
filterable
remote
......@@ -76,7 +76,8 @@ export default {
typeEnum: {
AssignCardPaint: 'ShellacCardPaint',
AssignCardLacquer: 'ShellacCardLacquer',
AssignCardItem: 'ShellacCardLacquer'
AssignCardItem: 'ShellacCardLacquer',
AssignCardAlodine: 'ShellacCardAlodine'
},
subTypeName: ''
}
......@@ -108,7 +109,18 @@ export default {
return this.subTypeName
}
},
watch: {},
watch: {
'form.assignCardDetails': {
immediate: true,
deep: true,
handler(val) {
if (!this.disabled) {
this.setFormDataAttr('baseModelNo', 'disabled', !!(val && val.length))
this.setFormDataAttr('modelNo', 'disabled', !!(val && val.length))
}
}
}
},
// 生命周期 - 创建完成(可以访问当前this 实例)
created() {
},
......@@ -126,6 +138,9 @@ export default {
Object.keys(this.basicData.setAttrs).forEach(key => {
this.$set(this.form, key, this.basicData.setAttrs[key])
})
if (this.itemObj.attrKey === 'baseModelNo') {
this.$set(this.form, 'baseModelNo', this.basicData.setAttrs['modelNo'])
}
}
if (this.basicData.setAttrs) {
this.initFn()
......@@ -168,6 +183,26 @@ export default {
]
this.setOptions('modelNo', params)
}
if (this.itemObj.attrKey === 'baseModelNo') {
params = [
{
'fieldName': 'modelNo',
'operator': 'LIKE',
'value': this.form.baseModelNo || ''
},
{
'fieldName': 'isValid',
'operator': 'EQ',
'value': '是'
},
{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': this.typeEnum[this.subTypeName]
}
]
this.setOptions('baseModelNo', params)
}
if (this.itemObj.attrKey === 'spec') {
if (this.form.modelNo) {
params = [
......@@ -256,6 +291,26 @@ export default {
]
this.setOptions('modelNo', params)
}
if (this.itemObj.attrKey === 'baseModelNo') {
const params = [
{
'fieldName': 'modelNo',
'operator': 'LIKE',
'value': ''
},
{
'fieldName': 'isValid',
'operator': 'EQ',
'value': '是'
},
{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': this.typeEnum[this.subTypeName]
}
]
this.setOptions('baseModelNo', params)
}
if (this.itemObj.attrKey === 'spec' && this.basicData.modelNo) {
const params = [
{
......@@ -363,6 +418,8 @@ export default {
} else if (this.itemObj.attrKey === 'certificateNum') {
const obj = this.form.inventory.find(item => item.testNo === value)
this.$set(this.form, 'diluentLotNo', obj.lotNo)
} else if (this.itemObj.attrKey === 'baseModelNo') {
this.$set(this.form, 'certificateNo', '')
} else {
this.$set(this.form, this.itemObj.attrKey, value)
this.changeRequest()
......
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