|
|
@ -16,7 +16,12 @@ |
|
|
|
placeholder-style="font-size:12px" style="padding: 5px;" @confirm="scanLocation" /> --> |
|
|
|
|
|
|
|
<view v-if="allowModifyLocation"> |
|
|
|
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位" @confirm="handleConfirm" style="height: 30rpx; border: 1px solid #fff"></uni-combox> |
|
|
|
<uni-combox :candidates="fromLocationList" disabled |
|
|
|
v-model="fromLocationCode" |
|
|
|
placeholder="请扫描来源库位" |
|
|
|
@confirm="handleConfirm" |
|
|
|
style="height: 30rpx; border: 1px solid #fff"> |
|
|
|
</uni-combox> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<text style="padding: 5px; font-size: 40rpx"> |
|
|
@ -94,6 +99,11 @@ const props = defineProps({ |
|
|
|
type: String, |
|
|
|
default: "" |
|
|
|
}, |
|
|
|
// 不走库存余额接口,只用于回显 |
|
|
|
isJustReplay: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
}, |
|
|
|
}) |
|
|
|
const scanResult = ref({}) |
|
|
|
const show = ref(false) |
|
|
@ -225,8 +235,14 @@ const scanLocation = (scanResult) => { |
|
|
|
if (available == 'TRUE') { |
|
|
|
if (checkDirectoryItemExist(fromLocationAreaTypeList.value, type)) { |
|
|
|
location.value = result |
|
|
|
// this.packGetFocus(); |
|
|
|
// 如果只回显 |
|
|
|
if(props.isJustReplay){ |
|
|
|
emit("getResult",scanResult); |
|
|
|
uni.hideLoading() |
|
|
|
}else{ |
|
|
|
checkPackage(scanResult) |
|
|
|
} |
|
|
|
// this.packGetFocus(); |
|
|
|
} else { |
|
|
|
uni.hideLoading() |
|
|
|
const hint = getListLocationAreaTypeDesc(fromLocationAreaTypeList.value) |
|
|
@ -253,13 +269,23 @@ const scanLocation = (scanResult) => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
const getScanResult = (result) => { |
|
|
|
const getScanResult = (result,businessType) => { |
|
|
|
// if (this.fromLocationCode == '' || this.fromLocationCode == null) { |
|
|
|
// this.showMessage('请先扫描来源库位', callback => { |
|
|
|
// this.locationGetFocus(); |
|
|
|
// }) |
|
|
|
// return; |
|
|
|
// } else |
|
|
|
// 直接合格转隔离直接调用的时候需要 |
|
|
|
console.log(88,businessType) |
|
|
|
if(businessType){ |
|
|
|
businessType.value = businessType; |
|
|
|
fromInventoryStatuses.value = getDirectoryItemArray(businessType.value.outInventoryStatuses) |
|
|
|
inventoryStatus.value = getDirectoryItemArray(businessType.value.outInventoryStatuses); //出库库存状态 |
|
|
|
fromLocationAreaTypeList.value = getDirectoryItemArray(businessType.value.outAreaTypes); //出库库区 |
|
|
|
console.log(99,this.fromInventoryStatuses) |
|
|
|
console.log(99,this.balanceFromInventoryStatuses) |
|
|
|
} |
|
|
|
scanLocation(result) |
|
|
|
// debugger |
|
|
|
// if(this.isCheck){ |
|
|
@ -286,7 +312,6 @@ const checkPackage = async (result) => { |
|
|
|
chooseWhich.value = '2' |
|
|
|
if(!result.label.itemCode){ |
|
|
|
showErrorMessage('扫描标签不对,请重新扫描') |
|
|
|
emit('clearItemCode',result.label) |
|
|
|
return |
|
|
|
} |
|
|
|
if (res.data && res.data.list && res.data.list.length > 1) { |
|
|
|