Browse Source

合格转隔离需求 YT-734pda所有功能提示问题,扫描库位的,扫描的是箱码,提示输入库位为空;扫描箱码,扫描的是库位,提示输入的箱码为空

intex_online20241111
张立 6 months ago
parent
commit
cef8e66cb9
  1. 8
      src/mycomponents/scan/winScanLocation.vue
  2. 5
      src/mycomponents/scan/winScanPackAndLocation.vue
  3. 1271
      src/pages/inventoryMove/coms/comMoveRecord.vue
  4. 58
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue

8
src/mycomponents/scan/winScanLocation.vue

@ -38,7 +38,7 @@
components: { components: {
winComScan, winComScan,
}, },
emits: ["getLocation"], emits: ["getLocation","clearFromLocation"],
props: { props: {
title: { title: {
type: String, type: String,
@ -101,10 +101,10 @@
} }
if(this.code==undefined){ if(this.code==undefined){
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.code + "]为空,请输入正确的库位") this.showErrorMessage("扫描库位为空,请输入正确的库位")
return return
} }
console.log(888,this.code)
getBasicLocationByCode(this.code).then(res => { getBasicLocationByCode(this.code).then(res => {
uni.hideLoading(); uni.hideLoading();
@ -112,6 +112,7 @@
let result = res.data.list[0]; let result = res.data.list[0];
if(result.code!=this.code){ if(result.code!=this.code){
this.showErrorMessage('未查询到库位[' + this.code + ']') this.showErrorMessage('未查询到库位[' + this.code + ']')
this.$emit('clearFromLocation',this.code)
return; return;
} }
var type = result.type; var type = result.type;
@ -131,6 +132,7 @@
} }
} else { } else {
this.showErrorMessage('未查询到库位[' + this.code + ']') this.showErrorMessage('未查询到库位[' + this.code + ']')
this.$emit('clearFromLocation',this.code)
} }
}).catch(error => { }).catch(error => {

5
src/mycomponents/scan/winScanPackAndLocation.vue

@ -337,6 +337,11 @@
}) })
} }
this.chooseWhich = '2' this.chooseWhich = '2'
if(!result.label.itemCode){
this.showErrorMessage('扫描标签不对,请重新扫描')
this.$emit('clearItemCode',result.label.code)
return
}
if (res.data && res.data.list && res.data.list.length > 1) { if (res.data && res.data.list && res.data.list.length > 1) {
this.showBalanceSelect(res.data.list); this.showBalanceSelect(res.data.list);
} else { } else {

1271
src/pages/inventoryMove/coms/comMoveRecord.vue

File diff suppressed because it is too large

58
src/pages/inventoryMove/coms/okToHoldRecordPack.vue

@ -5,7 +5,7 @@
<view class="title-txt"> <view class="title-txt">
需求信息 需求信息
</view> </view>
<u-icon name="close" color="#4f4f4f" size="28"></u-icon> <u-icon name="close" color="#4f4f4f" size="28" @click="showOne = false"></u-icon>
</view> </view>
<view class="item"> <view class="item">
<view class="label">来源库位</view> <view class="label">来源库位</view>
@ -36,7 +36,7 @@
</view> </view>
</view> </view>
<view class="uni-flex uni-row hide_border"> <view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> <button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="showOne = false">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> <button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view> </view>
</u-popup> </u-popup>
@ -91,6 +91,14 @@
type: String, type: String,
default: '' default: ''
}, },
isClearFromLocationCode:{
type: Boolean,
default: false
},
isClearItemCode:{
type: Boolean,
default: false
},
}, },
mounted() { mounted() {
}, },
@ -103,6 +111,10 @@
// //
itemCodeClick(){ itemCodeClick(){
// this.$refs.scanLocationCode.openScanPopup() // this.$refs.scanLocationCode.openScanPopup()
if(!this.fromLocationCode){
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
}
this.$emit("itemCodeClick"); this.$emit("itemCodeClick");
}, },
confirm(){ confirm(){
@ -117,12 +129,19 @@
this.$emit("confirm",obj); this.$emit("confirm",obj);
}, },
fromLocationScanMsg(){ fromLocationScanMsg(){
console.log(111,this.fromLocationCode)
this.scanMsg = this.fromLocationCode this.scanMsg = this.fromLocationCode
this.fromWitch = 'fromLocationScanMsg'
this.handelScanMsg() this.handelScanMsg()
}, },
itemCodeScanMsg(){ itemCodeScanMsg(){
this.scanMsg = this.itemCode if(!this.fromLocationCode){
this.handelScanMsg() this.$refs.comMessage.showMessage("请先扫描来源库位")
return
}
this.fromWitch = 'itemCodeScanMsg'
this.scanMsg = this.itemCode
this.handelScanMsg()
}, },
handelScanMsg() { handelScanMsg() {
// //
@ -131,7 +150,7 @@
// mask: true // mask: true
// }) // })
let that = this; let that = this;
console.log(that.scanMsg) console.log(777,that.scanMsg)
// if(index==-1){ // if(index==-1){
// that.scanMsg =that.scanMsg + "\n"; // that.scanMsg =that.scanMsg + "\n";
// } // }
@ -162,7 +181,8 @@
scanResult.scanMessage = content scanResult.scanMessage = content
if (scanResult.success) { if (scanResult.success) {
// that.getfocus();// // that.getfocus();//
that.$emit("getInputMsgResult", scanResult); console.log(scanResult)
that.$emit("getInputMsgResult", scanResult,this.fromWitch);
} else { } else {
that.losefocus(); that.losefocus();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => { this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
@ -183,12 +203,28 @@
}, },
}, },
watch: { watch: {
fromLocationCodeProps(newVal) { fromLocationCodeProps:{
console.log(newVal) handler(newVal, oldVal) {
this.fromLocationCode = newVal console.log('wer',this.isClearFromLocationCode)
console.log('wer',newVal)
if(this.isClearFromLocationCode){
this.fromLocationCode=''
}else{
this.fromLocationCode = newVal
}
},
// deep: true,
// immediate: true
}, },
itemCodeProps(newVal) { itemCodeProps: {
this.itemCode = newVal handler(newVal, oldVal) {
if(this.isClearItemCode){
this.itemCode=''
this.batch=''
}else{
this.itemCode = newVal
}
},
}, },
batchProps(newVal) { batchProps(newVal) {
this.batch = newVal this.batch = newVal

Loading…
Cancel
Save