소스 검색

物资清单页面物资规格查询功能修复

wyn 2 달 전
부모
커밋
f405e144bc
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      src/views/material/information/MaterialForm.vue
  2. 3 2
      src/views/material/information/index.vue

+ 2 - 2
src/views/material/information/MaterialForm.vue

@@ -334,8 +334,8 @@ const selectValue = (propertyId: string, recordId: string) => {
         (v) => v.id == recordId // 使用 id 字段
       )
       return {
-        propertyId,
-        recordId,
+        propertyId: String(propertyId),
+        recordId: String(recordId),
         valueName: value.valueName,
         propertyName: property.propertyName
       }

+ 3 - 2
src/views/material/information/index.vue

@@ -402,7 +402,7 @@ const filteredPropertyValues = computed(() => {
     return []
   }
   return PropertyValueList.value.filter(
-    (value) => value.propertyId === queryParams.propertyId
+    (value) => value.propertyId == queryParams.propertyId
   )
 })
 const route=useRoute()
@@ -423,7 +423,7 @@ const setInitialCabinetId = () => {
     queryParams.materialsCabinetId = Number(route.query.cabinetId)
     visibleSelect.value = true
   } else {
-    queryParams.materialsCabinetId = 1
+    queryParams.materialsCabinetId = ''
   }
 }
 // 查询物资柜
@@ -476,6 +476,7 @@ const getTreeselect = async () => {
   const propertyData = await PropertyApi.PropertyPage({ pageSize: -1, pageNo: 1 })
   PropertyList.value = propertyData.list
   const propertyValueData = await PropertyValueApi.PropertyValuePage({ pageSize: -1, pageNo: 1 })
+  console.log(propertyValueData,'propertyValueData')
   PropertyValueList.value = propertyValueData.list
 }