From adcf63676d0b6a4e0a600ddcce447eb6e17fb8c9 Mon Sep 17 00:00:00 2001 From: yuejiayang <146344614+YangLei105@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:56:27 +0800 Subject: [PATCH] =?UTF-8?q?2025.02.17=20=E7=BB=A9=E6=95=88&=E9=80=81?= =?UTF-8?q?=E8=B4=A7=E8=AE=A1=E5=88=92=20=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierDeliverySchedule.js | 2 + src/views/modules/common/Chooselist.vue | 4 + .../externalSupplierDeliverySchedule.vue | 18 +++ .../internalSupplierDeliverySchedule.vue | 23 ++- .../deliverySchedule/supDelPlanUpload.vue | 148 ++++++++++++++++++ .../supplierDeliverySchedule.vue | 120 +++++++++++--- .../modules/performance/myPerformance.vue | 123 +++++++++------ .../performanceIndicatorDefinition.vue | 11 +- .../supplierPerformanceTheYear.vue | 99 ++++++++---- .../supplierPerformanceThisMonth.vue | 53 +++---- 10 files changed, 470 insertions(+), 131 deletions(-) create mode 100644 src/views/modules/deliverySchedule/supDelPlanUpload.vue diff --git a/src/api/deliverySchedule/supplierDeliverySchedule.js b/src/api/deliverySchedule/supplierDeliverySchedule.js index 90e02d7..924bc81 100644 --- a/src/api/deliverySchedule/supplierDeliverySchedule.js +++ b/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) diff --git a/src/views/modules/common/Chooselist.vue b/src/views/modules/common/Chooselist.vue index 1249787..e9a5d2b 100644 --- a/src/views/modules/common/Chooselist.vue +++ b/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) { diff --git a/src/views/modules/deliverySchedule/externalSupplierDeliverySchedule.vue b/src/views/modules/deliverySchedule/externalSupplierDeliverySchedule.vue index 177b607..a46f3d4 100644 --- a/src/views/modules/deliverySchedule/externalSupplierDeliverySchedule.vue +++ b/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, diff --git a/src/views/modules/deliverySchedule/internalSupplierDeliverySchedule.vue b/src/views/modules/deliverySchedule/internalSupplierDeliverySchedule.vue index ef990aa..e61af8e 100644 --- a/src/views/modules/deliverySchedule/internalSupplierDeliverySchedule.vue +++ b/src/views/modules/deliverySchedule/internalSupplierDeliverySchedule.vue @@ -131,8 +131,8 @@ width="100" label="操作"> @@ -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 } diff --git a/src/views/modules/deliverySchedule/supDelPlanUpload.vue b/src/views/modules/deliverySchedule/supDelPlanUpload.vue new file mode 100644 index 0000000..6d7010c --- /dev/null +++ b/src/views/modules/deliverySchedule/supDelPlanUpload.vue @@ -0,0 +1,148 @@ + + + + diff --git a/src/views/modules/deliverySchedule/supplierDeliverySchedule.vue b/src/views/modules/deliverySchedule/supplierDeliverySchedule.vue index 5e46d90..ddf5f3a 100644 --- a/src/views/modules/deliverySchedule/supplierDeliverySchedule.vue +++ b/src/views/modules/deliverySchedule/supplierDeliverySchedule.vue @@ -58,8 +58,9 @@ - - + + 物料编码 + @@ -81,7 +82,8 @@ 查询 自动预留 - 创建 + 创建 + 导入 + class="el-button el-button--primary el-button--medium el-icon-upload"> {{ "导出" }} @@ -156,7 +158,7 @@ > - + - - - - + + + + + + + - + + + + + + + + + 确定 取消 - + + + + - + @@ -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) { diff --git a/src/views/modules/performance/myPerformance.vue b/src/views/modules/performance/myPerformance.vue index 0de2dff..16537d8 100644 --- a/src/views/modules/performance/myPerformance.vue +++ b/src/views/modules/performance/myPerformance.vue @@ -2,13 +2,38 @@
本月得分 - +
- - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

过往12个月的绩效

{ 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]; + // } + // } + // } }, }; @@ -194,4 +224,7 @@ export default { width: 100px; margin-left: 10px; } +.right-align .el-input__inner { + text-align: right; /* 向右对齐文本 */ +} diff --git a/src/views/modules/performance/performanceIndicatorDefinition.vue b/src/views/modules/performance/performanceIndicatorDefinition.vue index c251ee3..6604195 100644 --- a/src/views/modules/performance/performanceIndicatorDefinition.vue +++ b/src/views/modules/performance/performanceIndicatorDefinition.vue @@ -65,9 +65,14 @@ :width="item.columnWidth" :label="item.columnLabel"> 供应商编码 - + 查询 + + {{ "导出" }} + 供应商绩效统计计算 @@ -65,7 +79,7 @@ width="80" label="操作"> @@ -80,7 +94,7 @@ layout="total, sizes, prev, pager, next, jumper"> - + { - 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 + }, } } diff --git a/src/views/modules/performance/supplierPerformanceThisMonth.vue b/src/views/modules/performance/supplierPerformanceThisMonth.vue index 711a474..3d64f85 100644 --- a/src/views/modules/performance/supplierPerformanceThisMonth.vue +++ b/src/views/modules/performance/supplierPerformanceThisMonth.vue @@ -26,7 +26,7 @@ 供应商编码 - + @@ -79,7 +79,7 @@ layout="total, sizes, prev, pager, next, jumper"> - + { - 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 () {