diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 43a73abd..071e4d88 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -9,7 +9,7 @@ - @@ -42,7 +42,7 @@ + @click="openCheck(item1)"> @@ -401,9 +401,10 @@ }) }, - openCheck(url) { + openCheck(item) { + let name = item.name.split('\\n').join('') uni.navigateTo({ - url: "/" + url + url: `/${item.path}?title=${name}` }); this.filterList = [] }, diff --git a/src/pages/inspect/request/inspectRequest.vue b/src/pages/inspect/request/inspectRequest.vue index 27e32769..2ab723f2 100644 --- a/src/pages/inspect/request/inspectRequest.vue +++ b/src/pages/inspect/request/inspectRequest.vue @@ -59,6 +59,7 @@ }, data() { return { + title:'', requestList: [], pageNo: 1, pageSize: 10, @@ -77,7 +78,8 @@ }; }, - onLoad() { + onLoad(e) { + this.title = e.title; this.detailOptions = getDetailOption(); this.addAgainOption = getAddAgainOption(); this.detailAndApproveOptions = getDetailAndApproveOption() @@ -116,7 +118,7 @@ methods: { openRequestDetail(item) { uni.navigateTo({ - url: './inspectRequestDetail?id=' + item.id + url: './inspectRequestDetail?id=' + item.id+'&title='+this.title }); }, @@ -169,7 +171,7 @@ var list = res.data.list; this.totalCount = res.data.total - updateTitle("检验单申请(" + this.totalCount + ")"); + updateTitle(this.title+"(" + this.totalCount + ")"); this.loadingType = "loadmore"; if (list == null || list.length == 0) { this.loadingType = "nomore"; @@ -189,7 +191,7 @@ uni.stopPullDownRefresh(); } this.loadingType = ""; - updateTitle("检验单申请"); + updateTitle(this.title); uni.hideLoading(); that.showMessage(error) }) diff --git a/src/pages/inspect/request/inspectRequestDetail.vue b/src/pages/inspect/request/inspectRequestDetail.vue index 7fb0f7be..199efe98 100644 --- a/src/pages/inspect/request/inspectRequestDetail.vue +++ b/src/pages/inspect/request/inspectRequestDetail.vue @@ -61,8 +61,12 @@ }, onLoad(option) { this.id = option.id; + uni.setNavigationBarTitle({ + title: option.title+'详情' + }) this.getDetail(); }, + //返回首页 onNavigationBarButtonTap(e) { if (e.index === 0) { diff --git a/src/pages/issue/request/issueRequest.vue b/src/pages/issue/request/issueRequest.vue index 820642b7..65712926 100644 --- a/src/pages/issue/request/issueRequest.vue +++ b/src/pages/issue/request/issueRequest.vue @@ -62,6 +62,9 @@ requestInfoPopup, requestButton, }, + onLoad(e){ + this.title = e.title; + }, data() { return { requestList: [], @@ -79,6 +82,7 @@ showOptions: [], fromType: "requestType", loadingType: "nomore", + title:'' }; }, @@ -119,7 +123,7 @@ methods: { openRequestDetail(item) { uni.navigateTo({ - url: './issueRequestDetail?id=' + item.masterId + url: './issueRequestDetail?id=' + item.masterId+'&title='+this.title }); }, @@ -169,13 +173,13 @@ this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.pageNo++; - updateTitle("发料申请(" + this.totalCount + ")"); + updateTitle(this.title+"(" + this.totalCount + ")"); }).catch(error => { if (type === "refresh") { uni.stopPullDownRefresh(); } - updateTitle("发料申请"); + updateTitle(this.title); this.loadingType = ""; that.showMessage(error.errMsg) }) diff --git a/src/pages/issue/request/issueRequestDetail.vue b/src/pages/issue/request/issueRequestDetail.vue index 290179a9..51eb1dda 100644 --- a/src/pages/issue/request/issueRequestDetail.vue +++ b/src/pages/issue/request/issueRequestDetail.vue @@ -67,6 +67,9 @@ }; }, onLoad(option) { + uni.setNavigationBarTitle({ + title: option.title+'详情' + }) this.id = option.id; this.getDetail(); }, diff --git a/src/pages/purchaseReceipt/job/purchaseReceipt.vue b/src/pages/purchaseReceipt/job/purchaseReceipt.vue index 6769a1c3..9d8042b8 100644 --- a/src/pages/purchaseReceipt/job/purchaseReceipt.vue +++ b/src/pages/purchaseReceipt/job/purchaseReceipt.vue @@ -1,6 +1,6 @@ @@ -14,7 +14,7 @@ }, data() { return { - + title:'' }; }, onShow() { @@ -22,6 +22,9 @@ this.$refs.receiptjob.refresh(); } }, + onLoad(option) { + this.title = option.title + }, onPullDownRefresh() { this.$refs.receiptjob.refresh(); diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue index 6ceb2c02..20b600f3 100644 --- a/src/pages/purchaseReceipt/job/receiptJob.vue +++ b/src/pages/purchaseReceipt/job/receiptJob.vue @@ -94,7 +94,11 @@ scanTitle: { type: String, default: '箱标签' - } + }, + title: { + type: String, + default: '' + }, }, // onShow() { @@ -200,7 +204,7 @@ var list = res.data.list; this.totalCount = res.data.total - updateTitle("采购收货任务(" + this.totalCount + ")"); + updateTitle(this.title+"(" + this.totalCount + ")"); this.loadingType = "loadmore"; if (list == null || list.length == 0) { this.loadingType = "nomore"; @@ -213,7 +217,7 @@ if (type === "refresh") { uni.stopPullDownRefresh(); } - updateTitle("采购收货"); + updateTitle(this.title); this.loadingType = ""; uni.hideLoading(); that.showMessage(error) diff --git a/src/pages/query/container.vue b/src/pages/query/container.vue index 82f5cd38..8ce9324a 100644 --- a/src/pages/query/container.vue +++ b/src/pages/query/container.vue @@ -92,7 +92,10 @@ tabIndex: 0, }; }, - onLoad() { + onLoad(e){ + uni.setNavigationBarTitle({ + title: e.title + }) }, onNavigationBarButtonTap(e) { if (e.index === 0) { diff --git a/src/pages/query/item.vue b/src/pages/query/item.vue index 80ab2063..c329a880 100644 --- a/src/pages/query/item.vue +++ b/src/pages/query/item.vue @@ -96,6 +96,11 @@ this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "more"); }, + onLoad(e){ + uni.setNavigationBarTitle({ + title: e.title + }) + }, mounted() { this.openScanPopup(); }, diff --git a/src/pages/query/location.vue b/src/pages/query/location.vue index 5f1cd142..00bd9106 100644 --- a/src/pages/query/location.vue +++ b/src/pages/query/location.vue @@ -87,7 +87,11 @@ totalCount:0 }; }, - onLoad() {}, + onLoad(e){ + uni.setNavigationBarTitle({ + title: e.title + }) + }, onNavigationBarButtonTap(e) { if (e.index === 0) { goHome(); diff --git a/src/pages/supplierDeliver/record/supplierDeliverRecord.vue b/src/pages/supplierDeliver/record/supplierDeliverRecord.vue index 337bdab3..f1cd6202 100644 --- a/src/pages/supplierDeliver/record/supplierDeliverRecord.vue +++ b/src/pages/supplierDeliver/record/supplierDeliverRecord.vue @@ -64,10 +64,13 @@ todayTime: "", detailOptions: [], detailGiveupOptions: [], - currentItem: {} + currentItem: {}, + title:'' }; }, - + onLoad(e){ + this.title = e.title; + }, onShow() { this.getList('refresh'); }, @@ -141,7 +144,7 @@ var list = res.data.list; this.totalCount = res.data.total - updateTitle("供应商发货记录(" + this.totalCount + ")"); + updateTitle(this.title+"(" + this.totalCount + ")"); this.loadingType = "loadmore"; if (list == null || list.length == 0) { this.loadingType = "nomore"; @@ -154,7 +157,7 @@ if (type === "refresh") { uni.stopPullDownRefresh(); } - updateTitle("供应商发货记录"); + updateTitle(this.title); this.loadingType = ""; uni.hideLoading(); that.showMessage(error) @@ -165,7 +168,7 @@ openJobDetail(item) { uni.navigateTo({ - url: './supplierDeliverRecordDetail?id=' + item.masterId + url: './supplierDeliverRecordDetail?id=' + item.masterId+'&title='+this.title }); }, diff --git a/src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue b/src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue index fb980336..df48aa7f 100644 --- a/src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue +++ b/src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue @@ -87,6 +87,9 @@ }; }, onLoad(option) { + uni.setNavigationBarTitle({ + title: option.title+'详情' + }) this.id = option.id; this.getDetail(); },