diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 4e8433d5..ffcea41f 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -5,7 +5,7 @@ - + @@ -31,7 +31,7 @@ {{ item.name }} - + @@ -366,9 +366,10 @@ const getDictory = () => { .catch((error) => {}) } -const openCheck = (url) => { +const openCheck = (item) => { + const name = item.name.split('\\n').join('') uni.navigateTo({ - url: `/${url}` + url: `/${item.path}?title=${name}` }) filterList.value = [] } diff --git a/src/pages/inspect/request/inspectRequest.vue b/src/pages/inspect/request/inspectRequest.vue index 824db5dd..0baf6d5a 100644 --- a/src/pages/inspect/request/inspectRequest.vue +++ b/src/pages/inspect/request/inspectRequest.vue @@ -34,6 +34,7 @@ import { getInspectRequestList, inspectRequestClose, inspectRequestApprove, insp import { getDetailOption, getDetailAndApproveOption, getDetailAndApprovePassAndApproveNoOption, getDetailAndHandleOption, getDetailAndAddAndCloseOption, getAddAgainOption } from '@/common/array.js' const { proxy } = getCurrentInstance() +const title = ref('') const requestList = ref([]) const pageNo = ref(1) const pageSize = ref(10) @@ -52,7 +53,8 @@ const loadingType = ref('nomore') const requestInfoPopupRef = ref() const filter = ref() const comMessageRef = ref() -onReady(() => { +onLoad((e) => { + title.value = e.title detailOptions.value = getDetailOption() detailAndApproveOptions.value = getDetailAndApproveOption() detailAndApprovePassAndApproveNoOption.value = getDetailAndApprovePassAndApproveNoOption() @@ -84,7 +86,7 @@ onNavigationBarButtonTap((e) => { }) const openRequestDetail = (item) => { uni.navigateTo({ - url: `./inspectRequestDetail?id=${item.id}` + url: `./inspectRequestDetail?id=${item.id}&title=${title.value}` }) } const openRequestInfoPopup = (item) => { @@ -146,13 +148,13 @@ const getList = (type) => { requestList.value = type === 'refresh' ? list : requestList.value.concat(list) pageNo.value++ - updateTitle(`检验单申请(${totalCount.value})`) + updateTitle(`${title.value}(${totalCount.value})`) }) .catch((error) => { if (type === 'refresh') { uni.stopPullDownRefresh() } - updateTitle('检验单申请') + updateTitle(title.value) loadingType.value = '' showMessage(error.errMsg) }) diff --git a/src/pages/inspect/request/inspectRequestDetail.vue b/src/pages/inspect/request/inspectRequestDetail.vue index d1deab4f..e0007260 100644 --- a/src/pages/inspect/request/inspectRequestDetail.vue +++ b/src/pages/inspect/request/inspectRequestDetail.vue @@ -42,6 +42,9 @@ const detailSource = ref([]) // 绑定在页面上的数据源 const jobDetailPopup = ref() onLoad((option) => { id.value = option.id + uni.setNavigationBarTitle({ + title: `${option.title}详情` + }) getDetail() }) // 返回首页 diff --git a/src/pages/issue/request/issueRequest.vue b/src/pages/issue/request/issueRequest.vue index 017b1d73..59fe6516 100644 --- a/src/pages/issue/request/issueRequest.vue +++ b/src/pages/issue/request/issueRequest.vue @@ -44,10 +44,14 @@ const addAgainOption = ref([]) const showOptions = ref([]) const fromType = ref('requestType') const loadingType = ref('nomore') +const title = ref('') const requestInfoPopupRef = ref() const filter = ref() const comMessageRef = ref() +onLoad((e) => { + title.value = e.title +}) onReady(() => { detailOptions.value = getDetailOption() detailAndApproveOptions.value = getDetailAndApproveOption() @@ -80,7 +84,7 @@ onNavigationBarButtonTap((e) => { }) const openRequestDetail = (item) => { uni.navigateTo({ - url: `./issueRequestDetail?id=${item.masterId}` + url: `./issueRequestDetail?id=${item.masterId}&title=${title.value}` }) } const openRequestInfoPopup = (item) => { @@ -125,13 +129,13 @@ const getList = (type) => { requestList.value = type === 'refresh' ? list : requestList.value.concat(list) pageNo.value++ - updateTitle(`发料申请(${totalCount.value})`) + updateTitle(`${title.value}(${totalCount.value})`) }) .catch((error) => { if (type === 'refresh') { uni.stopPullDownRefresh() } - updateTitle('发料申请') + updateTitle(title.value) loadingType.value = '' showMessage(error.errMsg) }) diff --git a/src/pages/issue/request/issueRequestDetail.vue b/src/pages/issue/request/issueRequestDetail.vue index 6f9f42f8..4fd44986 100644 --- a/src/pages/issue/request/issueRequestDetail.vue +++ b/src/pages/issue/request/issueRequestDetail.vue @@ -40,6 +40,9 @@ const type = ref('query') // 来源新增add, query查询 const titleInfo = ref({}) onLoad((option) => { + uni.setNavigationBarTitle({ + title: `${option.title}详情` + }) id.value = option.id getDetail() }) diff --git a/src/pages/purchaseReceipt/job/purchaseReceipt.vue b/src/pages/purchaseReceipt/job/purchaseReceipt.vue index d3285312..78c38850 100644 --- a/src/pages/purchaseReceipt/job/purchaseReceipt.vue +++ b/src/pages/purchaseReceipt/job/purchaseReceipt.vue @@ -1,15 +1,16 @@ diff --git a/src/pages/query/item.vue b/src/pages/query/item.vue index ffe9405f..d41195d0 100644 --- a/src/pages/query/item.vue +++ b/src/pages/query/item.vue @@ -64,6 +64,11 @@ filter.value.openFilter() } }) + onLoad((e)=>{ + uni.setNavigationBarTitle({ + title: e.title + }) + }) onMounted(() => { openScanPopup() }) diff --git a/src/pages/query/location.vue b/src/pages/query/location.vue index be243cf2..a5fad520 100644 --- a/src/pages/query/location.vue +++ b/src/pages/query/location.vue @@ -73,6 +73,11 @@ onNavigationBarButtonTap((e) => { onMounted(() => { openScanPopup() }) +onLoad((e) => { + uni.setNavigationBarTitle({ + title: e.title + }) +}) onPullDownRefresh(() => { getContentByTab(tabIndex.value, pageNo.value, pageSize.value, 'refresh') }) diff --git a/src/pages/supplierDeliver/record/supplierDeliverRecord.vue b/src/pages/supplierDeliver/record/supplierDeliverRecord.vue index ca9ff282..95116338 100644 --- a/src/pages/supplierDeliver/record/supplierDeliverRecord.vue +++ b/src/pages/supplierDeliver/record/supplierDeliverRecord.vue @@ -51,6 +51,7 @@ const todayTime = ref('') const detailOptions = ref([]) const detailGiveupOptions = ref([]) const currentItem = ref({}) +const title = ref('') const recordListPopupRef = ref() const recordInfoPopupRef = ref() const filter = ref() @@ -60,6 +61,9 @@ onShow(() => { getList('refresh') }) }) +onLoad((e) => { + title.value = e.title +}) onReady(() => { detailOptions.value = getDetailOption() }) @@ -123,7 +127,7 @@ const getList = (type) => { const { list } = res.data totalCount.value = res.data.total - updateTitle(`供应商发货记录(${totalCount.value})`) + updateTitle(`${title.value}(${totalCount.value})`) loadingType.value = 'loadmore' if (list == null || list.length == 0) { loadingType.value = 'nomore' @@ -136,7 +140,7 @@ const getList = (type) => { if (type === 'refresh') { uni.stopPullDownRefresh() } - updateTitle('供应商发货记录') + updateTitle(title.value) loadingType.value = '' uni.hideLoading() showMessage(error) @@ -145,7 +149,7 @@ const getList = (type) => { const openJobDetail = (item) => { uni.navigateTo({ - url: `./supplierDeliverRecordDetail?id=${item.masterId}` + url: `./supplierDeliverRecordDetail?id=${item.masterId}&title=${title.value}` }) } diff --git a/src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue b/src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue index 6631eb14..ab22dda7 100644 --- a/src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue +++ b/src/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue @@ -59,6 +59,9 @@ const businessTypeInfo = ref({}) const managementList = ref([]) const recordDetailPopup = ref() onLoad((option) => { + uni.setNavigationBarTitle({ + title: `${option.title}详情` + }) id.value = option.id getDetail() })