|
@@ -8,7 +8,8 @@
|
|
<el-input v-model="listQuery.keyword" placeholder="关键字搜索..." clearable
|
|
<el-input v-model="listQuery.keyword" placeholder="关键字搜索..." clearable
|
|
style="margin-left: 20px;width: 500px;float: left;">
|
|
style="margin-left: 20px;width: 500px;float: left;">
|
|
</el-input>
|
|
</el-input>
|
|
- <el-select style="margin-left: 20px;width: 170px;float: left;" v-model="listQuery.production" clearable placeholder="产品类型">
|
|
|
|
|
|
+ <el-select style="margin-left: 20px;width: 170px;float: left;" v-model="listQuery.production" clearable
|
|
|
|
+ placeholder="产品类型">
|
|
<el-option value="STATEMENT" label="价值意见书">价值意见书</el-option>
|
|
<el-option value="STATEMENT" label="价值意见书">价值意见书</el-option>
|
|
<el-option value="REPORT" label="报告">报告</el-option>
|
|
<el-option value="REPORT" label="报告">报告</el-option>
|
|
<el-option value="LETTER" label="复评函">复评函</el-option>
|
|
<el-option value="LETTER" label="复评函">复评函</el-option>
|
|
@@ -18,8 +19,8 @@
|
|
<el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置
|
|
<el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
- <parentTable :data="pageData.records" slot="table" style="width: 100%;">
|
|
|
|
- <el-table-column label="订单编号" align="center" >
|
|
|
|
|
|
+ <parentTable :data="pageData.records" slot="table" style="width: 100%;">
|
|
|
|
+ <el-table-column label="订单编号" align="center">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
<span>{{ row.orderId }}</span>
|
|
<span>{{ row.orderId }}</span>
|
|
</template>
|
|
</template>
|
|
@@ -29,58 +30,66 @@
|
|
<span>{{ row.name }}</span>
|
|
<span>{{ row.name }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="产品编号" align="center" width='300' >
|
|
|
|
|
|
+ <el-table-column label="产品编号" align="center" width='300'>
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
<span>{{ row.reportNo }}</span>
|
|
<span>{{ row.reportNo }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="产品类型" align="center" >
|
|
|
|
|
|
+ <el-table-column label="产品类型" align="center">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
<span>{{ row.production }}</span>
|
|
<span>{{ row.production }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="实收款" align="center" >
|
|
|
|
|
|
+ <el-table-column label="实收款" align="center">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
- <span>{{ row.claimTimes>0?'已认领':'未认领' }}</span>
|
|
|
|
|
|
+ <span>{{ row.claimTimes > 0 ? '已认领' : '未认领' }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="绩效分配" align="center" >
|
|
|
|
|
|
+ <el-table-column label="绩效分配" align="center">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
- <span>{{ row.isAllot?'已分配':'未分配' }}</span>
|
|
|
|
|
|
+ <span>{{ row.isAllot ? '已分配' : '未分配' }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="操作" align="center" width='120' >
|
|
|
|
|
|
+ <el-table-column label="操作" align="center" width='120'>
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
- <el-button type="text" size="small" @click="doPerformanceAllot(row)">{{!row.isAllot?'分配':'查看'}}</el-button>
|
|
|
|
|
|
+ <el-button type="text" size="small" @click="doPerformanceAllot(row)">{{ !row.isAllot ? '分配' : '查看'
|
|
|
|
+ }}</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</parentTable>
|
|
</parentTable>
|
|
</y-page-list-layout>
|
|
</y-page-list-layout>
|
|
- <el-dialog :visible.sync="allotDialog" width="75%" center custom-class="doWarehouseClass">
|
|
|
|
|
|
+ <el-dialog :visible.sync="allotDialog" width="75%" center custom-class="doWarehouseClass">
|
|
<el-form ref="performanceForm" :model="performance" class="form-container">
|
|
<el-form ref="performanceForm" :model="performance" class="form-container">
|
|
<div class="createMajor-main-container">
|
|
<div class="createMajor-main-container">
|
|
<div class="postInfo-container">
|
|
<div class="postInfo-container">
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :xs="24" :sm="12" :lg="24" :span="6">
|
|
|
|
- <el-button style="float:right" type="success" @click="saveAllot()">确认分配</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="24" :span="6">
|
|
|
|
+ <el-button style="float:right" type="success" @click="saveAllot()">确认分配</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
<div>
|
|
<div>
|
|
<el-divider content-position="left">
|
|
<el-divider content-position="left">
|
|
- <h3 class="title">{{reportNo}} 绩效分配</h3>
|
|
|
|
|
|
+ <h3 class="title">{{ reportNo }} 绩效分配</h3>
|
|
</el-divider>
|
|
</el-divider>
|
|
</div>
|
|
</div>
|
|
- <el-row class="row-style" v-if="performance.performanceList.length>0">
|
|
|
|
- <el-col :xs="24" :sm="12" :lg="6" :span="6" v-for="(a,index) in performance.performanceList">
|
|
|
|
- <el-card shadow="always" style="margin-top:30px;margin-right:15px;margin-bottom:30px;">
|
|
|
|
- <span v-if="a.isPrincipal" style="position:absolute; top:35px;left :87px"><el-tag type="danger">项目负责人</el-tag></span>
|
|
|
|
- <div class="performance-avatar-wrapper perfomance-icon-title">{{a.userName.slice(-2)}}</div>
|
|
|
|
- <el-input v-model.number="a.ratio" type="number" style="width:80%;margin-left:5px">
|
|
|
|
- <template slot="append">%</template>
|
|
|
|
- </el-input>
|
|
|
|
- </el-card>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+ <el-row class="row-style" v-if="performance.performanceList.length > 0">
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6" v-for="(a, index) in performance.performanceList">
|
|
|
|
+ <el-card shadow="always" style="margin-top:30px;margin-right:15px;margin-bottom:30px;">
|
|
|
|
+ <span v-if="a.isPrincipal" style="position:absolute; top:35px;left :87px"><el-tag
|
|
|
|
+ type="danger">项目负责人</el-tag></span>
|
|
|
|
+ <div class="performance-avatar-wrapper perfomance-icon-title">{{ a.userName.slice(-2) }}</div>
|
|
|
|
+ <el-input v-model.number="a.ratio" type="number" style="width:80%;margin-left:5px">
|
|
|
|
+ <template slot="append">%</template>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-card>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <div>
|
|
|
|
+ <el-select style="margin-right: 15px;width: 20%;" v-model="needAddToPerformanceUsers" placeholder="请选择要添加的人员" multiple filterable clearable>
|
|
|
|
+ <el-option v-for="(u, id) in allUsers" :label="u.name" :value="u" :key="u.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-button type="primary" @click="addToPerformanceUsers()">添加</el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -107,26 +116,51 @@ export default {
|
|
size: 10,
|
|
size: 10,
|
|
descs: 'id',
|
|
descs: 'id',
|
|
},
|
|
},
|
|
- allotDialog:false,
|
|
|
|
- performance:{
|
|
|
|
- performanceList:[],
|
|
|
|
- majorProductionId:null
|
|
|
|
|
|
+ allotDialog: false,
|
|
|
|
+ performance: {
|
|
|
|
+ performanceList: [],
|
|
|
|
+ majorProductionId: null
|
|
},
|
|
},
|
|
- reportNo:null,
|
|
|
|
- majorId:null
|
|
|
|
-
|
|
|
|
|
|
+ reportNo: null,
|
|
|
|
+ majorId: null,
|
|
|
|
+ allUsers: [],
|
|
|
|
+ needAddToPerformanceUsers: []
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.reportNo = this.$route.query.reportNo;
|
|
this.reportNo = this.$route.query.reportNo;
|
|
this.performance.majorProductionId = this.$route.query.id;
|
|
this.performance.majorProductionId = this.$route.query.id;
|
|
- this.majorId= this.$route.query.majorId;
|
|
|
|
- if (this.performance.majorProductionId){
|
|
|
|
|
|
+ this.majorId = this.$route.query.majorId;
|
|
|
|
+ if (this.performance.majorProductionId) {
|
|
this.autoPerformanceAllot();
|
|
this.autoPerformanceAllot();
|
|
}
|
|
}
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ addToPerformanceUsers() {
|
|
|
|
+ this.needAddToPerformanceUsers.forEach((item) => {
|
|
|
|
+ let user = {
|
|
|
|
+ ratio: 0,
|
|
|
|
+ isPrincipal:false,
|
|
|
|
+ userId:item.id,
|
|
|
|
+ userName:item.name,
|
|
|
|
+ id: null,
|
|
|
|
+ created: null,
|
|
|
|
+ modified: null,
|
|
|
|
+ majorId: null,
|
|
|
|
+ majorProductionId: null,
|
|
|
|
+ declareId: null,
|
|
|
|
+ userType: null
|
|
|
|
+ }
|
|
|
|
+ // 判断要添加的人员是否已经存在了,已存在的跳过
|
|
|
|
+ if(!this.performance.performanceList.some(user => user.userId === item.id)){
|
|
|
|
+ this.performance.performanceList.push(user);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.needAddToPerformanceUsers = [];
|
|
|
|
+ console.log(this.performance.performanceList);
|
|
|
|
+ },
|
|
resetSearch() {
|
|
resetSearch() {
|
|
this.$router.push({ query: {} });
|
|
this.$router.push({ query: {} });
|
|
this.listQuery = {
|
|
this.listQuery = {
|
|
@@ -136,7 +170,7 @@ export default {
|
|
}
|
|
}
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
searchList() {
|
|
searchList() {
|
|
// 重置分页
|
|
// 重置分页
|
|
this.listQuery.page = 1
|
|
this.listQuery.page = 1
|
|
@@ -144,72 +178,74 @@ export default {
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
getList() {
|
|
getList() {
|
|
- this.$api.majorProduction.performanceList(Object.assign({}, this.listQuery)).then(res=>{
|
|
|
|
- if (res.code ===200){
|
|
|
|
- this.pageData = res.data;
|
|
|
|
|
|
+ this.$api.majorProduction.performanceList(Object.assign({}, this.listQuery)).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.pageData = res.data;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- autoPerformanceAllot(){
|
|
|
|
|
|
+ autoPerformanceAllot() {
|
|
this.allotDialog = true;
|
|
this.allotDialog = true;
|
|
- this.$api.majorPerformanceAllot.list(this.performance.majorProductionId).then(res=>{
|
|
|
|
- if (res.code ===200 ){
|
|
|
|
|
|
+ this.$api.majorPerformanceAllot.list(this.performance.majorProductionId).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
const list = res.data;
|
|
const list = res.data;
|
|
- for (let i in list){
|
|
|
|
- if (list[i].ratio==null){
|
|
|
|
- list[i].ratio = 0;
|
|
|
|
- }else {
|
|
|
|
- list[i].ratio = (list[i].ratio)*100;
|
|
|
|
- }
|
|
|
|
|
|
+ for (let i in list) {
|
|
|
|
+ if (list[i].ratio == null) {
|
|
|
|
+ list[i].ratio = 0;
|
|
|
|
+ } else {
|
|
|
|
+ list[i].ratio = (list[i].ratio) * 100;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.performance.performanceList = list;
|
|
this.performance.performanceList = list;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- doPerformanceAllot(row){
|
|
|
|
|
|
+ doPerformanceAllot(row) {
|
|
|
|
+ this.getAllUser();
|
|
this.allotDialog = true;
|
|
this.allotDialog = true;
|
|
this.reportNo = row.reportNo;
|
|
this.reportNo = row.reportNo;
|
|
this.performance.majorProductionId = row.id;
|
|
this.performance.majorProductionId = row.id;
|
|
- this.majorId= row.majorId;
|
|
|
|
- this.$api.majorPerformanceAllot.list(row.id).then(res=>{
|
|
|
|
- if (res.code ===200 ){
|
|
|
|
|
|
+ this.majorId = row.majorId;
|
|
|
|
+ this.$api.majorPerformanceAllot.list(row.id).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
const list = res.data;
|
|
const list = res.data;
|
|
- for (let i in list){
|
|
|
|
- if (list[i].ratio==null){
|
|
|
|
- list[i].ratio = 0;
|
|
|
|
- }else {
|
|
|
|
- list[i].ratio = (list[i].ratio)*100;
|
|
|
|
- }
|
|
|
|
|
|
+ for (let i in list) {
|
|
|
|
+ if (list[i].ratio == null) {
|
|
|
|
+ list[i].ratio = 0;
|
|
|
|
+ } else {
|
|
|
|
+ list[i].ratio = (list[i].ratio) * 100;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.performance.performanceList = list;
|
|
this.performance.performanceList = list;
|
|
|
|
+ console.log(this.performance.performanceList);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- saveAllot(){
|
|
|
|
|
|
+ saveAllot() {
|
|
const id = this.performance.majorProductionId;
|
|
const id = this.performance.majorProductionId;
|
|
const list = this.performance.performanceList;
|
|
const list = this.performance.performanceList;
|
|
let total = 0;
|
|
let total = 0;
|
|
- list.map(function(item){
|
|
|
|
|
|
+ list.map(function (item) {
|
|
total += item.ratio;
|
|
total += item.ratio;
|
|
})
|
|
})
|
|
- if (total!=100){
|
|
|
|
|
|
+ if (total != 100) {
|
|
this.$notify({
|
|
this.$notify({
|
|
- title: '提示',
|
|
|
|
- message: '绩效分配之和需等于100,请检查。',
|
|
|
|
- type: 'warning',
|
|
|
|
- duration: 2000
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
|
|
+ title: '提示',
|
|
|
|
+ message: '绩效分配之和需等于100,请检查。',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- for(let i in list){
|
|
|
|
|
|
+ for (let i in list) {
|
|
list[i].majorProductionId = id;
|
|
list[i].majorProductionId = id;
|
|
- list[i].ratio = (list[i].ratio)/100;
|
|
|
|
|
|
+ list[i].ratio = (list[i].ratio) / 100;
|
|
list[i].userType = 'EVALUATE';
|
|
list[i].userType = 'EVALUATE';
|
|
list[i].majorId = this.majorId;
|
|
list[i].majorId = this.majorId;
|
|
}
|
|
}
|
|
- this.$api.majorPerformanceAllot.allot(list).then(res=>{
|
|
|
|
- if (res.code ===200 && res.data){
|
|
|
|
|
|
+ this.$api.majorPerformanceAllot.allot(list).then(res => {
|
|
|
|
+ if (res.code === 200 && res.data) {
|
|
this.$notify({
|
|
this.$notify({
|
|
title: '成功',
|
|
title: '成功',
|
|
message: '保存成功',
|
|
message: '保存成功',
|
|
@@ -218,38 +254,47 @@ export default {
|
|
});
|
|
});
|
|
this.allotDialog = false;
|
|
this.allotDialog = false;
|
|
this.getList();
|
|
this.getList();
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
this.$notify({
|
|
this.$notify({
|
|
- title: '失败',
|
|
|
|
- message: '保存失败',
|
|
|
|
- type: 'error',
|
|
|
|
- duration: 2000
|
|
|
|
- });
|
|
|
|
|
|
+ title: '失败',
|
|
|
|
+ message: '保存失败',
|
|
|
|
+ type: 'error',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getAllUser() {
|
|
|
|
+ this.$api.user.simpleAll().then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.allUsers = res.data;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
- /deep/.doWarehouseClass {
|
|
|
|
- border-radius: 10px;
|
|
|
|
- }
|
|
|
|
- .performance-avatar-wrapper{
|
|
|
|
- width: 50px;
|
|
|
|
- height: 50px;
|
|
|
|
- position: relative;
|
|
|
|
- border-radius: 50%;
|
|
|
|
- background-color: rgba(129,216,207,1);
|
|
|
|
- text-align: center;
|
|
|
|
- line-height: 50px;
|
|
|
|
- }
|
|
|
|
- .perfomance-icon-title{
|
|
|
|
- font-size: 20px;
|
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
|
- display: inline-block;
|
|
|
|
- position: relative;
|
|
|
|
- top: -2px;
|
|
|
|
- }
|
|
|
|
|
|
+/deep/.doWarehouseClass {
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.performance-avatar-wrapper {
|
|
|
|
+ width: 50px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ position: relative;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ background-color: rgba(129, 216, 207, 1);
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 50px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.perfomance-icon-title {
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
|
+ display: inline-block;
|
|
|
|
+ position: relative;
|
|
|
|
+ top: -2px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|