diff --git a/src/api/httpRequest3.js b/src/api/httpRequest3.js index 0b362130..99e3086e 100644 --- a/src/api/httpRequest3.js +++ b/src/api/httpRequest3.js @@ -1,10 +1,10 @@ - import storage from '../common/utils/storage' import { removeToken } from '@/common/utils/auth' - + function service(options = {}) { + var token = storage.getStorage(storage.constant.token) var tenantId = storage.getStorage('tenantId') // if(getApp()!=undefined){ @@ -16,63 +16,111 @@ function service(options = {}) { // } var requestUrl = "" requestUrl = import.meta.env.VITE_BASE_URL - + options.header = { "content-type": "application/json", - "Authorization": "Bearer "+token, - "dataType":"json", - "dataSource":"PDA", - "tenant-id":tenantId + "Authorization": "Bearer " + token, + "dataType": "json", + "dataSource": "PDA", + "tenant-id": tenantId }; options.timeout = 300000 - - options.url = requestUrl+options.url - + + options.url = requestUrl + options.url + return new Promise((resolve, reject) => { - options.success = (res) => { - if (res ) { - if(res.statusCode == 200){ - if(res.data.code==0){ - resolve(res.data); - }else { - if(res.data.code==401){ - uni.clearStorageSync() - uni.removeStorageSync('overPackageRecord') // 删除直接翻包中缓存的来源库位 - removeToken(); - uni.reLaunch({ - url: '/pages/login/index' - }) - } - reject("系统异常:"+res.data.msg) - console.log("系统异常",res.data.msg) + options.success = (res) => { + if (res) { + if (res.statusCode == 200) { + if (res.data.code == 0) { + resolve(res.data); + } else { + if (res.data.code == 401) { + uni.clearStorageSync() + uni.removeStorageSync('overPackageRecord') // 删除直接翻包中缓存的来源库位 + removeToken(); + uni.reLaunch({ + url: '/pages/login/index' + }) + } + if (res.data.msg) { + if (res.data.msg.includes('get lock')) { + reject("系统异常:状态码["+res.statusCode +"]\n"+"数据库死锁") + } else { + reject("系统异常:状态码["+res.statusCode +"]\n"+res.data.msg) } - - }else { - reject("系统异常:"+ res.data.msg) - console.log("系统异常",res.data.msg) + } else { + reject("系统异常:状态码["+res.statusCode+"]") + } + } + + } else { + if (res.data.msg) { + if (res.data.msg.includes('get lock')) { + reject("系统异常:状态码[" +res.statusCode+"]\n"+ "数据库死锁") + } else { + reject("系统异常:状态码[" +res.statusCode+"]\n"+ res.data.msg) } - } else { - reject("系统异常:"+res.data.msg) - console.log("系统异常",res.data.msg) + reject("系统异常:状态码["+res.statusCode+"]") } - }; - options.fail = (error) => { - var message = error.errMsg - if (message === 'Network Error') { - message = '接口连接异常' - } else if (message.includes('timeout')) { - message = '接口请求超时' - } else if (message.includes('Request failed with status code')) { - message = '接口' + message.substr(message.length - 3) + '异常' + } + + } else { + if (res.data.msg) { + if (res.data.msg.includes('get lock')) { + reject("系统异常:状态码["+res.statusCode +"]\n"+ "数据库死锁") + } else { + reject("系统异常:状态码["+res.statusCode +"]\n"+ res.data.msg) } - reject("系统异常:"+message); - console.log("系统异常",message) - }; - uni.request(options); - }); - } - - + } else { + reject("系统异常:状态码["+res.statusCode+"]") + } + + } + }; + options.fail = (error) => { + var message = error.errMsg + if (message === 'Network Error') { + message = '接口连接异常' + } else if (message.includes('timeout')) { + message = '接口请求超时' + } else if (message.includes('Request failed with status code')) { + message = '接口' + message.substr(message.length - 3) + '异常' + } else if (message.includes('get lock')) { + message = '接口' + "数据库死锁" + }else if(message.includes('statusCode:-1')){ + message = "当前设备无网络,请检查网络后重试" + } + reject("系统异常:" + message); + console.log("系统异常", message) + }; + // #ifdef APP + uni.getNetworkType({ + success: function(res) { + const networkType = res.networkType; + console.log("网络类型", networkType) + if (networkType == "none") { + reject("当前设备无网络,请检查网络后重试"); + } else { + uni.request(options); + } + } + }) + // #endif + // #ifdef H5 + console.log("网s络H5", navigator.onLine) + if (navigator.onLine) { + uni.request(options); + } else { + reject("当前无网络"); + } + // #endif + + + }); +} + + - export default service; +export default service; \ No newline at end of file diff --git a/src/common/noclick.js b/src/common/noclick.js index 2c4191ee..6fe72a29 100644 --- a/src/common/noclick.js +++ b/src/common/noclick.js @@ -11,15 +11,34 @@ function noMultipleClicks(methods, info) { } else { methods(); } - setTimeout(()=> { + let timer = setTimeout(()=> { that.noClick= true; + clearTimeout(timer) }, 2000) } else { // 这里是重复点击的判断 } } + +// 节流函数 +const throttle = (fn, t,_this) => { + console.log('throttle') + return ()=> { + if (!_this.timer) { + _this.timer = setTimeout(()=>{ + fn() + console.log('fn') + //·清空定时器 + _this.timer = null + }, t) + } + } +} + + //导出 export default { noMultipleClicks,//禁止多次点击 + throttle } diff --git a/src/main.js b/src/main.js index 6344a1ab..6673bb74 100644 --- a/src/main.js +++ b/src/main.js @@ -36,6 +36,7 @@ export function createApp() { app.use(uView) app.component('comMessage', comMessage) app.config.globalProperties.$noMultipleClicks = noclick.noMultipleClicks; + app.config.globalProperties.$throttle = noclick.throttle; // startApp(app); return { app, diff --git a/src/manifest.json b/src/manifest.json index 6a45e3e6..7a1fc122 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,8 +3,8 @@ "package" : "uni.UNI43932FE", "appid" : "__UNI__C9CF4BF", "description" : "", - "versionName" : "1.0.52", - "versionCode" : 52, + "versionName" : "1.0.55", + "versionCode" : 55, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/src/mycomponents/common/comMessage.vue b/src/mycomponents/common/comMessage.vue index 85f72a16..5acb2266 100644 --- a/src/mycomponents/common/comMessage.vue +++ b/src/mycomponents/common/comMessage.vue @@ -12,16 +12,22 @@ - - - {{content}} - - - - + + + + + {{content}} + + + + + + + + - + {{ cancelText }} @@ -493,6 +499,7 @@ display: flex; //弹性布局 flex-direction: column; //垂直排列 align-items: center; //子元素居中 + margin: 8rpx; // background-image: url() } @@ -544,4 +551,11 @@ .def_text { color: $uni-color-primary; } + .text_content{ + padding: 10rpx; + font-size: 32rpx; + text-align: center; + word-break: break-all; + white-space: normal; + } diff --git a/src/mycomponents/job/jobFilter.vue b/src/mycomponents/job/jobFilter.vue index 0da05f0f..4dcd4b84 100644 --- a/src/mycomponents/job/jobFilter.vue +++ b/src/mycomponents/job/jobFilter.vue @@ -46,6 +46,22 @@ + + + 来源库区 + + + + + + 到库区 + + + - + @@ -33,8 +33,7 @@ - + @@ -55,7 +54,7 @@ - diff --git a/src/mycomponents/scan/winComScanBalance.vue b/src/mycomponents/scan/winComScanBalance.vue index eeb54da6..148baaf9 100644 --- a/src/mycomponents/scan/winComScanBalance.vue +++ b/src/mycomponents/scan/winComScanBalance.vue @@ -118,6 +118,9 @@ this.toLocationAreaTypeList = getDirectoryItemArray(businessType.inAreaTypes) this.itemTypesList = getDirectoryItemArray(businessType.itemTypes) this.$refs.popup.open('bottom') + setTimeout(res=>{ + this.getfocus() + },500) }, getScanResult(result) { diff --git a/src/mycomponents/scan/winComScanBalanceLocation.vue b/src/mycomponents/scan/winComScanBalanceLocation.vue index 68f9ae8e..0dfdc271 100644 --- a/src/mycomponents/scan/winComScanBalanceLocation.vue +++ b/src/mycomponents/scan/winComScanBalanceLocation.vue @@ -63,6 +63,10 @@ getBalanceByParams, getBasicItemByCode } from '@/api/request2.js'; + + import { + getLabelInfo + } from '@/common/label.js'; import { getListLocationAreaTypeDesc, @@ -141,28 +145,58 @@ this.fromLocationAreaTypeList = getDirectoryItemArray(businessType.outAreaTypes) this.itemTypesList = getDirectoryItemArray(businessType.itemTypes) this.$refs.popup.open('bottom') + setTimeout(res=>{ + this.packGetFocus() + },500) }, openScanPopupForJob(fromLocationCode, fromLocationList, jobContent){ this.fromLocationCode = fromLocationCode; this.fromLocationList = fromLocationList; - if (fromLocationCode != '') { - this.packGetFocus(); - } else { + this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses) + this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //出库库存状态; //出库库存状态 + 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) { + this.fromLocationCode = fromLocationCode; + this.fromLocationList = fromLocationList; + if (!fromLocationCode) { if (this.fromLocationList.length == 0) { - this.locationGetFocus(); + // this.locationGetFocus(); + alert('没有来源库位:List') } else { this.fromLocationCode = this.fromLocationList[0]; } } - - setTimeout(res => { - this.$refs.popup.open('bottom') - }, 500) + this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses) this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //出库库存状态; //出库库存状态 this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //出库库存状态 + getLabelInfo(scanMessage, this.headerType, callback => { + if (callback.success) { + this.getScanResult(callback); + } else { + this.showErrorMessage(callback.message, res => {}) + } + + }) + }, handleConfirm() { @@ -263,6 +297,7 @@ }) }, showErrorMessage(message) { + this.packLoseFocus(); this.$refs.comMessage.showErrorMessage(message, res => { if (res) { if(this.$refs.comscan){ diff --git a/src/mycomponents/scan/winComScanFg.vue b/src/mycomponents/scan/winComScanFg.vue index 531c5a36..b8772969 100644 --- a/src/mycomponents/scan/winComScanFg.vue +++ b/src/mycomponents/scan/winComScanFg.vue @@ -6,12 +6,14 @@ + style="margin-left: 5px;width: 90%;" + :focus="boxfocus" :placeholder="placeholderValue" + @focus="handleFocus" + @input="handelScanMsg" :cursor="cursorIndex"> - + @@ -103,13 +105,11 @@ } }, mounted() { - this.boxfocus = true; - // uni.hideKeyboard(); // #ifdef H5 - if (document.querySelector('textarea') != null) { - document.querySelector('textarea').setAttribute('inputmode', 'none') - } + // if (document.querySelector('textarea') != null) { + // document.querySelector('textarea').setAttribute('inputmode', 'none') + // } // #endif // this.hide() // #ifdef APP-PLUS @@ -125,20 +125,6 @@ this.placeholderValue = '请扫描' + this.placeholder; }, methods: { - - hide() { - // #ifdef APP-PLUS - // 只是解决软键盘的闪现 - var interval = setInterval(function() { - uni.hideKeyboard(); //隐藏软键盘 - console.log('刷新') - }, 5); - setTimeout(() => { - clearInterval(interval); - console.log('停止刷新') - }, 1000); - // #endif - }, setItemCodeSimulate(itemCode, scanMsg) { this.itemCode = itemCode; this.scanMsg = scanMsg; @@ -154,6 +140,7 @@ this.scanMsg = val }, clearScanValue() { + this.cursorIndex=0, this.scanMsg = '' this.getfocus(); }, @@ -171,7 +158,6 @@ let content = uni.$u.trim(that.scanMsg) // let content = that.scanMsg; if (content == "") { - that.getfocus(); this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => { if (res) { that.scanMsg = "" @@ -235,6 +221,7 @@ that.$emit("getResult", scanResult); } } catch (error) { + that.losefocus(); this.$refs.comMessage.showErrorMessage(error.message, res => { if (res) { that.getfocus(); @@ -243,6 +230,7 @@ } }).catch(error => { + that.losefocus(); this.$refs.comMessage.showErrorMessage(error, res => { if (res) { that.scanMsg = "" @@ -268,6 +256,11 @@ that.boxfocus = false; }); }, + // handleBlur(){ + // setTimeout(res=>{ + // uni.hideKeyboard(); + // },200) + // }, clear() { this.cursorIndex = 0; this.scanMsg = '' diff --git a/src/mycomponents/scan/winScanAsnNumber.vue b/src/mycomponents/scan/winScanAsnNumber.vue index 100a1c68..02ac8ca5 100644 --- a/src/mycomponents/scan/winScanAsnNumber.vue +++ b/src/mycomponents/scan/winScanAsnNumber.vue @@ -55,8 +55,9 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus('bottom') }, 500) }, closeScanPopup() { diff --git a/src/mycomponents/scan/winScanContainer.vue b/src/mycomponents/scan/winScanContainer.vue index d7323344..5ec28c5c 100644 --- a/src/mycomponents/scan/winScanContainer.vue +++ b/src/mycomponents/scan/winScanContainer.vue @@ -54,8 +54,9 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() }, 500) }, closeScanPopup() { diff --git a/src/mycomponents/scan/winScanFgLabel.vue b/src/mycomponents/scan/winScanFgLabel.vue index 552d3b0e..8d953201 100644 --- a/src/mycomponents/scan/winScanFgLabel.vue +++ b/src/mycomponents/scan/winScanFgLabel.vue @@ -60,13 +60,13 @@ this.$refs.comscansimulate.clickScanMsg(); }, openScanPopup(itemCode) { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') setTimeout(re=>{ this.$refs.comscan.setItemCode(itemCode) },500) - - }, 200) + this.getfocus() + }, 500) }, closeScanPopup() { @@ -91,13 +91,13 @@ }, getfocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan ) { this.$refs.comscan.getfocus(); } }, losefocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan ) { this.$refs.comscan.losefocus(); } }, diff --git a/src/mycomponents/scan/winScanItem.vue b/src/mycomponents/scan/winScanItem.vue index aee8b8d7..9b2a6abd 100644 --- a/src/mycomponents/scan/winScanItem.vue +++ b/src/mycomponents/scan/winScanItem.vue @@ -76,8 +76,10 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') + var that =this; setTimeout(res => { - this.$refs.popup.open('bottom') + that.getfocus() }, 500) }, closeScanPopup() { diff --git a/src/mycomponents/scan/winScanJobNumber.vue b/src/mycomponents/scan/winScanJobNumber.vue index e12dfbfe..5f7355f2 100644 --- a/src/mycomponents/scan/winScanJobNumber.vue +++ b/src/mycomponents/scan/winScanJobNumber.vue @@ -61,8 +61,9 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() }, 500) }, closeScanPopup() { @@ -72,7 +73,7 @@ this.$refs.popup.close() }, getfocus() { - if (this.isShow) { + if (this.$refs.scan) { this.$refs.scan.getfocus() } }, diff --git a/src/mycomponents/scan/winScanLocation.vue b/src/mycomponents/scan/winScanLocation.vue index 70f3aeea..0f4c0144 100644 --- a/src/mycomponents/scan/winScanLocation.vue +++ b/src/mycomponents/scan/winScanLocation.vue @@ -65,8 +65,9 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() }, 500) }, openScanPopupSimulate(location) { diff --git a/src/mycomponents/scan/winScanPack.vue b/src/mycomponents/scan/winScanPack.vue index 4fa855f5..7da05b49 100644 --- a/src/mycomponents/scan/winScanPack.vue +++ b/src/mycomponents/scan/winScanPack.vue @@ -70,9 +70,10 @@ }) }, openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') - }, 200) + this.getfocus() + }, 500) }, closeScanPopup() { @@ -103,13 +104,13 @@ }, getfocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.getfocus(); } }, losefocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.losefocus(); } }, diff --git a/src/mycomponents/scan/winScanPackAndCont.vue b/src/mycomponents/scan/winScanPackAndCont.vue index e71b2eaf..01941270 100644 --- a/src/mycomponents/scan/winScanPackAndCont.vue +++ b/src/mycomponents/scan/winScanPackAndCont.vue @@ -61,8 +61,9 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() }, 500) }, diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue index 91c712b1..e958c8d4 100644 --- a/src/mycomponents/scan/winScanPackAndLocation.vue +++ b/src/mycomponents/scan/winScanPackAndLocation.vue @@ -152,43 +152,44 @@ }, //直接扫描 openScanPopupForType(fromLocationCode, businessType) { - this.businessType = businessType; this.fromLocationCode = fromLocationCode; - if (fromLocationCode != '') { - this.packGetFocus(); - } else { - this.locationGetFocus(); - } + this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //出库库存状态 this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //出库库区 - if (!this.show) { - setTimeout(res => { - this.$refs.popup.open('bottom') - }, 500) - } + this.$refs.popup.open('bottom') + setTimeout(res => { + if (fromLocationCode != '') { + this.packGetFocus(); + } else { + this.locationGetFocus(); + } + }, 500) }, //在任务中扫描 openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { this.fromLocationCode = fromLocationCode; 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.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //出库库存状态; //出库库存状态 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) { @@ -417,7 +418,7 @@ balance: datas, fromLocationCode: this.fromLocationCode, } - this.packGetFocus(); + // this.packGetFocus(); this.$emit("getResult", data); this.$emit("getCountScanResult", data); }, @@ -433,18 +434,18 @@ balance: item, fromLocationCode: this.fromLocationCode, } - this.packGetFocus(); + // this.packGetFocus(); this.$emit("getResult", data); }, packGetFocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.getfocus(); } }, packLoseFocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.losefocus(); } }, diff --git a/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue b/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue index f43c2bb1..c1f8c477 100644 --- a/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue +++ b/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue @@ -131,16 +131,16 @@ openScanPopupForType(fromLocationCode, businessType) { this.businessType = businessType; this.fromLocationCode = fromLocationCode; - if (fromLocationCode != '') { - this.packGetFocus(); - } else { - this.locationGetFocus(); - } this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //出库库存状态 this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); //出库库存状态 + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + if (fromLocationCode != '') { + this.packGetFocus(); + } else { + this.locationGetFocus(); + } }, 500) }, @@ -148,21 +148,23 @@ openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { this.fromLocationCode = fromLocationCode; 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.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //出库库存状态; //出库库存状态 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) { diff --git a/src/mycomponents/scan/winScanPackAndPosition.vue b/src/mycomponents/scan/winScanPackAndPosition.vue index 1ee6edc6..266ba324 100644 --- a/src/mycomponents/scan/winScanPackAndPosition.vue +++ b/src/mycomponents/scan/winScanPackAndPosition.vue @@ -105,23 +105,23 @@ this.showErrorMessage(error) }) } - + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() }, 500) }, - - initData(){ + + initData() { this.positionInfo = "请选择位置"; this.positionList = []; this.productionLineCode = ''; this.rawLocationCode = ""; this.fgLocationCode = ""; this.workshopCode = ""; - this.workStationCode =""; + this.workStationCode = ""; this.workShopName = ""; - this.productionLineName=""; - this.workStationName=""; + this.productionLineName = ""; + this.workStationName = ""; this.show = false; this.isEditPosition = true }, @@ -223,4 +223,4 @@ height: auto; max-height: 300rpx; } - + \ No newline at end of file diff --git a/src/mycomponents/scan/winScanPackJob.vue b/src/mycomponents/scan/winScanPackJob.vue index eb53f519..c9db3744 100644 --- a/src/mycomponents/scan/winScanPackJob.vue +++ b/src/mycomponents/scan/winScanPackJob.vue @@ -71,6 +71,9 @@ // 弹出 openScanPopup(){ this.$refs.popup.open('bottom') + setTimeout(res=>{ + this.packGetFocus() + },500) }, // 关闭 closeScanPopup(content) { @@ -83,13 +86,13 @@ this.$emit("getResult", result); }, packGetFocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.getfocus(); } }, packLoseFocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.losefocus(); } }, diff --git a/src/mycomponents/scan/winScanPackLevel.vue b/src/mycomponents/scan/winScanPackLevel.vue index 6c78f008..07dd2bcd 100644 --- a/src/mycomponents/scan/winScanPackLevel.vue +++ b/src/mycomponents/scan/winScanPackLevel.vue @@ -96,9 +96,10 @@ }) }, openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') - }, 200) + this.getfocus(); + }, 500) }, closeScanPopup() { @@ -130,13 +131,13 @@ }, getfocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.getfocus(); } }, losefocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.losefocus(); } }, diff --git a/src/mycomponents/scan/winScanPackage.vue b/src/mycomponents/scan/winScanPackage.vue index ffb26638..e751e5f4 100644 --- a/src/mycomponents/scan/winScanPackage.vue +++ b/src/mycomponents/scan/winScanPackage.vue @@ -67,18 +67,19 @@ this.$refs.comscansimulate.clickScanMsg(); }, openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') - }, 200) + this.getfocus() + }, 500) }, openScanPopupByBusinessType(businessType) { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() this.businessType = businessType; - - }, 200) + }, 500) }, @@ -223,13 +224,13 @@ }, getfocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan) { this.$refs.comscan.getfocus(); } }, losefocus() { - if (this.$refs.comscan != undefined) { + if (this.$refs.comscan ) { this.$refs.comscan.losefocus(); } }, @@ -240,9 +241,10 @@ this.show = e.show }, showErrorMessage(message) { + this.losefocus() this.$refs.comMessage.showErrorMessage(message, res => { if (res) { - + this.getfocus(); } }); }, diff --git a/src/pages.json b/src/pages.json index 265152ee..b697869a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -2297,7 +2297,8 @@ // "fontSize": "58rpx" // }] // }, - "softinputMode": "adjustPan" //adjustResize + //手机软键盘升起不让其将页面头部上推 + "softinputMode": "adjustResize" //adjustResize }, "tabBar": { "color": "#000000", diff --git a/src/pages/count/job/fuzzyCountDetail.vue b/src/pages/count/job/fuzzyCountDetail.vue index addbf80e..ad1a4642 100644 --- a/src/pages/count/job/fuzzyCountDetail.vue +++ b/src/pages/count/job/fuzzyCountDetail.vue @@ -433,10 +433,12 @@ }, remove(item, index) { + this.scanPopupLoseFocus(); this.showQuestionMessage("是否要移除扫描信息?", res => { if (res) { this.detailSource.splice(index, 1) } + this.scanPopupGetFocus(); }); }, @@ -489,6 +491,7 @@ showMessage(message) { + this.scanPopupLoseFocus(); this.$refs.comMessage.showMessage(message, res => { if (res) { this.afterCloseMessage() @@ -496,6 +499,7 @@ }); }, showErrorMessage(message) { + this.scanPopupLoseFocus(); this.$refs.comMessage.showErrorMessage(message, res => { if (res) { this.afterCloseMessage() diff --git a/src/pages/customerReturn/job/returnDetail.vue b/src/pages/customerReturn/job/returnDetail.vue index 21afb6d1..637d4376 100644 --- a/src/pages/customerReturn/job/returnDetail.vue +++ b/src/pages/customerReturn/job/returnDetail.vue @@ -339,17 +339,44 @@ if (!this.checkLocation()) { return } + + // //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(); + } + }); + } + } + }, + + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` } }) }) if (str) { - str += ',是否确认提交?' + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -358,24 +385,6 @@ } else { this.submitJob() } - // //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - // "]箱总共[" + this.subList.length + "]箱", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, submitJob() { diff --git a/src/pages/deliver/coms/comScanDeliverPack.vue b/src/pages/deliver/coms/comScanDeliverPack.vue index 5592f322..27c5ce1c 100644 --- a/src/pages/deliver/coms/comScanDeliverPack.vue +++ b/src/pages/deliver/coms/comScanDeliverPack.vue @@ -184,8 +184,9 @@ this.initData(); this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + "-" + this.jobContent.subList[0].workStationCode + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus(); }, 500) }, diff --git a/src/pages/fg/receiptByPlan.vue b/src/pages/fg/receiptByPlan.vue index a64fb88e..74c31bcc 100644 --- a/src/pages/fg/receiptByPlan.vue +++ b/src/pages/fg/receiptByPlan.vue @@ -347,15 +347,15 @@ import { nextTick } from 'vue'; this.dataContent.goodQty = planeInfo.data.list[0].goodQty this.dataContent.noGoodQty = calc.sub(planeInfo.data.list[0].planQty, planeInfo.data.list[ 0].goodQty), - this.dataContent.subList = [] + this.dataContent.subList = [] this.showList = []; this.allList = [] this.index = 1 } - - } else { - throw new Error("未查找到单据信息") - } + } + // else { + // throw new Error("未查找到单据信息") + // } uni.hideLoading() if(isAllSubmit){ this.clearData() @@ -366,13 +366,10 @@ import { nextTick } from 'vue'; this.dataContent.handleQty = 0; } - - nextTick(()=>{ this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list) }) - } catch (error) { uni.hideLoading() var hint = error.message ? error.message : error diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 09a271e2..89863e59 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -49,6 +49,10 @@ import comBlankView from '@/mycomponents/common/comBlankView.vue' import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" + + import { + getInventoryStatusName + } from '@/common/directory.js'; import { inventoryMoveRecordSubmit, getBasicLocationByCode, @@ -278,17 +282,27 @@ } else { newDetail.toInventoryStatus = this.toInventoryStatus; } + + if (newDetail.packingNumber == '') { + newDetail.packingNumber = pack.number; + } newDetail.toLocationCode = this.toLocationCode; newDetail.fromLocationCode = result.fromLocationCode item.subList.push(newDetail); } else { - this.showErrorMessage(detail.packingNumber + "重复扫描") + this.showErrorMessage("包装["+detail.packingNumber+"]\n"+ + "批次["+detail.batch+"]\n"+"库位["+detail.fromLocationCode+"]\n"+ + "库存状态["+getInventoryStatusName(detail.toInventoryStatus)+"]\n" + + "重复扫描") } } calcHandleQty(this.detailSource); }, showErrorMessage(message) { + if(this.$refs.scanPopup){ + this.$refs.scanPopup.packLoseFocus() + } this.$refs.comMessage.showErrorMessage(message, res => { if (res) { @@ -341,10 +355,10 @@ this.showErrorMessage("请先选择目标库位") return; } - if(this.fromLocationCode==this.toLocationCode){ - this.showErrorMessage("来源库位和目标库位不能一致") - return; - } + // if(this.fromLocationCode==this.toLocationCode){ + // this.showErrorMessage("来源库位和目标库位不能一致") + // return; + // } if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { //查询管理模式 diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue index ce81a5da..bf64c75a 100644 --- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -354,17 +354,44 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } + + //允许部分提交 + //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(); + } + }); + } + } + }, + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` } }) }) if (str) { - str += ',是否确认提交?' + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -373,26 +400,6 @@ } else { this.submitJob() } - // //允许部分提交 - // //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - // "]箱总共[" + this - // .subList.length + "]箱", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, submitJob() { diff --git a/src/pages/issue/coms/comIssueJobCard.vue b/src/pages/issue/coms/comIssueJobCard.vue index 1cd8438e..bded9d84 100644 --- a/src/pages/issue/coms/comIssueJobCard.vue +++ b/src/pages/issue/coms/comIssueJobCard.vue @@ -11,8 +11,8 @@ - - + + diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index 3f266f6b..67204f8a 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -213,8 +213,9 @@ this.initData(); // this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + // "-" + this.jobContent.subList[0].workStationCode + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus(); }, 500) }, @@ -315,7 +316,10 @@ "状态 [" + status + "] \n" + "库区 [" + areaType + "] \n" + "未查找到库存余额" - this.showErrorMessage(hint) + this.showErrorMessage(hint, + res => { + that.getfocus(); + }) } else if (res.data.length == 1) { result.balance = res.data[0] @@ -332,11 +336,16 @@ uni.hideLoading() }).catch(error => { uni.hideLoading() - this.showErrorMessage(error) + this.showErrorMessage(error, + res => { + that.getfocus(); + }) }) } } catch (e) { - this.showErrorMessage(e.stack) + this.showErrorMessage(e.stack,res => { + that.getfocus(); + }) uni.hideLoading(); } }, diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue index 541e4808..2bfd64cd 100644 --- a/src/pages/issue/job/issueDetail.vue +++ b/src/pages/issue/job/issueDetail.vue @@ -481,6 +481,8 @@ '】不一致,是否继续提交', res => { if (res) { this.submit(); + }else { + this.scanPopupGetFocus() } }); } @@ -489,8 +491,8 @@ }, scanPopupGetFocus() { - if (this.$refs.scanPopup != undefined) { - this.$refs.scanPopup.getfocus(); + if (this.$refs.comScanIssuePack) { + this.$refs.comScanIssuePack.getfocus(); } }, diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue index fd57836e..a145d723 100644 --- a/src/pages/issue/job/issueJob.vue +++ b/src/pages/issue/job/issueJob.vue @@ -1,7 +1,7 @@ @@ -32,6 +39,10 @@ goHome, updateTitle } from '@/common/basic.js'; + + import { + getBusinessType + } from '@/common/record.js'; import { planRefreshTime } from '@/common/config.js'; @@ -45,6 +56,9 @@ import jobFilter from '@/mycomponents/job/jobFilter.vue' import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.vue' import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue' + import winScanButton from '@/mycomponents/scan/winScanButton.vue' + import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' + import jobList from '@/mycomponents/jobList/jobList.vue' export default { name: 'issue', @@ -52,7 +66,10 @@ comEmptyView, jobFilter, comOverPackJobCard, - jobInfoPopup + jobInfoPopup, + winComScanBalance, + winScanButton, + jobList }, data() { return { @@ -68,7 +85,11 @@ detailOptions: [], detailGiveupOptions: [], title:'', - timer:null + businessTypeCode: "OverPackage", + businessType: null, + timer:null, + scanMessage:"" + }; }, @@ -125,6 +146,16 @@ }, methods: { + getBusinessTypeFunc() { + getBusinessType(this.businessTypeCode, res => { + if (res.success) { + this.businessType = res.businessType; + this.openScanPopup(); + } else { + this.showErrorMessage(res.message) + } + }); + }, timerRefresh() { this.getList('refresh') this.stopRefresh(); @@ -225,8 +256,8 @@ }, - openJobDetail(item) { - this.getJobInfoByNumber(item.number) + openJobDetail(item,scanMessage = '') { + this.getJobInfoByNumber(item.number,scanMessage) }, showItemList(itemList) { @@ -327,8 +358,16 @@ } }); }, + openScanPopup() { + if (this.businessType == null) { + this.getBusinessTypeFunc() + } else { + this.$refs.scanPopup.openScanPopup(this.businessType); + } + }, - getJobInfoByNumber(number){ + getJobInfoByNumber(number,scanMessage){ + console.log("扫描",scanMessage) let that = this; uni.showLoading({ title: "加载中....", @@ -367,14 +406,93 @@ return; } uni.navigateTo({ - url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title + url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title+'&scanMessage=' + + scanMessage }); + this.scanMessage="" } }).catch(error => { uni.hideLoading(); that.showMessage(error); }) }, + + selectItem(item) { + this.$refs.scanPopup.closeScanPopup(); + this.openJobDetail(item, this.scanMessage); + }, + + getScanResult(result) { + let balance = result.balance; + if (balance != null) { + this.scanMessage = "" + if (!result.label.batch) { + this.showMessage("批次为空") + return; + } + if (!result.label.itemCode) { + this.showMessage("物料号为空") + return; + } + try { + var filters = [{ + column: "status", + action: "in", + value: '1,2' + }, + { + column: "batch", + action: "==", + value: result.label.batch + }, + { + column: "itemCode", + action: "==", + value: result.label.itemCode + }, + { + column: "fromLocationCode", + action: "==", + value: balance.locationCode + } + ] + getOverPageJobList({ + filters: filters, + pageNo: 1, + pageSize: 1000, + sort: 'createTime', + by: 'asc' + }).then(res => { + this.scanMessage = result.scanMessage + let resultList = res.data.list; + if (resultList.length > 0) { + resultList.forEach(item => { + item.title = item.number; + item.selected = false + }) + let list = [] + resultList.forEach(item => { + if (!list.find(subItem => subItem.title == item.title)) { + list.push(item) + } + }) + if (list.length > 0) { + this.selectItem(list[0]) + } + } else { + this.showMessage("按来源库位[" + balance.locationCode + "]批次[" + result.label.batch + + "]物料号[" + result.label.itemCode + "]未查找到任务\n" + "扫描[" + result + .scanMessage + "]") + } + }).catch(error => { + this.showMessage(error + "\n扫描[" + result.scanMessage + "]") + }) + + } catch (e) { + this.showMessage(e.message) + } + } + } } } diff --git a/src/pages/package/job/overPackageJobDetail.vue b/src/pages/package/job/overPackageJobDetail.vue index 2d91d17b..9c2d2319 100644 --- a/src/pages/package/job/overPackageJobDetail.vue +++ b/src/pages/package/job/overPackageJobDetail.vue @@ -58,7 +58,7 @@ - + @@ -128,6 +128,7 @@ detailOptions: [], scanOptions: [], jobStatus: "", + scanMessage: '' // printDeafult: {}, //默认打印机 // templateDeafult: {} //默认的模板 @@ -143,6 +144,7 @@ title: option.title + '详情' }) this.id = option.id; + this.scanMessage = option.scanMessage || ''; if (this.id != undefined) { //新建的任务自动接收 if (option.status == "1") { @@ -229,6 +231,9 @@ that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.detailSource, that.subList) + if (this.scanMessage) { + this.openScanPopupSimulate(this.scanMessage); + } // this.$nextTick(() => { // if (uni.getStorageSync('overPackageJobDetailPointParams')) { // const overPackageJobDetailPointParams = uni.getStorageSync( @@ -255,6 +260,9 @@ this.showErrorMessage(error) }) }, + openScanPopupSimulate(scanMessage) { + this.$refs.comScanPackagePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent, scanMessage); + }, closeScan() { this.resizeCollapse(); diff --git a/src/pages/package/record/splitPackageRecord.vue b/src/pages/package/record/splitPackageRecord.vue index bd4faefb..c4a93890 100644 --- a/src/pages/package/record/splitPackageRecord.vue +++ b/src/pages/package/record/splitPackageRecord.vue @@ -30,7 +30,7 @@ - + diff --git a/src/pages/point/index.vue b/src/pages/point/index.vue index 3aeaadad..ee1de5eb 100644 --- a/src/pages/point/index.vue +++ b/src/pages/point/index.vue @@ -39,7 +39,7 @@ - @@ -93,13 +93,25 @@ }, methods: { - success(img) { - this.picUrl.push(img) - this.picIndex++ - if (this.picIndex == this.data.length) { - this.isLoadFinish = true; - uni.hideLoading() - } + success(img,item) { + item.barcodeBase641 = img + uni.hideLoading() + this.isLoadFinish = true + // #ifdef APP + plus.io.resolveLocalFileSystemURL(item.barcodeBase641, (entry) => { + // 可通过entry对象操作test.html文件 + entry.file((file) => { + let fileReader = new plus.io.FileReader(); + fileReader.onloadend = (evt) => { + console.log("文件路径" + evt.target.result) + item.barcodeBase64 = evt.target.result + } + fileReader.readAsDataURL(file); + }); + }, (e) => { + console.log("失败" + e) + }); + // #endif }, setHtmlData() { let str = '' @@ -182,50 +194,21 @@ "mainBody", str); //替换物品代码 }); }, - - generateBase64(index) { - - //完成,调用打印 - if (index == this.picUrl.length) { - this.setHtmlData() - let clearInt = setInterval(() => { - if (!this.newHtmlContent.mainBody) { - // #ifdef APP - testModule.doHTMLPrint(this.newHtmlContent) - // #endif - clearInterval(clearInt) - uni.hideLoading() - } - }, 1000) - - } else { - let i = this.picUrl.length - 1 - index - var url = this.picUrl[i] - // #ifdef APP - plus.io.resolveLocalFileSystemURL(url, (entry) => { - // 可通过entry对象操作test.html文件 - entry.file((file) => { - let fileReader = new plus.io.FileReader(); - fileReader.onloadend = (evt) => { - console.log("文件路径" + evt.target.result) - let i = this.data.length - 1 - index - this.data[i].barcodeBase64 = evt.target.result - this.generateBase64(index + 1) - } - fileReader.readAsDataURL(file); - }); - }, (e) => { - console.log("失败" + e) - }); - // #endif - } - }, printImage() { uni.showLoading({ title: "加载中", mask: true }) - this.generateBase64(0) + this.setHtmlData() + let clearInt = setInterval(() => { + if (!this.newHtmlContent.mainBody) { + // #ifdef APP + testModule.doHTMLPrint(this.newHtmlContent) + // #endif + clearInterval(clearInt) + uni.hideLoading() + } + }, 1000) }, // #ifdef APP diff --git a/src/pages/pointPutawayJob/index.vue b/src/pages/pointPutawayJob/index.vue index bac7be5b..d3c1fe15 100644 --- a/src/pages/pointPutawayJob/index.vue +++ b/src/pages/pointPutawayJob/index.vue @@ -26,7 +26,7 @@ 供应商 {{item.supplierCode}} - 批次 + 供应商批次 {{item.supplierBatch}} @@ -218,7 +218,7 @@ 供应商 ${item.supplierCode} - 批次 + 供应商批次 ${item.supplierBatch} diff --git a/src/pages/productDismantle/job/productDismantleDetail.vue b/src/pages/productDismantle/job/productDismantleDetail.vue index e25735c9..27c9a7a6 100644 --- a/src/pages/productDismantle/job/productDismantleDetail.vue +++ b/src/pages/productDismantle/job/productDismantleDetail.vue @@ -342,12 +342,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/productPutaway/coms/comProductJobCard.vue b/src/pages/productPutaway/coms/comProductJobCard.vue index 31e6d155..54272f7c 100644 --- a/src/pages/productPutaway/coms/comProductJobCard.vue +++ b/src/pages/productPutaway/coms/comProductJobCard.vue @@ -1,8 +1,8 @@ diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index 1a970b6b..8cef3a48 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -404,12 +404,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/productPutaway/job/productPutawayJob.vue b/src/pages/productPutaway/job/productPutawayJob.vue index 11625ff6..25541856 100644 --- a/src/pages/productPutaway/job/productPutawayJob.vue +++ b/src/pages/productPutaway/job/productPutawayJob.vue @@ -213,7 +213,7 @@ }, openJobDetail(item, scanMessage = '') { - this.getJobInfoByNumber(item.number,scanMessage = '') + this.getJobInfoByNumber(item.number,scanMessage) }, getJobInfoByNumber(number,scanMessage){ @@ -357,8 +357,14 @@ }, showMessage(message) { + if(this.$refs.scanPopup){ + this.$refs.scanPopup.packLoseFocus() + } this.$refs.comMessage.showErrorMessage(message, res => { if (res) { + if(this.$refs.scanPopup){ + this.$refs.scanPopup.packLoseFocus() + } } }); diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue index bb40a81b..1c98771d 100644 --- a/src/pages/productPutaway/record/productPutawayRecord.vue +++ b/src/pages/productPutaway/record/productPutawayRecord.vue @@ -232,7 +232,10 @@ }, showErrorMessage(message) { - this.$refs.comMessage.showErrorMessage(message, res => {}); + this.scanPopupLoseFocus(); + this.$refs.comMessage.showErrorMessage(message, res => { + this.scanPopupGetFocus(); + }); }, calcHandleQty() { calcHandleQty(this.detailSource); @@ -274,6 +277,12 @@ this.$refs.scanPopup.getfocus(); } }, + + scanPopupLoseFocus() { + if (this.$refs.scanPopup != undefined) { + this.$refs.scanPopup.losefocus(); + } + }, scanLocationCode(location, code) { this.toLocationCode = code diff --git a/src/pages/productReceipt/coms/comProductJobCard.vue b/src/pages/productReceipt/coms/comProductJobCard.vue index 3fd24e47..594a2bfd 100644 --- a/src/pages/productReceipt/coms/comProductJobCard.vue +++ b/src/pages/productReceipt/coms/comProductJobCard.vue @@ -2,8 +2,8 @@ - - + +