From f5f196a49c86d6beff8d99ab5cb9a9baa890386c Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 27 Oct 2025 10:23:18 +0800 Subject: [PATCH] =?UTF-8?q?2025-10-27=20=E4=BB=93=E5=BA=93=E7=9B=98?= =?UTF-8?q?=E7=82=B9=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/warehouse/countingReport.js | 1 + .../modules/warehouse/countingReport.vue | 218 +++++++++++++++--- 2 files changed, 192 insertions(+), 27 deletions(-) diff --git a/src/api/warehouse/countingReport.js b/src/api/warehouse/countingReport.js index 50075d1..6139fd8 100644 --- a/src/api/warehouse/countingReport.js +++ b/src/api/warehouse/countingReport.js @@ -101,3 +101,4 @@ export function countingReportDetailList(data) { + diff --git a/src/views/modules/warehouse/countingReport.vue b/src/views/modules/warehouse/countingReport.vue index d87d5f2..11f7a6a 100644 --- a/src/views/modules/warehouse/countingReport.vue +++ b/src/views/modules/warehouse/countingReport.vue @@ -55,8 +55,8 @@ - - + + @@ -93,7 +93,7 @@ - + - - 盘点仓库 - - + + 盘点仓库 + + - - - + + 盘点货位 + + - - + + + + 盘点物料 + + - - + + + + @@ -141,6 +148,59 @@ + + + + + + + + + + + + + + + + + + 查询 + + + + +
+ 标签总数:{{ detailStatistics.totalCount }} + 物料总数:{{ detailStatistics.totalQty }} + 已盘点数:{{ detailStatistics.checkedQty }} +
+ + + + + + + + + + + + + + + + 关闭 + +
+ @@ -151,7 +211,8 @@ import { countingReportUpdate, countingReportBatchDelete, countingReportUpdateStatus, - countingReportBatchUpdateStatus + countingReportBatchUpdateStatus, + countingReportDetailList } from '@/api/warehouse/countingReport.js' import {getSiteAndBuByUserName} from "@/api/qc/qc.js" import Chooselist from '@/views/modules/common/Chooselist_eam' @@ -219,6 +280,23 @@ export default { message: ' ', trigger: ['blur','change'] }] + }, + // 盘点清单对话框 + detailFlag: false, + detailLoading: false, + detailList: [], + detailSearchData: { + site: '', + buNo: '', + reportId: '', + rollNo: '', + partNo: '', + checkedFlag: '' + }, + detailStatistics: { + totalCount: 0, // 标签总数 + totalQty: 0, // 物料总数(所有标签数量总和) + checkedQty: 0 // 已盘点数(已盘点标签数量总和) } } }, @@ -442,23 +520,92 @@ export default { // 查看盘点清单 viewDetail(row) { - this.$message.info('盘点清单功能待开发') - // TODO: 打开盘点清单对话框 + this.detailFlag = true + this.detailSearchData = { + site: row.site, + buNo: row.buNo, + reportId: row.reportId, + rollNo: '', + partNo: '', + checkedFlag: '' + } + this.getDetailList() + }, + + // 获取盘点清单列表 + getDetailList() { + this.detailLoading = true + countingReportDetailList(this.detailSearchData).then(({data}) => { + if (data && data.code === 0) { + this.detailList = data.detailList || [] + // 计算统计数据 + this.calculateStatistics() + } else { + this.detailList = [] + this.$message.error(data.msg || '查询失败') + } + this.detailLoading = false + }).catch(() => { + this.detailLoading = false + }) + }, + + // 计算统计数据 + calculateStatistics() { + this.detailStatistics.totalCount = this.detailList.length + this.detailStatistics.totalQty = this.detailList.reduce((sum, item) => sum + (item.rollQty || 0), 0) + this.detailStatistics.checkedQty = this.detailList + .filter(item => item.checkedFlag === 'Y') + .reduce((sum, item) => sum + (item.rollQty || 0), 0) }, // 输入校验 - supplierBlur (tagNo) { + warehouseBlur (tagNo) { + let tempData = { + tagno: tagNo, + conditionSql: " and WareHouseID = '" + this.modalData.warehouseId + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'" + } + verifyData(tempData).then(({data}) => { + if (data && data.code === 0) { + if (data.baseListData.length > 0) { + this.modalData.warehouseId = data.baseListData[0].WareHouseID + this.modalData.warehouseName = data.baseListData[0].WareHouseName + } else { + this.modalData.warehouseName = '' + } + } + }) + }, + + locationBlur (tagNo) { + let tempData = { + tagno: tagNo, + conditionSql: " and LocationID = '" + this.modalData.locationId + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'" + } + verifyData(tempData).then(({data}) => { + if (data && data.code === 0) { + if (data.baseListData.length > 0) { + this.modalData.locationId = data.baseListData[0].LocationID + this.modalData.locationName = data.baseListData[0].LocationName + } else { + this.modalData.locationName = '' + } + } + }) + }, + + partBlur (tagNo) { let tempData = { tagno: tagNo, - conditionSql: " and SupplierID = '" + this.modalData.supplierId + "'" + " and site = '" + this.modalData.site + "'" + conditionSql: " and PartNo = '" + this.modalData.partNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { - this.modalData.supplierId = data.baseListData[0].SupplierID - this.modalData.supplierName = data.baseListData[0].SupplierName + this.modalData.partNo = data.baseListData[0].PartNo + this.modalData.partDesc = data.baseListData[0].PartDescription } else { - this.modalData.supplierName = '' + this.modalData.partDesc = '' } } }) @@ -470,8 +617,16 @@ export default { this.tagType = type this.$nextTick(() => { let strVal = '' - if (val === 506) { - strVal = this.modalData.supplierId + if (val === 20) { + strVal = this.modalData.warehouseId + this.$refs.baseList.init(val, strVal) + } + if (val === 22) { + strVal = this.modalData.locationId + this.$refs.baseList.init(val, strVal) + } + if (val === 509) { + strVal = this.modalData.partNo this.$refs.baseList.init(val, strVal) } }) @@ -479,9 +634,17 @@ export default { // 列表方法的回调 getBaseData (val) { - if (this.tagNo === 506) { - this.modalData.supplierId = val.SupplierID - this.modalData.supplierName = val.SupplierName + if (this.tagNo === 20) { + this.modalData.warehouseId = val.WareHouseID + this.modalData.warehouseName = val.WareHouseName + } + if (this.tagNo === 22) { + this.modalData.locationId = val.LocationID + this.modalData.locationName = val.LocationName + } + if (this.tagNo === 509) { + this.modalData.partNo = val.PartNo + this.modalData.partDesc = val.PartDescription } }, @@ -495,3 +658,4 @@ export default { +