Commit e494064b authored by Marcus's avatar Marcus

1.选择品名后,没有带出特性

https://zentao.test.jdshangmen.com/bug-view-5099.html
parent a4544577
......@@ -7,7 +7,7 @@
<el-row :gutter="10">
<el-col :span="12">
<el-form-item :label="$t('中文品名')">
<product-selector v-model="value.prodId" @change="onProductChange" determined protect-once :disabled="readonly" />
<product-selector v-model="value.prodId" @change="onProductChange" determined :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -147,9 +147,10 @@ export default {
this.getProductBrandPage()
}
if (typeof this.value.prodAttrIds === 'string') {
this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e) || []
if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) {
this.prodAttrIds.push(...this.value.prodAttrIds.split(',').map(e => +e))
}
console.log(this.prodAttrIds)
if (this.value.usageIds) {
await this.$nextTick()
......@@ -182,7 +183,7 @@ export default {
this.$emit('handle-delete')
},
onProductChange(product){
if (!product) {
if (!product || this.readonly) {
return
}
this.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
......
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