Explorar el Código

fix: 出库详情物品类型显示

liujt hace 5 días
padre
commit
5ee956797f
Se han modificado 1 ficheros con 10 adiciones y 2 borrados
  1. 10 2
      src/views/warehouseManagement/outgoingManagement/details.vue

+ 10 - 2
src/views/warehouseManagement/outgoingManagement/details.vue

@@ -623,8 +623,16 @@
       ...mapActions('dict', ['requestDict']),
       getSceneState: useDictLabel(outputSceneState),
       handleAssetType(r) {
-        const code = this.codeList.find((item) => item.dictCode == r);
-        return code?.dictValue;
+        if (r == null || r === '') return '';
+        // r 可能为逗号分隔的多个编码,逐个匹配后拼接
+        return String(r)
+          .split(',')
+          .map((code) => {
+            const item = this.codeList.find((it) => it.dictCode == code);
+            return item?.dictValue || '';
+          })
+          .filter(Boolean)
+          .join(',');
       },
       tableRowClassName({ row, rowIndex }) {
         console.log(row);