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 {