From 0057daf4ac5b65cc2f41267e25f9156093500716 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 22 Dec 2023 13:18:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E9=80=80=E6=96=99?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E5=92=8C=E9=9A=94=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/httpRequest3.js | 8 +- mycomponents/scan/winScanPackAndPosition.vue | 38 +- .../job/productPutawayDetail.vue | 2 +- .../coms/comReturnRecordTitle.vue | 51 ++ .../productionReturn/record/returnToHold.vue | 447 +++++++++++++++++- .../productionReturn/record/returnToStore.vue | 163 ++++--- static/config.json | 2 +- .../components/u-select/u-select.vue | 2 +- 8 files changed, 603 insertions(+), 110 deletions(-) create mode 100644 pages/productionReturn/coms/comReturnRecordTitle.vue diff --git a/api/httpRequest3.js b/api/httpRequest3.js index aeec1a3e..49135adb 100644 --- a/api/httpRequest3.js +++ b/api/httpRequest3.js @@ -27,15 +27,15 @@ function service(options = {}) { if(res.data.code==0){ resolve(res.data); }else { - reject("系统:"+res.data.msg) + reject("系统异常:"+res.data.msg) } }else { - reject("系统:"+ res.data.msg) + reject("系统异常:"+ res.data.msg) } } else { - reject("系统:"+res.data.msg) + reject("系统异常:"+res.data.msg) } }; options.fail = (error) => { @@ -47,7 +47,7 @@ function service(options = {}) { } else if (message.includes('Request failed with status code')) { message = '接口' + message.substr(message.length - 3) + '异常' } - reject("系统:"+message); + reject("系统异常:"+message); }; uni.request(options); }); diff --git a/mycomponents/scan/winScanPackAndPosition.vue b/mycomponents/scan/winScanPackAndPosition.vue index 8ee30ffa..b3dab933 100644 --- a/mycomponents/scan/winScanPackAndPosition.vue +++ b/mycomponents/scan/winScanPackAndPosition.vue @@ -1,6 +1,6 @@ - - + + + + + diff --git a/pages/scrap/record/scrapRecord.vue b/pages/scrap/record/scrapRecord.vue index 9150d69f..6f6a2871 100644 --- a/pages/scrap/record/scrapRecord.vue +++ b/pages/scrap/record/scrapRecord.vue @@ -55,7 +55,6 @@ import { goHome, - updateTitle, } from '@/common/basic.js'; import { @@ -232,17 +231,20 @@ }, closeScanPopup() { - this.$refs.scanPopup.closeScanPopup(); + if(this.$refs.scanPopup!=undefined){ + this.$refs.scanPopup.closeScanPopup(); + } }, scanPopupGetFocus() { - this.$refs.scanPopup.getfocus(); + if(this.$refs.scanPopup!=undefined){ + this.$refs.scanPopup.getfocus(); + } }, - commit() { if(this.reasonText==""){ - this.showMessage("请先选择报废原因") + this.showErrorMessage("请先选择报废原因") return; } //允许部分提交 @@ -302,14 +304,6 @@ }, - - - - showMessage(message) { - this.$refs.comMessage.showMessage(message, res => { - if (res) {} - }); - }, showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { if (res) { @@ -339,15 +333,17 @@ showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { - this.reasonCode = "" - this.reasonText = ""; - this.detailSource = []; - this.subList =[]; - this.managementList =[]; - this.dataContent ={} - + this.clearData(); }) }, + clearData(){ + this.reasonCode = "" + this.reasonText = ""; + this.detailSource = []; + this.subList =[]; + this.managementList =[]; + this.dataContent ={} + }, updateData() { this.calcHandleQty(); diff --git a/pages/scrap/request/scrapRequestCreate.vue b/pages/scrap/request/scrapRequestCreate.vue index b4c921f4..dfe29d07 100644 --- a/pages/scrap/request/scrapRequestCreate.vue +++ b/pages/scrap/request/scrapRequestCreate.vue @@ -128,7 +128,7 @@ this.tolocationTypeList = res.tolocationTypeList; this.showFromLocationPopup(); } else { - this.$refs.comMessage.showBreakMessage(res.message); + this.showErrorMessage(res.message) } }); @@ -228,11 +228,15 @@ }, closeScanPopup() { - this.$refs.scanPopup.closeScanPopup(); + if (this.$refs.scanPopup != undefined) { + this.$refs.scanPopup.closeScanPopup(); + } }, scanPopupGetFocus() { - this.$refs.scanPopup.getfocus(); + if (this.$refs.scanPopup != undefined) { + this.$refs.scanPopup.getfocus(); + } }, diff --git a/pages/setter/index.vue b/pages/setter/index.vue index ab58b855..c27cc6ac 100644 --- a/pages/setter/index.vue +++ b/pages/setter/index.vue @@ -55,12 +55,12 @@ import { onLoad } from "@dcloudio/uni-app"; + const userName = ref(store.state.user.name); let test = ref("123"); let userInfo = ref(null); onLoad(() => { - console.log(11) getUserProfile().then(res => { userInfo.value = res.data // nextTick(()=>{ diff --git a/pages/transfer/coms/comTransferRecord.vue b/pages/transfer/coms/comTransferRecord.vue index 667b2558..f547133a 100644 --- a/pages/transfer/coms/comTransferRecord.vue +++ b/pages/transfer/coms/comTransferRecord.vue @@ -107,7 +107,7 @@ businessType: {}, managementList: [], dataContent: {}, - toWarehouseCode:'' + toWarehouseCode: '' }; }, @@ -155,7 +155,7 @@ if (item == undefined) { var itemp = createItemInfo(balance, pack); let newDetail = createDetailInfo(balance, pack); // - newDetail.inventoryStatus ="OK" + newDetail.inventoryStatus = "OK" itemp.subList.push(newDetail); this.detailSource.push(itemp) } else { @@ -221,11 +221,15 @@ }, closeScanPopup() { - this.$refs.scanPopup.closeScanPopup(); + if (this.$refs.scanPopup != undefined) { + this.$refs.scanPopup.closeScanPopup(); + } }, scanPopupGetFocus() { - this.$refs.scanPopup.getfocus(); + if (this.$refs.scanPopup != undefined) { + this.$refs.scanPopup.getfocus(); + } }, scanLocationCode(location, code) { @@ -241,7 +245,7 @@ }, commit() { - + if (this.toLocationCode == "") { this.showMessage("请先选择目标库位") return; @@ -254,7 +258,7 @@ }); this.managementList = []; var precisionStrategParams = this.setPrecisionStrategParams() - + getPrecisionStrategyList(precisionStrategParams, res => { if (res.success) { this.managementList = res.list; @@ -340,7 +344,7 @@ detail.itemName = detail.package.itemName; detail.itemDesc1 = detail.package.itemDesc1; detail.itemDesc2 = detail.package.itemDesc2; - + detail.inventoryStatus = detail.inventoryStatus; detail.fromPackingNumber = info.packingNumber; @@ -399,7 +403,7 @@ this.openScanPopup(); }, getToLocationCode(location, code) { - this.toWarehouseCode =location.warehouseCode + this.toWarehouseCode = location.warehouseCode // if (this.fromLocationCode == code) { // uni.showToast({ // title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致", @@ -412,15 +416,17 @@ showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { - this.fromLocationCode = ''; - this.subList = []; - this.detailSource = []; - this.toLocationCode = ''; - this.dataContent = {} - this.toWarehouseCode = "" - + this.clearData(); }) }, + clearData(){ + this.fromLocationCode = ''; + this.subList = []; + this.detailSource = []; + this.toLocationCode = ''; + this.dataContent = {} + this.toWarehouseCode = "" + }, updateData() { this.calcHandleQty(); diff --git a/pages/unPlanned/job/receiptJobDetail.vue b/pages/unPlanned/job/receiptJobDetail.vue index a8a18ab0..3342d8b5 100644 --- a/pages/unPlanned/job/receiptJobDetail.vue +++ b/pages/unPlanned/job/receiptJobDetail.vue @@ -73,7 +73,7 @@ import comMessage from '@/mycomponents/common/comMessage.vue' import comReceiptDetailCard from '@/pages/unPlanned/coms/comReceiptDetailCard.vue' import jobTop from '@/mycomponents/job/jobTop.vue' - + export default { name: 'receipt_detail', components: { @@ -243,16 +243,16 @@ } }, - commit() { - this.scanCount = getScanCount(this.subList); - if( this.scanCount==0){ - this.showErrorMessage("扫描数为0,请先扫描") - return; - } - //校验库位、 - if (!this.checkLocation()) { - return - } + commit() { + this.scanCount = getScanCount(this.subList); + if (this.scanCount == 0) { + this.showErrorMessage("扫描数为0,请先扫描") + return; + } + //校验库位、 + if (!this.checkLocation()) { + return + } //扫描数量和任务数量相等,直接提交 if (this.scanCount == this.subList.length) { this.submitJob(); @@ -273,19 +273,19 @@ } } }, - + checkLocation() { var isPass = true; if (this.toLocationCode == "" || this.toLocationCode == null) { this.showMessageHint('请扫描目标库位', callback => { this.$refs.comScanLocation.showLocation(); }) - + return isPass = false; } return isPass; }, - + showMessageHint(hint, callback) { this.$refs.comMessage.showErrorMessage(hint, res => { if (res) { @@ -295,7 +295,7 @@ }, - submitJob() { + submitJob() { uni.showLoading({ title: "提交中....", mask: true @@ -317,7 +317,7 @@ } else { this.showErrorMessage("提交失败[" + res.msg + "]") } - + }).catch(error => { uni.hideLoading() this.showErrorMessage(error) @@ -385,11 +385,15 @@ }, scanPopupGetFocus() { - this.$refs.scanPopup.getfocus(); + if (this.$refs.scanPopup != undefined) { + this.$refs.scanPopup.getfocus(); + } }, scanPopupLoseFocus() { - this.$refs.scanPopup.losefocus(); + if (this.$refs.scanPopup != undefined) { + this.$refs.scanPopup.losefocus(); + } }, showCommitSuccessMessage(hint) { diff --git a/pages/unPlanned/record/issueRecord.vue b/pages/unPlanned/record/issueRecord.vue index c134f140..e5d9b738 100644 --- a/pages/unPlanned/record/issueRecord.vue +++ b/pages/unPlanned/record/issueRecord.vue @@ -54,10 +54,6 @@ unPlannedIssueRecordSubmit } from '@/api/request2.js'; - import { - getBalanceByUniquecode, - } from '@/api/request.js'; - import { getBusinessType, } from '@/common/record.js'; @@ -278,13 +274,16 @@ }, showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { - this.reasonCode = "" - this.reasonText = ""; - this.detailSource = []; - this.managementList =[]; - this.dataContent ={} + }) }, + clearData(){ + this.reasonCode = "" + this.reasonText = ""; + this.detailSource = []; + this.managementList =[]; + this.dataContent ={} + } } } diff --git a/pages/unPlanned/record/receiptRecord.vue b/pages/unPlanned/record/receiptRecord.vue index f56bf620..fc0f6e59 100644 --- a/pages/unPlanned/record/receiptRecord.vue +++ b/pages/unPlanned/record/receiptRecord.vue @@ -351,14 +351,17 @@ }, showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { - this.reasonCode = "" - this.reasonText = ""; - this.detailSource = []; - this.managementList=[]; - this.dataContent ={} - this.toLocationCode ="" + this.clearData(); }) }, + clearData(){ + this.reasonCode = "" + this.reasonText = ""; + this.detailSource = []; + this.managementList=[]; + this.dataContent ={} + this.toLocationCode ="" + } } diff --git a/pages/unPlanned/request/issueRequest.vue b/pages/unPlanned/request/issueRequest.vue index 4895f0a1..fea2284c 100644 --- a/pages/unPlanned/request/issueRequest.vue +++ b/pages/unPlanned/request/issueRequest.vue @@ -36,9 +36,7 @@ updateTitle, clearTirmAndWrap } from '@/common/basic.js'; - import { - getBusinessType, - } from '@/common/record.js'; + import { getUnPlannedIssueRequestList, unPlannedIssueRequestApprove, diff --git a/pages/unPlanned/request/issueRequestCreate.vue b/pages/unPlanned/request/issueRequestCreate.vue index 4e96ea9f..433a0f8f 100644 --- a/pages/unPlanned/request/issueRequestCreate.vue +++ b/pages/unPlanned/request/issueRequestCreate.vue @@ -60,10 +60,6 @@ unPlannedIssueRequestCreate, } from '@/api/request2.js'; - import { - getBalanceByUniquecode, - } from '@/api/request.js'; - import { getBusinessType, } from '@/common/record.js'; @@ -128,7 +124,7 @@ this.fromLocationTypeArray = res.fromlocationTypeList; this.showFromLocationPopup(); } else { - this.$refs.comMessage.showBreakMessage(res.message); + this.showErrorMessage(res.message) } }); diff --git a/pages/unPlanned/request/receiptRequest.vue b/pages/unPlanned/request/receiptRequest.vue index 77dacb7a..d304ef4c 100644 --- a/pages/unPlanned/request/receiptRequest.vue +++ b/pages/unPlanned/request/receiptRequest.vue @@ -30,9 +30,6 @@ import requestRecInfoPopup from '@/pages/unPlanned/coms/requestRecInfoPopup.vue' import requestButton from '@/mycomponents/button/requestButton.vue' - import { - getBusinessType, - } from '@/common/record.js'; import { goHome, updateTitle,