|
@@ -0,0 +1,628 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="home-wrapper">
|
|
|
|
+ <!-- <TopSearch :searchVal="searchVal" :searchType="searchType" :searchTypeArr="searchTypeArr"/>-->
|
|
|
|
+ <div class="nav" stype="height:500px">
|
|
|
|
+ <!--搜索框-->
|
|
|
|
+ <el-row class="search-nav" style="padding: 30px 0 20px 0">
|
|
|
|
+ <el-col :span="6">
|
|
|
|
+ <div class="pull-left" @click="gotoHome" style="cursor: pointer">
|
|
|
|
+ <img class="logo-img" :src="logo_transparent"/>
|
|
|
|
+ <span class="logo-title">{{ logoTitle }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <div class="search-nav">
|
|
|
|
+ <div id="search-block ">
|
|
|
|
+ <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
|
|
|
|
+ <el-tab-pane v-for="item in searchTypeArr" v-if="item.value!=='all'" :label="item.name"
|
|
|
|
+ :name="item.value"
|
|
|
|
+ :key="item.value"></el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ <div class="search-input">
|
|
|
|
+ <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
|
|
|
|
+ <el-button class="search-button" slot="append" type="primary" @click="handleSearchData">搜索</el-button>
|
|
|
|
+ </el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="container" style="margin: 20px auto;">
|
|
|
|
+ <div class="create-body">
|
|
|
|
+ <div class="title h2" v-if="authType<2" >个人账单台账管理</div>
|
|
|
|
+ <div class="title h2" v-if="authType===2 || authType ===0" >企业台账管理</div>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="16">
|
|
|
|
+ 当前用户酬劳总额:{{ summary.sum }},
|
|
|
|
+ 未提现总额:
|
|
|
|
+ <span
|
|
|
|
+ :style="getNumerStyle('default',summary.defaultSum)">
|
|
|
|
+ {{summary.defaultSum}}
|
|
|
|
+ </span>
|
|
|
|
+ 待审核中总额:
|
|
|
|
+ <span
|
|
|
|
+ :style="getNumerStyle('commit',summary.commitSum)">
|
|
|
|
+ {{ summary.commitSum }}
|
|
|
|
+ </span>
|
|
|
|
+ 已提现总额:
|
|
|
|
+ <span
|
|
|
|
+ :style="getNumerStyle('audit',summary.auditSum)">
|
|
|
|
+ {{ summary.auditSum }}
|
|
|
|
+ </span>
|
|
|
|
+
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <div style="float: right">
|
|
|
|
+ <div class="btn btn-small btn-info" @click="handleBatchUpdate" v-if="authType<2">批量提现</div>
|
|
|
|
+ <div class="btn btn-small btn-info" @click="goToBalDetail(user.id)" v-if="authType<2">查看个人提现记录</div>
|
|
|
|
+ <div class="btn btn-small btn-info" @click="goToBalDetailBycode(user.id)" v-if="authType===2 || authType ===0">查看项目提现记录</div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ <template style="color: black">
|
|
|
|
+ <el-table
|
|
|
|
+ ref="multipleTable"
|
|
|
|
+ :data="curResourceList"
|
|
|
|
+ tooltip-effect="dark"
|
|
|
|
+ style="width: 100%; font-size: 15px; color: black" v-loading="loading"
|
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column
|
|
|
|
+ type="selection">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column type="expand" align="center" min-width="1%">
|
|
|
|
+ <template slot-scope="{row, $index}">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="[row]"
|
|
|
|
+ border
|
|
|
|
+ fit
|
|
|
|
+ highlight-current-row
|
|
|
|
+ style="width: 100%; "
|
|
|
|
+ max-height="500"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column label="独有的致命缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.onlyOneVeryHighDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.onlyOneVeryHighDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="独有的严重缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.onlyOneHighDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.onlyOneHighDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="独有的一般缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.onlyOneMidDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.onlyOneMidDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="独有的轻微缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.onlyOneLowDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.onlyOneLowDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="独有的建议缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.onlyOneVeryLowDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.onlyOneVeryLowDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="优质的致命缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.topVeryHighDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.topVeryHighDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="优质的严重缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.topHighDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.topHighDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="优质的一般缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.topMidDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.topMidDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="优质的轻微缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.topLowDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.topLowDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="优质的建议缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.topVeryLowDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.topVeryLowDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="补充的致命缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.notTopVeryHighDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.notTopVeryHighDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="补充的严重缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.notTopHighDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.notTopHighDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="补充的一般缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.notTopMidDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.notTopMidDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="补充的轻微缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.notTopLowDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.notTopLowDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="补充的建议缺陷" prop="code" align="center" min-width="5%">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <div>数量:{{ row.notTopVeryLowDefectCount }}</div>
|
|
|
|
+ <div>得分:{{ row.notTopVeryLowDefectScore }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="id"
|
|
|
|
+ align="center"
|
|
|
|
+ label="序号">
|
|
|
|
+ </el-table-column>
|
|
|
|
+<!-- <el-table-column-->
|
|
|
|
+<!-- prop="cptcode"-->
|
|
|
|
+<!-- align="left"-->
|
|
|
|
+<!-- label="项目编号">-->
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="cptname"
|
|
|
|
+ label="项目名称"
|
|
|
|
+ min-width="120"
|
|
|
|
+ align="center">
|
|
|
|
+ </el-table-column>
|
|
|
|
+<!-- <el-table-column-->
|
|
|
|
+<!-- prop="cttcode"-->
|
|
|
|
+<!-- align="left"-->
|
|
|
|
+<!-- label="任务编号">-->
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="cttname"
|
|
|
|
+ align="center"
|
|
|
|
+ min-width="150"
|
|
|
|
+ label="任务名称">
|
|
|
|
+ </el-table-column>
|
|
|
|
+<!-- <el-table-column-->
|
|
|
|
+<!-- prop="acceptTime"-->
|
|
|
|
+<!-- align="left"-->
|
|
|
|
+<!-- label="接包时间">-->
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
+<!-- <el-table-column-->
|
|
|
|
+<!-- prop="submitTime"-->
|
|
|
|
+<!-- align="left"-->
|
|
|
|
+<!-- label="提交时间">-->
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
+<!-- <el-table-column-->
|
|
|
|
+<!-- prop="price"-->
|
|
|
|
+<!-- align="left"-->
|
|
|
|
+<!-- label="酬劳所得">-->
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="effectiveWorkloadAmount"
|
|
|
|
+ align="center"
|
|
|
|
+ min-width="120"
|
|
|
|
+ label="有效工作量金额">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="defectExciationAmount"
|
|
|
|
+ align="center"
|
|
|
|
+ min-width="120"
|
|
|
|
+ label="缺陷激励金额">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="extraRewardAmount"
|
|
|
|
+ align="center"
|
|
|
|
+ min-width="120"
|
|
|
|
+ label="额外奖励金额">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="totalAmount"
|
|
|
|
+ align="center"
|
|
|
|
+ label="总金额">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="stateName"
|
|
|
|
+ align="center"
|
|
|
|
+ label="状态">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ label="操作"
|
|
|
|
+ width="120px"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div :style="getActionStyle('user')">
|
|
|
|
+ <div :style="getActionStyle('enterprise')" class="btn btn-small btn-info" @click="goToDetail(scope.row.id)">详情</div>
|
|
|
|
+ <div class="btn btn-small btn-info " @click="updateState(scope)" v-if="authType<2">提现</div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </template>
|
|
|
|
+ <el-collapse accordion style="margin: 0 30px">
|
|
|
|
+ <el-pagination
|
|
|
|
+ v-if="curResourceList&&curResourceList.length"
|
|
|
|
+ :page-size="10"
|
|
|
|
+ layout="prev, pager, next"
|
|
|
|
+ :total="totalElements"
|
|
|
|
+ :current-page="activePage"
|
|
|
|
+ @current-change="handlePageChange"
|
|
|
|
+ class="pull-right"
|
|
|
|
+ >
|
|
|
|
+ </el-pagination>
|
|
|
|
+ </el-collapse>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import Http from '@/js/http.js';
|
|
|
|
+import TopSearch from "../../components/commons/TopSearch";
|
|
|
|
+import {storageGet} from '@/js/index.js'
|
|
|
|
+import {notify} from "../../constants";
|
|
|
|
+import Apis from '@/js/api';
|
|
|
|
+import {CONFIG} from "../../config";
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: "ResourceList",
|
|
|
|
+ components: {TopSearch},
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ logoTitle: CONFIG.logoTitle,
|
|
|
|
+ logo_transparent: CONFIG.logo_transparent,
|
|
|
|
+ user: {},
|
|
|
|
+ authInfo:{},
|
|
|
|
+ authType:-1,
|
|
|
|
+ isLogin: false,
|
|
|
|
+ loading: false,
|
|
|
|
+ searchVal: '',
|
|
|
|
+ curResourceList: [],
|
|
|
|
+ searchType: 'cptcode',
|
|
|
|
+ searchTypeArr: [
|
|
|
|
+ {
|
|
|
|
+ "name": "全部",
|
|
|
|
+ "value": "all"
|
|
|
|
+ },
|
|
|
|
+ //首先,这个列表就是需要查询的查询,需要查多少个字段就用多少个实体{“name”:“”,value:“”}
|
|
|
|
+ //这个value不要这么乱七八糟的额,还用什么0和1,传到后台鬼知道是什么啊
|
|
|
|
+ //一般可以考虑用参数名
|
|
|
|
+ {
|
|
|
|
+ "name": "项目名称",
|
|
|
|
+ "value": "cptcode"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "任务名称",
|
|
|
|
+ "value": "cttcode"
|
|
|
|
+ }],
|
|
|
|
+ activePage: 1,
|
|
|
|
+ totalElements: 0,
|
|
|
|
+ selection: [],
|
|
|
|
+ summary: {
|
|
|
|
+ sum: 0,
|
|
|
|
+ defaultSum: 0,
|
|
|
|
+ commitSum: 0,
|
|
|
|
+ auditSum: 0,
|
|
|
|
+ completeSum: 0,
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ loadData() {
|
|
|
|
+ if (storageGet('user') != null) {
|
|
|
|
+ this.isLogin = true;
|
|
|
|
+ }
|
|
|
|
+ this.searchVal = this.$route.params.searchVal;
|
|
|
|
+ this.handleSearchData();
|
|
|
|
+ },
|
|
|
|
+ checkLogin() {
|
|
|
|
+ this.checkCreateProjectAuth();
|
|
|
|
+ },
|
|
|
|
+ checkCreateProjectAuth() {
|
|
|
|
+ if (!this.isLogin) {
|
|
|
|
+ // console.log("请登录后访问");
|
|
|
|
+ notify('warning', '请登录后访问');
|
|
|
|
+ } else if (this.isLogin) {
|
|
|
|
+ Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
|
|
|
|
+ this.$router.push('/project/create');
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ notify('error', error.data)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleSearchData() {
|
|
|
|
+ console.log(this.authType)
|
|
|
|
+ if(this.authType<2) {
|
|
|
|
+ let url = '/api/bookTest/pageList';
|
|
|
|
+ let params = {
|
|
|
|
+ "keyword": this.searchVal,
|
|
|
|
+ // "userid":this.user.userVO.id,
|
|
|
|
+ "activePage": 1,
|
|
|
|
+ "columnFilters": [
|
|
|
|
+ {
|
|
|
|
+ "field": "type",
|
|
|
|
+ "type": "enums",
|
|
|
|
+ "value": this.searchType
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "field": "id",
|
|
|
|
+ "type": "sort",
|
|
|
|
+ "value": "asc"
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ "extraCondition": {
|
|
|
|
+ "userId": this.user.id//用户ID
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ Http.post(url, params).then((res) => {
|
|
|
|
+ this.curResourceList = res.data.bookTestPageDTOPage.content;
|
|
|
|
+ this.totalElements = res.data.bookTestPageDTOPage.totalElements;
|
|
|
|
+ this.summary = res.data.summary;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ else if(this.authType===2) {
|
|
|
|
+ let url = '/api/bookTest/projectpageList';
|
|
|
|
+ let params = {
|
|
|
|
+ "keyword": this.searchVal,
|
|
|
|
+ // "userid":this.user.userVO.id,
|
|
|
|
+ "activePage": 1,
|
|
|
|
+ "columnFilters": [
|
|
|
|
+ {
|
|
|
|
+ "field": "type",
|
|
|
|
+ "type": "enums",
|
|
|
|
+ "value": this.searchType
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "field": "id",
|
|
|
|
+ "type": "sort",
|
|
|
|
+ "value": "asc"
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ "extraCondition": {
|
|
|
|
+ "userId": this.user.id//用户ID
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ Http.post(url, params).then((res) => {
|
|
|
|
+ this.curResourceList = res.data.bookTestPageDTOPage.content;
|
|
|
|
+ this.totalElements = res.data.bookTestPageDTOPage.totalElements;
|
|
|
|
+ this.summary = res.data.summary;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ nextPage() {
|
|
|
|
+ if(this.authType<2) {
|
|
|
|
+ let url = '/api/bookTest/pageList';
|
|
|
|
+ let params = {
|
|
|
|
+ "keyword": this.searchVal,
|
|
|
|
+ "activePage": this.activePage,
|
|
|
|
+ "columnFilters": [
|
|
|
|
+ {
|
|
|
|
+ "field": "type",
|
|
|
|
+ "type": "enums",
|
|
|
|
+ "enums": this.searchTypeArr,
|
|
|
|
+ "value": this.searchType
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "field": "id",
|
|
|
|
+ "type": "sort",
|
|
|
|
+ "value": "asc"
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ "extraCondition": { //这里是下一页的参数
|
|
|
|
+ "userId": this.user.id//用户ID
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ Http.post(url, params).then((res) => {
|
|
|
|
+ this.curResourceList = res.data.bookTestPageDTOPage.content;
|
|
|
|
+ this.totalElements = res.data.bookTestPageDTOPage.totalElements;
|
|
|
|
+ this.summary = res.data.summary;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ else if(this.authType===2) {
|
|
|
|
+ let url = '/api/bookTest/projectpageList';
|
|
|
|
+ let params = {
|
|
|
|
+ "keyword": this.searchVal,
|
|
|
|
+ "activePage": this.activePage,
|
|
|
|
+ "columnFilters": [
|
|
|
|
+ {
|
|
|
|
+ "field": "type",
|
|
|
|
+ "type": "enums",
|
|
|
|
+ "enums": this.searchTypeArr,
|
|
|
|
+ "value": this.searchType
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "field": "id",
|
|
|
|
+ "type": "sort",
|
|
|
|
+ "value": "asc"
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ "extraCondition": { //这里是下一页的参数
|
|
|
|
+ "userId": this.user.id//用户ID
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ Http.post(url, params).then((res) => {
|
|
|
|
+ this.curResourceList = res.data.bookTestPageDTOPage.content;
|
|
|
|
+ this.totalElements = res.data.bookTestPageDTOPage.totalElements;
|
|
|
|
+ this.summary = res.data.summary;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ gotoHome() {
|
|
|
|
+ this.$router.push('/home');
|
|
|
|
+ },
|
|
|
|
+ handleTypeClick(tab) {
|
|
|
|
+ this.searchType = tab.name
|
|
|
|
+ },
|
|
|
|
+ handlePageChange(index) {
|
|
|
|
+ this.activePage = index;
|
|
|
|
+ this.nextPage();
|
|
|
|
+ },
|
|
|
|
+ goToDetail(id) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'BookDetail',
|
|
|
|
+ path: '/book/detail',
|
|
|
|
+ query: {id: id}
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ goToBalDetail(uid) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'BalanceDetail',
|
|
|
|
+ path: '/book/baldetail',
|
|
|
|
+ query: {uid: uid}
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ goToBalDetailBycode(rmid) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'ProjectBalanceDetail',
|
|
|
|
+ path: '/book/projectbalDetail',
|
|
|
|
+ query: {rmid: rmid}
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ updateState(scope) {
|
|
|
|
+ const state = scope.row.state;
|
|
|
|
+ if (state > 0) {
|
|
|
|
+ notify('warning', '已经提现,请勿重新提现');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ let url = '/api/bookTest/updateState/{id}';
|
|
|
|
+ Http.get(url.replaceAll("{id}", scope.row.id + "")).then((res) => {
|
|
|
|
+ if (res.code == 20000) {
|
|
|
|
+ notify('success', '提现成功');
|
|
|
|
+ this.handleSearchData()
|
|
|
|
+ }
|
|
|
|
+ // if(scope.state==1){
|
|
|
|
+ // notify('error', '已经提现,请勿重新提现');
|
|
|
|
+ // }
|
|
|
|
+ else {
|
|
|
|
+ notify('error', '提现申请提交失败');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ showLoading() {
|
|
|
|
+ this.loading = true
|
|
|
|
+ },
|
|
|
|
+ hideLoading() {
|
|
|
|
+ this.loading = false
|
|
|
|
+ },
|
|
|
|
+ setUserInfo() {
|
|
|
|
+ this.user = storageGet('user') && storageGet('user').userVO;
|
|
|
|
+ },
|
|
|
|
+ handleSelectionChange(data) {
|
|
|
|
+ this.selection = data;
|
|
|
|
+ },
|
|
|
|
+ handleBatchUpdate() {
|
|
|
|
+ // console.log(this.selection)
|
|
|
|
+ if (this.selection.length === 0) {
|
|
|
|
+ notify('warning', '请先勾选需要提现的台账');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let canUpdate = true;
|
|
|
|
+ this.selection.some(d => {
|
|
|
|
+ if (d.state > 0) {
|
|
|
|
+ notify('warning', '请勾选未提现的台账');
|
|
|
|
+ canUpdate = false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ })
|
|
|
|
+ if (canUpdate) {
|
|
|
|
+ this.batchUpdate(this.selection.map(d => {
|
|
|
|
+ return d.id
|
|
|
|
+ }).join())
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ batchUpdate(ids) {
|
|
|
|
+ let url = '/api/bookTest/batchUpdateState/{ids}';
|
|
|
|
+ Http.get(url.replaceAll("{ids}", ids)).then((res) => {
|
|
|
|
+ if (res.code === 20000) {
|
|
|
|
+ notify('success', '批量提现申请成功');
|
|
|
|
+ this.handleSearchData()
|
|
|
|
+ } else {
|
|
|
|
+ notify('error', '提现申请失败');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getNumerStyle(state, sum) {
|
|
|
|
+ const style = {color: 'black'}
|
|
|
|
+ if (state === 'default') {
|
|
|
|
+ if (sum >= 30000) {
|
|
|
|
+ style.color = 'red';
|
|
|
|
+ } else {
|
|
|
|
+ style.color = '#6496ba';
|
|
|
|
+ }
|
|
|
|
+ } else if (state === 'commit') {
|
|
|
|
+ // console.log(sum)
|
|
|
|
+ if (sum >= 30000) {
|
|
|
|
+ style.color = 'red';
|
|
|
|
+ } else {
|
|
|
|
+ style.color = '#6496ba';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ return style;
|
|
|
|
+ },
|
|
|
|
+ async getAuthStatus(){
|
|
|
|
+ this.showLoading();
|
|
|
|
+ let userId = storageGet('user')&&storageGet('user').userVO.id;
|
|
|
|
+ await Http.get(`/api/user/${userId}`).then(res=>{
|
|
|
|
+ this.authInfo = res;
|
|
|
|
+ if(res.personalAuthVO){
|
|
|
|
+ this.authType = 1 //个人
|
|
|
|
+ }else if(res.agencyVO){
|
|
|
|
+ this.authType = 2 //企业
|
|
|
|
+ }else if((!res.enterpriseAuthVO) || (!res.agencyVO)){
|
|
|
|
+ this.authType = 0 //无
|
|
|
|
+ this.firstSubmit = 1
|
|
|
|
+ }
|
|
|
|
+ this.hideLoading();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getActionStyle(type){
|
|
|
|
+ const style={};
|
|
|
|
+ if(type==="user"){
|
|
|
|
+ if(this.authType<2){
|
|
|
|
+ style.display="flex";
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(this.authType<2){
|
|
|
|
+ style.marginRight="5px"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return style;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ async mounted() {
|
|
|
|
+ this.setUserInfo();
|
|
|
|
+ await this.getAuthStatus();
|
|
|
|
+ this.loadData();
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss">
|
|
|
|
+@import "../../style/search-nav.scss";
|
|
|
|
+
|
|
|
|
+.item-template {
|
|
|
|
+ height: 80px;
|
|
|
|
+}
|
|
|
|
+</style>
|