Commit c8069a15 authored by dragondean@qq.com's avatar dragondean@qq.com

修复留空的箱明细从订单商品选择后用途和材料异常

parent 8c4e7b00
......@@ -153,16 +153,14 @@ export default {
}
if(this.value.material){
this.material = this.value.material
this.$set(this, 'material', this.value.material)
}
if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) {
this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e)
}
console.log(this.prodAttrIds)
if (this.value.usageIds) {
await this.$nextTick()
this.usageIds = this.value.usageIds.split(',') || []
}
......@@ -253,7 +251,16 @@ export default {
getProductBrank(val).then(res => {
this.brandList.push(res.data)
})
},
"value.usageIds"(val) {
this.usageIds = val?.split(',') || []
if (this.usageIds.length > 0 && this.usageIds[0] === ''){
this.usageIds.splice(0, 1)
}
},
"value.material"(val) {
this.material = val
},
}
}
</script>
......
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