Commit ba86f2b7 by wusiyi

fix: 点击列表时刷新数量

parent ae144102
...@@ -949,7 +949,12 @@ ...@@ -949,7 +949,12 @@
<el-button type="primary" @click="updateShipmentNumber"> 确认 </el-button> <el-button type="primary" @click="updateShipmentNumber"> 确认 </el-button>
</template> </template>
</ElDialog> </ElDialog>
<ElDialog v-model="scanDialogVisible" width="800px" title="盘点"> <ElDialog
v-model="scanDialogVisible"
width="800px"
title="盘点"
@close="getTreeNum()"
>
<el-input <el-input
ref="scanInputRef" ref="scanInputRef"
v-model="scanInput" v-model="scanInput"
...@@ -1905,10 +1910,10 @@ const handleBatchDelete = async () => { ...@@ -1905,10 +1910,10 @@ const handleBatchDelete = async () => {
search() search()
await getTreeNum() await getTreeNum()
} }
const nodeClick = (data: InterWarehouseTree) => { const nodeClick = async (data: InterWarehouseTree) => {
nodeCode.value = data.code ?? '' nodeCode.value = data.code ?? ''
sessionStorage.setItem('InRecord_NodeCode', data.code ?? '') sessionStorage.setItem('InRecord_NodeCode', data.code ?? '')
search() Promise.all([search(), getTreeNum()])
} }
const searchDetail = async () => { const searchDetail = async () => {
try { try {
...@@ -2043,12 +2048,14 @@ const openScanDialog = () => { ...@@ -2043,12 +2048,14 @@ const openScanDialog = () => {
} }
// 扫码盘点 // 扫码盘点
const scan = async () => { const scan = async () => {
console.log(scanInput.value, 'scanInput.value')
if (!scanInput.value) { if (!scanInput.value) {
return ElMessage.warning('请输入备货单号') return ElMessage.warning('请输入备货单号')
} }
scanInput.value = scanInput.value.trim()
// 将中文破折号转换为下划线 // 将中文破折号转换为下划线
scanInput.value = scanInput.value.replace(/——/g, '_') scanInput.value = scanInput.value.replace(/——/g, '_')
console.log(scanInput.value)
const formatRegex = /^BHD\d{9}_\d+$/ const formatRegex = /^BHD\d{9}_\d+$/
if (!formatRegex.test(scanInput.value)) { if (!formatRegex.test(scanInput.value)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment