huang_an 2 lat temu
rodzic
commit
211110d420

+ 9 - 1
src/views/warehouseManagement/stockManagement/details.vue

@@ -165,7 +165,7 @@
                   </el-table-column>
                   <el-table-column label="" prop="measurementUnit">
                     <template slot-scope="{ row, $index }">
-                      {{ row.weightUnit }} /{{ row.packingUnit }}
+                      {{ handleRowUnit(row) }} /{{ row.packingUnit }}
                     </template>
                   </el-table-column>
                 </el-table-column>
@@ -389,6 +389,14 @@
       getMaterialType: useDictLabel(materialType),
       getInputStatus: useDictLabel(inputStatus),
       getSceneState: useDictLabel(sceneState),
+      handleRowUnit(row) {
+        if (this.extInfo.assetType == 1) {
+          console.log(row);
+          return row.weightUnit;
+        } else if (this.extInfo.assetType == 4) {
+          return row.measuringUnit;
+        }
+      },
       handleAssetType(r) {
         const code = this.codeList.find((item) => item.dictCode == r);
         return code?.dictValue;