Sfoglia il codice sorgente

feat: 强制仓回显增加判断

Howie 1 anno fa
parent
commit
43ea1d615a
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/views/setting/other.vue

+ 2 - 2
src/views/setting/other.vue

@@ -576,8 +576,8 @@ export default {
     getStockForceDetail() {
       getStockForceDetail().then(res => {
         this.forcedHoldForm = {
-          warehouse: res.data.stockCorrespondId,
-          category: res.data.stockForceCategories.map(k => k.categoryId)
+          warehouse: res.data?.stockCorrespondId || '',
+          category: res.data?.stockForceCategories.map(k => k.categoryId) || []
         }
       })
     },