入库-出库检查接口调整

This commit is contained in:
赵正易 2024-03-27 17:20:31 +08:00
parent 0cd58461b9
commit 4265112a42
3 changed files with 48 additions and 14 deletions

View File

@ -10,7 +10,7 @@ import * as WarehoseApi from '@/api/warehouse/warehose.js';
export default {
name: 'pda-scan-input',
props: {
hasFocus:{
hasFocus: {
default: true,
type: Boolean
},
@ -58,8 +58,8 @@ export default {
emitInputChange(data, type) {
this.$emit('getInfo', data, type);
},
handlerBlur(){
if(this.hasFocus){
handlerBlur() {
if (this.hasFocus) {
this.isFocus = false;
setTimeout(() => {
this.$nextTick(function () {
@ -126,6 +126,21 @@ export default {
// type = 2
async handleScanGoodsCode(text) {
let package_code = text;
let resolutionData = {
code: package_code
};
const emitRes = await WarehoseApi.resolutionPackage(resolutionData);
if (emitRes.code !== 200 || emitRes.data === null) {
uni.showModal({
title: '提示',
content: '该箱号数据解析异常!',
showCancel: false,
confirmText: '确定'
});
return;
}
this.emitInputChange(emitRes.data, 2);
return;
//
// let _warehouseInfo = this.warehouseInfo;
// if (_warehouseInfo != null && _warehouseInfo != undefined) {
@ -154,6 +169,7 @@ export default {
};
//
const checkRes = await WarehoseApi.isProductionPackage(locationCheckData);
console.log(checkRes);
if (checkRes.code !== 200) {
uni.showModal({
title: '提示',
@ -180,7 +196,6 @@ export default {
});
return;
} else if (checkRes.data === 1) {
//
// const isFullRes = await WarehoseApi.isFullPackage(locationCheckData);
// if (isFullRes.code !== 200 || !isFullRes.data) {
@ -192,9 +207,9 @@ export default {
// });
// return;
// }
// let resolutionData = {
// code: package_code
// };
let resolutionData = {
code: package_code
};
const emitRes = await WarehoseApi.resolutionPackage(resolutionData);
if (emitRes.code !== 200 || emitRes.data === null) {
uni.showModal({

View File

@ -57,6 +57,8 @@ export default {
},
data() {
return {
// true false
isStrict:true,
loading: false,
//
touchNum: 0,
@ -129,12 +131,29 @@ export default {
this.warehouseInfo = data?.warehoseInfo;
this.newMaterialList = [];
} else if (type === 2) {
//
//
//
if (this.newMaterialList.length > 0) {
for (let item of this.newMaterialList) {
if (item.patchCode === data.patchCode) {
uni.showModal({
title: '提示',
content: '此货物已录入过',
showCancel: false,
confirmText: '确定'
});
return;
}
}
}
const checkData = {
production_packcode: data.originalCode,
location:this.warehouseInfo.location,
isStrict:true,
location: this.warehouseInfo.location,
//
isStrict: this.isStrict
};
WarehoseApi.checkWarehousing(checkData).then(res=>{
WarehoseApi.checkWarehousing(checkData).then((res) => {
if (res.code === 200 && res.data) {
this.newMaterialList.push(data);
} else {
@ -145,7 +164,7 @@ export default {
confirmText: '确定'
});
}
})
});
// const checkData = {
// originalCode: data.originalCode
// };
@ -175,8 +194,8 @@ export default {
// }
// }
// }
});
// });
}
},

View File

@ -12,7 +12,7 @@
<span class="col">已扫箱数{{ newMaterialList.length }}</span>
</view>
<view>
<view v-if="searchType === 3" class="color1 aciton-box">操作指示-请扫出</view>
<view v-if="searchType === 3" class="color1 aciton-box">操作指示-请扫出</view>
<view v-if="searchType === 2" class="color2 aciton-box">操作指示-请扫货物码</view>
<!-- 扫描操作 -->
<view class="pda-search-box">