achao пре 3 година
родитељ
комит
57aafe51d3
3 измењених фајлова са 43 додато и 8 уклоњено
  1. 1 1
      src/App.vue
  2. 6 4
      src/layout/index/top/index.vue
  3. 36 3
      src/views/houseSelfCollect/inspectionManagementNew.vue

+ 1 - 1
src/App.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="app">
-    <router-view />
+    <router-view v-if="isRouterAlive"/>
     <ws-common-loading v-if="isLoadding"></ws-common-loading>
     <!-- <rookie-training v-if="roles && roles.length"></rookie-training> -->
   </div>

+ 6 - 4
src/layout/index/top/index.vue

@@ -252,6 +252,7 @@
     name: 'top',
     data() {
       return {
+        index:0,
         //status1:已初检未称毛重状态 status2:已初检且已称毛重状态  status3:已复检且已称毛重  status4:已复检且已称皮重状态
         //status5:已确认质检且已称皮重且未结算状态  status6:已结算状态
         btnStatus: {
@@ -625,7 +626,7 @@
         console.log('当前已失去焦点状态')
         this.isOpenCodeGun = false
       },
-      goToPage(type) {
+      goToPage(type) {debugger
         var _saomadata = {}
         _saomadata.cangid = this.cangid
         _saomadata.id = this.toPageData.qualityInspectionManagement.id
@@ -648,9 +649,10 @@
         } else if (type === 3) {
            _saomadata.type = 3
            localStorage.setItem('saoma_data',JSON.stringify(_saomadata))
-            this.$router.push({
-          	name: 'inspectionManagementNew'
-          })
+          //   this.$router.push({
+          // 	name: 'inspectionManagementNew'
+          // })
+          this.$router.push({ path: 'inspectionManagement',query: {  id:this.index++ }})
         } else if (type === 4) {
            _saomadata.typeNo = 1
            _saomadata.monitorUrl1 = this.toPageData.warehouseBaseInfo.monitorUrl1

+ 36 - 3
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -401,7 +401,38 @@
     components: {
       inspectInfoPrint
     },
-    watch: {},
+    watch: {
+    '$route' (to, from) {
+      console.log(this)
+          this.selectWarehouse()
+       var _saomaData = JSON.parse(localStorage.getItem('saoma_data'))
+       if(_saomaData){//缓存中有值,证明扫码进来的
+         this.warehouseName = _saomaData.warehouseName
+         this.warehouseNameChange(this.warehouseName)
+          let ids={}
+         ids.id = _saomaData.id
+         this.listclick(ids)
+          if(_saomaData.type == 1){
+         this.statusTypetext = '初检'
+       }else if(_saomaData.type == 2){
+         this.statusTypetext = '确认'
+       }else if(_saomaData.type == 3){
+         this.statusTypetext = '复检'
+       }
+       this.serviceManagementType = _saomaData.managementType
+         localStorage.removeItem('saoma_data');//第一次进来结束后清除缓存
+       }else{
+          let _WarehouseName = localStorage.getItem('houseSelfCollect_house1')
+          _WarehouseName = JSON.parse(_WarehouseName)
+          if (_WarehouseName) {
+            this.warehouseNameChange(_WarehouseName.value)
+          }
+       }
+      // 对路由变化作出响应...
+      // this.routerParms.id=to.query.id
+      // this.reload()
+    },
+},
     data() {
       return {
         //分页
@@ -531,7 +562,7 @@
         // searchKeyWord:''
       }
     },
-    activated(){
+    activated(){debugger
        this.selectWarehouse()
        var _saomaData = JSON.parse(localStorage.getItem('saoma_data'))
        if(_saomaData){//缓存中有值,证明扫码进来的
@@ -557,7 +588,9 @@
           }
        }
     },
-    
+    mounted (){
+      debugger
+    },
     methods: {
       binNumberChange(e){
         for (let i = 0; i < this.positionInfos.length; i++) {