diff --git a/src/views/modules/other-transaction/other-inbound.vue b/src/views/modules/other-transaction/other-inbound.vue index 15ce353..24e5222 100644 --- a/src/views/modules/other-transaction/other-inbound.vue +++ b/src/views/modules/other-transaction/other-inbound.vue @@ -213,7 +213,7 @@ export default { validateAndAddLabel(unitId) { const params = { unitId: unitId, - site: this.site, + //site: this.site, }; scanHandlingUnitLabel(params).then(({ data }) => { @@ -236,10 +236,10 @@ export default { this.$message.warning('该HandlingUnit已扫描,请勿重复扫描'); return; } - - // 校验HU是否属于当前站点 + this.site = this.scannedItems.length > 0 ? this.scannedItems[0].site : huInfo.site; // 设置当前站点为第一个扫描的HU的站点 + // 所有标签site必须一致 if (huInfo.site && huInfo.site !== this.site) { - this.$message.error('HandlingUnit站点不匹配'); + this.$message.error('所有标签site必须一致'); return; } // 校验HU是否在库 @@ -256,7 +256,8 @@ export default { qty: huInfo.qty, unit: huInfo.unit, batchNo: huInfo.batchNo, - locationId: huInfo.locationId + locationId: huInfo.locationId, + site: huInfo.site }); this.$message.success('扫描成功'); diff --git a/src/views/modules/other-transaction/other-outbound.vue b/src/views/modules/other-transaction/other-outbound.vue index 122be70..eb526cb 100644 --- a/src/views/modules/other-transaction/other-outbound.vue +++ b/src/views/modules/other-transaction/other-outbound.vue @@ -158,7 +158,7 @@ export default { validateAndAddLabel(unitId) { const params = { unitId: unitId, - site: this.site, + //site: this.site, }; scanHandlingUnitLabelForOther(params).then(({ data }) => { @@ -182,9 +182,10 @@ export default { return; } - // 校验HU是否属于当前站点 + this.site = this.scannedItems.length > 0 ? this.scannedItems[0].site : huInfo.site; // 设置当前站点为第一个扫描的HU的站点 + // 所有标签site必须一致 if (huInfo.site && huInfo.site !== this.site) { - this.$message.error('HandlingUnit站点不匹配'); + this.$message.error('所有标签site必须一致'); return; } @@ -203,7 +204,8 @@ export default { qty: huInfo.qty, unit: huInfo.unit, batchNo: huInfo.batchNo, - locationId: huInfo.locationId + locationId: huInfo.locationId, + site: huInfo.site }); this.$message.success('扫描成功'); diff --git a/src/views/modules/other-transaction/scrap.vue b/src/views/modules/other-transaction/scrap.vue index d4cd949..a42624e 100644 --- a/src/views/modules/other-transaction/scrap.vue +++ b/src/views/modules/other-transaction/scrap.vue @@ -136,7 +136,8 @@ export default { { value: 'ST010-ZH', label: '材料表面划伤' }, { value: 'ST011-ZH', label: '材料过期' }, ], - errorMessage: '' + errorMessage: '', + site: '', // 当前站点 }; }, methods: { @@ -162,10 +163,8 @@ export default { this.$message.warning('该标签已扫描,请勿重复扫描'); return; } - const params = { labelCode: labelCode, - site: localStorage.getItem('site'), }; scanScrapLabel(params).then(({ data }) => { @@ -175,7 +174,12 @@ export default { this.$message.error('库存不存在,该HU未入库或已出库'); return; } - + this.site = this.labelList.length > 0 ? this.labelList[0].site : data.labelInfo.site; // 设置当前站点为第一个扫描的HU的站点 + // 所有标签site必须一致 + if (data.labelInfo.site !== this.site) { + this.$message.error('所有标签site必须一致'); + return; + } // 添加到列表 this.labelList.push({ id: Date.now(), @@ -189,6 +193,7 @@ export default { warehouseId: data.labelInfo.warehouseId, inStockFlag: data.labelInfo.inStockFlag, engChgLevel: data.labelInfo.engChgLevel, + site: data.labelInfo.site, }); this.$message.success('扫描成功'); @@ -234,7 +239,7 @@ export default { type: 'warning' }).then(() => { const params = { - site: localStorage.getItem('site'), + site: this.site, scrapReason: this.selectedReason, labels: this.labelList.map(label => ({ labelCode: label.labelCode, diff --git a/src/views/modules/production-inbound/inboundRegister.vue b/src/views/modules/production-inbound/inboundRegister.vue index fc7cf17..adac8d1 100644 --- a/src/views/modules/production-inbound/inboundRegister.vue +++ b/src/views/modules/production-inbound/inboundRegister.vue @@ -315,7 +315,7 @@ export default { } const requestData = { - ifsSiteID: this.site, + ifsSiteID: this.site+'%', ifsOrderNo: orderNo, ifsReleaseNo: releaseNo, ifsSequenceNo: sequenceNo @@ -361,7 +361,7 @@ export default { try { // 1. 检查物料是否已发料 const validateResult = await validateMaterialIssued({ - site: this.site, + site: this.site+'%', orderNo: row.orderNo, releaseNo: row.releaseNo || '*', sequenceNo: row.sequenceNo || '*' @@ -430,7 +430,7 @@ export default { try { const { data } = await getHandlingUnitDetail({ - site: this.site, + //site: this.site, unitId: unitId }); @@ -656,7 +656,7 @@ export default { // 构建提交数据 const submitData = { // 基本字段 - site: this.site, + site: item.contract, warehouseId: this.warehouseId, orderNo: item.orderNo, releaseNo: item.releaseNo, diff --git a/src/views/modules/production-withdrawal/order-list.vue b/src/views/modules/production-withdrawal/order-list.vue index 2a68e65..532fcc1 100644 --- a/src/views/modules/production-withdrawal/order-list.vue +++ b/src/views/modules/production-withdrawal/order-list.vue @@ -111,7 +111,7 @@ export default { } } const queryData = { - ifsSiteID: localStorage.getItem('site'), + ifsSiteID: localStorage.getItem('site')+'%', ifsOrderNo: orderNo, ifsReleaseNo: releaseNo, ifsSequenceNo: sequenceNo @@ -161,6 +161,7 @@ export default { this.$router.push({ path: '/productionWithdrawalScan', query: { + site: item.contract, orderNo: item.sourceRef1, releaseNo: item.sourceRef2, sequenceNo: item.sourceRef3, diff --git a/src/views/modules/production-withdrawal/scan-hu.vue b/src/views/modules/production-withdrawal/scan-hu.vue index f6c3ecf..a1d6d93 100644 --- a/src/views/modules/production-withdrawal/scan-hu.vue +++ b/src/views/modules/production-withdrawal/scan-hu.vue @@ -152,6 +152,7 @@ export default { return { // 工单信息 orderInfo: { + site: '', orderNo: '', releaseNo: '', sequenceNo: '', @@ -201,6 +202,7 @@ export default { mounted() { // 从路由参数获取工单信息 this.orderInfo = { + site: this.$route.query.site || '', orderNo: this.$route.query.orderNo || '', releaseNo: this.$route.query.releaseNo || '', sequenceNo: this.$route.query.sequenceNo || '', @@ -350,7 +352,7 @@ export default { const unitIds = this.scannedHus.map(hu => hu.unitId) const params = { - site: this.site, + site: this.orderInfo.site, orderNo: this.orderInfo.orderNo, releaseNo: this.orderInfo.releaseNo, sequenceNo: this.orderInfo.sequenceNo, diff --git a/src/views/modules/recv/qualifiedStorage.vue b/src/views/modules/recv/qualifiedStorage.vue index d38473b..9d74cea 100644 --- a/src/views/modules/recv/qualifiedStorage.vue +++ b/src/views/modules/recv/qualifiedStorage.vue @@ -294,7 +294,7 @@ export default { const params = { purchaseOrderNo: this.scanCode.trim(), - site: this.site + site: this.site+'%' }; getPurchaseOrderReceiptList(params).then(({ data }) => { @@ -439,7 +439,7 @@ export default { const params = { unitId: unitId, - site: this.site, + site: this.selectedReceipt.contract, expectedPartNo: this.selectedReceipt.sourcePartNo, expectedBatchNo: this.getBatchNoFromReceipt() // 从接收记录中获取期望的批次号 }; @@ -552,7 +552,7 @@ export default { const totalQty = this.scannedItems.reduce((sum, item) => sum + (parseFloat(item.qty) || 0), 0); const params = { - site: this.site, + site: this.selectedReceipt.contract, receiptSequence: this.selectedReceipt.receiptSequence, sourceRef1: this.selectedReceipt.sourceRef1, sourceRef2: this.selectedReceipt.sourceRef2, diff --git a/src/views/modules/recv/recv.vue b/src/views/modules/recv/recv.vue index 74694c2..37ba51e 100644 --- a/src/views/modules/recv/recv.vue +++ b/src/views/modules/recv/recv.vue @@ -260,7 +260,7 @@ export default { // 开始搜索时显示loading this.loadingText = '搜索中...'; this.fullscreenLoading = true; - getPoList({ poNumber: this.scanCode,site: this.site }).then(({ data }) => { + getPoList({ poNumber: this.scanCode,site: this.site+'%' }).then(({ data }) => { if (data.code === 0) { /*let subSiteCodeList = localStorage.getItem('userSubSiteCodeList') ; let subSiteCodeList2 = this.$store.state.user.subSiteCodeList;*/ @@ -542,7 +542,7 @@ export default { // 构建符合服务端TransDetailDto结构的数据 const receiveData = { // 基本字段 - site: this.site, + site: item.contract, warehouseId: this.warehouseId, partNo: item.partNo, partDesc: item.description,