|
|
|
@ -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 { |
|
|
|
|