Преглед изворни кода

解决编辑产品类别和编辑产品是的参数问题

zhuliu пре 1 година
родитељ
комит
8997c10830

+ 2 - 0
src/views/pms/product/components/ProductInfoDetail.vue

@@ -222,6 +222,8 @@
         this.value.fileGuids = guids
         if(this.selectProductCateValue && this.selectProductCateValue.length>0){
           this.value.productCategoryId = this.selectProductCateValue[this.selectProductCateValue.length-1]
+        }else{
+          this.value.productCategoryId = null
         }
         console.log(this.selectProductCateValue)
         this.$refs[formName].validate((valid) => {

+ 2 - 0
src/views/pms/productCate/components/ProductCateDetail.vue

@@ -189,6 +189,8 @@
         this.productCate.fileGuids = guids
         if(this.parentId && this.parentId.length>0){
           this.productCate.parentId = this.parentId[this.parentId.length-1]
+        }else{
+          this.productCate.parentId = null
         }
         this.$refs[formName].validate((valid) => {
           if (valid) {