Ver código fonte

委外列表

chris 3 anos atrás
pai
commit
0b542265a3
1 arquivos alterados com 26 adições e 4 exclusões
  1. 26 4
      src/views/modules/sale/outsource.vue

+ 26 - 4
src/views/modules/sale/outsource.vue

@@ -48,6 +48,7 @@
       </el-form>
       <el-table
         :data="dataList"
+        :row-class-name="tableRowClassName"
         border
         v-loading="dataListLoading"
         style="width: 100%;">
@@ -87,6 +88,7 @@
           align="center"
           min-width="140"
           :show-overflow-tooltip="true"
+          :formatter="formatType"
           label="委外类别">
         </el-table-column>
         <el-table-column
@@ -150,7 +152,7 @@
           label="供应商">
         </el-table-column>
         <el-table-column
-          prop="technology"
+          prop="technologyFile"
           header-align="center"
           align="center"
           min-width="140"
@@ -169,7 +171,7 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="createTime"
+          prop="applyTime"
           header-align="center"
           align="center"
           min-width="140"
@@ -177,7 +179,7 @@
           label="申请时间">
         </el-table-column>
         <el-table-column
-          prop="applierId"
+          prop="purchaseCommission.applierId"
           header-align="center"
           align="center"
           min-width="140"
@@ -185,7 +187,7 @@
           label="申请人">
         </el-table-column>
         <el-table-column
-          prop="orgId"
+          prop="purchaseCommission.orgId"
           header-align="center"
           align="center"
           min-width="140"
@@ -444,6 +446,12 @@ export default {
       const item1 = this.optionsOutsourceState.find((item) => item.code === row.purchaseState.toString())
       return item1 ? item1.value : ''
     },
+    // 转换属性“类别”
+    formatType (row) {
+      if (!row.commissionType) return ''
+      const item1 = this.optionsType.find((item) => item.code === row.commissionType.toString())
+      return item1 ? item1.value : ''
+    },
     // 转换属性“审批状态”
     formatState (row) {
       if (!row.approvalState) return ''
@@ -456,6 +464,14 @@ export default {
       this.$nextTick(() => {
         this.$refs.attachDetail.init(row.attachList)
       })
+    },
+    // 高亮表格
+    tableRowClassName ({row, rowIndex}) {
+      if (!row.purchaseState) return ''
+      if (Number(row.purchaseState) === 0) {
+        return 'warning-row'
+      }
+      return ''
     }
   }
 }
@@ -464,3 +480,9 @@ export default {
 <style scoped>
 
 </style>
+
+<style>
+  .el-table .warning-row {
+    background: #fbc4c4;
+  }
+</style>