|
@@ -8,7 +8,7 @@
|
|
|
@click-left="onClickLeft"
|
|
@click-left="onClickLeft"
|
|
|
>
|
|
>
|
|
|
<template #left>
|
|
<template #left>
|
|
|
- <van-icon name="arrow-left" size="25" />
|
|
|
|
|
|
|
+ <van-icon name="arrow-left" size="25" />
|
|
|
<div style="color: #fff" >返回</div>
|
|
<div style="color: #fff" >返回</div>
|
|
|
</template>
|
|
</template>
|
|
|
<template #right>
|
|
<template #right>
|
|
@@ -68,6 +68,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<van-field class="input" ref="scanCountRef" label-width="50px" v-model="item.count" type="number" :min="0"
|
|
<van-field class="input" ref="scanCountRef" label-width="50px" v-model="item.count" type="number" :min="0"
|
|
|
:max="item.expectedQuantity"
|
|
:max="item.expectedQuantity"
|
|
|
|
|
+ autocomplete="off"
|
|
|
@keydown.enter="onCount(item,0)"
|
|
@keydown.enter="onCount(item,0)"
|
|
|
label="实拣数" placeholder="请输实拣数量"
|
|
label="实拣数" placeholder="请输实拣数量"
|
|
|
>
|
|
>
|
|
@@ -106,6 +107,16 @@
|
|
|
<lot-att ref="lotAttRef" />
|
|
<lot-att ref="lotAttRef" />
|
|
|
<barcode-combine ref="barcodeCombineRef" @setCombine="setCombine" :container="containerNo" :matched-sku="matchedSku" />
|
|
<barcode-combine ref="barcodeCombineRef" @setCombine="setCombine" :container="containerNo" :matched-sku="matchedSku" />
|
|
|
<printer ref="printerRef" @onPrint="onPrint"/>
|
|
<printer ref="printerRef" @onPrint="onPrint"/>
|
|
|
|
|
+ <van-dialog v-model:show="countTrueFalseBy" title="拣货数量" show-cancel-button :beforeClose="beforeClose" :keyboardEnabled="false" >
|
|
|
|
|
+ <van-field v-model="activeItem.count" autocomplete="off" center border label="实拣数:" placeholder="请输实拣数量"
|
|
|
|
|
+ type="digit" name="pattern" ref="countRef" class="count-input"
|
|
|
|
|
+ label-width="70px" label-align="center" :rules="[{ pattern, message: '请输入正确数量' }]">
|
|
|
|
|
+ </van-field>
|
|
|
|
|
+ <van-row :gutter="[5, 5]" style="margin: 10px 20px;font-size: 14px;text-align: left;color:#333" v-if="activeItem.barcode">
|
|
|
|
|
+ <van-col span="24">条码:{{activeItem.barcode}}</van-col>
|
|
|
|
|
+ <van-col span="24">商品:{{activeItem.name}}</van-col>
|
|
|
|
|
+ </van-row>
|
|
|
|
|
+ </van-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
@@ -147,6 +158,12 @@ try {
|
|
|
}
|
|
}
|
|
|
const warehouse = store.warehouse
|
|
const warehouse = store.warehouse
|
|
|
const containerNo = ref('')
|
|
const containerNo = ref('')
|
|
|
|
|
+// 数量扣除
|
|
|
|
|
+const pattern=/^[0-9]\d*$/
|
|
|
|
|
+const count=ref('')
|
|
|
|
|
+const countRef= ref(null)
|
|
|
|
|
+const countTrueFalseBy=ref(false)
|
|
|
|
|
+const activeItem=ref({})
|
|
|
//容器号ref
|
|
//容器号ref
|
|
|
const scanCountRef = ref(null)
|
|
const scanCountRef = ref(null)
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -387,8 +404,13 @@ const _handlerScan=(code)=> {
|
|
|
}
|
|
}
|
|
|
return list;
|
|
return list;
|
|
|
}, [])
|
|
}, [])
|
|
|
- const activeBarcode=modelLocative.list[0]
|
|
|
|
|
- playVoicePickNum(activeBarcode.expectedQuantity)
|
|
|
|
|
|
|
+ const listMap = modelLocative.list.reduce((acc, item) => {
|
|
|
|
|
+ const key = `${barcodeToUpperCase(item.barcode)}-${item.operationTime}`
|
|
|
|
|
+ acc[key] = item
|
|
|
|
|
+ return acc
|
|
|
|
|
+ }, {})
|
|
|
|
|
+ const upperCode = barcodeToUpperCase(code);
|
|
|
|
|
+ let activeBarcode = listMap[`${upperCode}-null`] || modelLocative.list.find(item => `${barcodeToUpperCase(item.barcode)}` === upperCode)
|
|
|
if(activeBarcode.operationTime){
|
|
if(activeBarcode.operationTime){
|
|
|
showConfirmDialog({
|
|
showConfirmDialog({
|
|
|
title: '温馨提示',
|
|
title: '温馨提示',
|
|
@@ -396,12 +418,18 @@ const _handlerScan=(code)=> {
|
|
|
`商品重复提交\n是否再次提交?`,
|
|
`商品重复提交\n是否再次提交?`,
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
|
|
+ playVoicePickNum(activeBarcode.expectedQuantity)
|
|
|
activeBarcode.count=activeBarcode.expectedQuantity
|
|
activeBarcode.count=activeBarcode.expectedQuantity
|
|
|
onScan(4)
|
|
onScan(4)
|
|
|
|
|
+ activeItem.value=activeBarcode
|
|
|
|
|
+ countTrueFalseBy.value=true
|
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
|
- //匹配到条码扣减库存
|
|
|
|
|
- onCount(activeBarcode,0)
|
|
|
|
|
|
|
+ countRef.value?.focus()
|
|
|
},200)
|
|
},200)
|
|
|
|
|
+ // setTimeout(()=>{
|
|
|
|
|
+ // //匹配到条码扣减库存
|
|
|
|
|
+ // onCount(activeBarcode,0)
|
|
|
|
|
+ // },200)
|
|
|
}).catch(()=>{
|
|
}).catch(()=>{
|
|
|
const allOperationTimeExist = modelLocative.list.every(({ operationTime }) => operationTime);
|
|
const allOperationTimeExist = modelLocative.list.every(({ operationTime }) => operationTime);
|
|
|
if(allOperationTimeExist){
|
|
if(allOperationTimeExist){
|
|
@@ -409,12 +437,18 @@ const _handlerScan=(code)=> {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}else {
|
|
}else {
|
|
|
|
|
+ playVoicePickNum(activeBarcode.expectedQuantity)
|
|
|
activeBarcode.count=activeBarcode.expectedQuantity
|
|
activeBarcode.count=activeBarcode.expectedQuantity
|
|
|
onScan(4)
|
|
onScan(4)
|
|
|
- setTimeout(()=>{
|
|
|
|
|
|
|
+ // setTimeout(()=>{
|
|
|
//匹配到条码扣减库存
|
|
//匹配到条码扣减库存
|
|
|
- onCount(activeBarcode,0)
|
|
|
|
|
- },200)
|
|
|
|
|
|
|
+ activeItem.value=activeBarcode
|
|
|
|
|
+ countTrueFalseBy.value=true
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
|
+ countRef.value?.focus()
|
|
|
|
|
+ },200)
|
|
|
|
|
+ // onCount(activeBarcode,0)
|
|
|
|
|
+ // },200)
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
//查询组合条码
|
|
//查询组合条码
|
|
@@ -482,6 +516,28 @@ const validate = (data,type) => {
|
|
|
}
|
|
}
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
+const beforeClose= (action) =>
|
|
|
|
|
+ new Promise((resolve) => {
|
|
|
|
|
+ if(action==='confirm'){
|
|
|
|
|
+ if(activeItem.value.count==''){
|
|
|
|
|
+ messageTips.value='请输入拣货数量'
|
|
|
|
|
+ showToast({duration:5000,message:'请输入拣货数量'})
|
|
|
|
|
+ return resolve(false)
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number(activeItem.value.count)>activeItem.value.expectedQuantity){
|
|
|
|
|
+ const message='拣货数量不能大于所需数量'+activeItem.value.expectedQuantity
|
|
|
|
|
+ messageTips.value=message
|
|
|
|
|
+ showToast({duration:5000,message})
|
|
|
|
|
+ return resolve(false)
|
|
|
|
|
+ }
|
|
|
|
|
+ resolve(true)
|
|
|
|
|
+ countTrueFalseBy.value=false
|
|
|
|
|
+ onCount(activeItem.value,0)
|
|
|
|
|
+ }
|
|
|
|
|
+ onScan(3)
|
|
|
|
|
+ activeItem.value.count=activeItem.value.quantity
|
|
|
|
|
+ resolve(true)
|
|
|
|
|
+ });
|
|
|
//输入数量
|
|
//输入数量
|
|
|
const jumpLoading=ref(false);
|
|
const jumpLoading=ref(false);
|
|
|
const onCount=(item,type)=>{
|
|
const onCount=(item,type)=>{
|
|
@@ -549,11 +605,15 @@ const _setPickingDetail=(params,type)=>{
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
// 更新 locationList 中的 operationTime
|
|
// 更新 locationList 中的 operationTime
|
|
|
- params.forEach((param, index) => {
|
|
|
|
|
- if (activeList.list[index]) {
|
|
|
|
|
- activeList.list[index].operationTime = param.operationTime;
|
|
|
|
|
- activeList.list[index].count = param.quantity;
|
|
|
|
|
- activeList.list[index].quantity = param.quantity;
|
|
|
|
|
|
|
+ const lineMap = toMap(params,'line')
|
|
|
|
|
+ activeList.list.forEach((item, index) => {
|
|
|
|
|
+ const param = lineMap[item.line]
|
|
|
|
|
+ if (param) {
|
|
|
|
|
+ if (item.operationTime !== param.operationTime || item.quantity !== param.quantity) {
|
|
|
|
|
+ activeList.list[index].operationTime = param.operationTime;
|
|
|
|
|
+ activeList.list[index].quantity = param.quantity;
|
|
|
|
|
+ activeList.list[index].count = param.count;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
//验证库位里的所有商品是否都存在拣货时间
|
|
//验证库位里的所有商品是否都存在拣货时间
|
|
@@ -604,7 +664,6 @@ const _setPickingDetail=(params,type)=>{
|
|
|
}else {
|
|
}else {
|
|
|
getPickingCode()
|
|
getPickingCode()
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}).catch((err)=> {
|
|
}).catch((err)=> {
|
|
@@ -654,7 +713,6 @@ const actions = [
|
|
|
{ name: '检索条码' ,key:'inputBarcode'},
|
|
{ name: '检索条码' ,key:'inputBarcode'},
|
|
|
];
|
|
];
|
|
|
const onClickLeft = () => {
|
|
const onClickLeft = () => {
|
|
|
-
|
|
|
|
|
if(route.query.aisle){
|
|
if(route.query.aisle){
|
|
|
router.push({name:'PickingAisle'})
|
|
router.push({name:'PickingAisle'})
|
|
|
}else {
|
|
}else {
|
|
@@ -947,5 +1005,6 @@ const onRefresh = () => {
|
|
|
padding: 5px 10px
|
|
padding: 5px 10px
|
|
|
background: none
|
|
background: none
|
|
|
border-bottom: 2px solid #1989fa
|
|
border-bottom: 2px solid #1989fa
|
|
|
-
|
|
|
|
|
|
|
+.count-input
|
|
|
|
|
+ border-bottom: 2px solid #0077ff
|
|
|
</style>
|
|
</style>
|