Browse Source

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

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

5
src/mycomponents/scan/winScanPackAndLocation.vue

@ -337,6 +337,11 @@
})
}
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) {
this.showBalanceSelect(res.data.list);
} 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>
<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 class="item">
<view class="label">来源库位</view>
@ -36,7 +36,7 @@
</view>
</view>
<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>
</view>
</u-popup>
@ -91,6 +91,14 @@
type: String,
default: ''
},
isClearFromLocationCode:{
type: Boolean,
default: false
},
isClearItemCode:{
type: Boolean,
default: false
},
},
mounted() {
},
@ -103,6 +111,10 @@
//
itemCodeClick(){
// this.$refs.scanLocationCode.openScanPopup()
if(!this.fromLocationCode){
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
}
this.$emit("itemCodeClick");
},
confirm(){
@ -117,12 +129,19 @@
this.$emit("confirm",obj);
},
fromLocationScanMsg(){
console.log(111,this.fromLocationCode)
this.scanMsg = this.fromLocationCode
this.fromWitch = 'fromLocationScanMsg'
this.handelScanMsg()
},
itemCodeScanMsg(){
this.scanMsg = this.itemCode
this.handelScanMsg()
if(!this.fromLocationCode){
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
}
this.fromWitch = 'itemCodeScanMsg'
this.scanMsg = this.itemCode
this.handelScanMsg()
},
handelScanMsg() {
//
@ -131,7 +150,7 @@
// mask: true
// })
let that = this;
console.log(that.scanMsg)
console.log(777,that.scanMsg)
// if(index==-1){
// that.scanMsg =that.scanMsg + "\n";
// }
@ -162,7 +181,8 @@
scanResult.scanMessage = content
if (scanResult.success) {
// that.getfocus();//
that.$emit("getInputMsgResult", scanResult);
console.log(scanResult)
that.$emit("getInputMsgResult", scanResult,this.fromWitch);
} else {
that.losefocus();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
@ -183,12 +203,28 @@
},
},
watch: {
fromLocationCodeProps(newVal) {
console.log(newVal)
this.fromLocationCode = newVal
fromLocationCodeProps:{
handler(newVal, oldVal) {
console.log('wer',this.isClearFromLocationCode)
console.log('wer',newVal)
if(this.isClearFromLocationCode){
this.fromLocationCode=''
}else{
this.fromLocationCode = newVal
}
},
// deep: true,
// immediate: true
},
itemCodeProps(newVal) {
this.itemCode = newVal
itemCodeProps: {
handler(newVal, oldVal) {
if(this.isClearItemCode){
this.itemCode=''
this.batch=''
}else{
this.itemCode = newVal
}
},
},
batchProps(newVal) {
this.batch = newVal

Loading…
Cancel
Save