Browse Source

单据查询模块--标题动态取

hella_online_20240829
wangyufei 4 months ago
parent
commit
56f4edc128
  1. 9
      src/pages/index/index.vue
  2. 10
      src/pages/inspect/request/inspectRequest.vue
  3. 4
      src/pages/inspect/request/inspectRequestDetail.vue
  4. 10
      src/pages/issue/request/issueRequest.vue
  5. 3
      src/pages/issue/request/issueRequestDetail.vue
  6. 7
      src/pages/purchaseReceipt/job/purchaseReceipt.vue
  7. 10
      src/pages/purchaseReceipt/job/receiptJob.vue
  8. 5
      src/pages/query/container.vue
  9. 5
      src/pages/query/item.vue
  10. 6
      src/pages/query/location.vue
  11. 13
      src/pages/supplierDeliver/record/supplierDeliverRecord.vue
  12. 3
      src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue

9
src/pages/index/index.vue

@ -9,7 +9,7 @@
</view> </view>
<view class="item-container" style="align-items: center; width: 100%;"> <view class="item-container" style="align-items: center; width: 100%;">
<view class="thumb-box" v-for="(item1, index1) in filterList" :key="index1" @click="openCheck(item1.path)" <view class="thumb-box" v-for="(item1, index1) in filterList" :key="index1" @click="openCheck(item1)"
style="text-align: center; "> style="text-align: center; ">
<view class="" style="position: relative; "> <view class="" style="position: relative; ">
<image class="item-menu-image" :src="'/static/menus/'+item1.componentName" mode=""> <image class="item-menu-image" :src="'/static/menus/'+item1.componentName" mode="">
@ -42,7 +42,7 @@
</view> </view>
<view class="item-container"> <view class="item-container">
<view class="thumb-box" v-for="(item1, index1) in item.children" :key="index1" <view class="thumb-box" v-for="(item1, index1) in item.children" :key="index1"
@click="openCheck(item1.path)"> @click="openCheck(item1)">
<view class="" style="position: relative; "> <view class="" style="position: relative; ">
<!-- <u-badge class="item-menu-badge" v-if="item1.count>0" type="error" :count="item1.count" :offset="position" <!-- <u-badge class="item-menu-badge" v-if="item1.count>0" type="error" :count="item1.count" :offset="position"
:showZero="false"></u-badge> --> :showZero="false"></u-badge> -->
@ -401,9 +401,10 @@
}) })
}, },
openCheck(url) { openCheck(item) {
let name = item.name.split('\\n').join('')
uni.navigateTo({ uni.navigateTo({
url: "/" + url url: `/${item.path}?title=${name}`
}); });
this.filterList = [] this.filterList = []
}, },

10
src/pages/inspect/request/inspectRequest.vue

@ -59,6 +59,7 @@
}, },
data() { data() {
return { return {
title:'',
requestList: [], requestList: [],
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -77,7 +78,8 @@
}; };
}, },
onLoad() { onLoad(e) {
this.title = e.title;
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption(); this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
@ -116,7 +118,7 @@
methods: { methods: {
openRequestDetail(item) { openRequestDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: './inspectRequestDetail?id=' + item.id url: './inspectRequestDetail?id=' + item.id+'&title='+this.title
}); });
}, },
@ -169,7 +171,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("检验单申请(" + this.totalCount + ")"); updateTitle(this.title+"(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -189,7 +191,7 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
this.loadingType = ""; this.loadingType = "";
updateTitle("检验单申请"); updateTitle(this.title);
uni.hideLoading(); uni.hideLoading();
that.showMessage(error) that.showMessage(error)
}) })

4
src/pages/inspect/request/inspectRequestDetail.vue

@ -61,8 +61,12 @@
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
uni.setNavigationBarTitle({
title: option.title+'详情'
})
this.getDetail(); this.getDetail();
}, },
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {

10
src/pages/issue/request/issueRequest.vue

@ -62,6 +62,9 @@
requestInfoPopup, requestInfoPopup,
requestButton, requestButton,
}, },
onLoad(e){
this.title = e.title;
},
data() { data() {
return { return {
requestList: [], requestList: [],
@ -79,6 +82,7 @@
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
title:''
}; };
}, },
@ -119,7 +123,7 @@
methods: { methods: {
openRequestDetail(item) { openRequestDetail(item) {
uni.navigateTo({ 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.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("发料申请(" + this.totalCount + ")"); updateTitle(this.title+"(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
updateTitle("发料申请"); updateTitle(this.title);
this.loadingType = ""; this.loadingType = "";
that.showMessage(error.errMsg) that.showMessage(error.errMsg)
}) })

3
src/pages/issue/request/issueRequestDetail.vue

@ -67,6 +67,9 @@
}; };
}, },
onLoad(option) { onLoad(option) {
uni.setNavigationBarTitle({
title: option.title+'详情'
})
this.id = option.id; this.id = option.id;
this.getDetail(); this.getDetail();
}, },

7
src/pages/purchaseReceipt/job/purchaseReceipt.vue

@ -1,6 +1,6 @@
<template> <template>
<view class=""> <view class="">
<receipt-job scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job> <receipt-job :title="title" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
</view> </view>
</template> </template>
@ -14,7 +14,7 @@
}, },
data() { data() {
return { return {
title:''
}; };
}, },
onShow() { onShow() {
@ -22,6 +22,9 @@
this.$refs.receiptjob.refresh(); this.$refs.receiptjob.refresh();
} }
}, },
onLoad(option) {
this.title = option.title
},
onPullDownRefresh() { onPullDownRefresh() {
this.$refs.receiptjob.refresh(); this.$refs.receiptjob.refresh();

10
src/pages/purchaseReceipt/job/receiptJob.vue

@ -94,7 +94,11 @@
scanTitle: { scanTitle: {
type: String, type: String,
default: '箱标签' default: '箱标签'
} },
title: {
type: String,
default: ''
},
}, },
// onShow() { // onShow() {
@ -200,7 +204,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("采购收货任务(" + this.totalCount + ")"); updateTitle(this.title+"(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -213,7 +217,7 @@
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
updateTitle("采购收货"); updateTitle(this.title);
this.loadingType = ""; this.loadingType = "";
uni.hideLoading(); uni.hideLoading();
that.showMessage(error) that.showMessage(error)

5
src/pages/query/container.vue

@ -92,7 +92,10 @@
tabIndex: 0, tabIndex: 0,
}; };
}, },
onLoad() { onLoad(e){
uni.setNavigationBarTitle({
title: e.title
})
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {

5
src/pages/query/item.vue

@ -96,6 +96,11 @@
this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "more"); this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "more");
}, },
onLoad(e){
uni.setNavigationBarTitle({
title: e.title
})
},
mounted() { mounted() {
this.openScanPopup(); this.openScanPopup();
}, },

6
src/pages/query/location.vue

@ -87,7 +87,11 @@
totalCount:0 totalCount:0
}; };
}, },
onLoad() {}, onLoad(e){
uni.setNavigationBarTitle({
title: e.title
})
},
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();

13
src/pages/supplierDeliver/record/supplierDeliverRecord.vue

@ -64,10 +64,13 @@
todayTime: "", todayTime: "",
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
currentItem: {} currentItem: {},
title:''
}; };
}, },
onLoad(e){
this.title = e.title;
},
onShow() { onShow() {
this.getList('refresh'); this.getList('refresh');
}, },
@ -141,7 +144,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("供应商发货记录(" + this.totalCount + ")"); updateTitle(this.title+"(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -154,7 +157,7 @@
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
updateTitle("供应商发货记录"); updateTitle(this.title);
this.loadingType = ""; this.loadingType = "";
uni.hideLoading(); uni.hideLoading();
that.showMessage(error) that.showMessage(error)
@ -165,7 +168,7 @@
openJobDetail(item) { openJobDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: './supplierDeliverRecordDetail?id=' + item.masterId url: './supplierDeliverRecordDetail?id=' + item.masterId+'&title='+this.title
}); });
}, },

3
src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue

@ -87,6 +87,9 @@
}; };
}, },
onLoad(option) { onLoad(option) {
uni.setNavigationBarTitle({
title: option.title+'详情'
})
this.id = option.id; this.id = option.id;
this.getDetail(); this.getDetail();
}, },

Loading…
Cancel
Save