Browse Source

优化扫描组件

lijuncheng0816
lijuncheng 4 months ago
parent
commit
659fcccfa6
  1. 40
      src/mycomponents/scan/winCheckFgLabel.vue
  2. 77
      src/mycomponents/scan/winComScan.vue
  3. 3
      src/mycomponents/scan/winComScanBalance.vue
  4. 30
      src/mycomponents/scan/winComScanBalanceLocation.vue
  5. 39
      src/mycomponents/scan/winComScanFg.vue
  6. 3
      src/mycomponents/scan/winScanAsnNumber.vue
  7. 3
      src/mycomponents/scan/winScanContainer.vue
  8. 10
      src/mycomponents/scan/winScanFgLabel.vue
  9. 4
      src/mycomponents/scan/winScanItem.vue
  10. 5
      src/mycomponents/scan/winScanJobNumber.vue
  11. 3
      src/mycomponents/scan/winScanLocation.vue
  12. 9
      src/mycomponents/scan/winScanPack.vue
  13. 3
      src/mycomponents/scan/winScanPackAndCont.vue
  14. 55
      src/mycomponents/scan/winScanPackAndLocation.vue
  15. 38
      src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
  16. 12
      src/mycomponents/scan/winScanPackAndPosition.vue
  17. 7
      src/mycomponents/scan/winScanPackJob.vue
  18. 9
      src/mycomponents/scan/winScanPackLevel.vue
  19. 18
      src/mycomponents/scan/winScanPackage.vue
  20. 3
      src/pages.json
  21. 4
      src/pages/count/job/fuzzyCountDetail.vue
  22. 3
      src/pages/deliver/coms/comScanDeliverPack.vue
  23. 3
      src/pages/inventoryMove/coms/comMoveRecord.vue
  24. 17
      src/pages/issue/coms/comScanIssuePack.vue
  25. 6
      src/pages/issue/job/issueDetail.vue
  26. 7
      src/pages/issue/record/directIssue.vue
  27. 5
      src/pages/issue/request/issueScanRequest.vue
  28. 1
      src/pages/package/coms/comScanPackagePack.vue
  29. 6
      src/pages/productPutaway/job/productPutawayJob.vue
  30. 11
      src/pages/productPutaway/record/productPutawayRecord.vue
  31. 7
      src/pages/productReceipt/job/ccProductReceiptJob.vue
  32. 7
      src/pages/productReceipt/job/productReceiptJob.vue
  33. 4
      src/pages/productRecycle/job/productRecycleJobDetail.vue
  34. 7
      src/pages/productionReceipt/job/productionReceiptJob.vue
  35. 5
      src/pages/productionReturn/coms/comScanReturnPack.vue
  36. 8
      src/pages/purchaseReceipt/job/receiptDetail.vue
  37. 46
      src/pages/purchaseReceipt/job/receiptJob.vue
  38. 14
      src/pages/purchaseReturn/job/returnDetail.vue
  39. 1
      src/pages/purchaseReturn/record/returnRecord.vue
  40. 5
      src/pages/putaway/job/putawayDetail.vue
  41. 7
      src/pages/putaway/job/putawayJob.vue
  42. 6
      src/pages/query/pack.vue
  43. 38
      src/pages/repleinsh/coms/comScanReplishPack.vue
  44. 7
      src/pages/scrap/job/scrapJobDetail.vue
  45. 8
      src/pages/stockUp/coms/comScanStockUpPack.vue

40
src/mycomponents/scan/winCheckFgLabel.vue

@ -102,18 +102,17 @@
methods: { methods: {
// //
openScanPopupForType(customerCode) { openScanPopupForType(customerCode) {
this.customerCode = customerCode; this.customerCode = customerCode;
if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); // this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
}, 500) }, 500)
}, },
@ -121,21 +120,24 @@
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
}
}
}, 500)
}, },
closeScanPopup(content) { closeScanPopup(content) {

77
src/mycomponents/scan/winComScan.vue

@ -4,11 +4,15 @@
<view> <view>
<view class="pop_tab"> <view class="pop_tab">
<view class="tab_info"> <view class="tab_info">
<view class="conbox"> <view class="conbox" >
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;" <textarea
:focus="boxfocus" :placeholder="placeholderValue" v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:placeholder="placeholderValue"
:focus="boxfocus"
@blur="handleBlur"
@focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex" ></textarea> @input="handelScanMsg" :cursor="cursorIndex" ></textarea>
</view> </view>
<view class="uni-flex uni-row space-between u-col-center"> <view class="uni-flex uni-row space-between u-col-center">
<!-- <view class="paizhao" @click="scanQRCode()" v-if="true"> <!-- <view class="paizhao" @click="scanQRCode()" v-if="true">
@ -16,7 +20,7 @@
</view> --> </view> -->
<view class="uni-flex"> <view class="uni-flex">
<button class="clean_scan_btn" @click="clearScanValue()">清空</button> <button class="clean_scan_btn" @touchend.prevent="clearScanValue()">清空</button>
<button class="scan_btn" @click="clickScanMsg()">扫描</button> <button class="scan_btn" @click="clickScanMsg()">扫描</button>
</view> </view>
</view> </view>
@ -73,10 +77,10 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
boxFocus: { // boxFocus: {
type: Boolean, // type: Boolean,
default: true // default: true
}, // },
isShowHistory: { isShowHistory: {
type: Boolean, type: Boolean,
default: true default: true
@ -100,41 +104,7 @@
} }
}, },
mounted() { mounted() {
this.boxfocus =true;
// uni.hideKeyboard();
// #ifdef H5
// if (document.querySelector('textarea') != null) {
// document.querySelector('textarea').setAttribute('inputmode', 'none')
// }
// #endif
// this.hide()
// #ifdef APP-PLUS
//
// this.hide()
// uni.onKeyboardHeightChange(res => {
// console.log(res.height)
// if(res.height>0){
// // uni.hideKeyboard();
// plus.key.hideSoftKeybord();
// }
// })
//
// uni.onWindowResize((res) => {
// plus.key.hideSoftKeybord()
// })
// plus.key.hideSoftKeybord();
// setInterval(function(){
// plus.key.hideSoftKeybord();
// // uni.hideKeyboard();//
// // plus.key.hideSoftKeybord();
// },60);
// #endif
// if (this.$el.querySelector('textarea') != null) {
// this.$el.querySelector('textarea').setAttribute('inputmode', 'none')
// }
}, },
watch: { watch: {
placeholder() { placeholder() {
@ -169,6 +139,7 @@
}, },
clearScanValue() { clearScanValue() {
this.scanMsg = '' this.scanMsg = ''
this.cursorIndex =0
this.getfocus(); this.getfocus();
}, },
clickScanMsg() { clickScanMsg() {
@ -186,10 +157,10 @@
if (index >= 0) { if (index >= 0) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => { setTimeout(() => {
that.losefocus(); that.losefocus();
let content = uni.$u.trim(that.scanMsg) let content = uni.$u.trim(that.scanMsg)
if (content == "") { if (content == "") {
that.getfocus(); // that.getfocus();
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => { this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) { if (res) {
that.scanMsg = "" that.scanMsg = ""
@ -212,6 +183,7 @@
that.$emit("getResult", scanResult); that.$emit("getResult", scanResult);
} else { } else {
that.clear(); that.clear();
that.losefocus();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => { this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
if (res) { if (res) {
that.getfocus(); that.getfocus();
@ -222,20 +194,25 @@
}, 500); }, 500);
} }
}, },
handleFocus(){
},
handleBlur(){
// setTimeout(res=>{
// uni.hideKeyboard();
// },200)
},
getfocus() { getfocus() {
let that = this; let that = this;
this.$nextTick(r => { this.$nextTick(r => {
console.log("获取焦点")
that.boxfocus = true; that.boxfocus = true;
}); });
// this.hide()
}, },
losefocus() { losefocus() {
let that = this; let that = this;
this.$nextTick(r => { this.$nextTick(r => {
console.log("失去焦点")
that.boxfocus = false; that.boxfocus = false;
uni.hideKeyboard();
}); });
}, },
clear() { clear() {
@ -289,7 +266,7 @@
<script module="textarea" lang="renderjs"> <script module="textarea" lang="renderjs">
export default { export default {
mounted() { mounted() {
document.querySelector('textarea').setAttribute('inputmode', 'none') // document.querySelector('textarea').setAttribute('inputmode', 'none')
}, },
} }
</script> </script>

3
src/mycomponents/scan/winComScanBalance.vue

@ -118,6 +118,9 @@
this.toLocationAreaTypeList = getDirectoryItemArray(businessType.inAreaTypes) this.toLocationAreaTypeList = getDirectoryItemArray(businessType.inAreaTypes)
this.itemTypesList = getDirectoryItemArray(businessType.itemTypes) this.itemTypesList = getDirectoryItemArray(businessType.itemTypes)
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res=>{
this.getfocus()
},500)
}, },
getScanResult(result) { getScanResult(result) {

30
src/mycomponents/scan/winComScanBalanceLocation.vue

@ -145,28 +145,31 @@
this.fromLocationAreaTypeList = getDirectoryItemArray(businessType.outAreaTypes) this.fromLocationAreaTypeList = getDirectoryItemArray(businessType.outAreaTypes)
this.itemTypesList = getDirectoryItemArray(businessType.itemTypes) this.itemTypesList = getDirectoryItemArray(businessType.itemTypes)
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res=>{
this.packGetFocus()
},500)
}, },
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent){ openScanPopupForJob(fromLocationCode, fromLocationList, jobContent){
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
}
}
}, 500)
}, },
// //
@ -294,6 +297,7 @@
}) })
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.packLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.comscan){ if(this.$refs.comscan){

39
src/mycomponents/scan/winComScanFg.vue

@ -6,12 +6,14 @@
<view class="tab_info"> <view class="tab_info">
<view class="conbox"> <view class="conbox">
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" <textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000"
style="margin-left: 5px;width: 90%;" :focus="boxfocus" :placeholder="placeholderValue" style="margin-left: 5px;width: 90%;"
@focus="getfocus" @blur="losefocus" @input="handelScanMsg" :cursor="cursorIndex"></textarea> :focus="boxfocus" :placeholder="placeholderValue"
@focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex"></textarea>
</view> </view>
<view class="uni-flex uni-row space-between u-col-center"> <view class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex"> <view class="uni-flex">
<button class="clean_scan_btn" @click="clearScanValue()">清空</button> <button class="clean_scan_btn" @touchend.prevent="clearScanValue()">清空</button>
<button class="scan_btn" @click="clickScanMsg()">扫描</button> <button class="scan_btn" @click="clickScanMsg()">扫描</button>
</view> </view>
</view> </view>
@ -103,13 +105,11 @@
} }
}, },
mounted() { mounted() {
this.boxfocus = true;
// uni.hideKeyboard();
// #ifdef H5 // #ifdef H5
if (document.querySelector('textarea') != null) { // if (document.querySelector('textarea') != null) {
document.querySelector('textarea').setAttribute('inputmode', 'none') // document.querySelector('textarea').setAttribute('inputmode', 'none')
} // }
// #endif // #endif
// this.hide() // this.hide()
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -125,20 +125,6 @@
this.placeholderValue = '请扫描' + this.placeholder; this.placeholderValue = '请扫描' + this.placeholder;
}, },
methods: { methods: {
hide() {
// #ifdef APP-PLUS
//
var interval = setInterval(function() {
uni.hideKeyboard(); //
console.log('刷新')
}, 5);
setTimeout(() => {
clearInterval(interval);
console.log('停止刷新')
}, 1000);
// #endif
},
setItemCodeSimulate(itemCode, scanMsg) { setItemCodeSimulate(itemCode, scanMsg) {
this.itemCode = itemCode; this.itemCode = itemCode;
this.scanMsg = scanMsg; this.scanMsg = scanMsg;
@ -154,6 +140,7 @@
this.scanMsg = val this.scanMsg = val
}, },
clearScanValue() { clearScanValue() {
this.cursorIndex=0,
this.scanMsg = '' this.scanMsg = ''
this.getfocus(); this.getfocus();
}, },
@ -171,7 +158,6 @@
let content = uni.$u.trim(that.scanMsg) let content = uni.$u.trim(that.scanMsg)
// let content = that.scanMsg; // let content = that.scanMsg;
if (content == "") { if (content == "") {
that.getfocus();
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => { this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) { if (res) {
that.scanMsg = "" that.scanMsg = ""
@ -235,6 +221,7 @@
that.$emit("getResult", scanResult); that.$emit("getResult", scanResult);
} }
} catch (error) { } catch (error) {
that.losefocus();
this.$refs.comMessage.showErrorMessage(error.message, res => { this.$refs.comMessage.showErrorMessage(error.message, res => {
if (res) { if (res) {
that.getfocus(); that.getfocus();
@ -243,6 +230,7 @@
} }
}).catch(error => { }).catch(error => {
that.losefocus();
this.$refs.comMessage.showErrorMessage(error, res => { this.$refs.comMessage.showErrorMessage(error, res => {
if (res) { if (res) {
that.scanMsg = "" that.scanMsg = ""
@ -268,6 +256,11 @@
that.boxfocus = false; that.boxfocus = false;
}); });
}, },
// handleBlur(){
// setTimeout(res=>{
// uni.hideKeyboard();
// },200)
// },
clear() { clear() {
this.cursorIndex = 0; this.cursorIndex = 0;
this.scanMsg = '' this.scanMsg = ''

3
src/mycomponents/scan/winScanAsnNumber.vue

@ -55,8 +55,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus('bottom')
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {

3
src/mycomponents/scan/winScanContainer.vue

@ -54,8 +54,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {

10
src/mycomponents/scan/winScanFgLabel.vue

@ -60,13 +60,13 @@
this.$refs.comscansimulate.clickScanMsg(); this.$refs.comscansimulate.clickScanMsg();
}, },
openScanPopup(itemCode) { openScanPopup(itemCode) {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom')
setTimeout(re=>{ setTimeout(re=>{
this.$refs.comscan.setItemCode(itemCode) this.$refs.comscan.setItemCode(itemCode)
},500) },500)
this.getfocus()
}, 200) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
@ -91,13 +91,13 @@
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan ) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan ) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

4
src/mycomponents/scan/winScanItem.vue

@ -76,8 +76,10 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
var that =this;
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') that.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {

5
src/mycomponents/scan/winScanJobNumber.vue

@ -61,8 +61,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
@ -72,7 +73,7 @@
this.$refs.popup.close() this.$refs.popup.close()
}, },
getfocus() { getfocus() {
if (this.isShow) { if (this.$refs.scan) {
this.$refs.scan.getfocus() this.$refs.scan.getfocus()
} }
}, },

3
src/mycomponents/scan/winScanLocation.vue

@ -65,8 +65,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
openScanPopupSimulate(location) { openScanPopupSimulate(location) {

9
src/mycomponents/scan/winScanPack.vue

@ -70,9 +70,10 @@
}) })
}, },
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 200) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
@ -103,13 +104,13 @@
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

3
src/mycomponents/scan/winScanPackAndCont.vue

@ -61,8 +61,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },

55
src/mycomponents/scan/winScanPackAndLocation.vue

@ -152,43 +152,44 @@
}, },
// //
openScanPopupForType(fromLocationCode, businessType) { openScanPopupForType(fromLocationCode, businessType) {
this.businessType = businessType; this.businessType = businessType;
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //
if (!this.show) { this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') if (fromLocationCode != '') {
}, 500) this.packGetFocus();
} } else {
this.locationGetFocus();
}
}, 500)
}, },
// //
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
}
}
}, 500)
}, },
// //
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) { openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) {
@ -417,7 +418,7 @@
balance: datas, balance: datas,
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
} }
this.packGetFocus(); // this.packGetFocus();
this.$emit("getResult", data); this.$emit("getResult", data);
this.$emit("getCountScanResult", data); this.$emit("getCountScanResult", data);
}, },
@ -433,18 +434,18 @@
balance: item, balance: item,
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
} }
this.packGetFocus(); // this.packGetFocus();
this.$emit("getResult", data); this.$emit("getResult", data);
}, },
packGetFocus() { packGetFocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
packLoseFocus() { packLoseFocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

38
src/mycomponents/scan/winScanPackAndLocationNoBalance.vue

@ -131,16 +131,16 @@
openScanPopupForType(fromLocationCode, businessType) { openScanPopupForType(fromLocationCode, businessType) {
this.businessType = businessType; this.businessType = businessType;
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); // this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') if (fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
}, 500) }, 500)
}, },
@ -148,21 +148,23 @@
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); // this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
}
}
}, 500)
}, },
closeScanPopup(content) { closeScanPopup(content) {

12
src/mycomponents/scan/winScanPackAndPosition.vue

@ -105,23 +105,23 @@
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
} }
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
initData(){ initData() {
this.positionInfo = "请选择位置"; this.positionInfo = "请选择位置";
this.positionList = []; this.positionList = [];
this.productionLineCode = ''; this.productionLineCode = '';
this.rawLocationCode = ""; this.rawLocationCode = "";
this.fgLocationCode = ""; this.fgLocationCode = "";
this.workshopCode = ""; this.workshopCode = "";
this.workStationCode =""; this.workStationCode = "";
this.workShopName = ""; this.workShopName = "";
this.productionLineName=""; this.productionLineName = "";
this.workStationName=""; this.workStationName = "";
this.show = false; this.show = false;
this.isEditPosition = true this.isEditPosition = true
}, },

7
src/mycomponents/scan/winScanPackJob.vue

@ -71,6 +71,9 @@
// //
openScanPopup(){ openScanPopup(){
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res=>{
this.packGetFocus()
},500)
}, },
// //
closeScanPopup(content) { closeScanPopup(content) {
@ -83,13 +86,13 @@
this.$emit("getResult", result); this.$emit("getResult", result);
}, },
packGetFocus() { packGetFocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
packLoseFocus() { packLoseFocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

9
src/mycomponents/scan/winScanPackLevel.vue

@ -96,9 +96,10 @@
}) })
}, },
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus();
}, 200) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
@ -130,13 +131,13 @@
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

18
src/mycomponents/scan/winScanPackage.vue

@ -67,18 +67,19 @@
this.$refs.comscansimulate.clickScanMsg(); this.$refs.comscansimulate.clickScanMsg();
}, },
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 200) }, 500)
}, },
openScanPopupByBusinessType(businessType) { openScanPopupByBusinessType(businessType) {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
this.businessType = businessType; this.businessType = businessType;
}, 500)
}, 200)
}, },
@ -223,13 +224,13 @@
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan ) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },
@ -240,9 +241,10 @@
this.show = e.show this.show = e.show
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.losefocus()
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.getfocus();
} }
}); });
}, },

3
src/pages.json

@ -2297,7 +2297,8 @@
// "fontSize": "58rpx" // "fontSize": "58rpx"
// }] // }]
// }, // },
"softinputMode": "adjustPan" //adjustResize //
"softinputMode": "adjustResize" //adjustResize
}, },
"tabBar": { "tabBar": {
"color": "#000000", "color": "#000000",

4
src/pages/count/job/fuzzyCountDetail.vue

@ -433,10 +433,12 @@
}, },
remove(item, index) { remove(item, index) {
this.scanPopupLoseFocus();
this.showQuestionMessage("是否要移除扫描信息?", res => { this.showQuestionMessage("是否要移除扫描信息?", res => {
if (res) { if (res) {
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
} }
this.scanPopupGetFocus();
}); });
}, },
@ -489,6 +491,7 @@
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
this.afterCloseMessage() this.afterCloseMessage()
@ -496,6 +499,7 @@
}); });
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.afterCloseMessage() this.afterCloseMessage()

3
src/pages/deliver/coms/comScanDeliverPack.vue

@ -184,8 +184,9 @@
this.initData(); this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode "-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus();
}, 500) }, 500)
}, },

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

@ -300,6 +300,9 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {

17
src/pages/issue/coms/comScanIssuePack.vue

@ -213,8 +213,9 @@
this.initData(); this.initData();
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + // this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode // "-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus();
}, 500) }, 500)
}, },
@ -315,7 +316,10 @@
"状态 [" + status + "] \n" + "状态 [" + status + "] \n" +
"库区 [" + areaType + "] \n" + "库区 [" + areaType + "] \n" +
"未查找到库存余额" "未查找到库存余额"
this.showErrorMessage(hint) this.showErrorMessage(hint,
res => {
that.getfocus();
})
} else if (res.data.length == 1) { } else if (res.data.length == 1) {
result.balance = res.data[0] result.balance = res.data[0]
@ -332,11 +336,16 @@
uni.hideLoading() uni.hideLoading()
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error,
res => {
that.getfocus();
})
}) })
} }
} catch (e) { } catch (e) {
this.showErrorMessage(e.stack) this.showErrorMessage(e.stack,res => {
that.getfocus();
})
uni.hideLoading(); uni.hideLoading();
} }
}, },

6
src/pages/issue/job/issueDetail.vue

@ -481,6 +481,8 @@
'】不一致,是否继续提交', res => { '】不一致,是否继续提交', res => {
if (res) { if (res) {
this.submit(); this.submit();
}else {
this.scanPopupGetFocus()
} }
}); });
} }
@ -489,8 +491,8 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.comScanIssuePack) {
this.$refs.scanPopup.getfocus(); this.$refs.comScanIssuePack.getfocus();
} }
}, },

7
src/pages/issue/record/directIssue.vue

@ -256,8 +256,13 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {} if (res) {
this.scanPopupGetFocus()
}
}); });
}, },

5
src/pages/issue/request/issueScanRequest.vue

@ -151,6 +151,9 @@
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}, },
showErrorMessage(message) { showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -158,7 +161,7 @@
}); });
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },

1
src/pages/package/coms/comScanPackagePack.vue

@ -171,6 +171,7 @@ import { getDirectoryItemArray } from '@/common/directory';
let lot = result.label.batch; let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode); let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) { if (item == undefined) {
this.packLoseFocus()
that.showErrorMessage('未查找到物料【' + itemCode + '】的翻包明细', that.showErrorMessage('未查找到物料【' + itemCode + '】的翻包明细',
res => { res => {
that.packGetFocus(); that.packGetFocus();

6
src/pages/productPutaway/job/productPutawayJob.vue

@ -357,8 +357,14 @@
}, },
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
} }
}); });

11
src/pages/productPutaway/record/productPutawayRecord.vue

@ -232,7 +232,10 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {}); this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
this.scanPopupGetFocus();
});
}, },
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
@ -275,6 +278,12 @@
} }
}, },
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
scanLocationCode(location, code) { scanLocationCode(location, code) {
this.toLocationCode = code this.toLocationCode = code
this.detailSource.forEach(item => { this.detailSource.forEach(item => {

7
src/pages/productReceipt/job/ccProductReceiptJob.vue

@ -322,9 +322,14 @@
}, },
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },

7
src/pages/productReceipt/job/productReceiptJob.vue

@ -312,9 +312,14 @@
}, },
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },

4
src/pages/productRecycle/job/productRecycleJobDetail.vue

@ -442,6 +442,7 @@
}, },
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -450,6 +451,7 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -463,6 +465,8 @@
this.$refs.comMessage.showQuestionMessage(message, res => { this.$refs.comMessage.showQuestionMessage(message, res => {
if (res) { if (res) {
callback(res); callback(res);
}else {
this.scanPopupGetFocus()
} }
}); });
}) })

7
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -347,9 +347,14 @@
}, },
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },

5
src/pages/productionReturn/coms/comScanReturnPack.vue

@ -159,8 +159,6 @@
this.scanOptions = getDetailEditRemoveOption(); this.scanOptions = getDetailEditRemoveOption();
}, },
methods: { methods: {
openScanPopup(content, jobcontent) { openScanPopup(content, jobcontent) {
this.issueRecord = []; this.issueRecord = [];
this.dataContent = content; this.dataContent = content;
@ -168,8 +166,9 @@
this.initData(); this.initData();
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + // this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode // "-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') that.getfocus();
}, 500) }, 500)
}, },

8
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -373,7 +373,7 @@
}) })
if (itemDetail.scaned && scanedLength == itemDetail if (itemDetail.scaned && scanedLength == itemDetail
.packList.length) { .packList.length) {
isExit.scanDate = new Date(); itemDetail.scanDate = new Date();
this.showMessage("箱码【" + packingNumber + "】已经扫描") this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
@ -712,6 +712,9 @@
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.losefocus();
}
setTimeout(r => { setTimeout(r => {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
@ -722,6 +725,9 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.losefocus();
}
setTimeout(r => { setTimeout(r => {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {

46
src/pages/purchaseReceipt/job/receiptJob.vue

@ -20,7 +20,7 @@
<receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup> <receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup>
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob title="箱标签/ASN单号" ref="scanPopup" @getResult='getScanResult' > <winScanPackJob title="箱标签/ASN单号" ref="scanPopup" @getResult='getScanResult'>
</winScanPackJob> </winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -78,7 +78,7 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
scanMessage:"" scanMessage: ""
}; };
}, },
@ -205,7 +205,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle(this.title+"(" + this.totalCount + ")"); updateTitle(this.title + "(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -292,7 +292,7 @@
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
.operation + '&scanMessage=' + scanMessage .operation + '&scanMessage=' + scanMessage
}); });
this.scanMessage="" this.scanMessage = ""
}, },
showItemList(itemList) { showItemList(itemList) {
@ -350,12 +350,14 @@
}, },
showMessage(message) { showMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if (this.$refs.scanPopup) {
if(this.$refs.scanPopup){ this.$refs.scanPopup.packGetFocus()
this.$refs.scanPopup.packGetFocus() }
}
} }
}); });
@ -363,12 +365,12 @@
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
}, },
selectItem(item,isScanedASN=false) { selectItem(item, isScanedASN = false) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
if(isScanedASN){ if (isScanedASN) {
this.openJobDetail(item) this.openJobDetail(item)
}else{ } else {
this.openJobDetail(item, this.scanMessage); this.openJobDetail(item, this.scanMessage);
} }
@ -376,7 +378,7 @@
getScanResult(result) { getScanResult(result) {
try { try {
this.scanMessage="" this.scanMessage = ""
let filters = [] let filters = []
if (result.label.barType == "BarCode") { if (result.label.barType == "BarCode") {
// ASN // ASN
@ -384,17 +386,17 @@
column: "asn_number", column: "asn_number",
action: "==", action: "==",
value: result.label.code value: result.label.code
},{ }, {
column: "status", column: "status",
action: "in", action: "in",
value: '1,2', value: '1,2',
}] }]
} else { } else {
filters = [{ filters = [{
column: "packingNumber", column: "packingNumber",
action: "in", action: "in",
value: result.package.number + "," + result.package.parentNumber value: result.package.number + "," + result.package.parentNumber
}, },
{ {
column: "batch", column: "batch",
action: "==", action: "==",
@ -432,7 +434,7 @@
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
}).then(res => { }).then(res => {
this.scanMessage =result.scanMessage this.scanMessage = result.scanMessage
let resultList = res.data.list; let resultList = res.data.list;
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach(item => { resultList.forEach(item => {
@ -448,15 +450,15 @@
console.log('list', list) console.log('list', list)
if (list.length > 1) { if (list.length > 1) {
this.$refs.jobList.openList(list,result.scanMessage.indexOf('ASN')>-1) this.$refs.jobList.openList(list, result.scanMessage.indexOf('ASN') > -1)
} else { } else {
this.selectItem(list[0],result.scanMessage.indexOf('ASN')>-1) this.selectItem(list[0], result.scanMessage.indexOf('ASN') > -1)
} }
} else { } else {
this.showMessage("未查找到任务\n"+"扫描["+result.scanMessage+"]") this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
} }
}).catch(error => { }).catch(error => {
this.showMessage(error+"\n扫描["+result.scanMessage+"]") this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
}) })
} catch (e) { } catch (e) {

14
src/pages/purchaseReturn/job/returnDetail.vue

@ -458,15 +458,21 @@
}, },
closeScanPopup() { closeScanPopup() {
this.$refs.scanPopup.closeScanPopup(); if(this.$refs.scanPopup){
this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus(); if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus(); if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus();
}
}, },
openDetail(item) { openDetail(item) {
@ -474,6 +480,7 @@
}, },
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -482,6 +489,7 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()

1
src/pages/purchaseReturn/record/returnRecord.vue

@ -211,6 +211,7 @@
} }
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
this.scanPopupGetFocus()
}, },
updateData() { updateData() {

5
src/pages/putaway/job/putawayDetail.vue

@ -1,14 +1,14 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header"> <view class="page-header">
<veiw class="header-view"> <view class="header-view">
<view class="header_job_top"> <view class="header_job_top">
<job-top :dataContent="jobContent"></job-top> <job-top :dataContent="jobContent"></job-top>
</view> </view>
<view class="header_item"> <view class="header_item">
申请单号 : {{jobContent.requestNumber}} 申请单号 : {{jobContent.requestNumber}}
</view> </view>
</veiw> </view>
</view> </view>
<view class="page-main"> <view class="page-main">
@ -364,6 +364,7 @@
} }
} }
calcTreeHandleQty(this.detailSource); calcTreeHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate() this.$forceUpdate()
} else { } else {
var scanedLength = 0; var scanedLength = 0;

7
src/pages/putaway/job/putawayJob.vue

@ -308,9 +308,14 @@
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },

6
src/pages/query/pack.vue

@ -119,6 +119,7 @@
return; return;
} }
this.packingNumber =result.label.packingNumber ; this.packingNumber =result.label.packingNumber ;
this.closeScanPopup();
this.tabChange(0) this.tabChange(0)
}, },
getItemInfo(code) { getItemInfo(code) {
@ -402,6 +403,9 @@
}, },
showMessage(message) { showMessage(message) {
if (this.$refs.scanPopup ) {
this.$refs.scanPopup.losefocus();
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.afterCloseMessage() this.afterCloseMessage()
@ -409,7 +413,7 @@
}); });
}, },
afterCloseMessage() { afterCloseMessage() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup ) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },

38
src/pages/repleinsh/coms/comScanReplishPack.vue

@ -161,8 +161,9 @@
this.dataContent = content; this.dataContent = content;
this.jobContent = jobcontent; this.jobContent = jobcontent;
this.initData(); this.initData();
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus();
}, 500) }, 500)
}, },
@ -230,7 +231,9 @@
let location = this.fromLocationList.find(r => r == fromlocation) let location = this.fromLocationList.find(r => r == fromlocation)
if (location == undefined) { if (location == undefined) {
this.fromLocationCode = '' this.fromLocationCode = ''
this.showErrorMessage('发料库位【' + fromlocation + '】不存在') this.showErrorMessage('发料库位【' + fromlocation + '】不存在',res=>{
this.getfocus();
})
} }
}, },
@ -246,7 +249,10 @@
if (this.toLocation && result.package.packUnit) { if (this.toLocation && result.package.packUnit) {
let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode); let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode);
if (!item) { if (!item) {
this.showErrorMessage('扫描物料代码不属于该任务'); this.showErrorMessage('扫描物料代码不属于该任务',
res => {
this.getfocus();
});
return return
} }
if (result.package.packUnit !== item.packUnit) { if (result.package.packUnit !== item.packUnit) {
@ -310,14 +316,20 @@
getBalanceByFilter(params).then(res => { getBalanceByFilter(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data.list.length > 0) { if (res.data.list.length > 0) {
this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额"); this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额",
res => {
this.getfocus();
});
} else { } else {
this.queryBalance(result); this.queryBalance(result);
} }
// callback(res.data) // callback(res.data)
}).catch(err => { }).catch(err => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(err.message); this.showErrorMessage(err.message,
res => {
this.getfocus();
});
}) })
}, },
@ -368,7 +380,10 @@
"状态 [" + status + "] \n" + "状态 [" + status + "] \n" +
"库区 [" + areaType + "] \n" + "库区 [" + areaType + "] \n" +
"未查找到库存余额" "未查找到库存余额"
this.showErrorMessage(hint) this.showErrorMessage(hint,
res => {
this.getfocus();
})
} else if (res.data.length == 1) { } else if (res.data.length == 1) {
result.balance = res.data[0] result.balance = res.data[0]
@ -385,12 +400,19 @@
uni.hideLoading() uni.hideLoading()
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error,
res => {
this.getfocus();
})
}) })
} }
} catch (e) { } catch (e) {
this.showErrorMessage(e.stack)
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(e.stack,
res => {
this.getfocus();
})
} }
}, },

7
src/pages/scrap/job/scrapJobDetail.vue

@ -214,7 +214,8 @@
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") { if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus + itemStatus +
']不一致,是否继续出库?', res => { ']不一致,是否继续出库?', res => {
if (res) { if (res) {
@ -231,7 +232,8 @@
} }
}); });
} else { } else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus + itemStatus +
']不一致,不允许转移!', res => { ']不一致,不允许转移!', res => {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -297,6 +299,7 @@
}) })
if (str) { if (str) {
str += ',是否确认提交?' str += ',是否确认提交?'
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()

8
src/pages/stockUp/coms/comScanStockUpPack.vue

@ -182,8 +182,9 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.initData(); this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode "-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
@ -420,17 +421,16 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
batch.Records.push(record); batch.Records.push(record);
this.issueRecord.unshift(record) this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch); this.calcBatchHandleQty(batch);
this.getfocus();
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan ) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

Loading…
Cancel
Save