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. 43
      src/pages/inventoryMove/coms/comMoveRecord.vue
  4. 50
      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 {

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

@ -35,11 +35,11 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<!-- 合格转隔离单独的弹窗--> <!-- 合格转隔离单独的弹窗-->
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack> <okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' :isClearFromLocationCode='isClearFromLocationCode' :isClearItemCode='isClearItemCode' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'" > <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' @clearItemCode='clearItemCode' :title="'箱码'" >
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' <win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList" @clearFromLocation='clearFromLocation'></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -149,6 +149,8 @@
isShowEditLocation: false, isShowEditLocation: false,
itemCode:'', itemCode:'',
batch:'', batch:'',
isClearFromLocationCode:false,//
isClearItemCode:false,//
} }
}, },
@ -161,7 +163,6 @@
if(this.showOnePop){ if(this.showOnePop){
console.log(this.$refs.okToHoldRecordPackRef) console.log(this.$refs.okToHoldRecordPackRef)
this.$refs.okToHoldRecordPackRef.show = true this.$refs.okToHoldRecordPackRef.show = true
}else{ }else{
this.showFromLocationPopup(); this.showFromLocationPopup();
} }
@ -175,6 +176,7 @@
methods: { methods: {
initData() { initData() {
if (this.businessTypeCode == "Move") { if (this.businessTypeCode == "Move") {
// this.title = ""; // this.title = "";
@ -263,10 +265,12 @@
this.toLocationInfo = location; this.toLocationInfo = location;
}, },
getScanResult(result,managementType) { getScanResult(result,managementType) {
console.log(result) console.log(356,result)
if(this.showOnePop){ if(this.showOnePop){
this.itemCode= result.label.itemCode this.itemCode= result.balance.itemCode
this.batch = result.label.batch this.batch = result.balance.batch
console.log(357,this.itemCode)
console.log(358,this.batch )
this.getResult = result// this.getResult = result//
this.$refs.scanPopup.closeScanPopup() this.$refs.scanPopup.closeScanPopup()
@ -386,12 +390,9 @@
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
console.log(233,this.detailSource)
console.log(988,balance.inventoryStatus)
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.batch == pack.batch && if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode && r.fromLocationCode == balance.locationCode &&
r.toInventoryStatus == balance.inventoryStatus &&
r.scaned == true) { r.scaned == true) {
return r; return r;
} }
@ -417,14 +418,22 @@
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
}, },
getInputMsgResult(result){ getInputMsgResult(result,fromWitch){
console.log('pooo',result) console.log('pooo',result)
if(!this.fromLocationCode){ if(fromWitch == 'fromLocationScanMsg'){
this.$refs.scanFromLocationCode.getScanResult(result) this.isClearFromLocationCode = false this.$refs.scanFromLocationCode.getScanResult(result) }else if(fromWitch == 'itemCodeScanMsg'){
}else{ console.log(7878,this.fromLocationCode) result.fromLocationCode = this.fromLocationCode this.$refs.scanPopup.getScanResult(result) }
result.fromLocationCode = this.fromLocationCode },
this.$refs.scanPopup.getScanResult(result) //
} clearFromLocation(fromLocationCodeParams){
this.fromLocationCode = fromLocationCodeParams
console.log('rwyrwey',this.fromLocationCode)
this.isClearFromLocationCode = true
},
//
clearItemCode(itemCodeParams){
this.itemCode = itemCodeParams
this.isClearItemCode = true
}, },
showErrorMessage(message) { showErrorMessage(message) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {

50
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,10 +129,17 @@
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(){
if(!this.fromLocationCode){
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
}
this.fromWitch = 'itemCodeScanMsg'
this.scanMsg = this.itemCode this.scanMsg = this.itemCode
this.handelScanMsg() this.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) {
console.log('wer',this.isClearFromLocationCode)
console.log('wer',newVal)
if(this.isClearFromLocationCode){
this.fromLocationCode=''
}else{
this.fromLocationCode = newVal this.fromLocationCode = newVal
}
},
// deep: true,
// immediate: true
}, },
itemCodeProps(newVal) { itemCodeProps: {
handler(newVal, oldVal) {
if(this.isClearItemCode){
this.itemCode=''
this.batch=''
}else{
this.itemCode = newVal this.itemCode = newVal
}
},
}, },
batchProps(newVal) { batchProps(newVal) {
this.batch = newVal this.batch = newVal

Loading…
Cancel
Save