From 2b3d3407dba447590d9344f32bb488fdcea20a2d Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Sat, 8 Jun 2024 10:41:07 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=A2=84=E7=94=9F=E4=BA=A7=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8--=E4=B8=8A?= =?UTF-8?q?=E6=8B=89=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/httpRequest3.js | 14 ++++++- src/pages/index/index.vue | 39 ++++++++++--------- .../productReceipt/job/productReceiptJob.vue | 26 +++++++------ .../productReceipt/job/scrapReceiptJob.vue | 4 +- .../job/semiProductReceiptJob.vue | 4 +- 5 files changed, 53 insertions(+), 34 deletions(-) diff --git a/src/api/httpRequest3.js b/src/api/httpRequest3.js index 569f7345..e6714f5e 100644 --- a/src/api/httpRequest3.js +++ b/src/api/httpRequest3.js @@ -1,6 +1,9 @@ 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') @@ -20,7 +23,7 @@ function service(options = {}) { "dataType":"json", "tenant-id":tenantId }; - options.timeout = 10000 + options.timeout = 300000 options.url = requestUrl+options.url @@ -31,6 +34,13 @@ function service(options = {}) { if(res.data.code==0){ resolve(res.data); }else { + if(res.data.code==401){ + uni.clearStorageSync() + removeToken(); + uni.reLaunch({ + url: '/pages/login/index' + }) + } reject("系统异常:"+res.data.msg) console.log("系统异常",res.data.msg) } diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 10bc33c0..ac9170fa 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -156,24 +156,27 @@ }, onShow() { if (uni.getStorageSync("hasLogin") == null || uni.getStorageSync("hasLogin") == false) { - uni.showModal({ - title: '未登录', - content: '您未登录 , 需要登录后才能继续', //如果需要强制登录,不显示取消按钮 - showCancel: !this.forcedLogin, - success: (res) => { - if (res.confirm) { - //如果需要强制登录,使用reLanch方式 - if (this.forcedLogin) { - uni.reLaunch({ - url: '../login/index' - }) - } else { - uni.navigateTo({ - url: '../login/index' - }) - } - } - } + // uni.showModal({ + // title: '未登录', + // content: '您未登录 , 需要登录后才能继续', //如果需要强制登录,不显示取消按钮 + // showCancel: !this.forcedLogin, + // success: (res) => { + // if (res.confirm) { + // //如果需要强制登录,使用reLanch方式 + // if (this.forcedLogin) { + // uni.reLaunch({ + // url: '../login/index' + // }) + // } else { + // uni.navigateTo({ + // url: '../login/index' + // }) + // } + // } + // } + // }) + uni.reLaunch({ + url: '../login/index' }) } else { this.timerRefresh(); diff --git a/src/pages/productReceipt/job/productReceiptJob.vue b/src/pages/productReceipt/job/productReceiptJob.vue index 40aa4911..38eb5ffd 100644 --- a/src/pages/productReceipt/job/productReceiptJob.vue +++ b/src/pages/productReceipt/job/productReceiptJob.vue @@ -72,7 +72,7 @@ pageNo: 1, pageSize: 10, totalCount: 0, - loadingType: "nomore", + loadingType: "noMore", checkedToday: false, checkedWaitTask: false, todayTime: "", @@ -94,13 +94,7 @@ this.getList('refresh'); }, - onReachBottom() { - //避免多次触发 - if (this.loadingType == 'loading' || this.loadingType == 'nomore') { - return; - } - this.getList("more"); - }, + onPullDownRefresh() { this.getList('refresh'); @@ -126,7 +120,15 @@ } }, - methods: { + methods: { + onReachBottom() { + console.log('onReachBottom',this.loadingType) + //避免多次触发 + if (this.loadingType == 'loading' || this.loadingType == 'noMore') { + return; + } + this.getList("more"); + }, refresh() { this.getList('refresh'); }, @@ -183,9 +185,9 @@ } else { updateTitle("报废收货任务(" + this.totalCount + ")"); } - this.loadingType = "loadmore"; + this.loadingType = "more"; if (list == null || list.length == 0) { - this.loadingType = "nomore"; + this.loadingType = "noMore"; return; } this.jobList = type === "refresh" ? list : this.jobList.concat(list); @@ -332,7 +334,7 @@ goHome() }, onReach() { - if (this.loadingType == 'loading' || this.loadingType == 'nomore') { + if (this.loadingType == 'loading' || this.loadingType == 'noMore') { return; } this.getList("more"); diff --git a/src/pages/productReceipt/job/scrapReceiptJob.vue b/src/pages/productReceipt/job/scrapReceiptJob.vue index 9591e077..431547ee 100644 --- a/src/pages/productReceipt/job/scrapReceiptJob.vue +++ b/src/pages/productReceipt/job/scrapReceiptJob.vue @@ -17,7 +17,9 @@ }; }, - + onReachBottom() { + this.$refs.productreceiptjob.onReach(); + }, onPullDownRefresh() { this.$refs.productreceiptjob.refresh(); }, diff --git a/src/pages/productReceipt/job/semiProductReceiptJob.vue b/src/pages/productReceipt/job/semiProductReceiptJob.vue index 5d2b70a2..0a4dc152 100644 --- a/src/pages/productReceipt/job/semiProductReceiptJob.vue +++ b/src/pages/productReceipt/job/semiProductReceiptJob.vue @@ -17,7 +17,9 @@ }; }, - + onReachBottom() { + this.$refs.productreceiptjob.onReach(); + }, onShow() { if(this.$refs.productreceiptjob!=undefined){ this.$refs.productreceiptjob.refresh(); From b2d7ed436ec8e4c7baf4ab048de15126bf4424f7 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Sat, 8 Jun 2024 11:04:48 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A3=85=E9=85=8D=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productPutaway/record/productPutawayRecord.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue index adba4f24..29a67667 100644 --- a/src/pages/productPutaway/record/productPutawayRecord.vue +++ b/src/pages/productPutaway/record/productPutawayRecord.vue @@ -73,6 +73,9 @@ import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' + import { + updateTitle + } from '@/common/basic.js'; export default { @@ -104,6 +107,13 @@ }; }, onLoad(option) { + this.type = option.type + if(this.type=='predict'){ + updateTitle('制品上架记录') + }else{ + updateTitle('装配上架记录') + } + var typeCode = "ProductPutaway" getBusinessType(typeCode, res => { if (res.success) { @@ -336,6 +346,7 @@ }) }) this.dataContent.subList = subList; + this.dataContent.type = this.type; this.dataContent.creator = creator; return this.dataContent; }, From 181b82e30cbc46d3aba8e8b2b1de8ef4533b4406 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Sat, 8 Jun 2024 11:21:48 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=A2=84=E7=94=9F=E4=BA=A7=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1type=E4=BC=A0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/productReceipt/job/productReceiptJob.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/productReceipt/job/productReceiptJob.vue b/src/pages/productReceipt/job/productReceiptJob.vue index 38eb5ffd..51f49dd7 100644 --- a/src/pages/productReceipt/job/productReceiptJob.vue +++ b/src/pages/productReceipt/job/productReceiptJob.vue @@ -367,7 +367,12 @@ column: "itemCode", action: "==", value: result.label.itemCode - }, + }, + { + column: "type", + action: "==", + value: this.type + } // { // column: "fromLocationCode", // action: "==", From 4974de75e4df84c148bbb9abd030e93f661f0e6e Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Sat, 8 Jun 2024 12:00:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=88=B6=E5=93=81=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/productPutaway/record/productPutawayRecord.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue index 29a67667..4cb454b3 100644 --- a/src/pages/productPutaway/record/productPutawayRecord.vue +++ b/src/pages/productPutaway/record/productPutawayRecord.vue @@ -103,14 +103,15 @@ inInventoryStatus: "", //目标入库库存状态 outInventoryStatus: "", //来源出库库存状态 businessType: {}, - managementList: [] + managementList: [], + type:'' }; }, onLoad(option) { this.type = option.type if(this.type=='predict'){ updateTitle('制品上架记录') - }else{ + }else if(this.type=='assemble'){ updateTitle('装配上架记录') } @@ -346,7 +347,9 @@ }) }) this.dataContent.subList = subList; - this.dataContent.type = this.type; + if(this.type){ + this.dataContent.type = this.type; + } this.dataContent.creator = creator; return this.dataContent; },