瀏覽代碼

fix: 采购需求/计划从bom选择物品,分类产品Id错误问题

liujt 6 天之前
父節點
當前提交
cc39e45018

+ 2 - 1
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -886,6 +886,7 @@
         this.$refs.cBomRef.open(this.form.datasource, index);
       },
       getSelectionCbom(obj, idx = -1) {
+        console.log(obj, 'obj~~~');
         obj.forEach((item, index) => {
           let i = idx == -1 ? index : idx;
           let row = JSON.parse(JSON.stringify(this.defaultForm));
@@ -894,7 +895,7 @@
           this.$set(parasm, 'productId', item.categoryId);
           // this.$set(parasm, 'id', item.id);
           this.$set(parasm, 'categoryName', item.name);
-          this.$set(parasm, 'productCategoryId', item.categoryLevelId);
+          this.$set(parasm, 'productCategoryId', item.category.categoryLevelId);
           this.$set(parasm, 'productBrand', item.brandNum);
           this.$set(
             parasm,

+ 1 - 1
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -1105,7 +1105,7 @@
           this.$set(parasm, 'productId', item.categoryId);
           // this.$set(parasm, 'id', item.id);
           this.$set(parasm, 'categoryName', item.name);
-          this.$set(parasm, 'productCategoryId', item.categoryLevelId);
+          this.$set(parasm, 'productCategoryId', item.category.categoryLevelId);
           this.$set(parasm, 'productBrand', item.brandNum);
           this.$set(
             parasm,