入库-出库检查接口调整
This commit is contained in:
parent
0cd58461b9
commit
4265112a42
@ -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({
|
||||
|
||||
@ -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 {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
});
|
||||
|
||||
// });
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -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">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user