diff --git a/.env.production b/.env.production index f6803774..9a603299 100644 --- a/.env.production +++ b/.env.production @@ -1,12 +1,11 @@ -VITE_BASE_URL=http://172.22.32.8:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api +VITE_BASE_URL=http://172.21.32.13:81/api/admin-api +VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' +VITE_TENANT='[{"text":"长春1379","value":1}]' # 是否是测试环境 VITE_isDevelopment=false - # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' +VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' diff --git a/src/api/httpRequest3.js b/src/api/httpRequest3.js index 0b362130..81a84796 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,109 @@ 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 = '接口' + "数据库死锁" + } + 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/api/request2.js b/src/api/request2.js index 24d9af7e..c8dbcd30 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -92,7 +92,7 @@ export function updateUserPwd(oldPassword, newPassword) { return request({ url: baseApi + '/system/user/profile/update-password', method: 'PUT', - params: data + data: data }) } diff --git a/src/common/config.js b/src/common/config.js index 1288b666..4c8cc3c4 100644 --- a/src/common/config.js +++ b/src/common/config.js @@ -1,2 +1,4 @@ export const overPagePrint="overPage_print" -export const overPageTemplate="overPage_Template" \ No newline at end of file +export const overPageTemplate="overPage_Template" +//3分钟刷新 +export const planRefreshTime=3*60*1000 \ No newline at end of file diff --git a/src/hybrid/html/purchaseReceiptJob.html b/src/hybrid/html/purchaseReceiptJob.html index 95e9a975..9352a1fc 100644 --- a/src/hybrid/html/purchaseReceiptJob.html +++ b/src/hybrid/html/purchaseReceiptJob.html @@ -28,10 +28,11 @@ align-items: center } - .top th { + .top1 th { font-weight: bold; - font-size: 16px; + font-size: 13px; padding: 10px; + text-align: left; } @@ -42,13 +43,33 @@ width: 100% } th{ - text-align:left; + font-weight: bold; + font-size: 13px; padding: 10px; } td{ padding: 10px; } + td:nth-child(2n){ + width:calc(50% - 100px); + } + td:nth-child(2n+1){ + width:80px; + } + .relative{ + margin-bottom: 10px; + position: relative; + } + + .q{ + position: absolute; + left: 50%; + top:50%; + font-size: 160px; + transform: translate(-50% ,-50%); + color: rgba(0, 0, 0, 0.1); + } diff --git a/src/manifest.json b/src/manifest.json index d1f325bc..7a1fc122 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,8 +3,8 @@ "package" : "uni.UNI43932FE", "appid" : "__UNI__C9CF4BF", "description" : "", - "versionName" : "1.0.45", - "versionCode" : 45, + "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 bc82cdc0..85f72a16 100644 --- a/src/mycomponents/common/comMessage.vue +++ b/src/mycomponents/common/comMessage.vue @@ -13,8 +13,11 @@ - - + + {{content}} + + + @@ -62,7 +65,9 @@ isDisabled: true, //为 true 时,表示用户可以点击,反之则不可以 seconds: 0, success: () => {} ,// 回调方法 - version:"" + version:"", + textColor:'', + count:0 } }, @@ -154,7 +159,11 @@ showQuestionMessage(mContent, callback) { this.showSelectModal("疑问", mContent, callback); }, - + // 打开疑问弹框(取消+确定) + showQuestionMessage1(mContent,textColor, callback) { + console.log(textColor) + this.showSelectModal1("疑问", mContent, callback,textColor); + }, // 打开警告弹框(确定+倒计时) showWarningMessage(mContent, callback) { this.showConfirmCountdownModal("警告", mContent, callback); @@ -264,6 +273,26 @@ } }); }, + // 初始化弹框并打开(取消+确定) + showSelectModal1(mIconType, mContent, callback,textColor) { + this.showModal({ + iconType: mIconType, + content: mContent, + textColor:textColor, + success: function(res) { + if (callback != undefined) { + if (res.confirm == true) { + callback(true); + console.log('用户点击确定') + } else { + callback(false); + console.log('用户点击取消') + } + } + + } + }); + }, // 打开疑问弹框(确定+倒计时) showConfirmCountdownQuestionModal(mContent, callback) { @@ -396,6 +425,11 @@ this.cancelColor = '#666F83' } + if (data.textColor) { + this.textColor = data.textColor + } else { + this.textColor = '' + } if (data.showConfirmButton === false || data.showConfirmButton === true) { this.showConfirmButton = data.showConfirmButton } else { diff --git a/src/mycomponents/job/jobAccept.vue b/src/mycomponents/job/jobAccept.vue new file mode 100644 index 00000000..b7b8dac2 --- /dev/null +++ b/src/mycomponents/job/jobAccept.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/mycomponents/job/jobFilter.vue b/src/mycomponents/job/jobFilter.vue index 84e9db14..4dcd4b84 100644 --- a/src/mycomponents/job/jobFilter.vue +++ b/src/mycomponents/job/jobFilter.vue @@ -46,6 +46,22 @@ + + + 来源库区 + + + + + + 到库区 + + + - + @@ -125,6 +141,16 @@ isShowQurery: { type: Boolean, default: false + }, + //来源库区 + isShowFromAreaCode: { + type: Boolean, + default: false + }, + //到库区 + isShowToAreaCode: { + type: Boolean, + default: false } }, data() { @@ -134,6 +160,8 @@ checkedWaitModel: false, productionLineCode: '', // 生产线 fromLocationCode: '', // 来源库位 + fromAreaCode: '', // 来源库区 + toAreaCode: '', // 到库区 itemCode: '', //物料代码 creationTime: '', status: '' @@ -161,6 +189,8 @@ let params = { productionLineCode: this.productionLineCode, fromLocationCode: this.fromLocationCode, + fromAreaCode: this.fromAreaCode, // 来源库区 + toAreaCode: this.toAreaCode, // 到库区 itemCode: this.itemCode, creationTime: this.creationTime, status: this.status @@ -170,6 +200,8 @@ reset(){ this.productionLineCode = '' this.fromLocationCode = '' + this.fromAreaCode = ''// 来源库区 + this.toAreaCode = ''// 到库区 this.itemCode = '' this.creationTime = '' this.status = '' diff --git a/src/mycomponents/scan/winCheckFgLabel.vue b/src/mycomponents/scan/winCheckFgLabel.vue index f4e38ac5..832789b7 100644 --- a/src/mycomponents/scan/winCheckFgLabel.vue +++ b/src/mycomponents/scan/winCheckFgLabel.vue @@ -102,18 +102,17 @@ methods: { //直接扫描 openScanPopupForType(customerCode) { - this.customerCode = customerCode; - if (this.fromLocationCode != '') { - this.packGetFocus(); - } else { - this.locationGetFocus(); - } this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //出库库存状态 this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //出库库区 + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + if (this.fromLocationCode != '') { + this.packGetFocus(); + } else { + this.locationGetFocus(); + } }, 500) }, @@ -121,21 +120,24 @@ 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) }, closeScanPopup(content) { diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue index 12066256..fc2c00ee 100644 --- a/src/mycomponents/scan/winComScan.vue +++ b/src/mycomponents/scan/winComScan.vue @@ -4,11 +4,15 @@ - - - + - + @@ -73,10 +77,10 @@ type: Boolean, default: true }, - boxFocus: { - type: Boolean, - default: true - }, + // boxFocus: { + // type: Boolean, + // default: true + // }, isShowHistory: { type: Boolean, default: true @@ -100,41 +104,7 @@ } }, 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: { placeholder() { @@ -169,6 +139,7 @@ }, clearScanValue() { this.scanMsg = '' + this.cursorIndex =0 this.getfocus(); }, clickScanMsg() { @@ -186,10 +157,10 @@ if (index >= 0) { // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; setTimeout(() => { - that.losefocus(); + that.losefocus(); let content = uni.$u.trim(that.scanMsg) if (content == "") { - that.getfocus(); + // that.getfocus(); this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => { if (res) { that.scanMsg = "" @@ -212,6 +183,7 @@ that.$emit("getResult", scanResult); } else { that.clear(); + that.losefocus(); this.$refs.comMessage.showErrorMessage(scanResult.message, res => { if (res) { that.getfocus(); @@ -222,20 +194,25 @@ }, 500); } }, + + handleFocus(){ + }, + + handleBlur(){ + // setTimeout(res=>{ + // uni.hideKeyboard(); + // },200) + }, getfocus() { let that = this; this.$nextTick(r => { - console.log("获取焦点") that.boxfocus = true; }); - // this.hide() }, losefocus() { let that = this; this.$nextTick(r => { - console.log("失去焦点") that.boxfocus = false; - uni.hideKeyboard(); }); }, clear() { @@ -289,7 +266,7 @@ diff --git a/src/mycomponents/scan/winComScanBalance.vue b/src/mycomponents/scan/winComScanBalance.vue index f9bb581c..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) { @@ -214,11 +217,11 @@ var status = getInventoryStatusDesc(params.inventoryStatus) var areaType = getListLocationAreaTypeDesc(params.areaType) var hint = - "按物料号 [" + params.itemCode + "]
" + - "包装号 [" + params.packingNumber + "]
" + - "批次 [" + params.batch + "]
" + - "状态 [" + status + "]
" + - "库区 [" + areaType + "]
" + + "按物料号 [" + params.itemCode + "] \n" + + "包装号 [" + params.packingNumber + "] \n" + + "批次 [" + params.batch + "] \n" + + "状态 [" + status + "] \n" + + "库区 [" + areaType + "] \n" + "未查找到库存余额" this.showErrorMessage(hint) } else if (res.data.length == 1) { @@ -282,6 +285,7 @@ }, showErrorMessage(message) { + this.losefocus() this.$refs.comMessage.showErrorMessage(message, res => { if (res) { if (this.$refs.comscan) { @@ -297,6 +301,7 @@ // this.closeScanPopup() }, closeScanPopup() { + this.losefocus(); this.$refs.popup.close() }, getfocus() { diff --git a/src/mycomponents/scan/winComScanBalanceLocation.vue b/src/mycomponents/scan/winComScanBalanceLocation.vue index 8e80ff8f..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() { @@ -205,11 +239,11 @@ var status = getInventoryStatusDesc(params.inventoryStatus) var areaType = getListLocationAreaTypeDesc(params.areaType) var hint = - "按物料号 [" + params.itemCode + "]
" + - "包装号 [" + params.packingNumber + "]
" + - "批次 [" + params.batch + "]
" + - "状态 [" + status + "]
" + - "库区 [" + areaType + "]
" + + "按物料号 [" + params.itemCode + "] \n" + + "包装号 [" + params.packingNumber + "] \n" + + "批次 [" + params.batch + "] \n" + + "状态 [" + status + "] \n" + + "库区 [" + areaType + "] \n" + "未查找到库存余额" this.showErrorMessage(hint) } else if (res.data.length == 1) { @@ -263,6 +297,7 @@ }) }, showErrorMessage(message) { + this.packLoseFocus(); this.$refs.comMessage.showErrorMessage(message, res => { if (res) { if(this.$refs.comscan){ @@ -277,6 +312,7 @@ // this.closeScanPopup() }, closeScanPopup() { + this.packLoseFocus() this.$refs.popup.close() this.$emit("onCloseScanPopup") }, 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 d01b5cbd..02ac8ca5 100644 --- a/src/mycomponents/scan/winScanAsnNumber.vue +++ b/src/mycomponents/scan/winScanAsnNumber.vue @@ -55,11 +55,16 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus('bottom') }, 500) }, closeScanPopup() { + if(this.$refs.scan){ + this.$refs.scan.losefocus() + } + this.$refs.popup.close() }, getfocus() { diff --git a/src/mycomponents/scan/winScanContainer.vue b/src/mycomponents/scan/winScanContainer.vue index 806a650b..5ec28c5c 100644 --- a/src/mycomponents/scan/winScanContainer.vue +++ b/src/mycomponents/scan/winScanContainer.vue @@ -12,8 +12,8 @@ - + @@ -54,11 +54,13 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() }, 500) }, closeScanPopup() { + this.losefocus() this.$refs.popup.close() }, scanClick() { @@ -81,7 +83,8 @@ if (this.containerInfo.containerStatus == 'USED') { this.callBack(); } else { - this.showErrorMessage("器具[" + this.code + "]状态是[" + this.containerInfo.status + "],不可以绑定") + this.showErrorMessage("器具[" + this.code + "]状态是[" + this.containerInfo.status + + "],不可以绑定") } } else { this.showErrorMessage("未查找到器具[" + this.code + "]") @@ -97,10 +100,16 @@ this.$emit("getContainer", this.containerInfo); }, getfocus() { - this.$refs.scan.getfocus(); + if (this.$refs.scan) { + this.$refs.scan.getfocus(); + } + }, losefocus() { - this.$refs.scan.losefocus(); + if (this.$refs.scan) { + this.$refs.scan.losefocus(); + } + }, showErrorMessage(message) { setTimeout(r => { @@ -116,4 +125,4 @@ + \ No newline at end of file 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 abda6b65..9b2a6abd 100644 --- a/src/mycomponents/scan/winScanItem.vue +++ b/src/mycomponents/scan/winScanItem.vue @@ -76,11 +76,14 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') + var that =this; setTimeout(res => { - this.$refs.popup.open('bottom') + that.getfocus() }, 500) }, closeScanPopup() { + this.losefocus(); this.$refs.popup.close() }, scanClick() { diff --git a/src/mycomponents/scan/winScanJobNumber.vue b/src/mycomponents/scan/winScanJobNumber.vue index 21679a53..5f7355f2 100644 --- a/src/mycomponents/scan/winScanJobNumber.vue +++ b/src/mycomponents/scan/winScanJobNumber.vue @@ -61,15 +61,19 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() }, 500) }, closeScanPopup() { + if(this.$refs.scan){ + this.$refs.scan.losefocus() + } 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 66531474..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) { @@ -74,6 +75,7 @@ this.$refs.comscansimulate.clickScanMsg(); }, closeScanPopup() { + this.losefocus() if(this.$refs.popup){ this.$refs.popup.close() } diff --git a/src/mycomponents/scan/winScanPack.vue b/src/mycomponents/scan/winScanPack.vue index 9c0108bf..7da05b49 100644 --- a/src/mycomponents/scan/winScanPack.vue +++ b/src/mycomponents/scan/winScanPack.vue @@ -70,12 +70,14 @@ }) }, openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') - }, 200) + this.getfocus() + }, 500) }, closeScanPopup() { + this.losefocus(); this.$refs.popup.close(); this.$emit("close", ''); }, @@ -102,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 fdccde6a..01941270 100644 --- a/src/mycomponents/scan/winScanPackAndCont.vue +++ b/src/mycomponents/scan/winScanPackAndCont.vue @@ -61,12 +61,14 @@ }, methods: { openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') + this.getfocus() }, 500) }, closeScanPopup() { + this.losefocus() this.$refs.popup.close(); this.$emit("close", ''); }, diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue index 33f087ec..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) { @@ -218,6 +219,7 @@ }, closeScanPopup(content) { + this.packLoseFocus() this.$refs.popup.close(); this.$emit("close", ''); }, @@ -365,7 +367,7 @@ //必须有库存 mustHavaBalance(datas) { if (datas.length == 0) { - this.showErrorMessage(this.getQueryCondition() + '
未查找到库存记录', res => { + this.showErrorMessage(this.getQueryCondition() + '\n未查找到库存记录', res => { this.packGetFocus(); }) } else if (datas.length == 1) { @@ -377,7 +379,7 @@ // if (balance.qty > 0) { // this.packCallBack(balance); // } else { - // this.showErrorMessage(this.getQueryCondition() + '
查找到库存记录数量为[' + balance.qty + "],
不可以进行操作", + // this.showErrorMessage(this.getQueryCondition() + '\n查找到库存记录数量为[' + balance.qty + "],\n不可以进行操作", // res => { // this.packGetFocus(); // }) @@ -397,7 +399,7 @@ // if (balance.qty > 0) { // this.packCallBack(balance); // } else { - // this.showErrorMessage(this.getQueryCondition() + '
查找到库存记录数量为[' + balance.qty + "],不可以进行操作", + // this.showErrorMessage(this.getQueryCondition() + '\n查找到库存记录数量为[' + balance.qty + "],不可以进行操作", // res => { // this.packGetFocus(); // }) @@ -416,7 +418,7 @@ balance: datas, fromLocationCode: this.fromLocationCode, } - this.packGetFocus(); + // this.packGetFocus(); this.$emit("getResult", data); this.$emit("getCountScanResult", data); }, @@ -432,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(); } }, @@ -454,31 +456,31 @@ }, getQueryCondition() { - let condition = '按照以下条件:
'; + let condition = '按照以下条件:\n'; let label = this.scanResult.label; let status = getInventoryStatusDesc(this.inventoryStatus); switch (this.managementPrecision) { case 'BY_PACKAGING': - condition = condition + '物料号=[' + label.itemCode + ']
箱码=[' + label.packingNumber + - ']
批次=[' + + condition = condition + '物料号=[' + label.itemCode + ']\n箱码=[' + label.packingNumber + + ']\n批次=[' + label.batch + - ']
库位=[' + this.fromLocationCode + ']' + ']\n库位=[' + this.fromLocationCode + ']' break; case 'BY_BATCH': - condition = condition + '物料号=[' + label.itemCode + ']
批次=[' + + condition = condition + '物料号=[' + label.itemCode + ']\n批次=[' + label.batch + - ']
库位=[' + this.fromLocationCode + ']' + ']\n库位=[' + this.fromLocationCode + ']' break; case 'BY_QUANTITY': - condition = condition + '物料号=[' + label.itemCode + ']
库位=[' + this.fromLocationCode + ']' + condition = condition + '物料号=[' + label.itemCode + ']\n库位=[' + this.fromLocationCode + ']' break; case 'BY_UNIQUEID': condition = condition + '物料号=[' + label.itemCode + ']' break; } if (this.inventoryStatus.length > 0) { - condition = condition + '
库存状态=[' + status + ']' + condition = condition + '\n库存状态=[' + status + ']' } return condition; }, diff --git a/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue b/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue index 843346f0..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,24 +148,27 @@ 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) { + this.packLoseFocus() this.$refs.popup.close(); this.$emit("close", ''); }, @@ -212,7 +215,7 @@ uni.hideLoading(); var hint = getListLocationTypeDesc(this.fromLocationTypeArray); this.showErrorMessage("库位[" + this.fromLocationCode + "]是" + - getLocationTypeName(type) + ",
需要的库位类型是[" + hint + "]", callback => { + getLocationTypeName(type) + ",\n需要的库位类型是[" + hint + "]", callback => { this.locationGetFocus(); }) } diff --git a/src/mycomponents/scan/winScanPackAndPosition.vue b/src/mycomponents/scan/winScanPackAndPosition.vue index a23b342a..266ba324 100644 --- a/src/mycomponents/scan/winScanPackAndPosition.vue +++ b/src/mycomponents/scan/winScanPackAndPosition.vue @@ -105,28 +105,29 @@ 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 }, closeScanPopup() { + this.losefocus() this.$refs.popup.close(); this.$emit("close", ''); }, @@ -222,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 dec3bf0b..07dd2bcd 100644 --- a/src/mycomponents/scan/winScanPackLevel.vue +++ b/src/mycomponents/scan/winScanPackLevel.vue @@ -96,12 +96,14 @@ }) }, openScanPopup() { + this.$refs.popup.open('bottom') setTimeout(res => { - this.$refs.popup.open('bottom') - }, 200) + this.getfocus(); + }, 500) }, closeScanPopup() { + this.losefocus() this.$refs.popup.close(); this.$emit("close", ''); }, @@ -129,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 a710f171..e751e5f4 100644 --- a/src/mycomponents/scan/winScanPackage.vue +++ b/src/mycomponents/scan/winScanPackage.vue @@ -67,22 +67,24 @@ 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) }, closeScanPopup() { + this.losefocus() this.$refs.popup.close(); this.$emit("close", ''); }, @@ -222,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(); } }, @@ -239,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/container/record/containerBindRecord.vue b/src/pages/container/record/containerBindRecord.vue index 0bb57073..9db73af4 100644 --- a/src/pages/container/record/containerBindRecord.vue +++ b/src/pages/container/record/containerBindRecord.vue @@ -322,7 +322,7 @@ containerBindRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成器具绑定记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成器具绑定记录\n" + res.data) this.clear(); } else { this.showErrorMessage("提交失败[" + res.msg + "]") diff --git a/src/pages/container/record/containerUnBindRecord.vue b/src/pages/container/record/containerUnBindRecord.vue index 6c072a1f..2171fae6 100644 --- a/src/pages/container/record/containerUnBindRecord.vue +++ b/src/pages/container/record/containerUnBindRecord.vue @@ -271,7 +271,7 @@ containerUnBindRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成器具绑定记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成器具绑定记录\n" + res.data) this.clear(); } else { this.showErrorMessage("提交失败[" + res.msg + "]") diff --git a/src/pages/count/job/countBlindDetail.vue b/src/pages/count/job/countBlindDetail.vue index 61c1ca16..cf5944ad 100644 --- a/src/pages/count/job/countBlindDetail.vue +++ b/src/pages/count/job/countBlindDetail.vue @@ -498,7 +498,7 @@ } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this .getTotalCount() + "]", res => { if (res) { @@ -520,7 +520,7 @@ countJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成盘点记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成盘点记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/src/pages/count/job/countDetail.vue b/src/pages/count/job/countDetail.vue index 7f2bd19d..18d943ee 100644 --- a/src/pages/count/job/countDetail.vue +++ b/src/pages/count/job/countDetail.vue @@ -704,7 +704,7 @@ } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this .getTotalCount() + "]", res => { if (res) { @@ -726,7 +726,7 @@ countJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成盘点记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成盘点记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/src/pages/count/job/countDetail1.vue b/src/pages/count/job/countDetail1.vue index ce60eb4e..98c74b6d 100644 --- a/src/pages/count/job/countDetail1.vue +++ b/src/pages/count/job/countDetail1.vue @@ -493,7 +493,7 @@ } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this .getTotalCount() + "]", res => { if (res) { @@ -515,7 +515,7 @@ // countJobSubmit(params).then(res => { // uni.hideLoading() // if (res.data) { - // this.showCommitSuccessMessage("提交成功
生成盘点记录
" + res.data) + // this.showCommitSuccessMessage("提交成功\n生成盘点记录\n" + res.data) // } else { // this.showErrorMessage("提交失败[" + res.msg + "]") // } diff --git a/src/pages/count/job/countLightDetail.vue b/src/pages/count/job/countLightDetail.vue index ff66ec25..59a6865d 100644 --- a/src/pages/count/job/countLightDetail.vue +++ b/src/pages/count/job/countLightDetail.vue @@ -503,7 +503,7 @@ } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this .getTotalCount() + "]", res => { if (res) { @@ -525,7 +525,7 @@ countJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成盘点记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成盘点记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } 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/count/record/countRecord.vue b/src/pages/count/record/countRecord.vue index 7260c414..81860241 100644 --- a/src/pages/count/record/countRecord.vue +++ b/src/pages/count/record/countRecord.vue @@ -404,7 +404,7 @@ } else { this.calcScanCount(); if (this.scanCount < this.subList.length) { - this.showMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length + + this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length + "]"); } } diff --git a/src/pages/customerReturn/job/returnDetail.vue b/src/pages/customerReturn/job/returnDetail.vue index 824cde5c..21afb6d1 100644 --- a/src/pages/customerReturn/job/returnDetail.vue +++ b/src/pages/customerReturn/job/returnDetail.vue @@ -339,25 +339,43 @@ if (!this.checkLocation()) { return } - - //扫描数量和任务数量相等,直接提交 - 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + - "]箱总共[" + this.subList.length + "]箱", res => { - if (res) { - this.openScanPopup(); - } - }); - } + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + } + }) + }) + if (str) { + str += ',是否确认提交?' + this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } 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() { @@ -378,7 +396,7 @@ customerReturnJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成客户退货记录:" + res.data) + this.showCommitSuccessMessage("提交成功\n生成客户退货记录:" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/src/pages/customerReturn/record/returnRecord.vue b/src/pages/customerReturn/record/returnRecord.vue index 9317f930..d6502676 100644 --- a/src/pages/customerReturn/record/returnRecord.vue +++ b/src/pages/customerReturn/record/returnRecord.vue @@ -168,7 +168,7 @@ item.subList.push(newDetail); } else { if (detail.scaned == true) { - this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") + this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描") } } } @@ -263,7 +263,7 @@ customerReturnRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成客户退货记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成客户退货记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/src/pages/customerReturn/request/customerReturnRequestCreate.vue b/src/pages/customerReturn/request/customerReturnRequestCreate.vue index a41a9bcf..aa6e07d9 100644 --- a/src/pages/customerReturn/request/customerReturnRequestCreate.vue +++ b/src/pages/customerReturn/request/customerReturnRequestCreate.vue @@ -193,7 +193,7 @@ item.subList.push(newDetail); } else { if (detail.scaned == true) { - this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") + this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描") } } } @@ -280,7 +280,7 @@ customerReturnRequestSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成客户退货申请
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成客户退货申请\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/src/pages/deliver/coms/comScanDeliverPack.vue b/src/pages/deliver/coms/comScanDeliverPack.vue index a1117ff1..27c5ce1c 100644 --- a/src/pages/deliver/coms/comScanDeliverPack.vue +++ b/src/pages/deliver/coms/comScanDeliverPack.vue @@ -184,12 +184,14 @@ 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) }, closeScanPopup() { + this.losefocus() this.$refs.popup.close(); this.$emit("closeScan") //清除数据,恢复默认值 diff --git a/src/pages/deliver/job/deliverDetail.vue b/src/pages/deliver/job/deliverDetail.vue index 72f19b7b..836f8529 100644 --- a/src/pages/deliver/job/deliverDetail.vue +++ b/src/pages/deliver/job/deliverDetail.vue @@ -254,7 +254,7 @@ deliverJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成发货记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成发货记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/src/pages/deliver/record/deliverRecord.vue b/src/pages/deliver/record/deliverRecord.vue index 743c3303..048328c0 100644 --- a/src/pages/deliver/record/deliverRecord.vue +++ b/src/pages/deliver/record/deliverRecord.vue @@ -45,7 +45,7 @@
- + @@ -192,7 +192,7 @@ item.subList.push(newDetail); } else { if (detail.scaned == true) { - this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") + this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描") } } } @@ -290,7 +290,7 @@ deliverRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成制品发货记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成制品发货记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/src/pages/deliver/request/deliverRequestCreate.vue b/src/pages/deliver/request/deliverRequestCreate.vue index 853cc3aa..b812c8b4 100644 --- a/src/pages/deliver/request/deliverRequestCreate.vue +++ b/src/pages/deliver/request/deliverRequestCreate.vue @@ -157,7 +157,7 @@ deliverRequestSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成成品发货申请
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成成品发货申请\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/src/pages/fg/receiptByPlan.vue b/src/pages/fg/receiptByPlan.vue index 0df01fb5..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("提交成功
生成装配收货记录
" + list[0].requestNumber, list) + this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list) }) - } catch (error) { uni.hideLoading() var hint = error.message ? error.message : error diff --git a/src/pages/fg/receiptNoPlan.vue b/src/pages/fg/receiptNoPlan.vue index 885e5e12..8bb14470 100644 --- a/src/pages/fg/receiptNoPlan.vue +++ b/src/pages/fg/receiptNoPlan.vue @@ -307,7 +307,7 @@ } else { //创建检验申请 createInspectRequestByPlan(list[0].requestNumber) } - this.showCommitSuccessMessage("提交成功
生成装配收货记录
" + list[0].requestNumber, list) + this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list) this.scanedQty = this.scanedQty + this.showList.length; this.showList = []; this.dataContent.handleQty = 0; diff --git a/src/pages/inspect/job/inspectDetail.vue b/src/pages/inspect/job/inspectDetail.vue index 7be5a0f8..5fd016ae 100644 --- a/src/pages/inspect/job/inspectDetail.vue +++ b/src/pages/inspect/job/inspectDetail.vue @@ -349,7 +349,7 @@ this.submitJob(); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]箱总共[" + this .subList.length + "]箱", res => { if (res) { @@ -373,9 +373,9 @@ inspectJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成到货检验记录
" + res.data) + this.showCommitSuccessMessage("提交成功\n生成到货检验记录\n" + res.data) createPutAwayRequest(res.data).then(putawayres => { - this.showCommitSuccessMessage("生成上架申请单号
" + putawayres.data) + this.showCommitSuccessMessage("生成上架申请单号\n" + putawayres.data) }).catch(error => { uni.hideLoading(); this.showErrorMessage(error); diff --git a/src/pages/inspect/job/inspectFullDetail.vue b/src/pages/inspect/job/inspectFullDetail.vue index 2373ccfa..912159c1 100644 --- a/src/pages/inspect/job/inspectFullDetail.vue +++ b/src/pages/inspect/job/inspectFullDetail.vue @@ -369,7 +369,7 @@ this.submitJob(); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]箱总共[" + this .subList.length + "]箱", res => { if (res) { @@ -392,10 +392,10 @@ inspectJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成到货检验记录" + res.data) + this.showCommitSuccessMessage("提交成功\n生成到货检验记录" + res.data) //创建完检验记录后创建上架申请 createPutAwayRequest(res.data).then(putawayres => { - this.showCommitSuccessMessage("生成上架申请单号
" + putawayres.data) + this.showCommitSuccessMessage("生成上架申请单号\n" + putawayres.data) }).catch(error => { uni.hideLoading(); this.showErrorMessage(error); diff --git a/src/pages/inspect/job/inspectResult.vue b/src/pages/inspect/job/inspectResult.vue index 275cbddd..5b620b8a 100644 --- a/src/pages/inspect/job/inspectResult.vue +++ b/src/pages/inspect/job/inspectResult.vue @@ -543,11 +543,11 @@ if (res.data) { var hint = ""; if (this.jobContent.nextAction == "FULL_INSPECT") { - hint = "提交成功
生成到货检验任务
" + res.data + hint = "提交成功\n生成到货检验任务\n" + res.data } else { - hint = "提交成功
生成到货检验记录
" + res.data + hint = "提交成功\n生成到货检验记录\n" + res.data createPutAwayRequest(res.data).then(putawayres => { - this.showCommitSuccessMessage("生成上架申请单号
" + putawayres.data) + this.showCommitSuccessMessage("生成上架申请单号\n" + putawayres.data) }).catch(error => { uni.hideLoading(); this.showErrorMessage(error); diff --git a/src/pages/inventoryMove/coms/comMove.vue b/src/pages/inventoryMove/coms/comMove.vue index 3d5ca05e..4fa3b88e 100644 --- a/src/pages/inventoryMove/coms/comMove.vue +++ b/src/pages/inventoryMove/coms/comMove.vue @@ -228,7 +228,7 @@ newDetail.toInventoryStatus = this.toInventoryStatus item.subList.push(newDetail); } else { - this.showErrorMessage(balance.packingNumber + "已经在列表中") + this.showErrorMessage(balance.packingNumber + "重复扫描") } } calcHandleQty(this.detailSource); @@ -307,7 +307,7 @@ inventoryMoveRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成" + this.title + "记录
" + + this.showCommitSuccessMessage("提交成功\n生成" + this.title + "记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 48bcc383..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, @@ -261,8 +265,8 @@ this.detailSource.push(itemp) } else { var detail = item.subList.find(r => { - if (r.packingNumber == balance.packingNumber && - r.batch == balance.batch && + if (r.packingNumber == pack.number && + r.batch == pack.batch && r.fromLocationCode == balance.locationCode && r.toInventoryStatus == balance.inventoryStatus && r.scaned == true) { @@ -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(balance.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,6 +355,11 @@ this.showErrorMessage("请先选择目标库位") return; } + // if(this.fromLocationCode==this.toLocationCode){ + // this.showErrorMessage("来源库位和目标库位不能一致") + // return; + // } + if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { //查询管理模式 uni.showLoading({ @@ -354,11 +373,11 @@ if (res.success) { this.managementList = res.list; var params = this.setParams() - // console.log("提交" + JSON.stringify(params)) + console.log("提交" + JSON.stringify(params)) inventoryMoveRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成" + this.title + "
" + + this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") diff --git a/src/pages/inventoryMove/coms/comMoveRecordCard.vue b/src/pages/inventoryMove/coms/comMoveRecordCard.vue index 80c1c590..7e9c2113 100644 --- a/src/pages/inventoryMove/coms/comMoveRecordCard.vue +++ b/src/pages/inventoryMove/coms/comMoveRecordCard.vue @@ -1,6 +1,6 @@