Просмотр исходного кода

销售预测详情样式调整

qymljy 2 лет назад
Родитель
Сommit
99ffd3b98e

+ 13 - 14
src/HDrpManagement/invoicePredictionManage/details/index.vue

@@ -167,7 +167,6 @@ export default {
           "sa_salesforecastbillid":this.$route.query.id
         }
       })
-      console.log(res.data,'1111')
       this.mainData = res.data
       this.changeDataStructure()
       this.listData()
@@ -339,20 +338,20 @@ export default {
       this.queryMainData()
     },
     goDetail(val){
-      let route = this.$route
-      if (route.path !== 'invoiceManagePredictionDetail') {
-        this.oldRoute = {path:route.path,query:route.query}
-        this.$store.dispatch('setHistoryRouter',this.oldRoute)
-      }
-      this.$router.push({
-        path:'/invoiceManagePredictionDetail',
-        query:{id:val.sa_salesforecastbillid,isDetail:1}
-      })
-      /*this.id = val.sa_salesforecastbillid
-      this.drawer = true
+      this.$store.dispatch('changeDetailDrawer',false)
       this.$nextTick(()=>{
-        this.$refs.subordinate.queryMainData()
-      })*/
+        let route = this.$route
+        if (route.path !== 'invoiceManagePredictionDetail') {
+          this.oldRoute = {path:route.path,query:route.query}
+          this.$store.dispatch('setHistoryRouter',this.oldRoute)
+        }
+
+        this.$router.push({
+          path:'/invoiceManagePredictionDetail',
+          query:{id:val.sa_salesforecastbillid,isDetail:1,isPredicion:1}
+        })
+        this.$store.dispatch('changeDetailDrawer',true)
+      })
     }
   },
   mounted() {

+ 15 - 19
src/HDrpManagement/projectPredictionManage/details/index.vue

@@ -88,7 +88,7 @@
        append-to-body
    >
      <div class="detail__panel">
-       <subordinateDetail :id="id" ref="subordinate"></subordinateDetail>
+       <subordinateDetail :id="$route.query.id" ref="subordinate"></subordinateDetail>
      </div>
    </el-drawer>
  </div>
@@ -153,7 +153,6 @@ export default {
           "sa_salesforecastbillid":this.$route.query.id
         }
       })
-      console.log(res.data,'1111')
       this.mainData = res.data
       this.changeDataStructure()
       this.listData()
@@ -316,25 +315,22 @@ export default {
       this.queryMainData()
     },
     goDetail(val){
-      console.log(val)
-      let route = this.$route
-      if (route.path !== 'projectManagePredictionDetail') {
-        this.oldRoute = {path:route.path,query:route.query}
-        this.$store.dispatch('setHistoryRouter',this.oldRoute)
-      }
-      this.$router.push({
-        path:'/projectManagePredictionDetail',
-        query:{id:val.sa_salesforecastbillid,isDetail:1}
-      })
-    }
-    /*goDetail(val){
-      console.log(val)
-      this.id = val.sa_salesforecastbillid
-      this.drawer = true
+      this.$store.dispatch('changeDetailDrawer',false)
+
       this.$nextTick(()=>{
-        this.$refs.subordinate.queryMainData()
+        let route = this.$route
+        if (route.path !== 'projectManagePredictionDetail') {
+          this.oldRoute = {path:route.path,query:route.query}
+          this.$store.dispatch('setHistoryRouter',this.oldRoute)
+        }
+        this.$router.push({
+          path:'/projectManagePredictionDetail',
+          query:{id:val.sa_salesforecastbillid,isDetail:1,isPredicion:1}
+        })
+        this.$store.dispatch('changeDetailDrawer',true)
       })
-    }*/
+
+    }
   },
   mounted() {
     this.queryMainData()

+ 15 - 3
src/components/normal-basic-layout/drawerDetail/drawer.vue

@@ -36,11 +36,23 @@ export default {
   },
   methods:{
     closeDrawer (done) {
+      console.log(this.historyRouter)
       if (this.historyRouter) {
+
         if (this.$route.query.isPredicion){
-          this.$store.dispatch('changeDetailDrawer',false)
-          this.$router.replace(this.historyRouter)
-          this.$store.dispatch('setHistoryRouter',null)
+          if (this.$route.query.isDetail){
+            this.$store.dispatch('changeDetailDrawer',false)
+            this.$router.replace(this.historyRouter)
+            this.$store.dispatch('setHistoryRouter',null)
+            this.$nextTick(()=>{
+              this.$store.dispatch('changeDetailDrawer',true)
+            })
+          }else {
+            this.$store.dispatch('changeDetailDrawer',false)
+            this.$router.replace(this.historyRouter)
+            this.$store.dispatch('setHistoryRouter',null)
+          }
+
         }else {
           this.$router.replace(this.historyRouter)
           this.$store.dispatch('setHistoryRouter',null)