|
@@ -1104,8 +1104,7 @@
|
|
<template slot-scope="props">
|
|
<template slot-scope="props">
|
|
<el-button round type="danger" @click="saveProduction(props.row)"
|
|
<el-button round type="danger" @click="saveProduction(props.row)"
|
|
:disabled="!updateProductionNode.includes(currentNode.nodeCode)">更新产品信息</el-button>
|
|
:disabled="!updateProductionNode.includes(currentNode.nodeCode)">更新产品信息</el-button>
|
|
- <el-button type="success" round v-if="doWare" @click="openWareHouseDialog(props.row)">{{
|
|
|
|
- currentNode.nodeName }}</el-button>
|
|
|
|
|
|
+ <el-button v-if="currentNode.nodeCode=='CHECK_STATEMENT' || currentNode.nodeCode=='CHECK_REPORT' || currentNode.nodeCode=='CHECK_LETTER'" type="success" round @click="openAllotDialog(props.row)">分配人员绩效</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -1663,13 +1662,42 @@
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-card>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <el-dialog :visible.sync="warehouseDialog" width="25%" center top="35vh" custom-class="doWarehouseClass"
|
|
|
|
- @closed="cleanWareHouseProductionType()">
|
|
|
|
- <ScanEntry ref="scanEntry" @scanEntryFun="handleScanEntry" label="请扫描二维码或输入产品号" />
|
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
- <el-button @click="warehouseDialog = false">取 消</el-button>
|
|
|
|
- <el-button type="primary" @click="doWareHouse()">确 定</el-button>
|
|
|
|
- </span>
|
|
|
|
|
|
+ <el-dialog :visible.sync="allotDialog" width="75%" center custom-class="doWarehouseClass">
|
|
|
|
+ <el-form ref="allotPerformanceForm" :model="allotPerformance" class="form-container">
|
|
|
|
+ <div class="createMajor-main-container">
|
|
|
|
+ <div class="postInfo-container">
|
|
|
|
+ <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>
|
|
|
|
+ <el-divider content-position="left">
|
|
|
|
+ <h3 class="title">{{ reportNo }} 绩效分配</h3>
|
|
|
|
+ </el-divider>
|
|
|
|
+ </div>
|
|
|
|
+ <el-row class="row-style" v-if="allotPerformance.performanceList.length > 0">
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6" v-for="(a, index) in allotPerformance.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">
|
|
|
|
+ <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>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<el-dialog :visible.sync="checkFundDialog" width="25%" center top="35vh" custom-class="doWarehouseClass">
|
|
<el-dialog :visible.sync="checkFundDialog" width="25%" center top="35vh" custom-class="doWarehouseClass">
|
|
<el-row>
|
|
<el-row>
|
|
@@ -2145,7 +2173,7 @@ export default {
|
|
tCustomerCompany: [],
|
|
tCustomerCompany: [],
|
|
tSubCustomerCompany: [],
|
|
tSubCustomerCompany: [],
|
|
tCustomerContract: [],
|
|
tCustomerContract: [],
|
|
- warehouseDialog: false,
|
|
|
|
|
|
+ allotDialog: false,
|
|
scanEntryData: null,
|
|
scanEntryData: null,
|
|
wareHouseProductionType: null,
|
|
wareHouseProductionType: null,
|
|
doWare: false,
|
|
doWare: false,
|
|
@@ -2192,7 +2220,12 @@ export default {
|
|
refuseForm:{
|
|
refuseForm:{
|
|
reason:null
|
|
reason:null
|
|
},
|
|
},
|
|
- year: '2025'
|
|
|
|
|
|
+ year: '2025',
|
|
|
|
+ allotPerformance: {
|
|
|
|
+ performanceList: [],
|
|
|
|
+ majorProductionId: null
|
|
|
|
+ },
|
|
|
|
+ needAddToPerformanceUsers: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -3600,50 +3633,29 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- doWareHouse() {
|
|
|
|
- let reportNo = this.scanEntryData
|
|
|
|
- let wareHoaseDto = new Object();
|
|
|
|
- if (reportNo) {
|
|
|
|
- wareHoaseDto.reportNo = reportNo;
|
|
|
|
- } else {
|
|
|
|
- wareHoaseDto.reportNo = this.$refs.scanEntry.scanEntryData;
|
|
|
|
- }
|
|
|
|
- if (this.currentNode.nodeName.includes("入库")) {
|
|
|
|
- wareHoaseDto.repertoryState = 0;
|
|
|
|
- } else {
|
|
|
|
- wareHoaseDto.repertoryState = 1;
|
|
|
|
- }
|
|
|
|
- wareHoaseDto.productionType = this.wareHouseProductionType;
|
|
|
|
- wareHoaseDto.productionId = this.wareHouseproductionId;
|
|
|
|
- this.taskRecordDTO.recordId = this.currentNode.tasks[0].recordId;
|
|
|
|
- this.taskRecordDTO.taskData = wareHoaseDto;
|
|
|
|
- this.$api.majorProduction.warehouse(this.taskRecordDTO).then(res => {
|
|
|
|
- if (res.code === 200 && res.data) {
|
|
|
|
- this.$notify({
|
|
|
|
- title: '成功',
|
|
|
|
- message: '库存操作成功',
|
|
|
|
- type: 'success',
|
|
|
|
- duration: 1000,
|
|
|
|
- offset: 100
|
|
|
|
- });
|
|
|
|
- this.warehouseDialog = false;
|
|
|
|
- this.getProductions(this.majorId, wareHoaseDto.reportNo);
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'info',
|
|
|
|
- message: '取消操作'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
handleScanEntry(scanData) {
|
|
handleScanEntry(scanData) {
|
|
this.scanEntryData = scanData;
|
|
this.scanEntryData = scanData;
|
|
},
|
|
},
|
|
- openWareHouseDialog(row) {
|
|
|
|
- this.warehouseDialog = true;
|
|
|
|
- this.wareHouseProductionType = row.production;
|
|
|
|
- this.wareHouseproductionId = row.id
|
|
|
|
|
|
+ openAllotDialog(row) {
|
|
|
|
+ this.getAllUser();
|
|
|
|
+ this.allotDialog = true;
|
|
|
|
+ this.reportNo = row.reportNo;
|
|
|
|
+ this.allotPerformance.majorProductionId = row.id;
|
|
|
|
+ this.majorId = row.majorId;
|
|
|
|
+ this.$api.majorPerformanceAllot.list(row.id).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.allotPerformance.performanceList = list;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
cleanWareHouseProductionType() {
|
|
cleanWareHouseProductionType() {
|
|
this.wareHouseProductionType = null;
|
|
this.wareHouseProductionType = null;
|
|
@@ -4004,7 +4016,71 @@ export default {
|
|
remindClean(){
|
|
remindClean(){
|
|
this.passNotRecord = false;
|
|
this.passNotRecord = false;
|
|
this.passNotSubmit = false;
|
|
this.passNotSubmit = false;
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ saveAllot() {
|
|
|
|
+ const id = this.allotPerformance.majorProductionId;
|
|
|
|
+ const list = this.allotPerformance.performanceList;
|
|
|
|
+ let total = 0;
|
|
|
|
+ list.map(function (item) {
|
|
|
|
+ total += item.ratio;
|
|
|
|
+ })
|
|
|
|
+ if (total != 100) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '提示',
|
|
|
|
+ message: '绩效分配之和需等于100,请检查。',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ for (let i in list) {
|
|
|
|
+ list[i].majorProductionId = id;
|
|
|
|
+ list[i].ratio = (list[i].ratio) / 100;
|
|
|
|
+ list[i].userType = 'EVALUATE';
|
|
|
|
+ list[i].majorId = this.majorId;
|
|
|
|
+ }
|
|
|
|
+ this.$api.majorPerformanceAllot.allot(list).then(res => {
|
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '成功',
|
|
|
|
+ message: '保存成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ this.allotDialog = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '失败',
|
|
|
|
+ message: '保存失败',
|
|
|
|
+ type: 'error',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ 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.allotPerformance.performanceList.some(user => user.userId === item.id)) {
|
|
|
|
+ this.allotPerformance.performanceList.push(user);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.needAddToPerformanceUsers = [];
|
|
|
|
+ },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -4117,4 +4193,21 @@ a:hover{
|
|
color: black;
|
|
color: black;
|
|
z-index: 999;
|
|
z-index: 999;
|
|
}
|
|
}
|
|
|
|
+.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>
|