linwenxin преди 9 месеца
родител
ревизия
b90a5f3a42
променени са 1 файла, в които са добавени 6 реда и са изтрити 7 реда
  1. 6 7
      src/views/auxiliaryFittings/AuxiliaryAccessoriesWarehouse/storage_table.js

+ 6 - 7
src/views/auxiliaryFittings/AuxiliaryAccessoriesWarehouse/storage_table.js

@@ -98,8 +98,7 @@ export default {
                             this.qkrow(row)
                             if (val) {
                               row['goodsCategoryName'] = (
-                                this.mainList.find(item => item.categoryId == this.formData.parentCategoryId)?.items ||
-                                []
+                                this.mainList.find(item => item.categoryId == row.parentCategoryId)?.items || []
                               ).find(item => item.categoryId == val).categoryName
                               materialNormList({
                                 isShowStockQty: true,
@@ -121,11 +120,11 @@ export default {
                             this.$nextTick(this.jiaoyan)
                           }}
                         >
-                          {(
-                            this.mainList.find(item => item.categoryId == this.formData.parentCategoryId)?.items || []
-                          ).map((item, index_) => (
-                            <el-option key={index_} label={item.categoryName} value={item.categoryId}></el-option>
-                          ))}
+                          {(this.mainList.find(item => item.categoryId == row.parentCategoryId)?.items || []).map(
+                            (item, index_) => (
+                              <el-option key={index_} label={item.categoryName} value={item.categoryId}></el-option>
+                            )
+                          )}
                         </el-select>
                       </el-form-item>
                     </div>