chencc 1 год назад
Родитель
Сommit
cc401a6f94

+ 0 - 1
src/views/material/product/components/DialogMoveTo.vue

@@ -4,7 +4,6 @@
       title="设置采购员"
       title="设置采购员"
       :visible.sync="dialogVisible"
       :visible.sync="dialogVisible"
       width="30%"
       width="30%"
-      :before-close="handleClose"
       class="fullscreen"
       class="fullscreen"
     >
     >
 
 

+ 42 - 12
src/views/material/product/components/index-data.vue

@@ -62,6 +62,14 @@
           >关联备品备件</el-button
           >关联备品备件</el-button
         >-->
         >-->
       </template>
       </template>
+     
+      <template v-slot:componentAttribute="{ row }">
+        <div>
+          <!-- {{ }} -->
+          {{ getDictValueFn(row.componentAttribute) }}
+        </div>
+        </template>
+
       <template v-slot:action="{ row }">
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="openEdit(row, 1)">
         <el-link type="primary" :underline="false" @click="openEdit(row, 1)">
           复制
           复制
@@ -353,17 +361,19 @@ export default {
         },
         },
 
 
         {
         {
-          prop: 'produceType',
+          prop: 'componentAttribute',
+          slot: 'componentAttribute',
           align: 'center',
           align: 'center',
           label: '属性类型',
           label: '属性类型',
           showOverflowTooltip: true,
           showOverflowTooltip: true,
-          formatter: (row, column) => {
-            return row?.produceType
-              ?.map((item) => {
-                return this.getDictValueFn(item);
-              })
-              ?.toString();
-          }
+          // formatter: (row, column) => {
+          //   return row?.produceType
+          //     ?.map((item) => {
+          //       {{row}}
+          //       return this.getDictValueFn(item);
+          //     })
+          //     ?.toString();
+          // }
         },
         },
         {
         {
           prop: 'attributeType',
           prop: 'attributeType',
@@ -438,8 +448,24 @@ export default {
 
 
   methods: {
   methods: {
     getDictValueFn(e) {
     getDictValueFn(e) {
-      console.log(e);
-      return this.sxtList[e].label
+      // console.log(e,'3333333333333');
+      if(e.length){
+        let arr = [];
+        e.map(v=>{
+          arr.push(this.findFn(v)?.label);
+        })
+        
+        return arr.join(',');
+      }else{
+        return '';
+      }
+      // let a = 
+
+      // return a?.label||''
+    },
+
+    findFn(e){
+      return  this.sxtList.find((item) => item.value == Number(e))
     },
     },
 
 
     toBomManager(row) {
     toBomManager(row) {
@@ -491,13 +517,17 @@ export default {
       });
       });
     },
     },
     /* 表格数据源 */
     /* 表格数据源 */
-    datasource({ page, limit, where, order }) {
-      return getMaterialList({
+    async datasource({ page, limit, where, order }) {
+      let labs= getMaterialList({
         pageNum: page,
         pageNum: page,
         size: limit,
         size: limit,
         ...where,
         ...where,
         categoryLevelId: this.currentId
         categoryLevelId: this.currentId
       });
       });
+      let a= await labs;
+      console.log(a,'ssssssssssssssssss');
+
+      return labs;
     },
     },
     /* 刷新表格 */
     /* 刷新表格 */
     reload(where) {
     reload(where) {