Explorar o código

产品项目管理列表新增状态

landydb hai 4 semanas
pai
achega
c0e778c8ae
Modificáronse 1 ficheiros con 22 adicións e 1 borrados
  1. 22 1
      src/views/modules/tech/project-product.vue

+ 22 - 1
src/views/modules/tech/project-product.vue

@@ -52,6 +52,15 @@
           :show-tooltip-when-overflow="true"
           label="物料名称">
         </el-table-column>
+        <el-table-column
+          prop="state"
+          header-align="center"
+          align="center"
+          min-width="160"
+          :show-tooltip-when-overflow="true"
+          :formatter="formatState"
+          label="状态">
+        </el-table-column>
         <el-table-column
           prop="deliveryDate"
           header-align="center"
@@ -134,7 +143,11 @@
         optionsLevel: [],
         importLoading: false,
         importData: {},
-        fileList: []
+        fileList: [],
+        stateOption: [
+          {label: '待处理', value: '1'},
+          {label: '已处理', value: '2'}
+        ]
       }
     },
     created () {
@@ -262,6 +275,14 @@
             this.$message.error(data.msg)
           }
         })
+      },
+      formatState (row) {
+        if (!row.state) return ''
+        let option = this.stateOption.find(t => t.value === row.state)
+        if (option != null) {
+          return option.label
+        }
+        return ''
       }
     }
   }