zuozhengqing
2024-01-03 2e99f3e099c8541808312eae125c7af5a498e122
修改出入库明细headerTitle刷新丢失的问题
2个文件已修改
17 ■■■■■ 已修改文件
src/router/index.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/AddOverviewDialog.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -168,14 +168,27 @@
router.afterEach((to, from, next) => {
  if(window.sessionStorage.getItem('routeName')){
    if(to.path === "/overview/overviewList"&&to.meta.title!="采购入库"){
      window.sessionStorage.setItem("routeName",to.params.name)
      to.meta.title=to.params.name
    }else if(to.meta.title==="采购入库"){
      to.meta.title = window.sessionStorage.getItem('routeName');
    }
  }else{
  if ((to.path === "/overview/overviewList" || to.path === "/productManage/productList") && to.params.name) {
    console.log(from, next)
    to.meta.title = to.params.name
      window.sessionStorage.setItem("routeName",to.params.name)
      to.meta.title = window.sessionStorage.getItem('routeName');
    // document.title = to.meta.title
  } else if (to.name === "inboundOutboundDetail") {
    to.meta.title = "入库明细报表"
    // document.title = to.meta.title
    }else{
      // window.sessionStorage.removeItem("routeName")
  }
  }
})
// router.beforeEach((to, from, next) => {
// must call `next`
src/views/overview/AddOverviewDialog.vue
@@ -767,6 +767,7 @@
              })
            }
            // 产品列表解构
            if(this.editConfig.title === "编辑"){
            let arr=[]
            if(this.workType===1){
              params.details.map((item)=>{
@@ -799,6 +800,7 @@
              })
              params.details=arr
            }
            }
            let requestUrl = this.editConfig.title === "新建" ? addOperation : updateOperation
            // let params = this.saveParams()
            requestUrl({