From 6dd3b3c715d3452f2a7a9a26ef75a1b0daabff0b Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 28 Oct 2025 10:30:39 +0800 Subject: [PATCH] =?UTF-8?q?2025-10-28=20=E4=BB=93=E5=BA=93=E7=9B=98?= =?UTF-8?q?=E7=82=B9=E7=AE=A1=E7=90=86PDA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/warehouse/countingWIP.js | 11 + .../modules/warehouse/countingDetail.vue | 278 +++++++++++++++--- src/views/modules/warehouse/countingList.vue | 81 ++--- 3 files changed, 297 insertions(+), 73 deletions(-) diff --git a/src/api/warehouse/countingWIP.js b/src/api/warehouse/countingWIP.js index 547938b..6de9565 100644 --- a/src/api/warehouse/countingWIP.js +++ b/src/api/warehouse/countingWIP.js @@ -66,3 +66,14 @@ export function countingWIPDelete(data) { }) } +/** + * 查询盘点明细列表(物料清单) + */ +export function countingReportDetailList(data) { + return http({ + url: http.adornUrl('/warehouse/countingReport/detailList'), + method: 'post', + data: http.adornData(data) + }) +} + diff --git a/src/views/modules/warehouse/countingDetail.vue b/src/views/modules/warehouse/countingDetail.vue index 526218b..af8f5d2 100644 --- a/src/views/modules/warehouse/countingDetail.vue +++ b/src/views/modules/warehouse/countingDetail.vue @@ -36,25 +36,22 @@
+
+ 盘点单号 + {{ reportId }} +
+
-
-
盘点单号
-
{{ reportId }}
-
标签张数
- {{ checkedCount }} - / - {{ totalCount }} + {{ checkedCount }}{{ totalCount }}
物料总数
- {{ checkedQty }} - / - {{ totalQty }} + {{ checkedQty }}{{ totalQty }}
@@ -66,6 +63,9 @@ 盘点信息确认
+
+ 物料清单 +
@@ -84,7 +84,7 @@ :key="index" class="list-item" :class="'status-' + getStatusClass(item.checkedStatus)"> -
{{ wipList.length - index }}
+
{{ index + 1 }}
{{ item.rollNo }}
{{ item.rollQty }}
@@ -126,6 +126,47 @@ 取消
+ + + +
+ +
+
+
NO.
+
标签条码
+
标签数量
+
是否盘点
+
+
+
+
{{ index + 1 }}
+
{{ item.rollNo }}
+
{{ item.rollQty }}
+
+ + {{ item.checkedFlag === 'Y' ? '是' : '否' }} + +
+
+
+ 暂无数据 +
+
+
+
+ + 关闭 + +
@@ -135,7 +176,8 @@ import { countingWIPScanLabel, countingWIPUpdateCheckedQty, countingWIPConfirmCounting, - countingWIPDelete + countingWIPDelete, + countingReportDetailList } from '@/api/warehouse/countingWIP.js' export default { @@ -153,7 +195,9 @@ export default { totalCount: 0, totalQty: 0, checkedCount: 0, - checkedQty: 0 + checkedQty: 0, + materialListVisible: false, + materialDetailList: [] } }, mounted() { @@ -271,8 +315,8 @@ export default { countingWIPScanLabel(params).then(({ data }) => { if (data && data.code === 0) { this.$message.success('扫描成功') - // 将新扫描的数据添加到列表顶部(显示在底部) - this.wipList.push(data.data) + // 将新扫描的数据添加到列表开头(显示在最上面) + this.wipList.unshift(data.data) this.scanCode = '' this.focusInput() } else { @@ -355,6 +399,31 @@ export default { this.$refs.scanInput.focus() } }) + }, + + // 显示物料清单对话框 + showMaterialListDialog() { + this.materialListVisible = true + this.loadMaterialDetailList() + }, + + // 加载物料清单 + loadMaterialDetailList() { + const params = { + site: this.site, + buNo: this.buNo, + reportId: this.reportId + } + + countingReportDetailList(params).then(({ data }) => { + if (data && data.code === 0) { + this.materialDetailList = data.detailList || [] + } else { + this.$message.error(data.msg || '查询失败') + } + }).catch(() => { + this.$message.error('查询失败') + }) } } } @@ -437,79 +506,122 @@ export default { /* 物料信息卡片 */ .material-info-card { - margin: 12px 16px; - padding: 16px; background: white; + margin: 4px 16px; + padding: 6px 20px; border-radius: 8px; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + border: 1px solid #f0f0f0; +} + +.card-title { + margin-bottom: 12px; +} + +.title-label { + font-size: 12px; + color: #666; + display: block; + margin-bottom: 4px; +} + +.title-value { + font-size: 16px; + font-weight: bold; + color: #333; + margin-left: 20px; } .card-details { display: flex; justify-content: space-between; align-items: flex-start; - gap: 8px; + gap: 4px; } .detail-item { flex: 1; text-align: center; - min-width: 0; + min-width: 60px; + max-width: 120px; } .detail-label { - font-size: 12px; - color: #999; - margin-bottom: 6px; + font-size: 11px; + color: #666; + margin-bottom: 4px; line-height: 1.2; - white-space: nowrap; + margin-left: -12px; } .detail-value { - font-size: 16px; + font-size: 13px; color: #333; line-height: 1.2; - font-weight: 500; - word-break: break-all; + margin-left: -12px; } -.detail-value .highlight { +.detail-value .qualified { color: #17B3A3; - font-weight: bold; + font-weight: 500; } -.detail-value .separator { +.detail-value .total { color: #333; - margin: 0 2px; + font-weight: 500; } -.detail-value .total-value { +.detail-value .total::before { + content: '/'; color: #333; - font-weight: 500; } /* 区块标题 */ .section-title { display: flex; - justify-content: space-between; align-items: center; - padding: 12px 16px; + justify-content: space-between; + padding: 6px 8px; background: white; - border-bottom: 1px solid #f0f0f0; + margin: 0 16px; + margin-top: 4px; + border-radius: 8px 8px 0 0; + border-bottom: 2px solid #17B3A3; } .title-left { display: flex; align-items: center; - gap: 8px; - font-size: 14px; - font-weight: bold; - color: #333; } .title-left i { + color: #17B3A3; font-size: 16px; + margin-right: 8px; +} + +.title-left span { + color: #17B3A3; + font-size: 14px; + font-weight: 500; +} + +.title-right { + display: flex; + align-items: center; +} + +.material-list-link { color: #17B3A3; + font-size: 14px; + font-weight: 500; + cursor: pointer; + text-decoration: underline; + transition: color 0.2s ease; +} + +.material-list-link:hover { + color: #13a08e; } /* 标签列表 */ @@ -781,4 +893,90 @@ export default { font-size: 14px; } } + +/* 物料清单对话框 */ +.material-list-container { + max-height: 60vh; + overflow-y: auto; +} + +.material-table { + width: 100%; +} + +.table-header { + display: flex; + align-items: center; + padding: 10px 8px; + background: #f8f9fa; + border-bottom: 1px solid #e0e0e0; + font-size: 12px; + font-weight: bold; + color: #666; +} + +.table-body { + max-height: 50vh; + overflow-y: auto; +} + +.table-row { + display: flex; + align-items: center; + padding: 10px 8px; + border-bottom: 1px solid #f0f0f0; + font-size: 12px; +} + +.table-row:last-child { + border-bottom: none; +} + +.table-header .col-no, +.table-row .col-no { + width: 50px; + text-align: center; + flex-shrink: 0; +} + +.table-header .col-roll-no, +.table-row .col-roll-no { + flex: 1; + min-width: 100px; + padding: 0 8px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.table-header .col-roll-qty, +.table-row .col-roll-qty { + width: 80px; + text-align: center; + flex-shrink: 0; +} + +.table-header .col-checked, +.table-row .col-checked { + width: 80px; + text-align: center; + flex-shrink: 0; +} + +.checked-yes { + color: #67C23A; + font-weight: 500; +} + +.checked-no { + color: #F56C6C; + font-weight: 500; +} + +.empty-data { + text-align: center; + padding: 40px 20px; + color: #999; + font-size: 14px; +} diff --git a/src/views/modules/warehouse/countingList.vue b/src/views/modules/warehouse/countingList.vue index 50cc3af..dacb574 100644 --- a/src/views/modules/warehouse/countingList.vue +++ b/src/views/modules/warehouse/countingList.vue @@ -30,30 +30,30 @@ :key="item.reportId" class="inbound-card" @click="goToDetail(item)"> +
+ 盘点单号 + {{ item.reportId }} +
+
-
-
盘点单号
-
{{ item.reportId }}
-
标签张数
- {{ item.checkedCount }} - / - {{ item.totalCount }} + {{ item.checkedCount }}{{ item.totalCount }}
物料总数
- {{ item.checkedQty }} - / - {{ item.totalQty }} + {{ item.checkedQty }}{{ item.totalQty }} +
+
+
+
盘点状态
+
+ {{ item.statusDesc }}
-
- @@ -211,57 +211,72 @@ export default { transform: translateY(0); } +/* 卡片标题 */ +.card-title { + margin-bottom: 12px; +} + +.title-label { + font-size: 12px; + color: #666; + display: block; + margin-bottom: 4px; +} + +.title-value { + font-size: 16px; + font-weight: bold; + color: #333; + margin-left: 20px; +} + /* 卡片详情 */ .card-details { display: flex; justify-content: space-between; align-items: flex-start; - gap: 8px; - padding-bottom: 12px; + gap: 4px; } .detail-item { flex: 1; text-align: center; - min-width: 0; + min-width: 60px; + max-width: 90px; } .detail-label { - font-size: 12px; - color: #999; - margin-bottom: 6px; + font-size: 11px; + color: #666; + margin-bottom: 4px; line-height: 1.2; - white-space: nowrap; + margin-left: -12px; } .detail-value { - font-size: 16px; + font-size: 13px; color: #333; line-height: 1.2; - font-weight: 500; - word-break: break-all; + margin-left: -12px; } .detail-value .qualified { color: #17B3A3; - font-weight: bold; + font-weight: 500; } -.detail-value .separator { +.detail-value .total { color: #333; - margin: 0 2px; + font-weight: 500; } -.detail-value .total { +.detail-value .total::before { + content: '/'; color: #333; - font-weight: 500; } -/* 卡片底部 */ -.card-footer { - padding-top: 8px; - border-top: 1px solid #f0f0f0; - text-align: right; +.detail-value.status-value { + margin-left: 0; } .status-tag {