Browse Source

2025.02.17 绩效&送货计划 功能优化

master
yuejiayang 1 year ago
parent
commit
adcf63676d
  1. 2
      src/api/deliverySchedule/supplierDeliverySchedule.js
  2. 4
      src/views/modules/common/Chooselist.vue
  3. 18
      src/views/modules/deliverySchedule/externalSupplierDeliverySchedule.vue
  4. 23
      src/views/modules/deliverySchedule/internalSupplierDeliverySchedule.vue
  5. 148
      src/views/modules/deliverySchedule/supDelPlanUpload.vue
  6. 120
      src/views/modules/deliverySchedule/supplierDeliverySchedule.vue
  7. 123
      src/views/modules/performance/myPerformance.vue
  8. 11
      src/views/modules/performance/performanceIndicatorDefinition.vue
  9. 99
      src/views/modules/performance/supplierPerformanceTheYear.vue
  10. 53
      src/views/modules/performance/supplierPerformanceThisMonth.vue

2
src/api/deliverySchedule/supplierDeliverySchedule.js

@ -9,3 +9,5 @@ export const autoReservationInitiateHandler = data => createAPI(`/deliverySchedu
export const addSupplierDeliveryPlan = data => createAPI(`/deliverySchedule/addSupplierDeliveryPlan`,'post',data)
export const updateSupplierDeliveryScheduleDelNotifyQty = data => createAPI(`/deliverySchedule/updateSupplierDeliveryScheduleDelNotifyQty`,'post',data)
export const uploadSupDelPlanExcel = data => createAPI(`/deliverySchedule/uploadSupDelPlanExcel`,'post',data)

4
src/views/modules/common/Chooselist.vue

@ -184,6 +184,10 @@ export default {
sql += " and site=" + this.param4
}
}
if (this.conSql === 1){
this.dataList = []
return
}
sql += this.conSql
getChooselistData({"sqlcode": sql}).then(({data}) => {
if (data.code == 0) {

18
src/views/modules/deliverySchedule/externalSupplierDeliverySchedule.vue

@ -511,6 +511,24 @@ export default {
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 109003,
serialNumber: '109003TablePendingQty',
tableId: "109003Table",
tableName: "内部供应商送货计划信息表",
columnWidth: 150,
columnProp: 'pendingQty',
headerAlign: 'center',
align: "right",
columnLabel: '剩余未送货数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 109003,

23
src/views/modules/deliverySchedule/internalSupplierDeliverySchedule.vue

@ -131,8 +131,8 @@
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" type="text" size="small" @click="updateModal(scope.row,0)">修改</el-link>
<el-link style="cursor: pointer" type="text" size="small" @click="updateModal(scope.row,1)">取消</el-link>
<el-link style="cursor: pointer" type="text" v-if="scope.row.status !== '已关闭'" size="small" @click="updateModal(scope.row,0)">修改</el-link>
<el-link style="cursor: pointer" type="text" v-if="scope.row.status !== '已关闭'" size="small" @click="updateModal(scope.row,1)">取消</el-link>
</template>
</el-table-column>
</el-table>
@ -536,6 +536,24 @@ export default {
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 109002,
serialNumber: '109002TablePendingQty',
tableId: "109002Table",
tableName: "内部供应商送货计划信息表",
columnWidth: 150,
columnProp: 'pendingQty',
headerAlign: 'center',
align: "right",
columnLabel: '剩余未送货数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 109002,
@ -722,7 +740,6 @@ export default {
getBaseData (val) {
if (this.tagNo === 3) {
this.searchData.supplierId = val.SupplierID
this.searchData.supplierName = val.SupplierName
} else if (this.tagNo === 9) {
this.searchData.userName = val.EmployeeName
}

148
src/views/modules/deliverySchedule/supDelPlanUpload.vue

@ -0,0 +1,148 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="isVisible" width="390px" style="height: 520px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
工厂:
<el-input v-model="pageData.site" style="width: 100px;" disabled></el-input>
<el-button type="primary" @click="downloadFile()" style="margin-left: 125px">下载文件模板</el-button>
<el-row>
<el-col :span="24">
<el-upload class="customer-upload" drag action="javascript:void(0);" ref="uploadFile" :limit="1" accept=".xlsx,.xls"
:before-upload="beforeUploadHandle" :on-change="onChange" :on-remove="onRemove" :auto-upload="false" style="text-align: left;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveUploadFile()">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
queryFileId, // ID
} from "@/api/qc/qc.js"
import { downLoadObjectFile } from '@/api/eam/eam_object_list.js'
import {
uploadSupDelPlanExcel, //
} from "../../../api/deliverySchedule/supplierDeliverySchedule";
import axios from 'axios'
import Vue from 'vue'
export default {
data() {
return {
titleCon: '文件导入',
isVisible: false,
fileList: [],
uploadList: [],
pageData: {
flag: '',
createBy: '',
site: ''
},
}
},
methods: {
//
init(currentRow) {
//
this.pageData = JSON.parse(JSON.stringify(currentRow))
//
this.isVisible = true;
},
//
beforeUploadHandle(file) {
let extName = file[0].name.substring(file[0].name.lastIndexOf('.')).toLowerCase()
if (!(extName === '.xlsx' || extName === '.xls')) {
this.$message.error('数据导入失败,请选择正确的xlsx模板文件')
return false
}
},
/*选择上传文件时*/
onChange(file){
this.fileList.push(file);
},
onRemove(file){
this.fileList = [];
},
/*关闭modal*/
closeDialog(){
this.fileList = [];
//
this.$refs.uploadFile.clearFiles();
//
this.isVisible = false;
},
/*保修当前的数据*/
saveUploadFile(){
/*判断文件是否上传*/
if(null == this.fileList || 0 == this.fileList.length){
this.$message.error("请先上传文件!");
return false;
}
const formData = new FormData();
formData.append("file", this.fileList[0].raw);
formData.append("createBy", this.pageData.createBy);
formData.append("site", this.pageData.site);
uploadSupDelPlanExcel(formData).then(({data}) => {
if (data.code === 0) {
this.uploadList = data.list;
//
this.$refs.uploadFile.clearFiles();
// uploadList
this.$emit('upload-success', this.uploadList);
}else {
this.$message.warning(data.msg);
}
})
},
//
async downloadFile(){
let file = {
id: 0,
fileName: ''
}
let tempData = {
orderRef1: 'supDelPlan',
orderRef2: 'delPlanFormat'
}
await queryFileId(tempData).then(({data}) => {
if (data && data.code === 0) {
file.id = data.data.id
file.fileName = data.data.fileName
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
await downLoadObjectFile(file).then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = file.fileName
// a
const linkNode = document.createElement('a')
// adownload
linkNode.download = fileName
linkNode.style.display = 'none'
// Blob URL
linkNode.href = URL.createObjectURL(blob)
document.body.appendChild(linkNode)
//
linkNode.click()
// URL
URL.revokeObjectURL(linkNode.href)
document.body.removeChild(linkNode)
})
},
}
}
</script>
<style scoped lang="scss">
</style>

120
src/views/modules/deliverySchedule/supplierDeliverySchedule.vue

@ -58,8 +58,9 @@
<el-form-item label="供应商名称">
<el-input v-model="searchData.supplierName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="物料编码">
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(5)"><a herf="#">物料编码</a></span>
<el-input v-model="searchData.partNo" style="width: 120px" placeholder="输入或选择物料编码"></el-input>
</el-form-item>
<el-form-item label="物料描述">
<el-input v-model="searchData.partDescription" style="width: 120px"></el-input>
@ -81,7 +82,8 @@
<el-form-item :label="' '">
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="autoReservationHandler()">自动预留</el-button>
<el-button type="primary" @click="createADeliveryPlanHandler()">创建</el-button>
<el-button type="primary" @click="createADeliveryPlanHandler(0)">创建</el-button>
<el-button type="primary" icon="el-icon-upload" @click="supDelPlanUpload()">导入</el-button>
<download-excel
:fields="fields()"
:data="exportData"
@ -93,7 +95,7 @@
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
class="el-button el-button--primary el-button--medium el-icon-upload">
{{ "导出" }}
</download-excel>
</el-form-item>
@ -156,7 +158,7 @@
>
</el-pagination>
<el-dialog title="创建供应商送货计划" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1250px">
<el-dialog title="创建供应商送货计划" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" style="margin-top: -50px" width="1050px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="'要求送货日期'" :rules="rules.wantedDelDate">
<el-date-picker
@ -179,7 +181,7 @@
</el-form-item>
</el-form>
<el-table
:height="height"
:height="height - 50"
:data="selectionList"
border
style="width: 100%;padding: 0px 0px;"
@ -223,26 +225,41 @@
</span>
</el-dialog>
<el-dialog :close-on-click-modal="false" v-drag :visible.sync="autoReservationFlag" width="161px">
<el-form :inline="true" label-position="top" :model="autoReservationData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="此次分配的送货数量" prop="allotmentQty" :rules="rules.allotmentQty">
<el-input v-model="autoReservationData.allotmentQty" clearable style="width: 120px"></el-input>
<el-dialog title="自动预留" :close-on-click-modal="false" v-drag :visible.sync="autoReservationFlag" width="451px" style="margin-top: 10vh">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 10px;">
<el-form-item label="供应商">
<el-input v-model="searchData.supplier" disabled style="width: 280px"></el-input>
</el-form-item>
<el-form-item label="总待计划数量">
<el-input-number v-model="allotmentQtys" :controls="false" disabled style="width: 120px"></el-input-number>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-form :inline="true" label-position="top" :model="autoReservationData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
<el-form-item label="物料">
<el-input v-model="searchData.part" disabled style="width: 280px"></el-input>
</el-form-item>
<el-form-item label="此次分配的计划数量" prop="allotmentQty" :rules="rules.allotmentQty">
<el-input-number v-model="autoReservationData.allotmentQty" :controls="false" clearable style="width: 120px"></el-input-number>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 25px;text-align:center">
<el-button type="primary" @click="autoReservationInitiateHandler">确定</el-button>
<el-button @click="autoReservationFlag = false">取消</el-button>
</span>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 导入 -->
<supDelPlanUpload ref="supDelPlanUpload" @upload-success="createADeliveryPlanHandler"
v-drag></supDelPlanUpload>
<!-- 数据表格部分 -->
<!-- <el-table :data="dataList" border style="width: 100%">-->
<!-- <el-table-column prop="orderNumber" label="订单号" width="150"></el-table-column>-->
<!-- <el-table-column prop="material" label="物料编码" width="150"></el-table-column>-->
<!-- <el-table-column prop="supplier" label="供应商" width="150"></el-table-column>-->
<!-- <el-table-column prop="quantity" label="待送货数量" width="150"></el-table-column>-->
<!-- <el-table-column prop="deliveryQuantity" label="此次送货数量" width="150">-->
<!-- <el-table-column prop="deliveryQuantity" label="此次计划数量" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-->
<!-- v-model.number="scope.row.deliveryQuantity"-->
@ -272,10 +289,12 @@ import {
} from "../../../api/deliverySchedule/supplierDeliverySchedule";
import {getTableDefaultListLanguage, getTableUserListLanguage} from "../../../api/table";
import Chooselist from "../common/Chooselist.vue";
import supDelPlanUpload from "./supDelPlanUpload";
export default {
components: {
Chooselist
Chooselist,
supDelPlanUpload
},
data() {
return {
@ -287,6 +306,7 @@ export default {
exportHeader: ["供应商送货计划"],
exportFooter: [],
exportList: [],
allotmentQtys: '',
modalData: {
WantedDelDate: new Date(),
DelPlace: '',
@ -312,6 +332,8 @@ export default {
partNo: '',
partDescription: '',
deliveryQty: '',
part: '',
supplier: ''
},
columnList: [
{
@ -324,7 +346,7 @@ export default {
columnProp: 'pendingQty',
headerAlign: 'center',
align: "right",
columnLabel: '待发货数量',
columnLabel: '待计划数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -342,7 +364,7 @@ export default {
columnProp: 'delNotifyQty',
headerAlign: 'center',
align: "right",
columnLabel: '已发货数量',
columnLabel: '已计划数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -360,7 +382,7 @@ export default {
columnProp: 'deliveryQty',
headerAlign: 'center',
align: "right",
columnLabel: '此次送货数量',
columnLabel: '此次计划数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -638,6 +660,24 @@ export default {
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 109001,
serialNumber: '109001TableRemark',
tableId: "109001Table",
tableName: "供应商送货计划表",
columnWidth: 210,
columnProp: 'remark',
headerAlign: 'center',
align: "center",
columnLabel: '订单备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 109001,
@ -719,6 +759,10 @@ export default {
strVal = this.searchData.supplierID
conSql = " and site = '" + this.searchData.site + "'"
this.$refs.baseList.init(val, strVal, conSql)
} else if (val === 5) {
strVal = this.searchData.partNo
conSql = 1
this.$refs.baseList.init(val, strVal, conSql)
} else if (val === 9) {
strVal = this.searchData.userName
conSql = " and site = '" + this.searchData.site + "'"
@ -731,7 +775,8 @@ export default {
getBaseData (val) {
if (this.tagNo === 3) {
this.searchData.supplierID = val.SupplierID
this.searchData.supplierName = val.SupplierName
} else if (this.tagNo === 5) {
this.searchData.partNo = val.PartNo
} else if (this.tagNo === 9) {
this.searchData.userName = val.EmployeeName
}
@ -823,10 +868,12 @@ export default {
},
validateDeliveryQty(row,type) {
console.log('deliveryQty',row.deliveryQty)
console.log('pendingQty',row.pendingQty)
if (row.deliveryQty > row.pendingQty) {
this.$message.error('此次送货数量不能大于待送货数量');
this.$message.error('此次计划数量不能大于待送货数量');
row.deliveryQty = row.pendingQty; //
throw new Error('此次送货数量不能大于待送货数量!'); //
throw new Error('此次计划数量不能大于待送货数量!'); //
} else {
if (type !== 2){
this.updateDeliveryQty(row)
@ -867,6 +914,20 @@ export default {
this.$message.error('没有订单数据无法自动预留,请检查查询条件是否正确!')
return
}
if(this.searchData.partNo === '' || this.searchData.partNo == null){
this.searchData.part = this.searchData.partDescription
} else {
this.searchData.part = this.searchData.partNo
}
if(this.searchData.supplierID === '' || this.searchData.supplierID == null){
this.searchData.supplier = this.searchData.supplierName
} else {
this.searchData.supplier = this.searchData.supplierID
}
this.allotmentQtys = 0
this.dataList.forEach(item => {
this.allotmentQtys += item.pendingQty
})
this.autoReservationFlag = true;
},
@ -898,7 +959,11 @@ export default {
})
},
createADeliveryPlanHandler () {
createADeliveryPlanHandler (uploadList) {
console.log(uploadList)
if (uploadList !== 0) {
this.selectionList = uploadList
}
if (this.selectionList.length === 0) {
this.$message.error('请选择要创建送货计划的订单')
return
@ -942,6 +1007,7 @@ export default {
}
})
})
this.$refs.supDelPlanUpload.closeDialog()
} else {
this.$message.error(data.msg)
}
@ -969,6 +1035,18 @@ export default {
this.getDataList()
},
supDelPlanUpload () {
let currentData = {
flag: 'supDelPlanUpload',
createBy: this.$store.state.user.name,
site: this.$store.state.user.site,
}
//
this.$nextTick(() => {
this.$refs.supDelPlanUpload.init(currentData)
})
},
//excel
async createExportData() {
if(this.selectionList.length > 0) {

123
src/views/modules/performance/myPerformance.vue

@ -2,13 +2,38 @@
<div class="score-container">
<div class="score-header">
<span>本月得分</span>
<el-input v-model="this.scoreTotalAll" class="score-input" readonly></el-input>
<el-input v-model="this.scoreTotalAll" class="score-input right-align" readonly></el-input>
</div>
<el-table :data="tableData" border :span-method="arraySpanMethod" style="width: 50%" :height="300">
<el-table-column prop="type" label="绩效类型" align="center" width="100px"></el-table-column>
<el-table-column prop="item" label="绩效项目" header-align="center" align="left"></el-table-column>
<el-table-column prop="value" label="指标值" align="center" width="80px"></el-table-column>
</el-table>
<!-- <el-table :data="tableData" border :span-method="arraySpanMethod" style="width: 50%" :height="300">-->
<!-- <el-table-column prop="type" label="绩效类型" align="center" width="100px"></el-table-column>-->
<!-- <el-table-column prop="item" label="绩效项目" header-align="center" align="left"></el-table-column>-->
<!-- <el-table-column prop="value" label="指标值" align="center" width="80px"></el-table-column>-->
<!-- </el-table>-->
<el-row>
<el-col :span="8">
<el-table :data="tableData1" border style="width: 100%">
<!-- 服务表现 + 评分 -->
<el-table-column prop="indicatorDesc" header-align="center" align="left" label="服务表现"></el-table-column>
<el-table-column prop="indicatorScore" header-align="center" align="right" label="评分" width="50"></el-table-column>
</el-table>
</el-col>
<el-col :span="8">
<el-table :data="tableData2" border style="width: 100%">
<!-- 交期表现 + 评分 -->
<el-table-column prop="indicatorDesc" header-align="center" align="left" label="交期表现"></el-table-column>
<el-table-column prop="indicatorScore" header-align="center" align="right" label="评分" width="50"></el-table-column>
</el-table>
</el-col>
<el-col :span="8">
<el-table :data="tableData3" border style="width: 100%">
<!-- 质量表现 + 评分 -->
<el-table-column prop="indicatorDesc" header-align="center" align="left" label="质量表现"></el-table-column>
<el-table-column prop="indicatorScore" header-align="center" align="right" label="评分" width="50"></el-table-column>
</el-table>
</el-col>
</el-row>
<p style="margin-top: 10px;font-size: 15px">过往12个月的绩效</p>
<!-- 展示列表 -->
<el-table
@ -82,7 +107,9 @@ export default {
{ userId: this.$store.state.user.name, functionId: 108003, serialNumber: '301001TableScoreTotalAll', tableId: "301001Table", tableName: "供应商绩效概览表", columnProp: 'scoreTotalAll', headerAlign: 'center', align: "center", columnLabel: '总得分', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108003, serialNumber: '301001TableGradeLevel', tableId: "301001Table", tableName: "供应商绩效概览表", columnProp: 'gradeLevel', headerAlign: 'center', align: "center", columnLabel: '等级', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
],
tableData: [],
tableData1: [],
tableData2: [],
tableData3: [],
pageIndex: 1,
pageSize: 20,
totalPage: 0,
@ -119,6 +146,9 @@ export default {
supplierPerformanceThisMonthDetails(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.tableData1 = data.tableData1
this.tableData2 = data.tableData2
this.tableData3 = data.tableData3
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
@ -139,44 +169,44 @@ export default {
})
},
generateTableData() {
const items = [
{ type: '服务表现', item: '包装数量短缺(件数)' },
{ type: '服务表现', item: '包装方式未按规定要求执行(件数)' },
{ type: '服务表现', item: '到料数量与计划数量差异' },
{ type: '服务表现', item: '需交付总批次(件数)' },
{ type: '交期表现', item: '延期交付(件数)' },
{ type: '交期表现', item: '准时交付批次完成率' },
{ type: '交期表现', item: '需交付总数量' },
{ type: '交期表现', item: '延期交付(数量)' },
{ type: '交期表现', item: '准时交付数量完成率' },
{ type: '质量表现', item: '检验总批数' },
{ type: '质量表现', item: '批量验收数抽选总批数' },
{ type: '质量表现', item: '合格批率' },
{ type: '质量表现', item: '出货检验报告未提交(件数)' },
{ type: '质量表现', item: '出货检验报告数据与样品进料检验的数据不符(件数)' },
{ type: '质量表现', item: '标签不正确或未贴(次数)' }
];
this.tableData = items.map((item, index) => ({
type: item.type,
item: item.item,
value: this.dataList[index] ? this.dataList[index].indicatorScore : 0 // dataList
}));
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex === 0) {
return [4, 1];
} else if (rowIndex === 4) {
return [5, 1];
} else if (rowIndex === 9) {
return [6, 1];
} else {
return [0, 0];
}
}
}
// generateTableData() {
// const items = [
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' },
// { type: '', item: '' }
// ];
//
// this.tableData = items.map((item, index) => ({
// type: item.type,
// item: item.item,
// value: this.dataList[index] ? this.dataList[index].indicatorScore : 0 // dataList
// }));
// },
// arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// if (columnIndex === 0) {
// if (rowIndex === 0) {
// return [4, 1];
// } else if (rowIndex === 4) {
// return [5, 1];
// } else if (rowIndex === 9) {
// return [6, 1];
// } else {
// return [0, 0];
// }
// }
// }
},
};
</script>
@ -194,4 +224,7 @@ export default {
width: 100px;
margin-left: 10px;
}
.right-align .el-input__inner {
text-align: right; /* 向右对齐文本 */
}
</style>

11
src/views/modules/performance/performanceIndicatorDefinition.vue

@ -65,9 +65,14 @@
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
<span v-if="item.columnProp === 'active'">{{ scope.row[item.columnProp] === 'Y' ? '' : '' }}</span>
<div v-if="item.columnProp === 'active'" >
<span v-if="scope.row.active === 'Y'">{{''}}</span>
<span v-if="scope.row.active === 'N'">{{''}}</span>
</div>
<div v-else>
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
</template>
</el-table-column>
<el-table-column

99
src/views/modules/performance/supplierPerformanceTheYear.vue

@ -26,13 +26,27 @@
</el-form-item>
<el-form-item>
<span slot="label" style="" @click="getBaseList(501)"><a herf="#">供应商编码</a></span>
<el-input v-model="searchData.supplierId" @blur="setupSupplierBlur(501)" filterable placeholder="请选择或输入供应商编码"></el-input>
<el-input v-model="searchData.supplierId" filterable placeholder="请选择或输入供应商编码"></el-input>
</el-form-item>
<el-form-item label="供应商名称">
<el-input v-model="searchData.supplierName" placeholder="请输入供应商名称"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
<el-button type="primary" @click="computeFlag = true">供应商绩效统计计算</el-button>
</el-form-item>
</el-form>
@ -65,7 +79,7 @@
width="80"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" class="highlight" @click="totalPoints(scope.row)">总得分</a>
<a type="text" size="small" class="highlight" @click="totalPoints(scope.row)">详情</a>
</template>
</el-table-column>
</el-table>
@ -80,7 +94,7 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="总得分" :close-on-click-modal="false" v-drag :visible.sync="suppPerTheMonthTotalPointsFlag" width="951px" style="margin-top: -30px">
<el-dialog title="详情" :close-on-click-modal="false" v-drag :visible.sync="suppPerTheMonthTotalPointsFlag" width="951px" style="margin-top: -5vh">
<el-table
:data="suppPerThisMonthDetailsList"
:height="height - 27"
@ -154,13 +168,13 @@
favorite: false,
// start
exportData: [],
exportName: "检验方法" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["检验方法"],
exportName: "供应商年度绩效信息" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["供应商年度绩效信息"],
exportFooter: [],
exportList: [],
// end
searchData: {
site: '',
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
statisticMonth: new Date().getFullYear(),
supplierId: '',
@ -271,7 +285,7 @@
columnSuppPerTheMonthTotalPointsList : [
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableStatisticMonth', tableId: "301001Table", tableName: "供应商绩效概览总得分表", columnWidth: 80, columnProp: 'statisticMonth', headerAlign: 'center', align: "center", columnLabel: '月份', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorItemNo', tableId: "301001Table", tableName: "供应商绩效概览总得分表", columnWidth: 140, columnProp: 'indicatorItemNo', headerAlign: 'center', align: "center", columnLabel: '绩效指标简码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorDesc', tableId: "301001Table", tableName: "供应商绩效概览总得分表", columnWidth: 260, columnProp: 'indicatorDesc', headerAlign: 'center', align: "center", columnLabel: '绩效项目', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorDesc', tableId: "301001Table", tableName: "供应商绩效概览总得分表", columnProp: 'indicatorDesc', headerAlign: 'center', align: "left", columnLabel: '绩效项目', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorCount', tableId: "301001Table", tableName: "供应商绩效概览总得分表", columnWidth: 80, columnProp: 'indicatorCount', headerAlign: 'center', align: "center", columnLabel: '绩效条数', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorScore', tableId: "301001Table", tableName: "供应商绩效概览总得分表", columnWidth: 80, columnProp: 'indicatorScore', headerAlign: 'center', align: "center", columnLabel: '绩效分数', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorGroup', tableId: "301001Table", tableName: "供应商绩效概览总得分表", columnWidth: 90, columnProp: 'indicatorGroup', headerAlign: 'center', align: "center", columnLabel: '绩效分类', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
@ -300,6 +314,7 @@
userBuList: [],
suppPerThisMonthDetailsList: [],
authSearch: false,
downLoading: false,
menuId: this.$route.meta.menuId,
}
},
@ -311,8 +326,6 @@
},
created () {
//
this.getDataList()
//
this.getButtonAuthData()
// site bu
@ -367,7 +380,6 @@
getBaseData(val) {
if (this.tagNo === 501) {
this.searchData.supplierId = val.SupplierID
this.searchData.supplierName = val.SupplierName
}
},
@ -417,27 +429,27 @@
})
},
setupSupplierBlur (tagNo) {
if (this.searchData.supplierId != null && this.searchData.supplierId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and SupplierID = '" + this.searchData.supplierId + "'" + " and site = '" + this.searchData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.searchData.supplierName = data.baseListData[0].SupplierName
} else {
this.$message.warning('供应商编码不存在')
this.searchData.supplierName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.supplierName = ''
}
})
}
},
// setupSupplierBlur (tagNo) {
// if (this.searchData.supplierId != null && this.searchData.supplierId !== '') {
// let tempData = {
// tagno: tagNo,
// conditionSql: " and SupplierID = '" + this.searchData.supplierId + "'" + " and site = '" + this.searchData.site + "'"
// }
// verifyData(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.baseListData.length > 0) {
// this.searchData.supplierName = data.baseListData[0].SupplierName
// } else {
// this.$message.warning('')
// this.searchData.supplierName = ''
// }
// } else {
// this.$message.warning(data.msg)
// this.modalData.supplierName = ''
// }
// })
// }
// },
//
sizeChangeHandle (val) {
@ -560,6 +572,31 @@
this.authUpdate = !updateFlag
this.authDelete = !deleteFlag
},
//excel
async createExportData () {
this.searchData.limit = -1
this.searchData.page = 1
await supplierPerformanceQuerySummarySearch(this.searchData).then(({data}) => {
this.exportList = data.page.list
})
return this.exportList
},
startDownload () {},
finishDownload () {},
fields () {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
}
}
</script>

53
src/views/modules/performance/supplierPerformanceThisMonth.vue

@ -26,7 +26,7 @@
</el-form-item>
<el-form-item>
<span slot="label" style="" @click="getBaseList(501)"><a herf="#">供应商编码</a></span>
<el-input v-model="searchData.supplierId" filterable @blur="setupSupplierBlur(501)" placeholder="请选择或输入供应商编码"></el-input>
<el-input v-model="searchData.supplierId" filterable placeholder="请选择或输入供应商编码"></el-input>
</el-form-item>
<el-form-item label="供应商名称">
<el-input v-model="searchData.supplierName" placeholder="请输入供应商名称"></el-input>
@ -79,7 +79,7 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="详情" :close-on-click-modal="false" v-drag :visible.sync="suppPerThisMonthDetailsFlag" width="951px" style="margin-top: -30px">
<el-dialog title="详情" :close-on-click-modal="false" v-drag :visible.sync="suppPerThisMonthDetailsFlag" width="951px" style="margin-top: -5vh">
<el-table
:data="suppPerThisMonthDetailsList"
:height="height - 27"
@ -141,7 +141,7 @@
exportList: [],
// end
searchData: {
site: '',
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
statisticMonth: `${year}-${month}`, // YYYY-MM
supplierId: '',
@ -212,7 +212,7 @@
columnSuppPerThisMonthDetailsList : [
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableStatisticMonth', tableId: "301001Table", tableName: "供应商本月绩效统计表", columnWidth: 80, columnProp: 'statisticMonth', headerAlign: 'center', align: "center", columnLabel: '月份', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorItemNo', tableId: "301001Table", tableName: "供应商本月绩效统计表", columnWidth: 140, columnProp: 'indicatorItemNo', headerAlign: 'center', align: "center", columnLabel: '绩效指标简码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorDesc', tableId: "301001Table", tableName: "供应商本月绩效统计表", columnWidth: 260, columnProp: 'indicatorDesc', headerAlign: 'center', align: "center", columnLabel: '绩效项目', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorDesc', tableId: "301001Table", tableName: "供应商本月绩效统计表", columnProp: 'indicatorDesc', headerAlign: 'center', align: "left", columnLabel: '绩效项目', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorCount', tableId: "301001Table", tableName: "供应商本月绩效统计表", columnWidth: 80, columnProp: 'indicatorCount', headerAlign: 'center', align: "center", columnLabel: '绩效条数', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorScore', tableId: "301001Table", tableName: "供应商本月绩效统计表", columnWidth: 80, columnProp: 'indicatorScore', headerAlign: 'center', align: "center", columnLabel: '绩效分数', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
{ userId: this.$store.state.user.name, functionId: 108002, serialNumber: '301001TableIndicatorGroup', tableId: "301001Table", tableName: "供应商本月绩效统计表", columnWidth: 90, columnProp: 'indicatorGroup', headerAlign: 'center', align: "center", columnLabel: '绩效分类', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '' },
@ -232,8 +232,6 @@
},
created () {
//
this.getDataList()
//
this.getButtonAuthData()
// site bu
@ -288,7 +286,6 @@
getBaseData(val) {
if (this.tagNo === 501) {
this.searchData.supplierId = val.SupplierID
this.searchData.supplierName = val.SupplierName
}
},
@ -339,27 +336,27 @@
})
},
setupSupplierBlur (tagNo) {
if (this.searchData.supplierId != null && this.searchData.supplierId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and SupplierID = '" + this.searchData.supplierId + "'" + " and site = '" + this.searchData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.searchData.supplierName = data.baseListData[0].SupplierName
} else {
this.$message.warning('供应商编码不存在')
this.searchData.supplierName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.supplierName = ''
}
})
}
},
// setupSupplierBlur (tagNo) {
// if (this.searchData.supplierId != null && this.searchData.supplierId !== '') {
// let tempData = {
// tagno: tagNo,
// conditionSql: " and SupplierID = '" + this.searchData.supplierId + "'" + " and site = '" + this.searchData.site + "'"
// }
// verifyData(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.baseListData.length > 0) {
// this.searchData.supplierName = data.baseListData[0].SupplierName
// } else {
// this.$message.warning('')
// this.searchData.supplierName = ''
// }
// } else {
// this.$message.warning(data.msg)
// this.modalData.supplierName = ''
// }
// })
// }
// },
// OR
favoriteFunction () {

Loading…
Cancel
Save