Bladeren bron

物料无法带出其他信息

002390 1 jaar geleden
bovenliggende
commit
eca3b06ae6

+ 19 - 0
src/components/popover-select-v2/index.vue

@@ -119,6 +119,25 @@ export default {
         );
         if (code === 200) {
           this.data = rows;
+
+
+          // 处理新增字段无法映射
+          let that = this;
+
+          this.TableColumns.forEach(({item,attr}) =>{
+
+            that.data = that.data.map(d =>{
+
+              if(!attr.is && attr.formatter){
+                d[item.key] = attr.formatter(d);
+              }
+
+              return d;
+
+            })
+
+          })
+
           this.page.total = total;
         }
       } catch (err) {

+ 1 - 1
src/components/popover-select/components/MATERIAL_PARAM.js

@@ -39,7 +39,7 @@ export default [
     item: { key: "isDrugNumber", title: "药品", width: "auto" },
     attr: {
       formatter: (prop) => {
-        return prop.materialMedcine.isDrugNumber;
+        return prop.materialMedcine.isDrug;
       },
     },
   },