Explorar o código

feat: 强制仓回显增加判断

Howie hai 1 ano
pai
achega
43ea1d615a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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) || []
         }
       })
     },