Browse Source

2025-10-27

仓库盘点管理PDA功能
master
fengyuan_yang 3 months ago
parent
commit
b8b57e4b26
  1. 11
      src/api/warehouse/countingWIP.js
  2. 69
      src/views/modules/warehouse/countingDetail.vue

11
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)
})
}

69
src/views/modules/warehouse/countingDetail.vue

@ -93,13 +93,12 @@
</span>
</div>
<div class="col-qty">
<el-input-number
v-model="item.checkedQty"
:min="0"
:precision="2"
size="mini"
controls-position="right"
<input
type="number"
v-model.number="item.checkedQty"
class="qty-input"
@blur="updateQty(item)"
@focus="$event.target.select()"
/>
</div>
</div>
@ -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 {

Loading…
Cancel
Save