wenhongquan 3 anni fa
parent
commit
b377590819
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      src/views/WarehouseDetailGoods/index.vue

+ 5 - 1
src/views/WarehouseDetailGoods/index.vue

@@ -167,6 +167,7 @@ const onCancel = ()=>{
 const onConfirm=(value)=>{
    whdata.value.name = value;
    showPicker.value = false;
+   whdata.value.unit = ((goodlistall.value.filter(i=>i.dictLabel===value) ?? [])[0]?.remark) ?? ''
 }
 
 const isedit = ref(true);
@@ -314,11 +315,14 @@ const dosavedata = () => {
 
 };
 
+const goodlistall = ref([]);
+
 
 onMounted(()=>{
   var c = async ()=>{
     await commonStore.getGlobalDict("zhdd_resource_goods");
-    goodlist.value = commonStore.globalDict['zhdd_resource_goods']?.map(o=>o.dictLabel);
+    goodlist.value = commonStore.globalDict['zhdd_resource_goods']?.map(o => o.dictLabel);
+    goodlistall.value = commonStore.globalDict['zhdd_resource_goods'];
   }
   c();
   try{