|
|
@ -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 |
|
|
|