yaozc
2023-03-09 54fd333b1cbced722ddccc8016cd1e4975aa31bf
eladmin-web-master/src/views/project/project/index.vue
@@ -83,7 +83,20 @@
          style="margin-left: 4px !important;"
          @click="toSeeCost(crud.selections[0])"
        >
          查看成本
          人力成本
        </el-button>
        <el-button
          slot="right"
          v-permission="permission.seeCost"
          class="filter-item"
          size="mini"
          type="primary"
          icon="el-icon-view"
          :disabled="crud.selections.length !== 1"
          style="margin-left: 4px !important;"
          @click="toSeeCostOther(crud.selections[0])"
        >
          其他成本
        </el-button>
      </crudOperation>
      <!--表单组件-->
@@ -256,19 +269,31 @@
            </span>
          </template>
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="totalLaborCost" label="计划项目总成本" width="110">
          <template slot-scope="scope">
            <span :style="{ color: scope.row.performancePrice * scope.row.totalTaskTime < scope.row.totalLaborCost ? 'red' : '' }">
              {{ crud.toMoney(scope.row.totalLaborCost) }}
            </span>
          </template>
        <el-table-column label="计划成本">
          <el-table-column :show-overflow-tooltip="true" prop="totalLaborCost" label="人力成本" width="110">
            <template slot-scope="scope">
              <span :style="{ color: scope.row.performancePrice * scope.row.totalTaskTime < scope.row.totalLaborCost ? 'red' : '' }">
                {{ crud.toMoney(scope.row.totalLaborCost) }}
              </span>
            </template>
          </el-table-column>
          <el-table-column :show-overflow-tooltip="true" prop="totalOtherCost" label="其他成本" width="110">
            <template slot-scope="scope">
              {{ crud.toMoney(scope.row.totalOtherCost) }}
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="actualLaborCost" label="实际项目总成本" width="110">
          <template slot-scope="scope">
            <span :style="{ color: scope.row.performancePrice * scope.row.actualTaskTime < scope.row.actualLaborCost ? 'red' : '' }">
              {{ crud.toMoney(scope.row.actualLaborCost) }}
            </span>
          </template>
        <el-table-column label="实际成本">
          <el-table-column :show-overflow-tooltip="true" prop="actualLaborCost" label="人力成本" width="110">
            <template slot-scope="scope">
              <span :style="{ color: scope.row.performancePrice * scope.row.actualTaskTime < scope.row.actualLaborCost ? 'red' : '' }">
                {{ crud.toMoney(scope.row.actualLaborCost) }}
              </span>
            </template>
          </el-table-column>
          <el-table-column :show-overflow-tooltip="true" prop="actualLaborCost" label="其他成本" width="110">
            未实装
          </el-table-column>
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="liableUserName" label="责任人" width="100">
          <template slot-scope="scope">
@@ -592,7 +617,7 @@
        }
      })
    },
    // 查看成本
    // 查看人力成本
    toSeeCost(data) {
      // 跳转页面
      this.$router.push({
@@ -601,6 +626,16 @@
          projectId: data.id
        }
      })
    },
    // 查看其他成本
    toSeeCostOther(data) {
      // 跳转页面
      this.$router.push({
        name: 'ProjectCostOther',
        params: {
          projectId: data.id
        }
      })
    }
  }
}