Browse Source

修改扫描库位和箱码

wms3.0_pda
lijuncheng 10 months ago
parent
commit
d86546561d
  1. 104
      mycomponents/scan/winScanPackAndLocation.vue
  2. 5
      pages/deliver/job/deliverDetail.vue
  3. 2
      pages/purchaseReturn/record/returnRecord.vue

104
mycomponents/scan/winScanPackAndLocation.vue

@ -28,7 +28,7 @@
<view v-if='allowModifyLocation'>
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位"
@confirm="scanLocation" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
@confirm="" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
</view>
<view v-else>
<text style="padding: 5px">
@ -122,7 +122,8 @@
businessType: {},
inventoryStatus: [],
managementPrecision: '',
fromInventoryStatuses: ""
fromInventoryStatuses: "",
isCheck:false
}
},
created() {
@ -168,20 +169,30 @@
this.$emit("close", '');
},
scanLocation() {
scanLocation(scanResult) {
var isCheck = false;
if (this.fromLocationCode == '') {
this.showMessage('来源库位不能为空', callback => {
this.showErrorMessage('来源库位不能为空', callback => {
this.locationGetFocus();
})
return;
}
if(this.fromLocationList.length>0){
if(!this.isInLocationList(this.fromLocationCode)){
this.showErrorMessage("扫描库位【"+this.fromLocationCode+'】不在任务来源库位中', callback => {
this.locationGetFocus();
})
return;
}
}
uni.showLoading({
title: '扫描中...',
mask: true
});
getBasicLocationByCode(this.fromLocationCode).then(res => {
uni.hideLoading();
if (res.data.total > 0) {
let result = res.data.list[0];
var type = result.type;
@ -189,8 +200,10 @@
if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) {
this.location = result;
this.packGetFocus();
// this.packGetFocus();
this.checkPackage(scanResult);
} else {
uni.hideLoading();
var hint = getListLocationTypeDesc(this.fromLocationTypeArray);
this.showErrorMessage("库位[" + this.fromLocationCode + "]是" +
getLocationTypeName(type) + ",<br>需要的库位类型是[" + hint + "]", callback => {
@ -198,11 +211,13 @@
})
}
} else {
uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
this.locationGetFocus();
})
}
} else {
uni.hideLoading();
this.showErrorMessage('未查询到库位[' + this.fromLocationCode + ']', res => {
this.locationGetFocus();
})
@ -215,36 +230,45 @@
})
},
getScanResult(result) {
console.log("扫描", result)
if (this.fromLocationCode == '' || this.fromLocationCode == null) {
this.showMessage('请先扫描来源库位', callback => {
this.locationGetFocus();
})
return;
} else {
if (result.label != null) {
this.scanResult = result;
// uni.showLoading({
// title: '...',
// mask: true
// })
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
res => {
if (res.success) {
this.managementPrecision = res.managementPrecision
this.afterQueryBalance(res.data.list);
} else {
this.showErrorMessage(res.message, res => {
this.packGetFocus();
})
}
// uni.hideLoading();
});
}
getScanResult(result) {
// console.log("", result)
// if (this.fromLocationCode == '' || this.fromLocationCode == null) {
// this.showMessage('', callback => {
// this.locationGetFocus();
// })
// return;
// } else
this.scanLocation(result);
// debugger
// if(this.isCheck){
// this.checkPackage(result);
// }
},
checkPackage(result){
if (result.label != null) {
this.scanResult = result;
// uni.showLoading({
// title: '...',
// mask: true
// })
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
res => {
uni.hideLoading();
if (res.success) {
this.managementPrecision = res.managementPrecision
this.afterQueryBalance(res.data.list);
} else {
this.showErrorMessage(res.message, res => {
this.packGetFocus();
})
}
// uni.hideLoading();
});
}
},
afterQueryBalance(datas) {
if (this.allowNullBalance) {
this.allowNoneBalance(datas);
@ -401,6 +425,20 @@
change(e) {
this.show = e.show
},
isInLocationList(location) {
var item = this.fromLocationList.filter(res => {
res = location
})
if (item != undefined && item.length > 0) {
return true
}
return false
},
addLocationCode(code) {
if (!this.isInLocationList(code)) {
this.fromLocationList.push(code)
}
}
}
}
</script>

5
pages/deliver/job/deliverDetail.vue

@ -224,7 +224,7 @@
})
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
if (locationCode == null) {
this.submitJob();
} else {
//
@ -280,8 +280,7 @@
record.supplierCode = r.supplierCode;
//使
if (this.jobContent.useOnTheWayLocation ==
'TRUE') {
if (this.toLocationCode ==null) {
record.toPackingNumber = r
.packingNumber;
record.toBatch = r.batch;

2
pages/purchaseReturn/record/returnRecord.vue

@ -286,7 +286,7 @@
submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch;
submitItem.fromLocationCode = this.fromLocationCode;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = ''; //退
submitItem.qty = detail.handleQty;

Loading…
Cancel
Save