From b8b57e4b2620471c5f39d226f92e50d749e87561 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Mon, 27 Oct 2025 16:24:36 +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=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 | 69 +++++++++++++++----
2 files changed, 67 insertions(+), 13 deletions(-)
diff --git a/src/api/warehouse/countingWIP.js b/src/api/warehouse/countingWIP.js
index 532b281..547938b 100644
--- a/src/api/warehouse/countingWIP.js
+++ b/src/api/warehouse/countingWIP.js
@@ -55,3 +55,14 @@ export function countingWIPConfirmCounting(data) {
})
}
+/**
+ * 删除WIP数据
+ */
+export function countingWIPDelete(data) {
+ return http({
+ url: http.adornUrl('/warehouse/countingWIP/delete'),
+ method: 'post',
+ data: http.adornData(data)
+ })
+}
+
diff --git a/src/views/modules/warehouse/countingDetail.vue b/src/views/modules/warehouse/countingDetail.vue
index 972599b..526218b 100644
--- a/src/views/modules/warehouse/countingDetail.vue
+++ b/src/views/modules/warehouse/countingDetail.vue
@@ -93,13 +93,12 @@
-
@@ -135,7 +134,8 @@ import {
countingWIPList,
countingWIPScanLabel,
countingWIPUpdateCheckedQty,
- countingWIPConfirmCounting
+ countingWIPConfirmCounting,
+ countingWIPDelete
} from '@/api/warehouse/countingWIP.js'
export default {
@@ -233,14 +233,31 @@ export default {
const rollNo = this.scanCode.trim()
const index = this.wipList.findIndex(item => item.rollNo === rollNo)
- if (index !== -1) {
- this.wipList.splice(index, 1)
- this.$message.success('移除成功')
- this.scanCode = ''
- this.focusInput()
- } else {
+ if (index === -1) {
this.$message.warning('未找到该标签')
+ return
}
+
+ // 调用后端接口删除
+ const params = {
+ site: this.site,
+ reportId: this.reportId,
+ rollNo: rollNo
+ }
+
+ countingWIPDelete(params).then(({ data }) => {
+ if (data && data.code === 0) {
+ // 从列表中移除
+ this.wipList.splice(index, 1)
+ this.$message.success('移除成功')
+ this.scanCode = ''
+ this.focusInput()
+ } else {
+ this.$message.error(data.msg || '移除失败')
+ }
+ }).catch(() => {
+ this.$message.error('移除失败')
+ })
},
// 扫描标签
@@ -579,6 +596,32 @@ export default {
width: 100px;
text-align: right;
flex-shrink: 0;
+ padding: 0 4px;
+}
+
+.qty-input {
+ width: 100%;
+ height: 28px;
+ padding: 0 8px;
+ border: 1px solid #dcdfe6;
+ border-radius: 4px;
+ font-size: 12px;
+ text-align: center;
+ outline: none;
+ transition: border-color 0.2s;
+ -webkit-appearance: none;
+ -moz-appearance: textfield;
+}
+
+.qty-input::-webkit-inner-spin-button,
+.qty-input::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+}
+
+.qty-input:focus {
+ border-color: #17B3A3;
+ background-color: #f0f9ff;
}
.status-badge {